home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / cpm / 1623 < prev    next >
Encoding:
Text File  |  1993-01-23  |  1.4 KB  |  39 lines

  1. Newsgroups: comp.os.cpm
  2. Path: sparky!uunet!cs.utexas.edu!torn!utzoo!telly!druid!darcy
  3. From: darcy@druid.uucp (D'Arcy J.M. Cain)
  4. Subject: Re: 8080/8085/Z80 Code Identifier
  5. Message-ID: <1993Jan23.042048.11708@druid.uucp>
  6. Date: Sat, 23 Jan 1993 04:20:48 GMT
  7. References: <2411@sousa.tay.dec.com>
  8. Organization: D'Arcy Cain Consulting
  9. Lines: 28
  10.  
  11. secrist@msdsws.enet.dec.com (Strong datatypes for weak minds.) writes:
  12. >Not that it'd be hard to write, but does anybody have some code you
  13. >can feed a random .COM file to and have it tell you whether or not it's
  14. >pure 8080, 8085, or Z80 code ?
  15.  
  16. It may not be quite as simple as you think.  How do you know if you are
  17. looking at code, data or random garbage?  What you want is a superset
  18. of a disassembler and those generally need a lot of user interventioon.
  19.  
  20. Consider the following:  (This is based on actual code)
  21.  
  22.    ...
  23.    call print
  24.    db   'Hello, world', CR, LF, 0
  25.    mov  a, b
  26.    ...
  27.  
  28. The print function would pull the string off the stack, print it and adjust
  29. the stack pointer before returning.  How would you determine the start of
  30. data there and if you did how would you know where it ended?  If you are
  31. lucky someone has already written what you want.  If not, this is not a
  32. knock-off project by any means.
  33.  
  34. -- 
  35. D'Arcy J.M. Cain (darcy@druid.com)  |
  36. D'Arcy Cain Consulting              |   There's no government
  37. Toronto, Ontario, Canada            |   like no government!
  38. +1 416 424 2871          DoD#0082   |
  39.