Sorcery icon indicating copy to clipboard operation
Sorcery copied to clipboard

NMI handler destroys flags before saving context

Open calc84maniac opened this issue 4 months ago • 0 comments

The LD HL, I instruction, as used here, is documented to affect flags, which causes an incorrect save of the F register in the NMI context. (The flags are actually affected differently than the documentation, but they are affected regardless, so the issue remains.) https://github.com/TheMachine02/Sorcery/blob/b245ea1f98e55f1554b1213426d47711fb5b094f/kernel/nmi.asm#L22

calc84maniac avatar Sep 13 '25 16:09 calc84maniac