Hello.
I have a really quick question about dealing with endless loops and NMIs. So you have an endless loop checking if a byte is a certain value, like this:
loop:
lda $FF
bpl loop
blah blah code
It's checking if $FF is below $80, so when it isn't, then the code afterwards can be executed. I know that you have to save the A, X, and Y registers if you want them to be the same at the beggining of your NMI routine. But, is it possible for something like this to happen?:
loop:
lda (NMI happens here) $FF
bpl loop
Where it would completely ruin everything? Or does the 6502 do an instruction along with it's value at the same time?
I have a really quick question about dealing with endless loops and NMIs. So you have an endless loop checking if a byte is a certain value, like this:
loop:
lda $FF
bpl loop
blah blah code
It's checking if $FF is below $80, so when it isn't, then the code afterwards can be executed. I know that you have to save the A, X, and Y registers if you want them to be the same at the beggining of your NMI routine. But, is it possible for something like this to happen?:
loop:
lda (NMI happens here) $FF
bpl loop
Where it would completely ruin everything? Or does the 6502 do an instruction along with it's value at the same time?