Reply to post:

RIP Dr Peuto, Zilog and Sun's bright SPARC

AndrueC Silver badge
Boffin

Ah yes, the old register exchange shuffle. And for hard core you could access the high and low bytes of the index registers. Actually using them for indexing was in any case quite slow. That was one reason why I didn't like the 6502. Having taught myself assembler on the Z80 having to constrain myself to only one register or trust in the speed of page zero felt weird.

The other reason was that I just preferred the syntax. <operation> <target>, [<source>] and ()s to indicate an address reference seems more intuitive.

LD HL,1234

LD A, (HL)

or

LD A, (1234)

For the uninitiated both read memory location 1234 into the accumulator. The use of HL demonstrates the Z80s partial support for 16 bit values. It could do 16 bit arithmetic:

LD HL,1234

LD DE, 5678,

ADD HL,DE

Although there were faster ways of doing it, thus betraying its 8-bit nature.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon