I know that LDA, LDX, and LDY instructions typically set/clear the (N)egative and (Z)ero flags based on the byte value that gets loaded into the register. I thought I remember reading somewhere that this is NOT the case with immediate addressing (e.g. LDA #$0F), but can no longer find reference to that. It doesn't seem like setting the flags on such operations would add any value, so it would make sense if it doesn't. I don't know if I am misremembering.
Does a 6502 register load (LDA, LDX, LDY) modify the N and Z flags in immediate addressing mode?
100 views Asked by ge97aa At
1
I was able to get an old Apple IIc up and running, and have since confirmed (on a 65C02 anyway), that the load instructions DO affect the N and Z flags in immediate addressing mode.