-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpmood.asm
263 lines (263 loc) · 3.63 KB
/
pmood.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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
;*************************************************
;** GTR-i pildilugemismoodul: **
;** **
;** SISEND: LXI H,PILT **
;** PUSH H **
;** CALL PMOOD **
;** **
;*************************************************
.printx /Processing PMOOD/
pmood:: MVI A,0C9H
STA PESA1
POP H
XTHL
PUSH H
CALL ALAM1
PUSH H
CALL ALAM2
POP H
MVI A,0C3H
STA PESA1
JMP ALAM1
ALAM1: PUSH H
CALL ALAM3
POP H
CALL ALAM4
PUSH H
CALL ALAM5
POP H
JMP ALAM4
ALAM6: STA MSG1+1
LXI B,MSG1
JMP 0FFCDH
ALAM5: MVI A,28H
JMP ALAM6
ALAM3: MVI A,27H
JMP ALAM6
MSG1: DB 1BH,0,24H,0
ALAM4: MOV A,M
INX H
STA PESA2
CPI 0FFH
RZ
PUSH H
MVI E,1BH
CALL ALAM7
MVI E,59H
CALL ALAM7
LDA PESA2
CALL ALAM8
POP H
MOV A,M
INX H
PUSH H
CALL ALAM8
POP H
MOV A,M
INX H
STA PESA3
ALAM9: MOV E,M
INX H
PUSH H
CALL ALAM7
POP H
LDA PESA3
DCR A
STA PESA3
JNZ ALAM9
JMP ALAM4
ALAM7: MOV A,E
PESA1: DB 0C9H,0D9H,0FFH,0C9H
ALAM8: ADI 20H
MOV E,A
JMP ALAM7
ALAM2: POP H
XTHL
MOV A,M
INX H
CPI 00H
JNZ ALAM10
MVI A,48H
STA PESA4
LXI D,0D800H
ALAM24: XRA A
STA PESA5
MOV A,M
CPI 00H
JZ ALAM11
MVI B,0
RLC
JNC ALAM12
MVI B,0FFH
ALAM12: RLC
MOV A,M
JNC ALAM13
ANI 3FH
MOV C,B
MOV B,A
MOV A,C
INX H
MOV C,M
JMP ALAM14
ALAM13: ANI 3FH
MOV C,A
MOV A,B
MVI B,0
ALAM14: STA PESA6
ALAM18: LDA PESA4
CPI 56H
LDA PESA6
JZ ALAM15
STAX D
INX D
JMP ALAM16
ALAM15: XTHL
CALL ALAM17
XTHL
ALAM16: DCR C
JNZ ALAM18
INR B
DCR B
JZ ALAM19
MOV C,B
ALAM22: LDA PESA4
CPI 56H
LDA PESA6
JZ ALAM20
STAX D
INX D
JMP ALAM21
ALAM20: XTHL
CALL ALAM17
XTHL
ALAM21: DCR C
JNZ ALAM22
MVI C,0FFH
DCR B
JP ALAM22
ALAM19: LDA PESA5
ORA A
JZ ALAM23
INX H
JMP ALAM24
ALAM23: INX H
MOV A,M
CPI 0
JNZ ALAM25
INX H
JMP ALAM24
ALAM25: STA PESA5
RLC
JNC ALAM26
MOV A,M
ANI 7FH
MOV B,A
ANI 40H
JNZ ALAM27
INX H
MOV C,M
JMP ALAM28
ALAM27: MOV A,M
ANI 3FH
MOV B,A
INX H
MOV C,M
JMP ALAM29
ALAM30: MOV A,M
ANI 3FH
MOV C,A
MVI B,0
ALAM29: INX H
MOV A,M
JMP ALAM14
ALAM26: RLC
JC ALAM30
MOV C,M
MVI B,0
ALAM28: INX H
ALAM33: LDA PESA4
CPI 56H
MOV A,M
INX H
JZ ALAM31
STAX D
INX D
JMP ALAM32
ALAM31: XTHL
CALL ALAM17
XTHL
ALAM32: DCR C
JNZ ALAM33
INR B
DCR B
JZ ALAM24
MOV C,B
ALAM36: LDA PESA4
CPI 56H
MOV A,M
INX H
JZ ALAM34
STAX D
INX D
JMP ALAM35
ALAM34: XTHL
CALL ALAM17
XTHL
ALAM35: DCR C
JNZ ALAM36
MVI C,0FFH
DCR B
JP ALAM36
JMP ALAM24
ALAM10: CPI 0FFH
RNZ
MVI A,56H
STA PESA4
PUSH H
LXI H,0D800H
SHLD PESA7
LXI D,0028H
XTHL
MVI A,0E6H
STA PESA8
JMP ALAM24
MOV M,A
DAD D
LDA PESA8
DCR A
LXI H,0D800H
SHLD PESA7
LXI D,0028H
XTHL
MVI A,0E6H
STA PESA8
JMP ALAM24
ALAM17: MOV M,A
DAD D
LDA PESA8
DCR A
STA PESA8
RNZ
MVI A,0E6H
STA PESA8
LHLD PESA7
INX H
SHLD PESA7
RET
PESA2: DB 0
PESA3: DB 0
PESA4: DB 0
PESA5: DB 0
PESA6: DB 0
PESA7: DW 0
PESA8: DB 0
ALAM11: INX H
MOV A,M
CPI 0
JNZ ALAM25
LDA PESA4
CPI 48H
RZ
POP H
RET