-
Notifications
You must be signed in to change notification settings - Fork 5
/
MAC2.ASM
63 lines (62 loc) · 1.01 KB
/
MAC2.ASM
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
*CLICK AN AUDIT COUNTER
*DESTROYS A0
AUDIT $MACRO P1
MOVI :P1:,A0
CALLA AUD1
$END
*
*AUDIT A WORD LONG RAM LOCATION
*P1 = AUDIT
*P2 = RAM LOCATION
*DESTROYS A0,A1
AUDITCNT $MACRO P1,P2
MOVE @:P2:,A1,W
MOVI :P1:,A0
CALLA AUD
$END
*
*GET A GAME ADJUSTMENT VALUE
*RETURNS ADJUSTMENT VALUE IN A0
ADJUST $MACRO P1
MOVI :P1:,A0
CALLA GET_ADJ
$END
*CLICK AN AUDIT COUNTER
*DESTROYS A0
AUDIT $MACRO P1
MOVI :P1:,A0
CALLA AUD1
$END
*
*AUDIT A WORD LONG RAM LOCATION
*P1 = AUDIT
*P2 = RAM LOCATION
*DESTROYS A0,A1
AUDITCNT $MACRO P1,P2
MOVE @:P2:,A1,W
MOVI :P1:,A0
CALLA AUD
$END
*
*GET A GAME ADJUSTMENT VALUE
*RETURNS ADJUSTMENT VALUE IN A0
ADJUST $MACRO P1
MOVI :P1:,A0
CALLA GET_ADJ
$END
*
*FCALL - FUNCTION CALL WITHOUT USING THE SYSTEM STACK
* FCALL ROUTINE, BREG
*
FCALL $MACRO NAME, BREG
MOVI :NAME:, :BREG:, L
EXGPC :BREG:
$END
*
*FRET - FUNCTION RETURN WITHOUT USING THE SYSTEM STACK
* FCALL ROUTINE, BREG
*
FRET $MACRO BREG
EXGPC :BREG:
$END