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.s32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/stack-frame.s b/test/stack-frame.s
new file mode 100644
index 0000000..6e64b86
--- /dev/null
+++ b/test/stack-frame.s
@@ -0,0 +1,32 @@
+; Testing stack frames.
+; Written by mr b0nk 500 <b0nk@b0nk.xyz>
+
+.org $8000
+reset:
+ cps ;
+ ldx.w #$FFFF ;
+ txs ;
+ lda #0 ;
+ tay ;
+ tax ;
+ tab ;
+start:
+ inc ;
+ pha ;
+ ldb sp, $1 ;
+ pla ;
+ sta $0 ;
+ phy.q ;
+ ldb (sp, $8) ;
+ ply.q ;
+ ldb (sp, -$8) ;
+ bra start ;
+
+.org $FFC0
+.qword reset
+a
+;.org reset
+;v
+;q
+d
+