So, nestest.log contains the following two PLPs:
... and ...
What exactly happens to the P regiser? In both cases the B bit is coming out as zero which from what I researched seems to be the right thing due to it not being really in the register and how it's used to signal hardware interrupts, etc.
But in the second case that 0x04 is turning into a 0x24... what about that bit 5? Where did it come from?
Code:
C824 48 PHA A:FF X:00 Y:00 P:AD SP:FB CYC: 86 SL:243
C825 28 PLP A:FF X:00 Y:00 P:AD SP:FA CYC: 95 SL:243
C826 D0 09 BNE $C831 A:FF X:00 Y:00 P:EF SP:FB CYC:107 SL:243
C825 28 PLP A:FF X:00 Y:00 P:AD SP:FA CYC: 95 SL:243
C826 D0 09 BNE $C831 A:FF X:00 Y:00 P:EF SP:FB CYC:107 SL:243
... and ...
Code:
C838 48 PHA A:04 X:00 Y:00 P:6D SP:FB CYC:152 SL:243
C839 28 PLP A:04 X:00 Y:00 P:6D SP:FA CYC:161 SL:243
C83A F0 09 BEQ $C845 A:04 X:00 Y:00 P:24 SP:FB CYC:173 SL:243
C839 28 PLP A:04 X:00 Y:00 P:6D SP:FA CYC:161 SL:243
C83A F0 09 BEQ $C845 A:04 X:00 Y:00 P:24 SP:FB CYC:173 SL:243
What exactly happens to the P regiser? In both cases the B bit is coming out as zero which from what I researched seems to be the right thing due to it not being really in the register and how it's used to signal hardware interrupts, etc.
But in the second case that 0x04 is turning into a 0x24... what about that bit 5? Where did it come from?