RosettaCodeData/Task/Deepcopy/6502-Assembly/deepcopy-2.6502

6 lines
295 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
LDA $00 ;read the byte at memory address $00
STA $20 ;store it at memory address $20
INC $00 ;add 1 to the original
CMP $00 ;compare the copy to the original (we could have done LDA $20 first but they're the same value so why bother)
BNE notEqual ;this branch will be taken.