forked from martinpiper/ACME
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test.a
78 lines (63 loc) · 823 Bytes
/
Test.a
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
!to "Test.prg", cbm
!sal ; Causes the label saving routines to also dump out local labels
!sl "Test.map" ; Save all labels
!svl "Test.lbl" ; Save referenced labels in VICE format
!pdb "Test.pdb" ; Save PDB format data
!source "ACME_Lib/6502/std.a"
!cpu 6510
!ct pet
!macro MFOO {
lda #0
sta $500
}
!initmem $77
localLabel = 1234
*=$400
main
GlobalLabel
sei
lda #0
sta $400
+MFOO
+MFOO
+MFOO
+MFOO
.loop
jsr .localLabel
jsr Foo2
inc $d020
jmp .loop
rts
.localLabel
lda GlobalLabel
lda .localLabel
rts
!zn {
Foo2
.reallyLocal
lda .reallyLocal
+MFOO
jsr Foo3
rts
}
!zn
.anotherLocal
Foo3
lda .anotherLocal
+inc16 $700
!zn
.anotherLocal2
lda .anotherLocal2
rts
!by $12
*=*+13
!by $32
!zn
UnusedCode
inc $d021
rts
!bin ".gitIgnore",,,4
foo = 1
!ifndef foo {
!error "foo not defined!"
}