-
Notifications
You must be signed in to change notification settings - Fork 0
/
129-screen-addressing.lst
103 lines (103 loc) · 1.98 KB
/
129-screen-addressing.lst
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
SCREEN_ADR EQU 4000
ENTRY_POINT EQU 8000
ORG 8000
8000: label start
8000:060F LD B, 0F
8002:0E03 LD C, 03
8004:CD1680 CALL 8016
8007:CD2580 CALL 8025
800A:060F LD B, 0F
800C:0E06 LD C, 06
800E:CD1680 CALL 8016
8011:CD2580 CALL 8025
8014: label finish
8014:18FE JR 8014
8016: label calc_sprite_address
8016:79 LD A, C
8017:E607 AND 07
8019:0F RRCA
801A:0F RRCA
801B:0F RRCA
801C:B0 OR B
801D:5F LD E, A
801E:79 LD A, C
801F:E618 AND 18
8021:F640 OR 40
8023:57 LD D, A
8024:C9 RET
Defining MACRO add_e
Params: n
8025: label draw_sprite
8025:215080 LD HL, 8050
8028:D5 PUSH DE
8029:CD4080 CALL 8040
802C:D1 POP DE
Expanding MACRO add_e
n= 0020
LD A , E
802D:7B LD A, E
ADD A , n
802E:C620 ADD A, 20
LD E , A
8030:5F LD E, A
ENDM
ENDM
End of MACRO add_e
8031:D5 PUSH DE
8032:CD4080 CALL 8040
8035:D1 POP DE
Expanding MACRO add_e
n= 0020
LD A , E
8036:7B LD A, E
ADD A , n
8037:C620 ADD A, 20
LD E , A
8039:5F LD E, A
ENDM
ENDM
End of MACRO add_e
803A:CD4080 CALL 8040
803D:C9 RET
803E:0608 LD B, 08
8040: label draw_8_lines
8040:011008 LD BC, 0810
8043: label loop
8043:EDA0 LDI
8045:EDA0 LDI
8047:7E LD A, (HL)
8048:12 LD (DE), A
8049:23 INC HL
804A:1D DEC E
804B:1D DEC E
804C:14 INC D
804D:10F4 DJNZ 8043
804F:C9 RET
8050: label SPRITE_ADR
8050:000000 DEFB of 3 bytes
8053:000000 DEFB of 3 bytes
8056:01F010 DEFB of 3 bytes
8059:033810 DEFB of 3 bytes
805C:05D710 DEFB of 3 bytes
805F:05CC10 DEFB of 3 bytes
8062:053010 DEFB of 3 bytes
8065:04C810 DEFB of 3 bytes
8068:073610 DEFB of 3 bytes
806B:0CFE38 DEFB of 3 bytes
806E:1FF800 DEFB of 3 bytes
8071:000030 DEFB of 3 bytes
8074:03FFB0 DEFB of 3 bytes
8077:05FEE0 DEFB of 3 bytes
807A:0EFDC0 DEFB of 3 bytes
807D:18FC00 DEFB of 3 bytes
8080:180000 DEFB of 3 bytes
8083:01F800 DEFB of 3 bytes
8086:03FC00 DEFB of 3 bytes
8089:01B000 DEFB of 3 bytes
808C:020C00 DEFB of 3 bytes
808F:070E00 DEFB of 3 bytes
8092:1E0780 DEFB of 3 bytes
8095:000000 DEFB of 3 bytes
8098: END 8000
Emiting TAP basic loader
Emiting TAP from 8000 to 8097