-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.s
84 lines (65 loc) · 1.43 KB
/
test.s
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
;
; File generated by cc65 v 2.18 - Ubuntu 2.18-1
;
.fopt compiler,"cc65 v 2.18 - Ubuntu 2.18-1"
.setcpu "6502"
.smart on
.autoimport on
.case on
.debuginfo off
.importzp sp, sreg, regsave, regbank
.importzp tmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4
.macpack longbranch
.forceimport __STARTUP__
.export _testm
.export _tests
.export _main
; ---------------------------------------------------------------
; void __near__ testm (unsigned char, unsigned char)
; ---------------------------------------------------------------
.segment "CODE"
.proc _testm: near
.segment "CODE"
jsr pusha
ldy #$01
ldx #$00
lda (sp),y
sta $0010
ldy #$00
ldx #$00
lda (sp),y
sta $0011
jsr incsp2
rts
.endproc
; ---------------------------------------------------------------
; void __near__ tests (unsigned char)
; ---------------------------------------------------------------
.segment "CODE"
.proc _tests: near
.segment "CODE"
jsr pusha
ldy #$00
ldx #$00
lda (sp),y
sta $0010
jsr incsp1
rts
.endproc
; ---------------------------------------------------------------
; int __near__ main (void)
; ---------------------------------------------------------------
.segment "CODE"
.proc _main: near
.segment "CODE"
jsr decsp1
ldx #$00
lda #$04
ldy #$00
sta (sp),y
ldx #$00
lda #$00
jmp L0009
L0009: jsr incsp1
rts
.endproc