summaryrefslogtreecommitdiff
path: root/test/stack-frame.s
blob: fefb3d03a516fae559b30b6c8f007bf5b83ead87 (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
33
34
35
36
37
; Testing stack frames.
; Written by mr b0nk 500 <b0nk@b0nk.xyz>

.org $0
var:
	.byte 0

.org $8000
reset:
	cps		;
	ldx.d #$2FFFF	;
	txs		;
	lda #0		;
	tay		;
	tax		;
	tab		;
	sta.q var	;
start:
	inc		;
	pha		;
	ldb sp+1	;
	pla		;
	sta var		;
	ldy #var	;
	phy.q		;
	ldb (sp+1)	;
	ply.q		;
	ldb (sp-7)	;
	bra start	;

.org $FFC0
.qword reset
a
;.org reset
;v
;q
d