From cb186b0f3b5e605c3296c1eb2e8f46d1041ea03b Mon Sep 17 00:00:00 2001 From: n loewen Date: Wed, 2 Aug 2023 15:09:35 +0100 Subject: [PATCH] Create test program for ADD and SUB --- test-programs/add-sub.asm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test-programs/add-sub.asm diff --git a/test-programs/add-sub.asm b/test-programs/add-sub.asm new file mode 100644 index 0000000..2052728 --- /dev/null +++ b/test-programs/add-sub.asm @@ -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 \ No newline at end of file