I know that.wimoos wrote:Just like the Zp $03-$06 and $FB-FE are never used in CBM Basic or the Kernal, there is no instance of a SED. So a CLD would not be needed....
Don't you think that doesn't preclude that user programs might use decimal mode?
That consideration is especially important, as the free memory display is supposed to run with essentially arbitrary user programs in the foreground.
Actually, we both face another slight problem: $03 .. $06 and $FB .. $FE are now effectively unusable for all foreground processes. Their contents ought to be put on stack during the ISR like this:
Code: Select all
[...]
LDX #4
.loop1
LDA $02,X
PHA
LDA $FA,X
PHA
DEX
BNE loop1
[...]
LDX #1
.loop2
PLA
STA $FA,X
PLA
STA $02,X
INX
CPX #5
BNE loop2
[...]