summaryrefslogtreecommitdiff
path: root/test/stack-frame.s
blob: 6e64b8648ab8c27a0b35542db5c3b020ff49e9e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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