-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmacros.s
44 lines (35 loc) · 1 KB
/
macros.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
processor 6502
mac VarBase
NEXT_VAR set {1}
endm
mac Var
{1} = NEXT_VAR
NEXT_VAR set NEXT_VAR + 1
endm
mac VarRange
{1} = NEXT_VAR
NEXT_VAR set NEXT_VAR + {2}
endm
mac CheckVarBase
if NEXT_VAR > {1}
err
endif
endm
mac CodeStart
if NEXT_VAR > {1}
err
endif
org {1}
endm
; BIT instruction for skipping the next 1- or 2-byte instruction
mac skip1
dc.b $24
endm
mac skip2
dc.b $2c
endm
mac CheckScriptEnd
if * > $fffa
err
endif
endm