diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/reg-transfer.s | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/reg-transfer.s b/test/reg-transfer.s new file mode 100644 index 0000000..580020c --- /dev/null +++ b/test/reg-transfer.s @@ -0,0 +1,23 @@ +; Test register transfer instructions. +; +; by mr b0nk 500 <b0nk @b0nk.xyz> + +cps +inc ; Increment the accumulator. +tay ; Transfer the accumulator to the y register. +tax ; Do the same thing, but with the x register. +jmp $1 ; Loop forever. + +.org $8000 +cps +inc ; Increment the accumulator. +tay ; Transfer the accumulator to the y register. +tax ; Do the same thing, but with the x register. +jmp $1 ; Loop forever. + +.org $FF50 +.qword $8000 + +; Execute the program. +done + |