Re:Why xor eax, eax?
by vanderZwan on Tuesday December 02, 2025 @03:56AM
(#46119104)
> What is this "LD A, 0" syntax? Is it a z80 thing?
Well, I never wrote any 6502 so I can't compare, but yes, you could load immediate values into any register except the flag register on the Z80. Was that not a thing on the 6502?
Re:Why xor eax, eax?
by jgrahamc on Wednesday December 03, 2025 @02:15PM
(#46138667)
The 6502 instruction set was really limited but there were three registers: A, X, Y and there were immediate load instructions for each: LDA #0, LDX #0, LDY #0.
Well, I never wrote any 6502 so I can't compare, but yes, you could load immediate values into any register except the flag register on the Z80. Was that not a thing on the 6502?