| ▲ | vanderZwan 10 hours ago | ||||||||||||||||
Hah, we commented on the exact same paragraph within a minute of each other! My memory agrees with your memory, although I think that should be 3E 00. Let me look that up: https://jnz.dk/z80/ld_r_n.html Yep, if I'm reading this right that's 3E 00, since the second byte is the immediate value. One difference between XOR and LD is that LD A, 0 does not affect flags, which sometimes mattered. | |||||||||||||||||
| ▲ | sfink 4 hours ago | parent | next [-] | ||||||||||||||||
What is this "LD A, 0" syntax? Is it a z80 thing? One of the random things burned into my memory for 6502 assembly is that LDA is $A9. I never separated the instruction from the register; it's not like they were general purpose. But that might be because I learned programming from the 2 books that came with my C64, a BASIC manual and a machine code reference manual, and that's how they did it. I learned assembly programming by reading through the list of supported instructions. That, and typing in games from Compute's Gazette and manually disassembling the DATA instructions to understand how they worked. Oh, and the zero-page reference. Good times. | |||||||||||||||||
| |||||||||||||||||
| ▲ | jgrahamc 10 hours ago | parent | prev [-] | ||||||||||||||||
You're right. Of course, it's 3E 00. Not sure how I remembered 3E 01. My only excuse is that it was 40 years ago! | |||||||||||||||||