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