Code: Select all
LDX COUNT
WATCH LDA STATUS
BPL WATCH
LDA INPUT
PHA
DEX
BNE WATCH
He then discusses what would happen if the data you wanted to transfer was > 256 words and to large for the stack. To deal with this, he proposes to modify the code to this:
Code: Select all
LDY #0
WATCH LDA STATUS
BPL WATCH
STA (POINTER), Y
INC (POINTER)
DEC COUNT
BNE WATCH
I have been thinking about this for a while and cannot figure out his motivation here. Does anyone have any thoughts? Thanks