-
Notifications
You must be signed in to change notification settings - Fork 2
/
Test.Z80
108 lines (94 loc) · 1.56 KB
/
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
org $8000
ld a, 0
GREEN_ADDR equ $C000
GREEN_PTN_DEF equ 0000_1111b
GREEN_A equ 0000_0001b
GREEN_B equ 0000_0010b
GREEN_C equ 0000_0100b
PORT_A equ $CC
.SET_DATA equ $01
TEST_ADDR1 equ FFEEH
TEST_ADDR2 equ 0FFEEH
TEST_ADDR3 equ 0xF8F1
LD HL, GREEN_ADDR
LD DE, $
LD A, GREEN_PTN_DEF
LD A, GREEN_A | GREEN_B | GREEN_C
LD B, GREEN_ADDR.@H
LD C, GREEN_ADDR.@L
LD A, PORT_A.SET_DATA
OUT (PORT_A), A
LD HL, TEST_ADDR1
LD HL, TEST_ADDR2
LD HL, TEST_ADDR3
NOP
NOP
NOP
ForwardLabel:
LD (.stack), SP
NOP
.stack equ $ + 1
LD SP, 0
LocalLabel:
.C equ 0
.CP equ 1
.D equ 2
.DP equ 3
.E equ 4
.F equ 5
.FP equ 6
.G equ 7
.GP equ 8
.A equ 9
.AP equ 10
.B equ 11
NOP
AtmarkTest: dw .@1, .@2, .@3
NOP
.@1 db 1, 2, 3
.@2 db 4, 5, 6
.@3 db 7, 8, 9
NOP
NOP
NOP
NOP
NOP
NOP
NOP
ld bc, EqualTest1.@1 * 256 + EqualTest2.@1
;ld bc, %00110110 * 256 + %00001100
ld a, EqualTest1.All
ld a, EqualTest2.All
ld hl, SF.FST
ld hl, SF.MAP
EqualTest1:
.@1 equ %00110110 ; 1
.@2 equ %01110110 ; 2
.@3 equ %10110110 ; 3
.All equ (.@1 | .@2 | .@3)
EqualTest2:
.@1 equ %00001100 ; 1
.@2 equ %00001101 ; 2
.@3 equ %00001110 ; 3
.All equ (.@1 | .@2 | .@3)
SF: equ 00000H
SF.RS equ 00000H
SF.FST equ 00005H
SF.MAP: equ 0C000H
ABCLabel equ $1234 ; リスティングファイル検証用
LABEL_A equ "A"
LABEL_HL equ "HL"
DS 3
ld A, LABEL_A
ld hl, LABEL_HL
TEST.1CH equ 00000H
TEST.2CH equ 00001H
TEST.3CH equ 00002H
TEST.0 equ 00003H
TEST.A equ 00004H
TEST.LD equ 00005H
LABELTEST:equ 0006H
ld a, low $0123
ld a, high $0123
LB EQU 0xFF1234
LD HL, LB