home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / zplot10a.lbr / NOTE.ZZ8 / NOTE.Z28
Encoding:
Text File  |  1993-06-07  |  1.5 KB  |  32 lines

  1.         Notes on Z280 version by Greg Trice
  2.         -----------------------------------
  3.  
  4. Here's a real Z280 applications program! Zplot was ideal in many ways for 
  5. demonstrating the advantages of the Z280. It is very multiplication and 
  6. division intensive, and has a lot of 16-bit arithmetic. Several new 
  7. instructions are used, saving many bytes of code. Specifically, the following 
  8. may be noticed:
  9.  
  10. LD HL,(HL). Used in the parse routine, it saves using the IX register at all. In 
  11. any application involving selecting an address from a table and dispatching to 
  12. it, the combination of LD HL,(HL) and JP (HL) is hard to beat.
  13.  
  14. CPW. A real code-saver. Previously to compare two 16-bit numbers, SBC had to be 
  15. used. It destroyed the HL contents and required the carry flag to be zeroed 
  16. before use. Furthermore CPW can have one operand in memory, saving a register.
  17.  
  18. ADD HL,A. Very useful in addressing small tables, again avoiding the use of 
  19. another 16-bit register.
  20.  
  21. INC (addr). One instruction instead of three. Greatly reduces the penalty for 
  22. keeping variables in memory rather than registers.
  23.  
  24.  Of course the multiply and divide instructions are heavily used. Note the 
  25. richness of these instructions; byte and word length, signed or unsigned are 
  26. all available.
  27.  
  28.  As yet I haven't made the whole program relocatable (by using PC-relative 
  29. addressing). For this application it's probably not worthwhile, but for writing 
  30. TSR type utilities it's just the thing.
  31.  
  32.