summaryrefslogtreecommitdiff
path: root/test/stack-frame.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/stack-frame.s')
-rw-r--r--test/stack-frame.s14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/stack-frame.s b/test/stack-frame.s
index 6e64b86..0f631b9 100644
--- a/test/stack-frame.s
+++ b/test/stack-frame.s
@@ -1,6 +1,10 @@
; Testing stack frames.
; Written by mr b0nk 500 <b0nk@b0nk.xyz>
+.org $0
+var:
+ .byte 0
+
.org $8000
reset:
cps ;
@@ -10,16 +14,18 @@ reset:
tay ;
tax ;
tab ;
+ sta.q var ;
start:
inc ;
pha ;
- ldb sp, $1 ;
+ ldb sp+1 ;
pla ;
- sta $0 ;
+ sta var ;
+ ldy #var ;
phy.q ;
- ldb (sp, $8) ;
+ ldb (sp+1) ;
ply.q ;
- ldb (sp, -$8) ;
+ ldb (sp-7) ;
bra start ;
.org $FFC0