There is a lot of great unofficial documentation out there for the Z80 - clever programmers have reverse-engineered almost everything there is to know about that venerable CPU. And a lot of that information, which is missing or inaccurate in the official CPU documentation, has turned out to be really useful for programming.

There doesn't seem to be much documentation out there for the eZ80, though. The official documentation is vague in many areas, extremely dubious in others (MADL affecting RST?) and in other places I just don't trust the authors to have gotten all the details right. So how about a thread where we can try to collect the important questions and answers?

Here are a few things I've found so far:

16-bit math operations
All of the following instructions set HLu to zero:


INC is documented; the others aren't.

Loads with strange prefixes
All of the following instructions set HLu to zero:

LD.SIS HL, 1234h
LD.LIS HL, 1234h
LD.SIL HL, 123456h

16-bit EX and EXX instructions
EX.SIS DE, HL sets both DEu and HLu to zero.
EXX.SIS swaps HLu with HLu' (equivalent to EXX.LIL.)

Instructions that are only documented as having 16-bit results
Both MLT.SIS HL and MLT.LIL HL set HLu to zero.
LD.SIS HL,I sets HLu to zero.
LD.LIL HL,I sets HLu to MB (I think.)

And here are a few questions I haven't yet answered:

- MADL and RST: please tell me the documentation is wrong about this, at least.
- PC and MB: is the program counter only 16 bits in Z80 mode, or do .IS jumps copy MB into PCu?
- Mixed mode CALLs and RSTs: what happens in all the undocumented cases? (Is it the prefix, or the original CPU mode, that determines what gets pushed?)
- Aside from CALL, RST, and RET, are there any instructions that behave differently when used with the "default" prefix?
- Are there any undocumented instructions?
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum