Create test program for ADD and SUB

This commit is contained in:
n loewen 2023-08-02 15:09:35 +01:00
parent 8b4a670b29
commit cb186b0f3b
1 changed files with 18 additions and 0 deletions

18
test-programs/add-sub.asm Normal file
View File

@ -0,0 +1,18 @@
;; test addition and substraction
; with direct addressing...
LDA $FE
ADD $01 ; $FF
ADD $01 ; $00 + CF=1
ADD $01 ; $01 + CF=0
SUB $01 ; $00 + CF=0
SUB $01 ; $FF + CF=1
; and with indirect...
LDA $01
STO $00
LDA $FE
ADD ($00) ; $FF
ADD ($00) ; $00 + CF=1
ADD ($00) ; $01 + CF=0
SUB ($00) ; $00 + CF=0
SUB ($00) ; $00 + CF=1
END