diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2020-10-06 08:02:23 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2020-10-06 08:02:23 -0400 |
commit | 8aa8586b03568d3a3d6eba39269a1b79510bc835 (patch) | |
tree | b674ea424fd816fe4219b4423c2e3544b1ff58ce /test/add-sub.s | |
parent | 8c880c339000010260a927c3a0f28f9049b8a0b8 (diff) |
- Made the stack pointer 64 bit, rather than 16 bit.
This is to allow for making the stack bigger for
anything that needs to change the size of it.
- Made the SuB Suite set the stack pointer to the end
of the usable RAM, and allow for changing the stack
size.
In this case, the size of the stack is currently set
to 192K, with the end of the heap being just below
the stack.
Diffstat (limited to 'test/add-sub.s')
-rw-r--r-- | test/add-sub.s | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/add-sub.s b/test/add-sub.s index 3dfdca4..d923cdc 100644 --- a/test/add-sub.s +++ b/test/add-sub.s @@ -6,7 +6,7 @@ .org 0 reset: cps ; Clear the processor status register. - ldx.w #$FFFF ; Reset the stack pointer. + ldx.d #$2FFFF ; Reset the stack pointer. txs ; and #0 ; Reset A. tab ; Reset B. @@ -15,11 +15,11 @@ up: inc ; Increment the counter. cmp #$FF ; Did the accumulator overflow? bcs down ; Yes, so start decrementing. - jmp up ; No, so keep incrementing. + bra up ; No, so keep incrementing. down: dec ; Did the accumulator underflow? beq up ; Yes, so start incrementing. - jmp down ; No, so keep decrementing. + bra down ; No, so keep decrementing. .org $FFC0 .qword reset |