-
Notifications
You must be signed in to change notification settings - Fork 2
/
Test.Z80
108 lines (80 loc) · 989 Bytes
/
Test.Z80
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[MAIN]
ARG1 equ 2
.Three equ 3
VRAM_ADDRESS equ $8001
ORG $9000
ALLLD
ADDR: TestArg 0, 1
TestArg ARG1, ARG1.Three
VRAMSET VRAM_ADDRESS
VRAMSET ADDR
REPEAT_TEST
MACRO_IN_MACRO ADDR, 0, 1
READ_LABEL
REPEAT_JR 3
TESTSTOP()
TESTRESUME()
ALLLD MACRO
ld a,1
ld b,2
ld c,3
ld d,4
ld e,5
ld h,6
ld l,7
ENDM
TestArg macro a1, a2
ld a, a1
ld b, a2
endm
VRAMSET macro VRAM_ADDRESS
ld H, VRAM_ADDRESS.@H
ld L, VRAM_ADDRESS.@L
endm
REPEAT_TEST macro
REPT 2
xor a
ENDM
REPT 3 LAST - 1
ld a,1
ld b,2
ENDM
endm
MACRO_IN_MACRO macro VRAM_ADDRESS, a11, a22
MAIN.VRAMSET VRAM_ADDRESS
main.TestArg a11, a22
endm
READ_LABEL macro
ld hl, ADDR
endm
REPEAT_JR macro TEST
ld a, TEST
jr nz, .lp
MAIN.READ_LABEL
REPT 2
xor a
ENDM
ld a, 0
.lp
endm
TESTSTOP() MACRO
nop ;コメントテスト
nop
nop
nop
nop
nop
nop
nop
ENDM
TESTRESUME() MACRO
XOR A
XOR A
XOR A
XOR A
XOR A
XOR A
XOR A
XOR A
ENDM
END