RosettaCodeData/Task/Call-a-function/6502-Assembly/call-a-function-2.6502

7 lines
202 B
Plaintext

sum:
;adds the values in zero page address $00 and $01, outputs to accumulator.
LDA $00 ;load the byte stored at memory address $0000
CLC
ADC $01 ;add the byte at memory address $0001
RTS ;return