| author | brandonlw |
| Tue, 20 May 2014 02:59:10 -0400 | |
| changeset 41 | 9ef17625274f |
| parent 38 | a4c5f839b738 |
| child 43 | 486c42a314bc |
| permissions | -rw-r--r-- |
| 7 | 1 |
sub_BD1: |
| 4 | 2 |
call OP1ToOP3 |
3 |
call OP2ToOP4 |
|
| 8 | 4 |
jp cpop1op2 |
| 4 | 5 |
; End of function sub_BD1 |
6 |
||
7 |
; --------------------------------------------------------------------------- |
|
8 |
||
9 |
Min: |
|
10 |
call sub_BD1 |
|
| 8 | 11 |
jp c, OP3ToOP1 |
12 |
jp OP4ToOP1 |
|
| 4 | 13 |
; --------------------------------------------------------------------------- |
14 |
||
15 |
Max: |
|
16 |
call sub_BD1 |
|
| 8 | 17 |
jp c, OP4ToOP1 |
18 |
jp OP3ToOP1 |
|
| 4 | 19 |
; --------------------------------------------------------------------------- |
20 |
||
21 |
page0_BEC: |
|
22 |
call Mov9ToOP2 |
|
| 8 | 23 |
jr FPAdd |
| 4 | 24 |
; --------------------------------------------------------------------------- |
25 |
||
26 |
BCALL_405A: |
|
27 |
call ClrOP1S |
|
28 |
call ClrOP2S |
|
| 8 | 29 |
jr FPAdd |
| 4 | 30 |
; --------------------------------------------------------------------------- |
31 |
||
32 |
BCALL_405D: |
|
33 |
call page0_14E1 |
|
| 8 | 34 |
ret z |
35 |
ld a, (OP1) |
|
| 4 | 36 |
push af |
37 |
call Trunc |
|
| 8 | 38 |
pop af |
39 |
and 80h ; '' |
|
40 |
jr nz, Minus1 |
|
| 4 | 41 |
ret |
42 |
; --------------------------------------------------------------------------- |
|
43 |
||
44 |
page0_C0A: |
|
45 |
call InvOP1S |
|
| 8 | 46 |
jr page0_C3D |
| 4 | 47 |
|
48 |
; =============== S U B R O U T I N E ======================================= |
|
49 |
||
50 |
||
| 7 | 51 |
Trunc: |
52 |
||
53 |
||
54 |
||
55 |
||
| 4 | 56 |
|
| 8 | 57 |
rst 8 |
| 4 | 58 |
call frac |
59 |
||
60 |
InvSub: |
|
61 |
call InvOP1S |
|
| 8 | 62 |
jr FPAdd |
| 4 | 63 |
; --------------------------------------------------------------------------- |
64 |
||
65 |
Times2: |
|
| 8 | 66 |
rst 8 |
67 |
jr FPAdd |
|
| 4 | 68 |
; --------------------------------------------------------------------------- |
69 |
||
| 7 | 70 |
Plus1: |
| 4 | 71 |
call OP2Set1 |
| 8 | 72 |
jr FPAdd |
| 4 | 73 |
; --------------------------------------------------------------------------- |
74 |
||
75 |
page0_C20: |
|
76 |
call Mov9ToOP2 |
|
| 8 | 77 |
jr FPAdd |
| 4 | 78 |
; --------------------------------------------------------------------------- |
79 |
||
80 |
page0_C25: |
|
81 |
call Mov9ToOP2 |
|
| 8 | 82 |
jr FPSub |
| 4 | 83 |
; --------------------------------------------------------------------------- |
84 |
||
| 7 | 85 |
Minus1: |
| 4 | 86 |
call OP2Set1 |
87 |
||
| 7 | 88 |
FPSub: |
| 8 | 89 |
ld hl, 8483h |
90 |
ld a, (hl) |
|
91 |
xor 80h ; '' |
|
92 |
ld (hl), a |
|
| 4 | 93 |
|
| 7 | 94 |
FPAdd: |
| 8 | 95 |
res 6, (iy+0Eh) |
| 4 | 96 |
call page0_FB5 |
| 8 | 97 |
jr page0_C41 |
| 4 | 98 |
; --------------------------------------------------------------------------- |
99 |
||
| 7 | 100 |
page0_C3D: |
| 8 | 101 |
set 6, (iy+0Eh) |
| 4 | 102 |
|
| 7 | 103 |
page0_C41: |
| 4 | 104 |
call CkOP2FP0 |
| 8 | 105 |
ret z |
| 4 | 106 |
call CkOP1FP0 |
| 8 | 107 |
jp z, OP2ToOP1 |
| 4 | 108 |
call OP1MOP2EXP |
| 8 | 109 |
jr nc, page0_C8E |
110 |
add a, (hl) |
|
111 |
ld d, (hl) |
|
112 |
ld e, a |
|
113 |
ld a, d |
|
| 29 | 114 |
ld (OP1+1), a |
| 8 | 115 |
sub e |
116 |
cp 10h |
|
117 |
jp nc, OP2ToOP1 |
|
118 |
ld b, a |
|
| 4 | 119 |
|
| 7 | 120 |
page0_C5E: |
| 8 | 121 |
ld hl, 847Ah |
| 4 | 122 |
call SHR16 |
123 |
djnz page0_C5E |
|
| 8 | 124 |
ld a, (OP2) |
125 |
and 80h ; '' |
|
126 |
ld c, a |
|
127 |
ld a, (OP1) |
|
128 |
and 80h ; '' |
|
129 |
xor c |
|
130 |
ld a, c |
|
131 |
ld (OP1), a |
|
132 |
jr z, page0_CAD |
|
| 4 | 133 |
call sub_1415 |
| 8 | 134 |
jr nc, page0_CCF |
| 4 | 135 |
call sub_1397 |
136 |
call page0_141D |
|
| 8 | 137 |
ld a, (OP1) |
138 |
xor 80h ; '' |
|
139 |
ld (OP1), a |
|
140 |
jp page0_CD2 |
|
| 4 | 141 |
; --------------------------------------------------------------------------- |
142 |
||
| 7 | 143 |
page0_C8E: |
| 8 | 144 |
jr z, page0_C9C |
145 |
cp 10h |
|
146 |
ret nc |
|
147 |
ld b, a |
|
| 4 | 148 |
|
| 7 | 149 |
page0_C94: |
| 8 | 150 |
ld hl, 8485h |
| 4 | 151 |
call SHR16 |
152 |
djnz page0_C94 |
|
153 |
||
| 7 | 154 |
page0_C9C: |
| 8 | 155 |
ld a, (OP1) |
156 |
and 80h ; '' |
|
157 |
ld (OP1), a |
|
158 |
ld c, a |
|
159 |
ld a, (OP2) |
|
160 |
and 80h ; '' |
|
161 |
xor c |
|
162 |
jr nz, page0_CC4 |
|
| 4 | 163 |
|
| 7 | 164 |
page0_CAD: |
| 4 | 165 |
call page0_139F |
| 8 | 166 |
jr nc, page0_CB8 |
| 4 | 167 |
call sub_12F5 |
168 |
call INCO1EXP |
|
169 |
||
| 7 | 170 |
page0_CB8: |
| 4 | 171 |
call sub_CDF |
| 8 | 172 |
bit 6, (iy+0Eh) |
173 |
jr z, page0_D06 |
|
174 |
jp LJNORND |
|
| 4 | 175 |
; --------------------------------------------------------------------------- |
176 |
||
| 7 | 177 |
page0_CC4: |
| 4 | 178 |
call page0_141D |
| 8 | 179 |
jr nc, page0_CD2 |
| 4 | 180 |
call page0_139F |
181 |
call sub_1415 |
|
182 |
||
| 7 | 183 |
page0_CCF: |
| 4 | 184 |
call OP2ToOP1 |
185 |
||
| 7 | 186 |
page0_CD2: |
| 4 | 187 |
call sub_CDF |
| 8 | 188 |
bit 6, (iy+0Eh) |
189 |
jp z, LJRND |
|
190 |
jp LJNORND |
|
| 4 | 191 |
; End of function Trunc |
192 |
||
193 |
||
194 |
; =============== S U B R O U T I N E ======================================= |
|
195 |
||
196 |
||
| 7 | 197 |
sub_CDF: |
| 6 | 198 |
; Trunc:loc_CD2p |
| 4 | 199 |
|
| 7 | 200 |
|
201 |
||
| 4 | 202 |
|
| 8 | 203 |
ld hl, 847Ah |
204 |
ld b, 6 |
|
| 4 | 205 |
call sub_1525 |
| 8 | 206 |
ret nz |
207 |
ld a, (hl) |
|
208 |
cp 10h |
|
209 |
ret nc |
|
210 |
xor a |
|
211 |
inc hl |
|
212 |
ld (hl), a |
|
213 |
jp OP1Set0 |
|
| 4 | 214 |
; End of function sub_CDF |
215 |
||
216 |
||
217 |
; =============== S U B R O U T I N E ======================================= |
|
218 |
||
219 |
||
| 7 | 220 |
page0_CF2: |
221 |
||
222 |
||
| 4 | 223 |
|
| 8 | 224 |
ld a, 5 |
225 |
jr page0_CF7 |
|
| 4 | 226 |
; --------------------------------------------------------------------------- |
227 |
||
| 7 | 228 |
page0_CF6: |
| 8 | 229 |
xor a |
| 4 | 230 |
|
| 7 | 231 |
page0_CF7: |
| 4 | 232 |
call GETCONOP2 |
233 |
||
234 |
page0_CFA: |
|
| 8 | 235 |
set 6, (iy+0Eh) |
236 |
jr page0_D26 |
|
| 4 | 237 |
; End of function page0_CF2 |
238 |
||
239 |
; --------------------------------------------------------------------------- |
|
240 |
||
241 |
DToR: |
|
242 |
call page0_FB5 |
|
243 |
call page0_CF2 |
|
244 |
; START OF FUNCTION CHUNK FOR Trunc |
|
245 |
||
| 7 | 246 |
page0_D06: |
| 8 | 247 |
jp page0_E2D |
| 4 | 248 |
; END OF FUNCTION CHUNK FOR Trunc |
249 |
; --------------------------------------------------------------------------- |
|
250 |
||
251 |
RToD: |
|
252 |
call page0_FB5 |
|
253 |
call page0_CF6 |
|
| 8 | 254 |
jr page0_D06 |
| 4 | 255 |
; --------------------------------------------------------------------------- |
256 |
||
257 |
Cube: |
|
258 |
call FPSquare |
|
| 8 | 259 |
jr FPMult |
| 4 | 260 |
; --------------------------------------------------------------------------- |
261 |
||
262 |
TimesPt5: |
|
| 8 | 263 |
ld hl, page0_FC3 |
| 4 | 264 |
|
265 |
page0_D19: |
|
266 |
call Mov9ToOP2 |
|
| 8 | 267 |
jr FPMult |
| 4 | 268 |
|
269 |
; =============== S U B R O U T I N E ======================================= |
|
270 |
||
271 |
||
| 7 | 272 |
FPSquare: |
| 8 | 273 |
rst 8 |
| 4 | 274 |
|
| 7 | 275 |
FPMult: |
| 8 | 276 |
res 6, (iy+0Eh) |
| 4 | 277 |
call page0_FB5 |
278 |
; End of function FPSquare |
|
279 |
||
280 |
; START OF FUNCTION CHUNK FOR page0_CF2 |
|
281 |
||
| 7 | 282 |
page0_D26: |
| 4 | 283 |
call CkOP1FP0 |
| 8 | 284 |
ret z |
| 4 | 285 |
call CkOP2FP0 |
| 8 | 286 |
jp z, OP2ToOP1 |
| 4 | 287 |
call page0_E9E |
| 8 | 288 |
ld a, d |
| 29 | 289 |
ld (OP1+1), a |
| 4 | 290 |
|
291 |
page0_D37: |
|
292 |
call ZeroOP3 |
|
| 8 | 293 |
ld b, 8 |
294 |
ld hl, 848Dh |
|
| 4 | 295 |
|
| 7 | 296 |
page0_D3F: |
| 8 | 297 |
dec hl |
298 |
cp (hl) |
|
299 |
jr nz, page0_D4F |
|
| 4 | 300 |
djnz page0_D3F |
301 |
||
| 7 | 302 |
page0_D45: |
| 8 | 303 |
ld hl, 848Fh |
| 4 | 304 |
call SHR16 |
305 |
rrd |
|
| 8 | 306 |
pop hl |
307 |
dec hl |
|
| 4 | 308 |
|
| 7 | 309 |
page0_D4F: |
| 4 | 310 |
push hl |
311 |
push bc |
|
| 8 | 312 |
ld a, (hl) |
313 |
ld c, a |
|
314 |
and 0Fh |
|
315 |
jr z, page0_D96 |
|
316 |
ld b, a |
|
| 4 | 317 |
|
| 7 | 318 |
page0_D58: |
| 8 | 319 |
ld de, 8497h |
| 29 | 320 |
ld hl, (OP1+8) |
| 8 | 321 |
ld a, (de) |
322 |
add a, h |
|
| 4 | 323 |
daa |
| 8 | 324 |
ld (de), a |
325 |
dec de |
|
326 |
ld a, (de) |
|
| 4 | 327 |
adc a, l |
328 |
daa |
|
| 8 | 329 |
ld (de), a |
330 |
dec de |
|
| 29 | 331 |
ld hl, (OP1+6) |
| 8 | 332 |
ld a, (de) |
| 4 | 333 |
adc a, h |
334 |
daa |
|
| 8 | 335 |
ld (de), a |
336 |
dec de |
|
337 |
ld a, (de) |
|
| 4 | 338 |
adc a, l |
339 |
daa |
|
| 8 | 340 |
ld (de), a |
341 |
dec de |
|
| 29 | 342 |
ld hl, (OP1+4) |
| 8 | 343 |
ld a, (de) |
| 4 | 344 |
adc a, h |
345 |
daa |
|
| 8 | 346 |
ld (de), a |
347 |
dec de |
|
348 |
ld a, (de) |
|
| 4 | 349 |
adc a, l |
350 |
daa |
|
| 8 | 351 |
ld (de), a |
352 |
dec de |
|
353 |
ld hl, (OP1M) |
|
354 |
ld a, (de) |
|
| 4 | 355 |
adc a, h |
356 |
daa |
|
| 8 | 357 |
ld (de), a |
358 |
dec de |
|
359 |
ld a, (de) |
|
| 4 | 360 |
adc a, l |
361 |
daa |
|
| 8 | 362 |
ld (de), a |
363 |
jp nc, page0_D94 |
|
364 |
dec de |
|
365 |
ex de, hl |
|
366 |
inc (hl) |
|
| 4 | 367 |
|
| 7 | 368 |
page0_D94: |
| 4 | 369 |
djnz page0_D58 |
370 |
||
| 7 | 371 |
page0_D96: |
| 8 | 372 |
ld hl, 848Fh |
| 4 | 373 |
call SHR16 |
374 |
rrd |
|
| 8 | 375 |
ld a, c |
| 4 | 376 |
rra |
377 |
rra |
|
378 |
rra |
|
379 |
rra |
|
| 8 | 380 |
and 0Fh |
381 |
jr z, page0_DE6 |
|
382 |
ld b, a |
|
| 4 | 383 |
|
| 7 | 384 |
page0_DA8: |
| 8 | 385 |
ld de, 8497h |
| 29 | 386 |
ld hl, (OP1+8) |
| 8 | 387 |
ld a, (de) |
388 |
add a, h |
|
| 4 | 389 |
daa |
| 8 | 390 |
ld (de), a |
391 |
dec de |
|
392 |
ld a, (de) |
|
| 4 | 393 |
adc a, l |
394 |
daa |
|
| 8 | 395 |
ld (de), a |
396 |
dec de |
|
| 29 | 397 |
ld hl, (OP1+6) |
| 8 | 398 |
ld a, (de) |
| 4 | 399 |
adc a, h |
400 |
daa |
|
| 8 | 401 |
ld (de), a |
402 |
dec de |
|
403 |
ld a, (de) |
|
| 4 | 404 |
adc a, l |
405 |
daa |
|
| 8 | 406 |
ld (de), a |
407 |
dec de |
|
| 29 | 408 |
ld hl, (OP1+4) |
| 8 | 409 |
ld a, (de) |
| 4 | 410 |
adc a, h |
411 |
daa |
|
| 8 | 412 |
ld (de), a |
413 |
dec de |
|
414 |
ld a, (de) |
|
| 4 | 415 |
adc a, l |
416 |
daa |
|
| 8 | 417 |
ld (de), a |
418 |
dec de |
|
419 |
ld hl, (OP1M) |
|
420 |
ld a, (de) |
|
| 4 | 421 |
adc a, h |
422 |
daa |
|
| 8 | 423 |
ld (de), a |
424 |
dec de |
|
425 |
ld a, (de) |
|
| 4 | 426 |
adc a, l |
427 |
daa |
|
| 8 | 428 |
ld (de), a |
429 |
jp nc, page0_DE4 |
|
430 |
dec de |
|
431 |
ex de, hl |
|
432 |
inc (hl) |
|
| 4 | 433 |
|
| 7 | 434 |
page0_DE4: |
| 4 | 435 |
djnz page0_DA8 |
436 |
||
| 7 | 437 |
page0_DE6: |
| 8 | 438 |
pop bc |
439 |
dec b |
|
440 |
jp nz, page0_D45 |
|
441 |
pop hl |
|
| 29 | 442 |
ld a, (OP3+1) |
| 8 | 443 |
and a |
444 |
jr z, page0_DFD |
|
445 |
ld hl, 848Fh |
|
| 4 | 446 |
call SHR16 |
447 |
rrd |
|
448 |
call INCO1EXP |
|
449 |
||
| 7 | 450 |
page0_DFD: |
| 4 | 451 |
call page0_11CB |
| 8 | 452 |
bit 6, (iy+0Eh) |
453 |
ret nz |
|
454 |
jr page0_E2D |
|
| 4 | 455 |
; END OF FUNCTION CHUNK FOR page0_CF2 |
456 |
; --------------------------------------------------------------------------- |
|
457 |
; START OF FUNCTION CHUNK FOR Trunc |
|
458 |
||
| 7 | 459 |
LJRND: |
| 8 | 460 |
ld hl, 847Ah |
461 |
ld a, (hl) |
|
462 |
and 0F0h ; |
|
463 |
jr nz, page0_E2D |
|
464 |
ld c, 10h |
|
| 4 | 465 |
|
| 7 | 466 |
page0_E11: |
| 8 | 467 |
dec c |
468 |
jp z, OP1Set0 |
|
| 4 | 469 |
call page0_1301 |
| 8 | 470 |
inc hl |
471 |
ld a, (hl) |
|
472 |
and 0F0h ; |
|
473 |
jp z, page0_E11 |
|
474 |
ld a, 10h |
|
475 |
sub c |
|
476 |
ld c, a |
|
| 29 | 477 |
ld a, (OP1+1) |
| 8 | 478 |
sub c |
479 |
jp c, OP1Set0 |
|
| 29 | 480 |
ld (OP1+1), a |
| 4 | 481 |
|
| 7 | 482 |
page0_E2D: |
| 6 | 483 |
; page0_CF2+113j ... |
| 8 | 484 |
ld a, (OP1) |
485 |
and 80h ; '' |
|
486 |
ld (OP1), a |
|
487 |
ld hl, 8481h |
|
488 |
ld a, (hl) |
|
489 |
ld (hl), 0 |
|
490 |
dec hl |
|
491 |
add a, 0B0h ; 'Ч |
|
492 |
ret nc |
|
| 4 | 493 |
call sub_1373 |
| 8 | 494 |
ret nc |
495 |
inc hl |
|
496 |
ld (hl), 10h |
|
497 |
jp INCO1EXP |
|
| 4 | 498 |
; END OF FUNCTION CHUNK FOR Trunc |
499 |
; --------------------------------------------------------------------------- |
|
500 |
||
501 |
InvOP1SC: |
|
502 |
call InvOP2S |
|
503 |
||
504 |
; =============== S U B R O U T I N E ======================================= |
|
505 |
||
506 |
||
| 7 | 507 |
InvOP1S: |
| 6 | 508 |
; Trunc:InvSubp |
| 4 | 509 |
call CkOP1FP0 |
| 8 | 510 |
ld a, (OP1) |
511 |
jr nz, page0_E56 |
|
512 |
or 80h ; '' |
|
| 4 | 513 |
|
| 7 | 514 |
page0_E56: |
| 8 | 515 |
xor 80h ; '' |
516 |
ld (OP1), a |
|
| 4 | 517 |
ret |
518 |
; End of function InvOP1S |
|
519 |
||
520 |
||
521 |
; =============== S U B R O U T I N E ======================================= |
|
522 |
||
523 |
||
| 7 | 524 |
InvOP2S: |
| 4 | 525 |
call CkOP2FP0 |
| 8 | 526 |
ld a, (OP2) |
527 |
jr nz, page0_E66 |
|
528 |
or 80h ; '' |
|
| 4 | 529 |
|
| 7 | 530 |
page0_E66: |
| 8 | 531 |
xor 80h ; '' |
532 |
ld (OP2), a |
|
| 4 | 533 |
ret |
534 |
; End of function InvOP2S |
|
535 |
||
536 |
; --------------------------------------------------------------------------- |
|
| 8 | 537 |
and 80h ; '' |
538 |
ld (OP1), a |
|
| 4 | 539 |
ret |
540 |
||
541 |
; =============== S U B R O U T I N E ======================================= |
|
542 |
||
543 |
||
| 7 | 544 |
frac: |
| 4 | 545 |
call CkOP1FP0 |
| 8 | 546 |
ret z |
547 |
xor a |
|
| 29 | 548 |
ld (OP1+9), a |
549 |
ld a, (OP1+1) |
|
| 8 | 550 |
sub 80h ; '' |
551 |
ret c |
|
552 |
cp 0Fh |
|
553 |
jr c, page0_E8E |
|
554 |
jr page0_EBE |
|
| 4 | 555 |
; --------------------------------------------------------------------------- |
556 |
||
| 7 | 557 |
page0_E86: |
| 29 | 558 |
ld a, (OP1+1) |
| 8 | 559 |
cp 80h ; '' |
560 |
jp c, LJRND |
|
| 4 | 561 |
|
| 7 | 562 |
page0_E8E: |
| 4 | 563 |
call page0_12EF |
564 |
call DecO1Exp |
|
| 8 | 565 |
jr page0_E86 |
| 4 | 566 |
; --------------------------------------------------------------------------- |
567 |
||
| 7 | 568 |
page0_E96: |
| 29 | 569 |
ld a, (OP2+1) |
| 4 | 570 |
cpl |
| 8 | 571 |
inc a |
572 |
ld d, a |
|
573 |
jr page0_EA2 |
|
| 4 | 574 |
; --------------------------------------------------------------------------- |
575 |
||
| 7 | 576 |
page0_E9E: |
| 29 | 577 |
ld a, (OP2+1) |
| 8 | 578 |
ld d, a |
| 4 | 579 |
|
| 7 | 580 |
page0_EA2: |
| 29 | 581 |
ld a, (OP1+1) |
| 8 | 582 |
add a, d |
583 |
jr nc, page0_EAF |
|
584 |
add a, 80h ; '' |
|
585 |
jr nc, page0_EB3 |
|
586 |
jp ErrOverflow |
|
| 4 | 587 |
; --------------------------------------------------------------------------- |
588 |
||
| 7 | 589 |
page0_EAF: |
| 8 | 590 |
add a, 80h ; '' |
591 |
jr nc, page0_EBD |
|
| 4 | 592 |
|
| 7 | 593 |
page0_EB3: |
| 8 | 594 |
ld d, a |
595 |
ld a, (OP2) |
|
596 |
ld hl, 8478h |
|
597 |
xor (hl) |
|
598 |
ld (hl), a |
|
| 4 | 599 |
ret |
600 |
; --------------------------------------------------------------------------- |
|
601 |
||
| 7 | 602 |
page0_EBD: |
| 8 | 603 |
pop bc |
| 4 | 604 |
|
| 7 | 605 |
page0_EBE: |
| 8 | 606 |
jp OP1Set0 |
| 4 | 607 |
; End of function frac |
608 |
||
609 |
; --------------------------------------------------------------------------- |
|
610 |
||
611 |
page0_EC1: |
|
612 |
call Mov9ToOP2 |
|
| 8 | 613 |
jr fpdiv |
| 4 | 614 |
; --------------------------------------------------------------------------- |
615 |
||
616 |
page0_EC6: |
|
| 8 | 617 |
set 6, (iy+0Eh) |
618 |
jr page0_ED7 |
|
| 4 | 619 |
; --------------------------------------------------------------------------- |
620 |
||
621 |
fprecip: |
|
| 8 | 622 |
rst 8 |
| 4 | 623 |
call OP1Set1 |
624 |
||
| 7 | 625 |
fpdiv: |
| 8 | 626 |
res 6, (iy+0Eh) |
| 4 | 627 |
call page0_FB5 |
628 |
||
| 7 | 629 |
page0_ED7: |
| 4 | 630 |
call CkOP2FP0 |
| 8 | 631 |
jp z, ErrDivBy0 |
| 4 | 632 |
call CkOP1FP0 |
| 8 | 633 |
ret z |
| 4 | 634 |
call page0_E96 |
| 8 | 635 |
ld e, a |
636 |
ld (OP3), de |
|
637 |
xor a |
|
| 29 | 638 |
ld (OP1+1), a |
| 8 | 639 |
ld b, 0Fh |
640 |
bit 6, (iy+0Eh) |
|
641 |
jr z, page0_EF7 |
|
642 |
ld b, 10h |
|
| 4 | 643 |
|
| 7 | 644 |
page0_EF7: |
| 8 | 645 |
ld hl, 8490h |
| 4 | 646 |
push hl |
| 8 | 647 |
ld c, a |
648 |
ld hl, 848Ch |
|
649 |
ld de, 8481h |
|
| 4 | 650 |
call SUB16D |
| 8 | 651 |
jr nc, page0_F24 |
652 |
ld hl, 848Fh |
|
653 |
dec (hl) |
|
654 |
ld a, (hl) |
|
655 |
cp 0FFh |
|
656 |
jr nz, page0_F13 |
|
657 |
pop hl |
|
658 |
jr page0_EBE |
|
| 4 | 659 |
; --------------------------------------------------------------------------- |
660 |
||
| 7 | 661 |
page0_F13: |
| 8 | 662 |
ld c, 0 |
| 4 | 663 |
|
| 7 | 664 |
page0_F15: |
| 8 | 665 |
ld hl, 848Ch |
666 |
ld de, 8481h |
|
| 4 | 667 |
call ADD16D |
668 |
call page0_1301 |
|
| 8 | 669 |
ld (hl), a |
670 |
jr page0_F25 |
|
| 4 | 671 |
; --------------------------------------------------------------------------- |
672 |
||
| 7 | 673 |
page0_F24: |
| 8 | 674 |
inc c |
| 4 | 675 |
|
| 7 | 676 |
page0_F25: |
| 8 | 677 |
ld de, 8481h |
| 29 | 678 |
ld hl, (OP2+8) |
| 8 | 679 |
ld a, (de) |
680 |
sub h |
|
| 4 | 681 |
daa |
| 8 | 682 |
ld (de), a |
683 |
dec de |
|
684 |
ld a, (de) |
|
685 |
sbc a, l |
|
| 4 | 686 |
daa |
| 8 | 687 |
ld (de), a |
688 |
dec de |
|
| 29 | 689 |
ld hl, (OP2+6) |
| 8 | 690 |
ld a, (de) |
691 |
sbc a, h |
|
| 4 | 692 |
daa |
| 8 | 693 |
ld (de), a |
694 |
dec de |
|
695 |
ld a, (de) |
|
696 |
sbc a, l |
|
| 4 | 697 |
daa |
| 8 | 698 |
ld (de), a |
699 |
dec de |
|
| 29 | 700 |
ld hl, (OP2+4) |
| 8 | 701 |
ld a, (de) |
702 |
sbc a, h |
|
| 4 | 703 |
daa |
| 8 | 704 |
ld (de), a |
705 |
dec de |
|
706 |
ld a, (de) |
|
707 |
sbc a, l |
|
| 4 | 708 |
daa |
| 8 | 709 |
ld (de), a |
710 |
dec de |
|
711 |
ld hl, (OP2M) |
|
712 |
ld a, (de) |
|
713 |
sbc a, h |
|
| 4 | 714 |
daa |
| 8 | 715 |
ld (de), a |
716 |
dec de |
|
717 |
ld a, (de) |
|
718 |
sbc a, l |
|
| 4 | 719 |
daa |
| 8 | 720 |
ld (de), a |
721 |
jp nc, page0_F24 |
|
722 |
dec de |
|
723 |
ex de, hl |
|
724 |
dec (hl) |
|
725 |
jp p, page0_F24 |
|
726 |
bit 6, (iy+0Eh) |
|
727 |
jr z, page0_F70 |
|
728 |
bit 0, b |
|
729 |
jr z, page0_F74 |
|
730 |
jr page0_F7F |
|
| 4 | 731 |
; --------------------------------------------------------------------------- |
732 |
||
| 7 | 733 |
page0_F70: |
| 8 | 734 |
bit 0, b |
735 |
jr z, page0_F7F |
|
| 4 | 736 |
|
| 7 | 737 |
page0_F74: |
| 8 | 738 |
ld a, c |
739 |
add a, a |
|
740 |
add a, a |
|
741 |
add a, a |
|
742 |
add a, a |
|
743 |
ld c, a |
|
744 |
dec b |
|
745 |
jr z, page0_F8A |
|
746 |
jr page0_F15 |
|
| 4 | 747 |
; --------------------------------------------------------------------------- |
748 |
||
| 7 | 749 |
page0_F7F: |
| 8 | 750 |
pop hl |
751 |
ld (hl), c |
|
752 |
dec b |
|
753 |
jr z, page0_F8C |
|
754 |
inc hl |
|
| 4 | 755 |
push hl |
| 8 | 756 |
ld c, 0 |
757 |
jr page0_F15 |
|
| 4 | 758 |
; --------------------------------------------------------------------------- |
759 |
||
| 7 | 760 |
page0_F8A: |
| 8 | 761 |
pop hl |
762 |
ld (hl), c |
|
| 4 | 763 |
|
| 7 | 764 |
page0_F8C: |
| 4 | 765 |
call OP3ToOP1 |
| 8 | 766 |
bit 6, (iy+0Eh) |
767 |
jp z, LJRND |
|
768 |
jr LJNORND |
|
| 4 | 769 |
; START OF FUNCTION CHUNK FOR Trunc |
770 |
||
| 7 | 771 |
LJNORND: |
| 8 | 772 |
ld c, 11h |
| 4 | 773 |
|
| 7 | 774 |
page0_F9A: |
| 8 | 775 |
ld a, (OP1M) |
776 |
and 0F0h ; |
|
777 |
ret nz |
|
778 |
dec c |
|
779 |
jr z, page0_FAC |
|
| 4 | 780 |
call page0_1301 |
781 |
call DecO1Exp |
|
| 8 | 782 |
jr nc, page0_F9A |
| 4 | 783 |
ret |
784 |
; --------------------------------------------------------------------------- |
|
785 |
||
| 7 | 786 |
page0_FAC: |
| 8 | 787 |
jp OP1Set0 |
| 4 | 788 |
; END OF FUNCTION CHUNK FOR Trunc |
789 |
; --------------------------------------------------------------------------- |
|
790 |
||
791 |
int: |
|
| 8 | 792 |
ld d, 0 |
| 4 | 793 |
|
794 |
Round: |
|
795 |
call Page0Call_3E73 |
|
796 |
ret |
|
797 |
||
798 |
; =============== S U B R O U T I N E ======================================= |
|
799 |
||
800 |
||
| 7 | 801 |
page0_FB5: |
| 8 | 802 |
xor a |
| 29 | 803 |
ld (OP1+9), a |
| 8 | 804 |
ld (OP2EXT), a |
| 29 | 805 |
ld (OP1+10), a |
806 |
ld (OP2+10), a |
|
| 4 | 807 |
ret |
808 |
; End of function page0_FB5 |
|
809 |
||
810 |
page0_FC3: |
|
| 8 | 811 |
.db 0 |
812 |
.db 7Fh ; |
|
813 |
.db 50h ; P |
|
814 |
.db 0 |
|
815 |
.db 0 |
|
816 |
.db 0 |
|
817 |
.db 0 |
|
818 |
.db 0 |
|
819 |
.db 0 |
|
| 4 | 820 |
page0_FCC: |
| 8 | 821 |
.db 0 |
822 |
.db 7Fh ; |
|
823 |
.db 25h ; % |
|
824 |
.db 0 |
|
825 |
.db 0 |
|
826 |
.db 0 |
|
827 |
.db 0 |
|
828 |
.db 0 |
|
829 |
.db 0 |
|
| 4 | 830 |
page0_FD5: |
| 8 | 831 |
.db 0 |
832 |
.db 7Fh ; |
|
833 |
.db 75h ; u |
|
834 |
.db 0 |
|
835 |
.db 0 |
|
836 |
.db 0 |
|
837 |
.db 0 |
|
838 |
.db 0 |
|
839 |
.db 0 |
|
| 4 | 840 |
; --------------------------------------------------------------------------- |
841 |
||
842 |
page0_FDE: |
|
| 8 | 843 |
ld a, 0E3h ; '㧍 |
| 4 | 844 |
|
845 |
page0_FE0: |
|
| 8 | 846 |
ld hl, 8478h |
| 4 | 847 |
|
848 |
page0_FE3: |
|
849 |
push hl |
|
850 |
push af |
|
851 |
call page0_1254 |
|
| 8 | 852 |
pop af |
853 |
pop hl |
|
854 |
inc hl |
|
855 |
ld (hl), a |
|
| 4 | 856 |
ret |
857 |
page0_FED: |
|
| 8 | 858 |
.db 0Ch |
859 |
.db 80h ; |
|
860 |
.db 10h |
|
861 |
.db 0 |
|
862 |
.db 0 |
|
863 |
.db 0 |
|
864 |
.db 0 |
|
865 |
.db 0 |
|
866 |
.db 0 |
|
| 4 | 867 |
page0_FF6: |
| 8 | 868 |
.db 0Ch |
869 |
.db 80h ; |
|
870 |
.db 0 |
|
871 |
.db 0 |
|
872 |
.db 0 |
|
873 |
.db 0 |
|
874 |
.db 0 |
|
875 |
.db 0 |
|
876 |
.db 0 |
|
877 |
.db 0Ch |
|
878 |
.db 80h ; |
|
879 |
.db 0 |
|
880 |
.db 0 |
|
881 |
.db 0 |
|
882 |
.db 0 |
|
883 |
.db 0 |
|
884 |
.db 0 |
|
885 |
.db 0 |
|
| 4 | 886 |
unk_1008: |
| 8 | 887 |
.db 0 |
888 |
.db 80h |
|
| 4 | 889 |
unk_100A: ; |
| 8 | 890 |
.db 0 |
891 |
.db 0 |
|
892 |
.db 0 |
|
893 |
.db 0 |
|
894 |
.db 0 |
|
895 |
.db 0 |
|
896 |
.db 0 |
|
| 4 | 897 |
unk_1011: |
| 8 | 898 |
.db 0 |
899 |
.db 80h ; |
|
900 |
.db 10h |
|
901 |
.db 0 |
|
902 |
.db 0 |
|
| 4 | 903 |
unk_1016: |
| 8 | 904 |
.db 0 |
905 |
.db 0 |
|
906 |
.db 0 |
|
907 |
.db 0 |
|
| 4 | 908 |
; --------------------------------------------------------------------------- |
909 |
||
910 |
OPSet0DE: |
|
| 8 | 911 |
ld hl, unk_1008 |
| 4 | 912 |
|
| 7 | 913 |
page0_101D: |
| 8 | 914 |
jp mov9B2 |
| 4 | 915 |
; --------------------------------------------------------------------------- |
916 |
||
917 |
page0_1020: |
|
| 8 | 918 |
ld hl, unk_1011 |
919 |
jr page0_101D |
|
| 4 | 920 |
|
921 |
; =============== S U B R O U T I N E ======================================= |
|
922 |
||
923 |
||
| 7 | 924 |
HLTimes9: |
| 6 | 925 |
; DataSize:page0_2138p ... |
| 8 | 926 |
ld b, h |
927 |
ld c, l |
|
928 |
add hl, hl |
|
929 |
ret c |
|
930 |
add hl, hl |
|
931 |
ret c |
|
932 |
add hl, hl |
|
933 |
ret c |
|
934 |
add hl, bc |
|
| 4 | 935 |
ret |
936 |
; End of function HLTimes9 |
|
937 |
||
938 |
; --------------------------------------------------------------------------- |
|
939 |
||
940 |
CkOP1Cplx: |
|
| 8 | 941 |
ld a, (OP1) |
| 4 | 942 |
|
943 |
page0_1032: |
|
| 8 | 944 |
and 1Fh |
945 |
cp 0Ch |
|
| 4 | 946 |
ret |
947 |
||
948 |
; =============== S U B R O U T I N E ======================================= |
|
949 |
||
950 |
||
| 7 | 951 |
CkOP1Real: |
| 6 | 952 |
; EOP1NotRealp ... |
| 8 | 953 |
ld a, (OP1) |
954 |
and 1Fh |
|
| 4 | 955 |
ret |
956 |
; End of function CkOP1Real |
|
957 |
||
958 |
; --------------------------------------------------------------------------- |
|
959 |
||
960 |
page0_103D: |
|
961 |
call OP2ToOP1 |
|
962 |
||
963 |
page0_1040: |
|
| 8 | 964 |
ld hl, 8478h |
965 |
ld a, (hl) |
|
966 |
and 0E0h ; '্ |
|
967 |
ld (hl), a |
|
| 4 | 968 |
ret |
969 |
; --------------------------------------------------------------------------- |
|
970 |
||
971 |
COP1Set0: |
|
972 |
call OP1Set0 |
|
973 |
||
974 |
page0_104B: |
|
975 |
call OP2Set0 |
|
976 |
||
977 |
; =============== S U B R O U T I N E ======================================= |
|
978 |
||
979 |
||
| 7 | 980 |
page0_104E: |
| 8 | 981 |
ld a, (OP1) |
982 |
and 0E0h ; '্ |
|
983 |
or 0Ch |
|
984 |
ld (OP1), a |
|
985 |
ld a, (OP2) |
|
986 |
and 0E0h ; '্ |
|
987 |
or 0Ch |
|
988 |
ld (OP2), a |
|
| 4 | 989 |
ret |
990 |
; End of function page0_104E |
|
991 |
||
992 |
; --------------------------------------------------------------------------- |
|
993 |
||
994 |
page0_1063: |
|
995 |
call MovFrOP1 |
|
| 8 | 996 |
inc hl |
997 |
inc hl |
|
998 |
jp mov9B2 |
|
| 4 | 999 |
; --------------------------------------------------------------------------- |
1000 |
||
1001 |
CpOP4OP3: |
|
1002 |
call OP4ToOP1 |
|
1003 |
call BCALL_4120 |
|
| 8 | 1004 |
jr cpop1op2 |
| 4 | 1005 |
; --------------------------------------------------------------------------- |
1006 |
||
1007 |
Mov9OP2Cp: |
|
1008 |
call Mov9ToOP2 |
|
| 8 | 1009 |
jr cpop1op2 |
| 4 | 1010 |
; --------------------------------------------------------------------------- |
1011 |
||
1012 |
AbsO1O2Cp: |
|
1013 |
call ClrOP1S |
|
1014 |
call ClrOP2S |
|
1015 |
; START OF FUNCTION CHUNK FOR sub_BD1 |
|
1016 |
||
| 7 | 1017 |
cpop1op2: |
| 8 | 1018 |
ld a, (OP1M) |
1019 |
or a |
|
| 4 | 1020 |
call z, ZeroOP1 |
| 8 | 1021 |
ld a, (OP2M) |
1022 |
or a |
|
| 4 | 1023 |
|
1024 |
page0_1089: |
|
1025 |
call z, ZeroOP2 |
|
| 8 | 1026 |
ld a, (OP1) |
1027 |
or a |
|
1028 |
ld a, (OP2) |
|
1029 |
jp m, page0_10B0 |
|
1030 |
and 80h ; '' |
|
1031 |
jr nz, page0_10C3 |
|
| 4 | 1032 |
call OP1MOP2EXP |
| 8 | 1033 |
ld hl, 8485h |
1034 |
ld de, 847Ah |
|
| 4 | 1035 |
|
| 7 | 1036 |
page0_10A3: |
| 8 | 1037 |
jr nz, page0_10C3 |
1038 |
ld b, 7 |
|
| 4 | 1039 |
|
| 7 | 1040 |
page0_10A7: |
| 8 | 1041 |
ld a, (de) |
1042 |
cp (hl) |
|
1043 |
ret nz |
|
1044 |
inc hl |
|
1045 |
inc de |
|
| 4 | 1046 |
djnz page0_10A7 |
| 8 | 1047 |
jr page0_10C3 |
| 4 | 1048 |
; --------------------------------------------------------------------------- |
1049 |
||
| 7 | 1050 |
page0_10B0: |
| 8 | 1051 |
and 80h ; '' |
1052 |
jr z, page0_10C1 |
|
1053 |
ld hl, 8479h |
|
| 29 | 1054 |
ld a, (OP2+1) |
| 8 | 1055 |
sub (hl) |
1056 |
inc hl |
|
1057 |
ld de, 8485h |
|
1058 |
jr page0_10A3 |
|
| 4 | 1059 |
; --------------------------------------------------------------------------- |
1060 |
||
| 7 | 1061 |
page0_10C1: |
| 8 | 1062 |
sub 1 |
| 4 | 1063 |
|
| 7 | 1064 |
page0_10C3: |
| 6 | 1065 |
; sub_BD1:page0_10A3j ... |
| 4 | 1066 |
push af |
| 29 | 1067 |
ld a, (OP1+1) |
| 8 | 1068 |
or a |
| 4 | 1069 |
call z, OP1Set0 |
| 29 | 1070 |
ld a, (OP2+1) |
| 8 | 1071 |
or a |
| 4 | 1072 |
call z, OP2Set0 |
| 8 | 1073 |
pop af |
| 4 | 1074 |
ret |
1075 |
; END OF FUNCTION CHUNK FOR sub_BD1 |
|
1076 |
||
1077 |
; =============== S U B R O U T I N E ======================================= |
|
1078 |
||
1079 |
||
| 7 | 1080 |
OP3ToOP4: |
| 8 | 1081 |
ld hl, 848Eh |
1082 |
ld de, 8499h |
|
1083 |
jp Mov11B |
|
| 4 | 1084 |
; End of function OP3ToOP4 |
1085 |
||
1086 |
||
1087 |
; =============== S U B R O U T I N E ======================================= |
|
1088 |
||
1089 |
||
| 7 | 1090 |
OP1ToOP4: |
| 8 | 1091 |
ld hl, 8478h |
1092 |
ld de, 8499h |
|
1093 |
jp Mov11B |
|
| 4 | 1094 |
; End of function OP1ToOP4 |
1095 |
||
1096 |
||
1097 |
; =============== S U B R O U T I N E ======================================= |
|
1098 |
||
1099 |
||
| 7 | 1100 |
OP2ToOP4: |
| 8 | 1101 |
ld hl, 8483h |
1102 |
ld de, 8499h |
|
1103 |
jp Mov11B |
|
| 4 | 1104 |
; End of function OP2ToOP4 |
1105 |
||
1106 |
; --------------------------------------------------------------------------- |
|
1107 |
||
1108 |
OP4ToOP2: |
|
| 8 | 1109 |
ld hl, 8499h |
1110 |
ld de, 8483h |
|
1111 |
jp Mov11B |
|
| 4 | 1112 |
|
1113 |
; =============== S U B R O U T I N E ======================================= |
|
1114 |
||
1115 |
||
| 7 | 1116 |
BCALL_4120: |
| 8 | 1117 |
ld hl, 848Eh |
1118 |
ld de, 8483h |
|
1119 |
jr Mov11B |
|
| 4 | 1120 |
; End of function BCALL_4120 |
1121 |
||
1122 |
||
1123 |
; =============== S U B R O U T I N E ======================================= |
|
1124 |
||
1125 |
||
| 7 | 1126 |
OP1ToOP3: |
| 8 | 1127 |
ld de, 848Eh |
| 4 | 1128 |
; End of function OP1ToOP3 |
1129 |
||
1130 |
||
1131 |
; =============== S U B R O U T I N E ======================================= |
|
1132 |
||
1133 |
||
| 7 | 1134 |
sub_1103: |
| 8 | 1135 |
ld hl, 8478h |
1136 |
jr Mov11B |
|
| 4 | 1137 |
; --------------------------------------------------------------------------- |
1138 |
||
1139 |
OP5ToOP2: |
|
| 8 | 1140 |
ld hl, 84A4h |
1141 |
ld de, 8483h |
|
1142 |
jr Mov11B |
|
| 4 | 1143 |
; --------------------------------------------------------------------------- |
1144 |
||
| 7 | 1145 |
OP5ToOP6: |
| 8 | 1146 |
ld hl, 84A4h |
1147 |
ld de, 84AFh |
|
1148 |
jr Mov11B |
|
| 4 | 1149 |
; --------------------------------------------------------------------------- |
1150 |
||
1151 |
OP5ToOP4: |
|
| 8 | 1152 |
ld hl, 84A4h |
1153 |
ld de, 8499h |
|
1154 |
jr Mov11B |
|
| 4 | 1155 |
; --------------------------------------------------------------------------- |
1156 |
||
| 7 | 1157 |
OP1ToOP2: |
| 8 | 1158 |
ld hl, 8478h |
1159 |
ld de, 8483h |
|
1160 |
jr Mov11B |
|
| 4 | 1161 |
; --------------------------------------------------------------------------- |
1162 |
||
1163 |
OP6ToOP2: |
|
| 8 | 1164 |
ld hl, 84AFh |
1165 |
ld de, 8483h |
|
1166 |
jr Mov11B |
|
| 4 | 1167 |
; --------------------------------------------------------------------------- |
1168 |
||
1169 |
OP6ToOP1: |
|
| 8 | 1170 |
ld hl, 84AFh |
1171 |
jr page0_117C |
|
| 4 | 1172 |
; --------------------------------------------------------------------------- |
1173 |
||
| 7 | 1174 |
OP4ToOP1: |
| 8 | 1175 |
ld hl, 8499h |
1176 |
jr page0_117C |
|
| 4 | 1177 |
; --------------------------------------------------------------------------- |
1178 |
||
1179 |
OP5ToOP1: |
|
| 8 | 1180 |
ld hl, 84A4h |
1181 |
jr page0_117C |
|
| 4 | 1182 |
; --------------------------------------------------------------------------- |
1183 |
||
| 7 | 1184 |
OP3ToOP1: |
| 8 | 1185 |
ld hl, 848Eh |
1186 |
jr page0_117C |
|
| 4 | 1187 |
; --------------------------------------------------------------------------- |
1188 |
||
1189 |
OP6ToOP5: |
|
| 8 | 1190 |
ld hl, 84AFh |
1191 |
jr page0_114C |
|
| 4 | 1192 |
; --------------------------------------------------------------------------- |
1193 |
||
1194 |
OP4ToOP5: |
|
| 8 | 1195 |
ld hl, 8499h |
| 4 | 1196 |
|
| 7 | 1197 |
page0_114C: |
| 8 | 1198 |
ld de, 84A4h |
1199 |
jr Mov11B |
|
| 4 | 1200 |
; --------------------------------------------------------------------------- |
1201 |
||
1202 |
OP3ToOP5: |
|
| 8 | 1203 |
ld hl, 848Eh |
1204 |
ld de, 84A4h |
|
1205 |
jr Mov11B |
|
| 4 | 1206 |
; --------------------------------------------------------------------------- |
1207 |
||
1208 |
OP2ToOP5: |
|
| 8 | 1209 |
ld hl, 8483h |
1210 |
ld de, 84A4h |
|
1211 |
jr Mov11B |
|
| 4 | 1212 |
; --------------------------------------------------------------------------- |
1213 |
||
1214 |
OP2ToOP6: |
|
| 8 | 1215 |
ld hl, 8483h |
1216 |
ld de, 84AFh |
|
1217 |
jr Mov11B |
|
| 4 | 1218 |
; --------------------------------------------------------------------------- |
1219 |
||
1220 |
OP1ToOP6: |
|
| 8 | 1221 |
ld hl, 8478h |
1222 |
ld de, 84AFh |
|
1223 |
jr Mov11B |
|
| 4 | 1224 |
; --------------------------------------------------------------------------- |
1225 |
||
1226 |
OP1ToOP5: |
|
| 8 | 1227 |
ld hl, 8478h |
1228 |
ld de, 84A4h |
|
1229 |
jr Mov11B |
|
| 4 | 1230 |
; --------------------------------------------------------------------------- |
1231 |
||
| 7 | 1232 |
OP2ToOP1: |
| 8 | 1233 |
ld hl, 8483h |
| 4 | 1234 |
|
| 7 | 1235 |
page0_117C: |
| 8 | 1236 |
ld de, 8478h |
| 4 | 1237 |
|
| 7 | 1238 |
Mov11B: |
| 4 | 1239 |
ldi |
1240 |
||
1241 |
Mov10B: |
|
1242 |
ldi |
|
1243 |
; End of function sub_1103 |
|
1244 |
||
1245 |
||
1246 |
; =============== S U B R O U T I N E ======================================= |
|
1247 |
||
1248 |
Mov9B: |
|
| 7 | 1249 |
mov9B2: |
1250 |
||
| 4 | 1251 |
ldi |
1252 |
||
| 7 | 1253 |
Mov8B: |
| 4 | 1254 |
ldi |
1255 |
Mov7B: |
|
| 7 | 1256 |
Mov7B2: |
| 4 | 1257 |
ldi |
1258 |
||
1259 |
page0_1189: |
|
1260 |
ldi |
|
1261 |
||
1262 |
page0_118B: |
|
1263 |
ldi |
|
1264 |
||
1265 |
page0_118D: |
|
1266 |
ldi |
|
1267 |
||
1268 |
page0_118F: |
|
1269 |
ldi |
|
1270 |
ldi |
|
1271 |
ldi |
|
1272 |
ret |
|
1273 |
; End of function mov9B2 |
|
1274 |
||
1275 |
; --------------------------------------------------------------------------- |
|
| 8 | 1276 |
ld de, 849Bh |
1277 |
ld hl, 8485h |
|
1278 |
jr Mov8B |
|
| 4 | 1279 |
; --------------------------------------------------------------------------- |
1280 |
||
1281 |
page0_119E: |
|
| 8 | 1282 |
ld hl, 847Ah |
1283 |
ld de, 849Bh |
|
1284 |
jr Mov8B |
|
| 4 | 1285 |
; --------------------------------------------------------------------------- |
1286 |
||
1287 |
page0_11A6: |
|
| 8 | 1288 |
ld hl, 849Bh |
1289 |
jr page0_11AE |
|
| 4 | 1290 |
; --------------------------------------------------------------------------- |
1291 |
||
1292 |
page0_11AB: |
|
| 8 | 1293 |
ld hl, 8485h |
| 4 | 1294 |
|
| 7 | 1295 |
page0_11AE: |
| 8 | 1296 |
ld de, 847Ah |
1297 |
jr Mov8B |
|
| 4 | 1298 |
; --------------------------------------------------------------------------- |
1299 |
||
1300 |
page0_11B3: |
|
| 8 | 1301 |
ld de, 8485h |
1302 |
ld hl, 8490h |
|
1303 |
jr Mov7B2 |
|
| 4 | 1304 |
; --------------------------------------------------------------------------- |
1305 |
||
1306 |
page0_11BB: |
|
| 8 | 1307 |
ld de, 847Ah |
1308 |
ld hl, 84A6h |
|
1309 |
jr Mov7B2 |
|
| 4 | 1310 |
; --------------------------------------------------------------------------- |
1311 |
||
1312 |
page0_11C3: |
|
| 8 | 1313 |
ld de, 847Ah |
1314 |
ld hl, 8490h |
|
1315 |
jr Mov7B2 |
|
| 4 | 1316 |
|
1317 |
; =============== S U B R O U T I N E ======================================= |
|
1318 |
||
1319 |
||
| 7 | 1320 |
page0_11CB: |
| 8 | 1321 |
ld de, 847Ah |
1322 |
ld hl, 8490h |
|
1323 |
jr Mov8B |
|
| 4 | 1324 |
; End of function page0_11CB |
1325 |
||
1326 |
; --------------------------------------------------------------------------- |
|
1327 |
||
1328 |
page0_11D3: |
|
| 8 | 1329 |
ld de, 8490h |
1330 |
jr Mov7B2 |
|
| 4 | 1331 |
; --------------------------------------------------------------------------- |
1332 |
||
1333 |
OP2ToOP3: |
|
| 8 | 1334 |
ld hl, 8483h |
| 4 | 1335 |
|
| 7 | 1336 |
page0_11DB: |
| 8 | 1337 |
ld de, 848Eh |
1338 |
jr Mov11B |
|
| 4 | 1339 |
; --------------------------------------------------------------------------- |
1340 |
||
1341 |
OP4ToOP3: |
|
| 8 | 1342 |
ld hl, 8499h |
1343 |
jr page0_11DB |
|
| 4 | 1344 |
; --------------------------------------------------------------------------- |
1345 |
||
1346 |
OP5ToOP3: |
|
| 8 | 1347 |
ld hl, 84A4h |
1348 |
jr page0_11DB |
|
| 4 | 1349 |
; --------------------------------------------------------------------------- |
1350 |
||
1351 |
OP4ToOP6: |
|
| 8 | 1352 |
ld hl, 8499h |
1353 |
ld de, 84AFh |
|
1354 |
jr Mov11B |
|
| 4 | 1355 |
|
1356 |
; =============== S U B R O U T I N E ======================================= |
|
1357 |
||
1358 |
||
| 7 | 1359 |
Mov9ToOP1: |
| 8 | 1360 |
ld de, 8478h |
| 4 | 1361 |
|
| 7 | 1362 |
page0_11F5: |
| 8 | 1363 |
jr mov9B2 |
| 4 | 1364 |
; End of function Mov9ToOP1 |
1365 |
||
1366 |
; --------------------------------------------------------------------------- |
|
1367 |
||
1368 |
Mov9OP1OP2: |
|
| 8 | 1369 |
rst 20h |
| 4 | 1370 |
|
1371 |
; =============== S U B R O U T I N E ======================================= |
|
1372 |
||
1373 |
||
| 7 | 1374 |
Mov9ToOP2: |
| 6 | 1375 |
; Trunc:page0_C20p ... |
| 8 | 1376 |
ld de, 8483h |
1377 |
jr page0_11F5 |
|
| 4 | 1378 |
; End of function Mov9ToOP2 |
1379 |
||
1380 |
||
1381 |
; =============== S U B R O U T I N E ======================================= |
|
1382 |
||
1383 |
||
| 7 | 1384 |
MovFrOP1: |
1385 |
||
| 8 | 1386 |
ld hl, 8478h |
1387 |
jr page0_11F5 |
|
| 4 | 1388 |
; End of function MovFrOP1 |
1389 |
||
1390 |
; --------------------------------------------------------------------------- |
|
1391 |
||
1392 |
OP4Set1: |
|
| 8 | 1393 |
ld hl, 8499h |
1394 |
jr page0_1254 |
|
| 4 | 1395 |
; --------------------------------------------------------------------------- |
1396 |
||
1397 |
OP3Set1: |
|
| 8 | 1398 |
ld hl, 848Eh |
1399 |
jr page0_1254 |
|
| 4 | 1400 |
; --------------------------------------------------------------------------- |
1401 |
||
1402 |
OP2Set8: |
|
| 8 | 1403 |
ld hl, 8483h |
1404 |
ld a, 80h ; '' |
|
1405 |
jr page0_1256 |
|
| 4 | 1406 |
; --------------------------------------------------------------------------- |
1407 |
||
1408 |
OP2Set5: |
|
| 8 | 1409 |
ld a, 50h ; 'P' |
| 4 | 1410 |
; START OF FUNCTION CHUNK FOR OP2Set0 |
1411 |
||
| 7 | 1412 |
OP2SetA: |
| 8 | 1413 |
ld hl, 8483h |
1414 |
jr page0_1256 |
|
| 4 | 1415 |
; END OF FUNCTION CHUNK FOR OP2Set0 |
1416 |
; --------------------------------------------------------------------------- |
|
1417 |
||
1418 |
OP2Set4: |
|
| 8 | 1419 |
ld hl, 8483h |
1420 |
ld a, 40h ; '@' |
|
1421 |
jr page0_1256 |
|
| 4 | 1422 |
; --------------------------------------------------------------------------- |
1423 |
||
1424 |
OP2Set3: |
|
| 8 | 1425 |
ld hl, 8483h |
| 4 | 1426 |
|
1427 |
page0_1224: |
|
| 8 | 1428 |
ld a, 30h ; '0' |
1429 |
jr page0_1256 |
|
| 4 | 1430 |
; --------------------------------------------------------------------------- |
1431 |
||
1432 |
page0_1228: |
|
| 8 | 1433 |
pop hl |
| 4 | 1434 |
|
1435 |
; =============== S U B R O U T I N E ======================================= |
|
1436 |
||
1437 |
||
| 7 | 1438 |
OP1Set1: |
| 8 | 1439 |
ld hl, 8478h |
1440 |
jr page0_1254 |
|
| 4 | 1441 |
; End of function OP1Set1 |
1442 |
||
1443 |
; --------------------------------------------------------------------------- |
|
1444 |
||
1445 |
OP1Set4: |
|
| 8 | 1446 |
ld hl, 8478h |
1447 |
ld a, 40h ; '@' |
|
1448 |
jr page0_1256 |
|
| 4 | 1449 |
; --------------------------------------------------------------------------- |
1450 |
||
1451 |
OP1Set3: |
|
| 8 | 1452 |
ld hl, 8478h |
1453 |
ld a, 30h ; '0' |
|
1454 |
jr page0_1256 |
|
| 4 | 1455 |
; --------------------------------------------------------------------------- |
1456 |
||
1457 |
OP3Set2: |
|
| 8 | 1458 |
ld hl, 848Eh |
1459 |
jr page0_1249 |
|
| 4 | 1460 |
; --------------------------------------------------------------------------- |
1461 |
||
1462 |
OP1Set2: |
|
| 8 | 1463 |
ld hl, 8478h |
1464 |
jr page0_1249 |
|
| 4 | 1465 |
; --------------------------------------------------------------------------- |
1466 |
||
1467 |
OP2Set2: |
|
| 8 | 1468 |
ld hl, 8483h |
| 4 | 1469 |
|
| 7 | 1470 |
page0_1249: |
| 8 | 1471 |
ld a, 20h ; ' ' |
1472 |
jr page0_1256 |
|
| 4 | 1473 |
; --------------------------------------------------------------------------- |
1474 |
||
1475 |
page0_124D: |
|
| 8 | 1476 |
ld a, 10h |
1477 |
jr page0_125C |
|
| 4 | 1478 |
|
1479 |
; =============== S U B R O U T I N E ======================================= |
|
1480 |
||
1481 |
||
| 7 | 1482 |
OP2Set1: |
| 6 | 1483 |
; Trunc:Minus1p |
| 8 | 1484 |
ld hl, 8483h |
| 4 | 1485 |
|
| 7 | 1486 |
page0_1254: |
| 8 | 1487 |
ld a, 10h |
| 4 | 1488 |
; End of function OP2Set1 |
1489 |
||
1490 |
; START OF FUNCTION CHUNK FOR sub_CDF |
|
1491 |
||
| 7 | 1492 |
page0_1256: |
| 8 | 1493 |
ld (hl), 0 |
1494 |
inc hl |
|
1495 |
ld (hl), 80h ; '' |
|
| 4 | 1496 |
|
| 7 | 1497 |
page0_125B: |
| 8 | 1498 |
inc hl |
| 4 | 1499 |
|
| 7 | 1500 |
page0_125C: |
| 8 | 1501 |
ld (hl), a |
1502 |
xor a |
|
1503 |
jr page0_1262 |
|
| 4 | 1504 |
; END OF FUNCTION CHUNK FOR sub_CDF |
1505 |
; --------------------------------------------------------------------------- |
|
1506 |
||
| 7 | 1507 |
Zero16D: |
| 8 | 1508 |
xor a |
1509 |
ld (hl), a |
|
| 4 | 1510 |
; START OF FUNCTION CHUNK FOR sub_CDF |
1511 |
||
| 7 | 1512 |
page0_1262: |
| 8 | 1513 |
inc hl |
1514 |
ld (hl), a |
|
1515 |
inc hl |
|
1516 |
ld (hl), a |
|
1517 |
inc hl |
|
1518 |
ld (hl), a |
|
1519 |
inc hl |
|
1520 |
ld (hl), a |
|
1521 |
inc hl |
|
1522 |
ld (hl), a |
|
1523 |
inc hl |
|
1524 |
ld (hl), a |
|
| 4 | 1525 |
|
1526 |
page0_126E: |
|
| 8 | 1527 |
inc hl |
1528 |
ld (hl), a |
|
| 4 | 1529 |
ret |
1530 |
; END OF FUNCTION CHUNK FOR sub_CDF |
|
1531 |
; --------------------------------------------------------------------------- |
|
1532 |
||
1533 |
OP5Set0: |
|
| 8 | 1534 |
ld hl, 84A4h |
1535 |
jr OPSet0 |
|
| 4 | 1536 |
; --------------------------------------------------------------------------- |
1537 |
||
1538 |
OP4Set0: |
|
| 8 | 1539 |
ld hl, 8499h |
1540 |
jr OPSet0 |
|
| 4 | 1541 |
; --------------------------------------------------------------------------- |
1542 |
||
1543 |
OP3Set0: |
|
| 8 | 1544 |
ld hl, 848Eh |
1545 |
jr OPSet0 |
|
| 4 | 1546 |
; --------------------------------------------------------------------------- |
1547 |
||
1548 |
page0_1280: |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
1549 |
bit fmtReal, (iy+numMode) |
| 8 | 1550 |
jp nz, ErrNon_Real |
| 4 | 1551 |
|
1552 |
; =============== S U B R O U T I N E ======================================= |
|
1553 |
||
1554 |
||
| 7 | 1555 |
OP2Set0: |
| 6 | 1556 |
; sub_BD1+4FEp ... |
| 4 | 1557 |
|
| 7 | 1558 |
|
| 4 | 1559 |
|
| 8 | 1560 |
xor a |
1561 |
jr OP2SetA |
|
| 4 | 1562 |
; End of function OP2Set0 |
1563 |
||
1564 |
||
1565 |
; =============== S U B R O U T I N E ======================================= |
|
1566 |
||
1567 |
||
| 7 | 1568 |
OP1Set0: |
| 8 | 1569 |
ld hl, 8478h |
| 4 | 1570 |
|
| 7 | 1571 |
OPSet0: |
| 8 | 1572 |
xor a |
1573 |
jr page0_1256 |
|
| 4 | 1574 |
; End of function OP1Set0 |
1575 |
||
1576 |
; --------------------------------------------------------------------------- |
|
1577 |
||
1578 |
page0_1290: |
|
| 8 | 1579 |
ld hl, 847Ah |
1580 |
jr Zero16D |
|
| 4 | 1581 |
|
1582 |
; =============== S U B R O U T I N E ======================================= |
|
1583 |
||
1584 |
||
| 7 | 1585 |
ZeroOP1: |
| 8 | 1586 |
ld hl, 8478h |
1587 |
jr ZeroOP |
|
| 4 | 1588 |
; End of function ZeroOP1 |
1589 |
||
1590 |
||
1591 |
; =============== S U B R O U T I N E ======================================= |
|
1592 |
||
1593 |
||
| 7 | 1594 |
ZeroOP2: |
| 8 | 1595 |
ld hl, 8483h |
1596 |
jr ZeroOP |
|
| 4 | 1597 |
; --------------------------------------------------------------------------- |
1598 |
||
| 7 | 1599 |
ZeroOP3: |
| 8 | 1600 |
ld hl, 848Eh |
| 4 | 1601 |
|
| 7 | 1602 |
ZeroOP: |
| 8 | 1603 |
xor a |
1604 |
ld (hl), a |
|
1605 |
inc hl |
|
1606 |
ld (hl), a |
|
1607 |
inc hl |
|
1608 |
ld (hl), a |
|
1609 |
jr page0_125B |
|
| 4 | 1610 |
; End of function ZeroOP2 |
1611 |
||
1612 |
||
1613 |
; =============== S U B R O U T I N E ======================================= |
|
1614 |
||
1615 |
||
| 7 | 1616 |
ClrLp: |
| 8 | 1617 |
ld (hl), 0 |
1618 |
inc hl |
|
| 4 | 1619 |
djnz ClrLp |
1620 |
ret |
|
1621 |
; End of function ClrLp |
|
1622 |
||
1623 |
; --------------------------------------------------------------------------- |
|
| 8 | 1624 |
ld a, c |
| 4 | 1625 |
|
1626 |
; =============== S U B R O U T I N E ======================================= |
|
1627 |
||
1628 |
||
| 7 | 1629 |
ShRAcc: |
1630 |
||
| 4 | 1631 |
rra |
1632 |
rra |
|
1633 |
rra |
|
1634 |
rra |
|
| 8 | 1635 |
and 0Fh |
| 4 | 1636 |
ret |
1637 |
; End of function ShRAcc |
|
1638 |
||
1639 |
; --------------------------------------------------------------------------- |
|
1640 |
||
1641 |
page0_12B8: |
|
| 8 | 1642 |
ld a, c |
| 4 | 1643 |
|
1644 |
; =============== S U B R O U T I N E ======================================= |
|
1645 |
||
1646 |
||
| 7 | 1647 |
ShLAcc: |
| 8 | 1648 |
add a, a |
1649 |
add a, a |
|
1650 |
add a, a |
|
1651 |
add a, a |
|
| 4 | 1652 |
ret |
1653 |
; End of function ShLAcc |
|
1654 |
||
1655 |
; --------------------------------------------------------------------------- |
|
1656 |
||
1657 |
page0_12BE: |
|
| 8 | 1658 |
ld hl, 847Ah |
1659 |
xor a |
|
1660 |
jr SHR14 |
|
| 4 | 1661 |
; --------------------------------------------------------------------------- |
1662 |
||
1663 |
page0_12C4: |
|
| 8 | 1664 |
ld hl, 8479h |
| 4 | 1665 |
|
1666 |
ShR18: |
|
| 8 | 1667 |
xor a |
| 4 | 1668 |
|
1669 |
SHR18A: |
|
1670 |
rrd |
|
| 8 | 1671 |
inc hl |
1672 |
jr page0_12D1 |
|
| 4 | 1673 |
; --------------------------------------------------------------------------- |
1674 |
||
1675 |
page0_12CD: |
|
| 8 | 1676 |
ld hl, 847Ah |
| 4 | 1677 |
|
1678 |
; =============== S U B R O U T I N E ======================================= |
|
1679 |
||
1680 |
||
| 7 | 1681 |
SHR16: |
| 8 | 1682 |
xor a |
| 4 | 1683 |
|
| 7 | 1684 |
page0_12D1: |
| 4 | 1685 |
rrd |
| 8 | 1686 |
inc hl |
| 4 | 1687 |
|
| 7 | 1688 |
SHR14: |
| 4 | 1689 |
rrd |
| 8 | 1690 |
inc hl |
| 4 | 1691 |
rrd |
| 8 | 1692 |
inc hl |
| 4 | 1693 |
rrd |
| 8 | 1694 |
inc hl |
| 4 | 1695 |
rrd |
| 8 | 1696 |
inc hl |
| 4 | 1697 |
rrd |
| 8 | 1698 |
inc hl |
| 4 | 1699 |
rrd |
| 8 | 1700 |
inc hl |
| 4 | 1701 |
rrd |
| 8 | 1702 |
inc hl |
| 4 | 1703 |
ret |
1704 |
; End of function SHR16 |
|
1705 |
||
1706 |
; --------------------------------------------------------------------------- |
|
| 8 | 1707 |
ld hl, 8496h |
1708 |
jr page0_12F2 |
|
| 4 | 1709 |
|
1710 |
; =============== S U B R O U T I N E ======================================= |
|
1711 |
||
1712 |
||
| 7 | 1713 |
page0_12EF: |
| 8 | 1714 |
ld hl, 8480h |
| 4 | 1715 |
|
| 7 | 1716 |
page0_12F2: |
| 8 | 1717 |
xor a |
1718 |
jr SHL14 |
|
| 4 | 1719 |
; End of function page0_12EF |
1720 |
||
1721 |
||
1722 |
; =============== S U B R O U T I N E ======================================= |
|
1723 |
||
1724 |
||
| 7 | 1725 |
sub_12F5: |
| 8 | 1726 |
ld hl, 847Ah |
| 4 | 1727 |
|
1728 |
page0_12F8: |
|
| 8 | 1729 |
ld a, 1 |
1730 |
jr page0_12D1 |
|
| 4 | 1731 |
; End of function sub_12F5 |
1732 |
||
1733 |
; --------------------------------------------------------------------------- |
|
| 8 | 1734 |
ld hl, 8497h |
1735 |
jr SHL16 |
|
| 4 | 1736 |
|
1737 |
; =============== S U B R O U T I N E ======================================= |
|
1738 |
||
1739 |
||
| 7 | 1740 |
page0_1301: |
| 8 | 1741 |
ld hl, 8481h |
| 4 | 1742 |
|
| 7 | 1743 |
SHL16: |
| 8 | 1744 |
xor a |
| 4 | 1745 |
rld |
| 8 | 1746 |
dec hl |
| 4 | 1747 |
|
| 7 | 1748 |
SHL14: |
| 4 | 1749 |
rld |
| 8 | 1750 |
dec hl |
| 4 | 1751 |
rld |
| 8 | 1752 |
dec hl |
| 4 | 1753 |
rld |
| 8 | 1754 |
dec hl |
| 4 | 1755 |
rld |
| 8 | 1756 |
dec hl |
| 4 | 1757 |
rld |
| 8 | 1758 |
dec hl |
| 4 | 1759 |
rld |
| 8 | 1760 |
dec hl |
| 4 | 1761 |
rld |
| 8 | 1762 |
dec hl |
| 4 | 1763 |
ret |
1764 |
; End of function page0_1301 |
|
1765 |
||
1766 |
; --------------------------------------------------------------------------- |
|
1767 |
||
1768 |
page0_131E: |
|
| 8 | 1769 |
ld a, (OP2) |
| 4 | 1770 |
|
1771 |
page0_1321: |
|
| 8 | 1772 |
ld de, 849Bh |
1773 |
jr SHRDRND |
|
1774 |
; --------------------------------------------------------------------------- |
|
1775 |
ld a, 1 |
|
| 4 | 1776 |
|
1777 |
SRDO1: |
|
| 8 | 1778 |
ld de, 847Ah |
1779 |
jr SHRDRND |
|
| 4 | 1780 |
; --------------------------------------------------------------------------- |
1781 |
||
1782 |
page0_132D: |
|
| 8 | 1783 |
ld a, b |
1784 |
ld hl, 84A5h |
|
1785 |
sub (hl) |
|
| 4 | 1786 |
|
1787 |
page0_1332: |
|
| 8 | 1788 |
ld de, 8485h |
| 4 | 1789 |
|
| 7 | 1790 |
SHRDRND: |
| 4 | 1791 |
srl a |
| 8 | 1792 |
ld hl, 8490h |
1793 |
jp nz, page0_1350 |
|
1794 |
ex de, hl |
|
| 4 | 1795 |
call Mov8B |
| 8 | 1796 |
ret nc |
| 4 | 1797 |
|
| 7 | 1798 |
page0_1342: |
| 8 | 1799 |
ld hl, 8490h |
1800 |
xor a |
|
| 4 | 1801 |
call SHR14 |
1802 |
rrd |
|
| 8 | 1803 |
cp 5 |
1804 |
ret c |
|
1805 |
jr page0_136D |
|
| 4 | 1806 |
; --------------------------------------------------------------------------- |
1807 |
||
| 7 | 1808 |
page0_1350: |
| 4 | 1809 |
push af |
| 8 | 1810 |
ld b, a |
| 4 | 1811 |
call ClrLp |
| 8 | 1812 |
ld c, a |
1813 |
ld hl, 8490h |
|
1814 |
add hl, bc |
|
1815 |
ex de, hl |
|
| 4 | 1816 |
cpl |
| 8 | 1817 |
add a, 9 |
1818 |
jr z, page0_1363 |
|
1819 |
ld c, a |
|
| 4 | 1820 |
ldir |
1821 |
||
| 7 | 1822 |
page0_1363: |
| 8 | 1823 |
pop af |
1824 |
jr c, page0_1342 |
|
1825 |
ld a, (hl) |
|
1826 |
cp 50h ; 'P' |
|
1827 |
ret c |
|
1828 |
ld hl, 8497h |
|
| 4 | 1829 |
|
| 7 | 1830 |
page0_136D: |
| 8 | 1831 |
ld a, 1 |
1832 |
ld b, 8 |
|
1833 |
jr ADDPROPLP |
|
| 4 | 1834 |
|
1835 |
; =============== S U B R O U T I N E ======================================= |
|
1836 |
||
1837 |
||
| 7 | 1838 |
sub_1373: |
| 8 | 1839 |
ld a, 1 |
| 4 | 1840 |
|
1841 |
MANTPA: |
|
| 8 | 1842 |
ld b, 7 |
| 4 | 1843 |
|
| 7 | 1844 |
ADDPROP: |
| 8 | 1845 |
or a |
| 4 | 1846 |
|
| 7 | 1847 |
ADDPROPLP: |
| 4 | 1848 |
adc a, (hl) |
1849 |
daa |
|
| 8 | 1850 |
ld (hl), a |
1851 |
ret nc |
|
1852 |
dec hl |
|
1853 |
ld a, 0 |
|
| 4 | 1854 |
djnz ADDPROPLP |
1855 |
ret |
|
1856 |
; End of function sub_1373 |
|
1857 |
||
1858 |
; --------------------------------------------------------------------------- |
|
1859 |
||
1860 |
page0_1382: |
|
| 8 | 1861 |
ld a, (OP2) |
1862 |
and 1 |
|
1863 |
ld a, b |
|
| 4 | 1864 |
call z, ShLAcc |
1865 |
||
1866 |
page0_138B: |
|
| 8 | 1867 |
ld b, 8 |
1868 |
jr ADDPROP |
|
| 4 | 1869 |
; --------------------------------------------------------------------------- |
1870 |
||
1871 |
page0_138F: |
|
| 8 | 1872 |
ld hl, 84A2h |
1873 |
ld de, 848Ch |
|
1874 |
jr ADD16D |
|
| 4 | 1875 |
|
1876 |
; =============== S U B R O U T I N E ======================================= |
|
1877 |
||
1878 |
||
| 7 | 1879 |
sub_1397: |
| 8 | 1880 |
ld hl, 8481h |
1881 |
ld de, 848Ch |
|
1882 |
jr ADD16D |
|
| 4 | 1883 |
; End of function sub_1397 |
1884 |
||
1885 |
||
1886 |
; =============== S U B R O U T I N E ======================================= |
|
1887 |
||
1888 |
||
| 7 | 1889 |
page0_139F: |
| 8 | 1890 |
ld hl, 848Ch |
1891 |
ld de, 8481h |
|
1892 |
jr ADD16D |
|
1893 |
; --------------------------------------------------------------------------- |
|
1894 |
ld de, 848Bh |
|
1895 |
jr page0_13AF |
|
1896 |
; --------------------------------------------------------------------------- |
|
1897 |
ld de, 8480h |
|
| 4 | 1898 |
|
| 7 | 1899 |
page0_13AF: |
| 8 | 1900 |
ld hl, 848Bh |
1901 |
xor a |
|
1902 |
jr ADD14D |
|
| 4 | 1903 |
; --------------------------------------------------------------------------- |
1904 |
||
1905 |
page0_13B5: |
|
| 8 | 1906 |
ld hl, 8497h |
1907 |
ld de, 8481h |
|
| 4 | 1908 |
|
| 7 | 1909 |
ADD16D: |
| 8 | 1910 |
ld a, (de) |
1911 |
add a, (hl) |
|
| 4 | 1912 |
daa |
| 8 | 1913 |
ld (de), a |
1914 |
dec de |
|
1915 |
dec hl |
|
| 4 | 1916 |
|
| 7 | 1917 |
ADD14D: |
1918 |
||
| 8 | 1919 |
ld a, (de) |
| 4 | 1920 |
adc a, (hl) |
1921 |
daa |
|
| 8 | 1922 |
ld (de), a |
1923 |
dec de |
|
1924 |
dec hl |
|
1925 |
ld a, (de) |
|
| 4 | 1926 |
adc a, (hl) |
1927 |
daa |
|
| 8 | 1928 |
ld (de), a |
1929 |
dec de |
|
1930 |
dec hl |
|
1931 |
ld a, (de) |
|
| 4 | 1932 |
adc a, (hl) |
1933 |
daa |
|
| 8 | 1934 |
ld (de), a |
1935 |
dec de |
|
1936 |
dec hl |
|
| 4 | 1937 |
|
| 7 | 1938 |
page0_13D3: |
| 8 | 1939 |
ld a, (de) |
| 4 | 1940 |
adc a, (hl) |
1941 |
daa |
|
| 8 | 1942 |
ld (de), a |
1943 |
dec de |
|
1944 |
dec hl |
|
1945 |
ld a, (de) |
|
| 4 | 1946 |
adc a, (hl) |
1947 |
daa |
|
| 8 | 1948 |
ld (de), a |
1949 |
dec de |
|
1950 |
dec hl |
|
1951 |
ld a, (de) |
|
| 4 | 1952 |
adc a, (hl) |
1953 |
daa |
|
| 8 | 1954 |
ld (de), a |
1955 |
dec de |
|
1956 |
dec hl |
|
1957 |
ld a, (de) |
|
| 4 | 1958 |
adc a, (hl) |
1959 |
daa |
|
| 8 | 1960 |
ld (de), a |
1961 |
dec de |
|
1962 |
dec hl |
|
| 4 | 1963 |
ret |
1964 |
; End of function page0_139F |
|
1965 |
||
1966 |
; --------------------------------------------------------------------------- |
|
1967 |
||
1968 |
page0_13EC: |
|
| 8 | 1969 |
ld a, (OP5) |
1970 |
and 80h ; '' |
|
| 4 | 1971 |
|
1972 |
page0_13F1: |
|
| 8 | 1973 |
ld hl, 8497h |
1974 |
ld de, 848Ch |
|
1975 |
jr nz, SUB16D |
|
1976 |
jp ADD16D |
|
| 4 | 1977 |
; --------------------------------------------------------------------------- |
1978 |
||
1979 |
page0_13FC: |
|
| 8 | 1980 |
ld a, (OP5) |
1981 |
and 80h ; '' |
|
1982 |
ld hl, 8497h |
|
1983 |
ld de, 848Ch |
|
1984 |
jr nz, SUB16D |
|
1985 |
jp page0_13D3 |
|
| 4 | 1986 |
; --------------------------------------------------------------------------- |
1987 |
||
1988 |
page0_140C: |
|
| 8 | 1989 |
ld hl, 8496h |
1990 |
ld de, 8480h |
|
1991 |
xor a |
|
1992 |
jr ADD14D |
|
| 4 | 1993 |
|
1994 |
; =============== S U B R O U T I N E ======================================= |
|
1995 |
||
1996 |
||
| 7 | 1997 |
sub_1415: |
| 8 | 1998 |
ld hl, 8481h |
1999 |
ld de, 848Ch |
|
2000 |
jr SUB16D |
|
| 4 | 2001 |
; End of function sub_1415 |
2002 |
||
2003 |
||
2004 |
; =============== S U B R O U T I N E ======================================= |
|
2005 |
||
2006 |
||
| 7 | 2007 |
page0_141D: |
| 8 | 2008 |
ld hl, 848Ch |
2009 |
jr page0_142D |
|
| 4 | 2010 |
; --------------------------------------------------------------------------- |
2011 |
||
2012 |
page0_1422: |
|
| 8 | 2013 |
ld hl, 8481h |
2014 |
ld de, 8497h |
|
2015 |
jr SUB16D |
|
| 4 | 2016 |
; --------------------------------------------------------------------------- |
2017 |
||
2018 |
page0_142A: |
|
| 8 | 2019 |
ld hl, 8497h |
| 4 | 2020 |
|
| 7 | 2021 |
page0_142D: |
| 8 | 2022 |
ld de, 8481h |
| 4 | 2023 |
|
| 7 | 2024 |
SUB16D: |
| 8 | 2025 |
ld a, (de) |
2026 |
sub (hl) |
|
| 4 | 2027 |
daa |
| 8 | 2028 |
ld (de), a |
2029 |
dec de |
|
2030 |
dec hl |
|
| 4 | 2031 |
|
| 7 | 2032 |
SUB14D: |
| 8 | 2033 |
ld a, (de) |
2034 |
sbc a, (hl) |
|
| 4 | 2035 |
daa |
| 8 | 2036 |
ld (de), a |
2037 |
dec de |
|
2038 |
dec hl |
|
2039 |
ld a, (de) |
|
2040 |
sbc a, (hl) |
|
| 4 | 2041 |
daa |
| 8 | 2042 |
ld (de), a |
2043 |
dec de |
|
2044 |
dec hl |
|
2045 |
ld a, (de) |
|
2046 |
sbc a, (hl) |
|
| 4 | 2047 |
daa |
| 8 | 2048 |
ld (de), a |
2049 |
dec de |
|
2050 |
dec hl |
|
| 4 | 2051 |
|
2052 |
page0_1448: |
|
| 8 | 2053 |
ld a, (de) |
2054 |
sbc a, (hl) |
|
| 4 | 2055 |
daa |
| 8 | 2056 |
ld (de), a |
2057 |
dec de |
|
2058 |
dec hl |
|
2059 |
ld a, (de) |
|
2060 |
sbc a, (hl) |
|
| 4 | 2061 |
daa |
| 8 | 2062 |
ld (de), a |
2063 |
dec de |
|
2064 |
dec hl |
|
2065 |
ld a, (de) |
|
2066 |
sbc a, (hl) |
|
| 4 | 2067 |
daa |
| 8 | 2068 |
ld (de), a |
2069 |
dec de |
|
2070 |
dec hl |
|
2071 |
ld a, (de) |
|
2072 |
sbc a, (hl) |
|
| 4 | 2073 |
daa |
| 8 | 2074 |
ld (de), a |
2075 |
dec de |
|
2076 |
dec hl |
|
| 4 | 2077 |
ret |
2078 |
; End of function page0_141D |
|
2079 |
||
2080 |
; --------------------------------------------------------------------------- |
|
2081 |
||
2082 |
page0_1461: |
|
| 8 | 2083 |
ld de, 84A1h |
2084 |
xor a |
|
2085 |
jr SUB14D |
|
| 4 | 2086 |
; --------------------------------------------------------------------------- |
2087 |
||
2088 |
page0_1467: |
|
| 8 | 2089 |
ld hl, 8480h |
2090 |
ld de, 8496h |
|
2091 |
xor a |
|
2092 |
jr SUB14D |
|
| 4 | 2093 |
; --------------------------------------------------------------------------- |
2094 |
||
2095 |
page0_1470: |
|
| 8 | 2096 |
ld hl, 8496h |
2097 |
ld de, 8480h |
|
2098 |
xor a |
|
2099 |
jr SUB14D |
|
| 4 | 2100 |
; --------------------------------------------------------------------------- |
2101 |
||
2102 |
OP2ExOP6: |
|
| 8 | 2103 |
ld hl, 84AFh |
2104 |
jr page0_1498 |
|
| 4 | 2105 |
; --------------------------------------------------------------------------- |
2106 |
||
2107 |
OP5ExOP6: |
|
| 8 | 2108 |
ld hl, 84A4h |
2109 |
ld de, 84AFh |
|
2110 |
jr page0_14B6 |
|
| 4 | 2111 |
; --------------------------------------------------------------------------- |
2112 |
||
2113 |
OP1ExOP5: |
|
| 8 | 2114 |
ld hl, 84A4h |
2115 |
jr page0_14B3 |
|
| 4 | 2116 |
; --------------------------------------------------------------------------- |
2117 |
||
2118 |
OP1ExOP6: |
|
| 8 | 2119 |
ld hl, 84AFh |
2120 |
jr page0_14B3 |
|
| 4 | 2121 |
; --------------------------------------------------------------------------- |
2122 |
||
2123 |
OP2ExOP4: |
|
| 8 | 2124 |
ld hl, 8499h |
2125 |
jr page0_1498 |
|
| 4 | 2126 |
; --------------------------------------------------------------------------- |
2127 |
||
2128 |
OP2ExOP5: |
|
| 8 | 2129 |
ld hl, 84A4h |
| 4 | 2130 |
|
| 7 | 2131 |
page0_1498: |
| 8 | 2132 |
ld de, 8483h |
2133 |
jr page0_14B6 |
|
| 4 | 2134 |
; --------------------------------------------------------------------------- |
2135 |
||
2136 |
OP1ExOP3: |
|
| 8 | 2137 |
ld hl, 848Eh |
2138 |
jr page0_14B3 |
|
| 4 | 2139 |
; --------------------------------------------------------------------------- |
2140 |
||
2141 |
OP1ExOP4: |
|
| 8 | 2142 |
ld hl, 8499h |
2143 |
jr page0_14B3 |
|
| 4 | 2144 |
; --------------------------------------------------------------------------- |
2145 |
||
2146 |
page0_14A7: |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2147 |
call j_RndGuard |
| 4 | 2148 |
call OP1ExOP2 |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2149 |
call j_RndGuard |
| 4 | 2150 |
|
2151 |
; =============== S U B R O U T I N E ======================================= |
|
2152 |
||
2153 |
||
| 7 | 2154 |
OP1ExOP2: |
| 8 | 2155 |
ld hl, 8483h |
| 4 | 2156 |
|
| 7 | 2157 |
page0_14B3: |
| 8 | 2158 |
ld de, 8478h |
| 4 | 2159 |
|
| 7 | 2160 |
page0_14B6: |
| 8 | 2161 |
ld b, 0Bh |
| 4 | 2162 |
|
| 7 | 2163 |
ExLp: |
| 8 | 2164 |
ld a, (de) |
2165 |
ld c, (hl) |
|
2166 |
ld (hl), a |
|
2167 |
ld a, c |
|
2168 |
ld (de), a |
|
2169 |
inc hl |
|
2170 |
inc de |
|
| 4 | 2171 |
djnz ExLp |
2172 |
ret |
|
2173 |
; End of function OP1ExOP2 |
|
2174 |
||
2175 |
; --------------------------------------------------------------------------- |
|
2176 |
||
2177 |
CkOP1C0: |
|
| 8 | 2178 |
ld a, (OP2M) |
2179 |
or a |
|
2180 |
ret nz |
|
| 4 | 2181 |
|
2182 |
; =============== S U B R O U T I N E ======================================= |
|
2183 |
||
2184 |
||
| 7 | 2185 |
CkOP1FP0: |
| 6 | 2186 |
; page0_CF2:loc_D26p ... |
| 8 | 2187 |
ld a, (OP1M) |
2188 |
and a |
|
| 4 | 2189 |
ret |
2190 |
; End of function CkOP1FP0 |
|
2191 |
||
2192 |
||
2193 |
; =============== S U B R O U T I N E ======================================= |
|
2194 |
||
2195 |
||
| 7 | 2196 |
CkOP2FP0: |
| 6 | 2197 |
; page0_CF2+38p ... |
| 8 | 2198 |
ld a, (OP2M) |
2199 |
and a |
|
| 4 | 2200 |
ret |
2201 |
; End of function CkOP2FP0 |
|
2202 |
||
2203 |
; --------------------------------------------------------------------------- |
|
2204 |
||
2205 |
page0_14D1: |
|
2206 |
call CkOP1Real |
|
| 8 | 2207 |
ret nz |
| 4 | 2208 |
|
2209 |
PosNo0Int: |
|
| 8 | 2210 |
ld a, (OP1M) |
2211 |
sub 10h |
|
2212 |
ret c |
|
| 4 | 2213 |
|
2214 |
; =============== S U B R O U T I N E ======================================= |
|
2215 |
||
2216 |
||
| 7 | 2217 |
CKPosInt: |
| 8 | 2218 |
ld a, (OP1) |
2219 |
and 80h ; '' |
|
2220 |
ret nz |
|
| 4 | 2221 |
; End of function CKPosInt |
2222 |
||
2223 |
||
2224 |
; =============== S U B R O U T I N E ======================================= |
|
2225 |
||
2226 |
||
| 7 | 2227 |
page0_14E1: |
| 8 | 2228 |
ld hl, 8479h |
| 4 | 2229 |
|
2230 |
CKInt: |
|
| 8 | 2231 |
ld d, 1 |
2232 |
jr page0_14EA |
|
| 4 | 2233 |
; --------------------------------------------------------------------------- |
2234 |
||
| 7 | 2235 |
CKOdd: |
| 8 | 2236 |
ld d, 0 |
| 4 | 2237 |
|
| 7 | 2238 |
page0_14EA: |
| 8 | 2239 |
ld a, (hl) |
2240 |
ld e, a |
|
2241 |
sub 80h ; '' |
|
2242 |
ret c |
|
2243 |
cp 0Eh |
|
2244 |
jr c, page0_14F5 |
|
2245 |
xor a |
|
| 4 | 2246 |
ret |
2247 |
; --------------------------------------------------------------------------- |
|
2248 |
||
| 7 | 2249 |
page0_14F5: |
| 4 | 2250 |
srl a |
| 8 | 2251 |
ld b, 0 |
2252 |
ld c, a |
|
2253 |
inc hl |
|
2254 |
add hl, bc |
|
2255 |
ld a, (hl) |
|
2256 |
bit 0, d |
|
2257 |
jr nz, page0_1509 |
|
2258 |
bit 0, e |
|
| 4 | 2259 |
call z, ShRAcc |
| 8 | 2260 |
and 1 |
| 4 | 2261 |
ret |
2262 |
; --------------------------------------------------------------------------- |
|
2263 |
||
| 7 | 2264 |
page0_1509: |
| 8 | 2265 |
bit 0, e |
2266 |
jr nz, page0_1510 |
|
2267 |
and 0Fh |
|
2268 |
ret nz |
|
| 4 | 2269 |
|
| 7 | 2270 |
page0_1510: |
| 8 | 2271 |
ld a, 6 |
2272 |
sub c |
|
2273 |
ret z |
|
2274 |
inc hl |
|
2275 |
ld b, a |
|
2276 |
jr sub_1525 |
|
| 4 | 2277 |
; End of function page0_14E1 |
2278 |
||
2279 |
; --------------------------------------------------------------------------- |
|
2280 |
||
2281 |
page0_1518: |
|
| 8 | 2282 |
ld a, 10h |
2283 |
jr CKOP1M |
|
| 4 | 2284 |
; --------------------------------------------------------------------------- |
2285 |
||
2286 |
page0_151C: |
|
| 8 | 2287 |
xor a |
| 4 | 2288 |
|
| 7 | 2289 |
CKOP1M: |
| 8 | 2290 |
ld hl, 847Ah |
2291 |
cp (hl) |
|
2292 |
ret nz |
|
2293 |
inc hl |
|
2294 |
ld b, 7 |
|
| 4 | 2295 |
|
2296 |
; =============== S U B R O U T I N E ======================================= |
|
2297 |
||
2298 |
||
| 7 | 2299 |
sub_1525: |
| 8 | 2300 |
xor a |
| 4 | 2301 |
|
| 7 | 2302 |
page0_1526: |
| 8 | 2303 |
cp (hl) |
2304 |
ret nz |
|
2305 |
inc hl |
|
| 4 | 2306 |
djnz page0_1526 |
2307 |
ret |
|
2308 |
; End of function sub_1525 |
|
2309 |
||
2310 |
; --------------------------------------------------------------------------- |
|
2311 |
||
2312 |
GETCONOP1: |
|
| 8 | 2313 |
ld de, 8478h |
2314 |
jr page0_1534 |
|
| 4 | 2315 |
|
2316 |
; =============== S U B R O U T I N E ======================================= |
|
2317 |
||
2318 |
||
| 7 | 2319 |
GETCONOP2: |
| 8 | 2320 |
ld de, 8483h |
| 4 | 2321 |
|
| 7 | 2322 |
page0_1534: |
| 4 | 2323 |
push af |
| 8 | 2324 |
xor a |
2325 |
ld (de), a |
|
2326 |
inc de |
|
2327 |
pop af |
|
2328 |
ld hl, unk_1544 |
|
| 4 | 2329 |
call sub_18C3 |
2330 |
ldi |
|
2331 |
ldi |
|
2332 |
ret |
|
2333 |
; End of function GETCONOP2 |
|
2334 |
||
2335 |
unk_1544: |
|
| 8 | 2336 |
.db 81h ; ü |
2337 |
.db 57h ; W |
|
2338 |
.db 29h ; ) |
|
2339 |
.db 57h ; W |
|
2340 |
.db 79h ; y |
|
2341 |
.db 51h ; Q |
|
2342 |
.db 30h ; 0 |
|
2343 |
.db 82h ; é |
|
2344 |
.db 32h ; 2 |
|
| 4 | 2345 |
PIDIV2: |
| 8 | 2346 |
.db 80h ; Ç |
2347 |
.db 15h |
|
2348 |
.db 70h ; p |
|
2349 |
.db 79h ; y |
|
2350 |
.db 63h ; c |
|
2351 |
.db 26h ; & |
|
2352 |
.db 79h ; y |
|
2353 |
.db 48h ; H |
|
2354 |
.db 97h ; ù |
|
| 4 | 2355 |
PIDIV4: |
| 8 | 2356 |
.db 7Fh ; |
2357 |
.db 78h ; x |
|
2358 |
.db 53h ; S |
|
2359 |
.db 98h ; ÿ |
|
2360 |
.db 16h |
|
2361 |
.db 33h ; 3 |
|
2362 |
.db 97h ; ù |
|
2363 |
.db 44h ; D |
|
2364 |
.db 83h ; â |
|
2365 |
.db 7Fh ; |
|
2366 |
.db 43h ; C |
|
2367 |
.db 42h ; B |
|
2368 |
.db 94h ; ö |
|
2369 |
.db 48h ; H |
|
2370 |
.db 19h |
|
2371 |
.db 3 |
|
2372 |
.db 25h ; % |
|
2373 |
.db 18h |
|
2374 |
.db 80h ; Ç |
|
2375 |
.db 31h ; 1 |
|
2376 |
.db 41h ; A |
|
2377 |
.db 59h ; Y |
|
2378 |
.db 26h ; & |
|
2379 |
.db 53h ; S |
|
2380 |
.db 58h ; X |
|
2381 |
.db 98h ; ÿ |
|
2382 |
.db 0 |
|
2383 |
.db 7Eh ; ~ |
|
2384 |
.db 17h |
|
2385 |
.db 45h ; E |
|
2386 |
.db 32h ; 2 |
|
2387 |
.db 92h ; Æ |
|
2388 |
.db 51h ; Q |
|
2389 |
.db 99h ; Ö |
|
2390 |
.db 43h ; C |
|
2391 |
.db 30h ; 0 |
|
2392 |
.db 80h ; Ç |
|
2393 |
.db 23h ; # |
|
2394 |
.db 2 |
|
2395 |
.db 58h ; X |
|
2396 |
.db 50h ; P |
|
2397 |
.db 92h ; Æ |
|
2398 |
.db 99h ; Ö |
|
2399 |
.db 40h ; @ |
|
2400 |
.db 46h ; F |
|
| 4 | 2401 |
PItimes2: |
| 8 | 2402 |
.db 62h ; b |
2403 |
.db 83h ; â |
|
2404 |
.db 18h |
|
2405 |
.db 53h ; S |
|
2406 |
.db 7 |
|
2407 |
.db 17h |
|
2408 |
.db 96h ; û |
|
| 4 | 2409 |
PI: |
| 8 | 2410 |
.db 31h ; 1 |
2411 |
.db 41h ; A |
|
2412 |
.db 59h ; Y |
|
2413 |
.db 26h ; & |
|
2414 |
.db 53h ; S |
|
2415 |
.db 58h ; X |
|
| 4 | 2416 |
unk_1590: |
| 8 | 2417 |
.db 98h ; ÿ |
2418 |
.db 78h ; x |
|
2419 |
.db 53h ; S |
|
2420 |
.db 98h ; ÿ |
|
2421 |
.db 16h |
|
2422 |
.db 33h ; 3 |
|
2423 |
.db 97h ; ù |
|
| 4 | 2424 |
unk_1597: |
| 8 | 2425 |
.db 45h ; E |
| 4 | 2426 |
unk_1598: |
| 8 | 2427 |
.db 15h |
2428 |
.db 70h ; p |
|
2429 |
.db 79h ; y |
|
2430 |
.db 63h ; c |
|
2431 |
.db 26h ; & |
|
2432 |
.db 79h ; y |
|
2433 |
.db 49h ; I |
|
| 4 | 2434 |
|
| 7 | 2435 |
ExpToHex: |
| 8 | 2436 |
ld a, 80h ; '' |
2437 |
sub (hl) |
|
2438 |
jr nc, page0_15A7 |
|
2439 |
res 7, (hl) |
|
| 4 | 2440 |
ret |
2441 |
; --------------------------------------------------------------------------- |
|
2442 |
||
| 7 | 2443 |
page0_15A7: |
| 8 | 2444 |
ld (hl), a |
| 4 | 2445 |
ret |
2446 |
; End of function ExpToHex |
|
2447 |
||
2448 |
; --------------------------------------------------------------------------- |
|
2449 |
||
2450 |
OP1ExpToDec: |
|
| 8 | 2451 |
ld hl, 8479h |
| 4 | 2452 |
call ExpToHex |
| 8 | 2453 |
ld a, (hl) |
2454 |
and 0F0h ; |
|
| 4 | 2455 |
call ShRAcc |
| 8 | 2456 |
ld b, a |
2457 |
ld a, (hl) |
|
2458 |
and 0Fh |
|
2459 |
add a, 0 |
|
| 4 | 2460 |
daa |
2461 |
||
| 7 | 2462 |
page0_15BC: |
| 8 | 2463 |
dec b |
2464 |
ret m |
|
2465 |
add a, 16h |
|
| 4 | 2466 |
daa |
| 8 | 2467 |
jr nc, page0_15BC |
2468 |
jp ErrOverflow |
|
| 4 | 2469 |
; --------------------------------------------------------------------------- |
2470 |
||
2471 |
ckop2pos: |
|
| 8 | 2472 |
ld a, (OP2) |
2473 |
jr page0_15CE |
|
| 4 | 2474 |
|
2475 |
; =============== S U B R O U T I N E ======================================= |
|
2476 |
||
2477 |
||
| 7 | 2478 |
CkOP1Pos: |
| 8 | 2479 |
ld a, (OP1) |
| 4 | 2480 |
|
| 7 | 2481 |
page0_15CE: |
| 8 | 2482 |
and 80h ; '' |
| 4 | 2483 |
ret |
2484 |
; End of function CkOP1Pos |
|
2485 |
||
2486 |
||
2487 |
; =============== S U B R O U T I N E ======================================= |
|
2488 |
||
2489 |
||
| 7 | 2490 |
ClrOP2S: |
| 8 | 2491 |
ld hl, 8483h |
2492 |
jr page0_15D9 |
|
| 4 | 2493 |
; End of function ClrOP2S |
2494 |
||
2495 |
||
2496 |
; =============== S U B R O U T I N E ======================================= |
|
2497 |
||
2498 |
||
| 7 | 2499 |
ClrOP1S: |
2500 |
||
| 8 | 2501 |
ld hl, 8478h |
| 4 | 2502 |
|
| 7 | 2503 |
page0_15D9: |
| 8 | 2504 |
ld a, (hl) |
| 4 | 2505 |
|
| 7 | 2506 |
page0_15DA: |
| 8 | 2507 |
res 7, (hl) |
| 4 | 2508 |
ret |
2509 |
; End of function ClrOP1S |
|
2510 |
||
2511 |
; --------------------------------------------------------------------------- |
|
2512 |
||
2513 |
FDIV100: |
|
2514 |
call FDIV10 |
|
2515 |
||
2516 |
FDIV10: |
|
2517 |
call CkOP1FP0 |
|
| 8 | 2518 |
ret z |
| 4 | 2519 |
call DecO1Exp |
| 8 | 2520 |
jp z, OP1Set0 |
| 4 | 2521 |
ret |
2522 |
||
2523 |
; =============== S U B R O U T I N E ======================================= |
|
2524 |
||
2525 |
||
| 7 | 2526 |
DecO1Exp: |
| 29 | 2527 |
ld a, (OP1+1) |
| 8 | 2528 |
dec a |
| 29 | 2529 |
ld (OP1+1), a |
| 4 | 2530 |
ret |
2531 |
; End of function DecO1Exp |
|
2532 |
||
2533 |
||
2534 |
; =============== S U B R O U T I N E ======================================= |
|
2535 |
||
2536 |
||
| 7 | 2537 |
INCO1EXP: |
2538 |
||
2539 |
||
2540 |
||
| 4 | 2541 |
|
| 8 | 2542 |
ld hl, 8479h |
| 4 | 2543 |
|
2544 |
INCEXP: |
|
| 8 | 2545 |
inc (hl) |
2546 |
ret nz |
|
2547 |
jp ErrOverflow |
|
| 4 | 2548 |
; End of function INCO1EXP |
2549 |
||
2550 |
||
2551 |
; =============== S U B R O U T I N E ======================================= |
|
2552 |
||
2553 |
||
| 7 | 2554 |
CkValidNum: |
| 8 | 2555 |
ld a, (OP1) |
| 4 | 2556 |
|
2557 |
page0_15FE: |
|
| 8 | 2558 |
and 1Fh |
| 4 | 2559 |
push af |
| 8 | 2560 |
jr z, page0_1620 |
2561 |
cp 0Ch |
|
2562 |
jr nz, page0_1639 |
|
| 4 | 2563 |
call CkOP2FP0 |
| 8 | 2564 |
jr nz, page0_1614 |
| 4 | 2565 |
|
| 7 | 2566 |
page0_160C: |
| 4 | 2567 |
call OP2Set0 |
| 8 | 2568 |
pop af |
2569 |
ld (OP2), a |
|
| 4 | 2570 |
push af |
2571 |
||
| 7 | 2572 |
page0_1614: |
| 29 | 2573 |
ld a, (OP2+1) |
| 8 | 2574 |
cp 0E4h ; '䧍 |
2575 |
jp nc, ErrOverflow |
|
2576 |
cp 1Dh |
|
2577 |
jr c, page0_160C |
|
| 4 | 2578 |
|
| 7 | 2579 |
page0_1620: |
| 4 | 2580 |
call CkOP1FP0 |
| 8 | 2581 |
jr nz, page0_162D |
| 4 | 2582 |
|
| 7 | 2583 |
page0_1625: |
| 4 | 2584 |
call OP1Set0 |
| 8 | 2585 |
pop af |
2586 |
ld (OP1), a |
|
| 4 | 2587 |
ret |
2588 |
; --------------------------------------------------------------------------- |
|
2589 |
||
| 7 | 2590 |
page0_162D: |
| 29 | 2591 |
ld a, (OP1+1) |
| 8 | 2592 |
cp 0E4h ; '䧍 |
2593 |
jp nc, ErrOverflow |
|
2594 |
cp 1Dh |
|
2595 |
jr c, page0_1625 |
|
| 4 | 2596 |
|
| 7 | 2597 |
page0_1639: |
| 8 | 2598 |
pop af |
| 4 | 2599 |
ret |
2600 |
; End of function CkValidNum |
|
2601 |
||
2602 |
; --------------------------------------------------------------------------- |
|
2603 |
||
2604 |
GETEXP: |
|
| 29 | 2605 |
ld a, (OP1+1) |
| 8 | 2606 |
cp 80h ; '' |
| 4 | 2607 |
ret |
2608 |
||
2609 |
; =============== S U B R O U T I N E ======================================= |
|
2610 |
||
2611 |
||
| 7 | 2612 |
page0_1641: |
| 29 | 2613 |
ld a, (OP1+1) |
| 8 | 2614 |
cp 24h ; '$' |
| 4 | 2615 |
ret |
2616 |
; End of function page0_1641 |
|
2617 |
||
2618 |
||
2619 |
; =============== S U B R O U T I N E ======================================= |
|
2620 |
||
2621 |
||
| 7 | 2622 |
HTimesL: |
| 8 | 2623 |
ld b, h |
2624 |
ld h, 0 |
|
2625 |
ld d, h |
|
2626 |
ld e, h |
|
2627 |
ex de, hl |
|
2628 |
or a |
|
| 4 | 2629 |
|
| 7 | 2630 |
page0_164E: |
| 4 | 2631 |
adc hl, de |
2632 |
djnz page0_164E |
|
2633 |
ret |
|
2634 |
; End of function HTimesL |
|
2635 |
||
2636 |
||
2637 |
; =============== S U B R O U T I N E ======================================= |
|
2638 |
||
2639 |
||
| 7 | 2640 |
EOP1NotReal: |
| 4 | 2641 |
call CkOP1Real |
| 8 | 2642 |
ret z |
2643 |
cp 0Eh |
|
2644 |
jp z, ErrInvalid |
|
2645 |
jp ErrDataType |
|
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2646 |
last_entry_to_OP1: |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2647 |
ld hl, 21h |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2648 |
jr {+}
|
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2649 |
command_buf_to_OP1: |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2650 |
ld hl, 23h |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2651 |
+: ld a, 5 |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2652 |
AHLtoOP1: |
| 8 | 2653 |
ld (OP1), a |
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2654 |
jr HLtoOP1 |
| 4 | 2655 |
page0_166E: |
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2656 |
ld hl, 40h |
| 7 | 2657 |
page0_1671: |
| 8 | 2658 |
ld a, 3 |
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2659 |
jr AHLtoOP1 |
| 4 | 2660 |
page0_1675: |
| 8 | 2661 |
ld hl, 2A01h |
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2662 |
HLtoOP1: |
| 29 | 2663 |
ld (OP1+1), hl |
| 8 | 2664 |
xor a |
| 29 | 2665 |
ld (OP1+3), a |
| 4 | 2666 |
ret |
2667 |
; END OF FUNCTION CHUNK FOR page0_1671 |
|
2668 |
||
2669 |
; =============== S U B R O U T I N E ======================================= |
|
2670 |
||
2671 |
||
| 7 | 2672 |
sub_1680: |
2673 |
||
| 8 | 2674 |
ld a, 40h ; '@' |
| 4 | 2675 |
|
2676 |
page0_1682: |
|
| 8 | 2677 |
ld h, a |
2678 |
ld l, 5Dh ; ']' |
|
2679 |
ld a, 1 |
|
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2680 |
jr AHLtoOP1 |
| 4 | 2681 |
; End of function sub_1680 |
2682 |
||
2683 |
; --------------------------------------------------------------------------- |
|
2684 |
||
2685 |
ThetaName: |
|
| 8 | 2686 |
ld a, 5Bh ; '[' |
2687 |
jr REALNAME |
|
| 4 | 2688 |
; --------------------------------------------------------------------------- |
2689 |
||
2690 |
RName: |
|
| 8 | 2691 |
ld a, 52h ; 'R' |
2692 |
jr REALNAME |
|
| 4 | 2693 |
; --------------------------------------------------------------------------- |
2694 |
||
2695 |
REGEQNAME: |
|
| 8 | 2696 |
ld h, 1 |
2697 |
ld a, 3 |
|
2698 |
jr page0_169B |
|
| 4 | 2699 |
; --------------------------------------------------------------------------- |
2700 |
||
2701 |
RECURNNAME: |
|
| 8 | 2702 |
ld a, 0 |
2703 |
ld h, 21h ; '!' |
|
| 4 | 2704 |
|
| 7 | 2705 |
page0_169B: |
| 8 | 2706 |
ld l, 62h ; 'b' |
2707 |
ld (OP1), a |
|
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2708 |
jr HLtoOP1 |
| 4 | 2709 |
; --------------------------------------------------------------------------- |
2710 |
||
2711 |
XName: |
|
| 8 | 2712 |
ld a, 58h ; 'X' |
2713 |
jr REALNAME |
|
| 4 | 2714 |
; --------------------------------------------------------------------------- |
2715 |
||
2716 |
YName: |
|
| 8 | 2717 |
ld a, 59h ; 'Y' |
2718 |
jr REALNAME |
|
| 4 | 2719 |
; --------------------------------------------------------------------------- |
2720 |
||
2721 |
TName: |
|
| 8 | 2722 |
ld a, 54h ; 'T' |
| 4 | 2723 |
|
| 7 | 2724 |
REALNAME: |
| 4 | 2725 |
push af |
2726 |
call ZeroOP1 |
|
| 8 | 2727 |
pop af |
| 29 | 2728 |
ld (OP1+1), a |
| 4 | 2729 |
ret |
2730 |
; --------------------------------------------------------------------------- |
|
2731 |
||
2732 |
SETesTOfps: |
|
| 8 | 2733 |
ld hl, (FPS) |
2734 |
ld (ES), hl |
|
| 4 | 2735 |
ret |
2736 |
; --------------------------------------------------------------------------- |
|
2737 |
||
2738 |
markTableDirty: |
|
2739 |
call page0_1641 |
|
| 8 | 2740 |
ret nz |
2741 |
rst 10h |
|
2742 |
set 7, (hl) |
|
| 4 | 2743 |
ret |
2744 |
||
2745 |
; =============== S U B R O U T I N E ======================================= |
|
2746 |
||
2747 |
||
| 7 | 2748 |
page0_16C4: |
| 29 | 2749 |
ld a, (OP1+1) |
| 8 | 2750 |
cp 5Ch ; '\' |
2751 |
jr nz, page0_16D3 |
|
2752 |
ld a, (OP1M) |
|
2753 |
ld hl, 8D8Eh |
|
2754 |
cp (hl) |
|
| 4 | 2755 |
ret |
2756 |
; --------------------------------------------------------------------------- |
|
2757 |
||
| 7 | 2758 |
page0_16D3: |
| 8 | 2759 |
cp 5Dh ; ']' |
2760 |
ret nz |
|
2761 |
ld hl, 8D2Eh |
|
2762 |
ld b, 14h |
|
| 4 | 2763 |
|
| 7 | 2764 |
page0_16DB: |
| 4 | 2765 |
push bc |
2766 |
push hl |
|
| 8 | 2767 |
ld de, 847Eh |
2768 |
ld b, 5 |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2769 |
call j_CmpSyms |
| 8 | 2770 |
ld a, c |
2771 |
pop hl |
|
2772 |
ld bc, 5 |
|
2773 |
add hl, bc |
|
2774 |
pop bc |
|
2775 |
cp 5 |
|
2776 |
ret z |
|
| 4 | 2777 |
djnz page0_16DB |
| 8 | 2778 |
or 1 |
| 4 | 2779 |
ret |
2780 |
; End of function page0_16C4 |
|
2781 |
||
2782 |
||
2783 |
; =============== S U B R O U T I N E ======================================= |
|
2784 |
||
2785 |
||
| 7 | 2786 |
page0_16F4: |
2787 |
||
2788 |
||
| 4 | 2789 |
|
2790 |
call ChkFindSym |
|
| 8 | 2791 |
jp c, ErrUndefined |
| 4 | 2792 |
|
2793 |
page0_16FA: |
|
| 8 | 2794 |
bit 6, (hl) |
2795 |
ret z |
|
2796 |
jp SetTblGraphDraw |
|
| 4 | 2797 |
; End of function page0_16F4 |
2798 |
||
2799 |
||
2800 |
; =============== S U B R O U T I N E ======================================= |
|
2801 |
||
2802 |
||
| 7 | 2803 |
OP1MOP2EXP: |
| 29 | 2804 |
ld a, (OP1+1) |
| 8 | 2805 |
ld hl, 8484h |
2806 |
sub (hl) |
|
| 4 | 2807 |
ret |
2808 |
; End of function OP1MOP2EXP |
|
2809 |
||
2810 |
; --------------------------------------------------------------------------- |
|
2811 |
||
2812 |
page0_1708: |
|
| 8 | 2813 |
ld e, 81h ; 'g |
| 4 | 2814 |
|
| 7 | 2815 |
OP1EXPMinusE: |
| 29 | 2816 |
ld a, (OP1+1) |
| 8 | 2817 |
sub e |
| 4 | 2818 |
ret |
2819 |
; --------------------------------------------------------------------------- |
|
2820 |
||
2821 |
page0_170F: |
|
| 8 | 2822 |
ld e, 7Fh ; '' |
2823 |
jr OP1EXPMinusE |
|
| 4 | 2824 |
; --------------------------------------------------------------------------- |
2825 |
||
2826 |
page0_1713: |
|
| 8 | 2827 |
ld e, 8Ch ; '̧ |
2828 |
jr OP1EXPMinusE |
|
| 4 | 2829 |
; --------------------------------------------------------------------------- |
2830 |
||
2831 |
page0_1717: |
|
| 27 | 2832 |
call IsOP1Num |
| 8 | 2833 |
jp z, ErrInvalid |
| 4 | 2834 |
ret |
2835 |
; --------------------------------------------------------------------------- |
|
2836 |
||
2837 |
CHKERRBREAK: |
|
| 27 | 2838 |
call IsOnInterruptSet |
| 8 | 2839 |
jp nz, ErrBreak |
| 4 | 2840 |
ret |
2841 |
; --------------------------------------------------------------------------- |
|
2842 |
||
2843 |
page0_1725: |
|
| 8 | 2844 |
bit 5, (iy+9) |
| 4 | 2845 |
ret |
2846 |
; --------------------------------------------------------------------------- |
|
2847 |
||
2848 |
page0_172A: |
|
| 20 | 2849 |
bit drawingGraph, (iy+graphFlags) |
| 4 | 2850 |
ret |
2851 |
||
| 38 | 2852 |
isPtrHLA2ByteTok: |
| 8 | 2853 |
ld a, (hl) |
| 4 | 2854 |
isA2ByteTok: |
2855 |
push bc |
|
2856 |
push hl |
|
| 38 | 2857 |
ld hl, _2ByteTokTable |
2858 |
ld bc, _2ByteTokTableEnd-_2ByteTokTable |
|
| 8 | 2859 |
or a |
| 4 | 2860 |
cpir |
| 8 | 2861 |
pop hl |
2862 |
pop bc |
|
| 4 | 2863 |
ret |
| 38 | 2864 |
_2ByteTokTable: |
2865 |
.db 5Ch |
|
2866 |
.db 5Dh |
|
2867 |
.db 5Eh |
|
2868 |
.db 60h |
|
2869 |
.db 61h |
|
2870 |
.db 62h |
|
2871 |
.db 63h |
|
2872 |
.db 7Eh |
|
2873 |
.db 0BBh |
|
2874 |
.db 0AAh |
|
2875 |
_2ByteTokTableEnd: |
|
2876 |
||
| 4 | 2877 |
|
2878 |
GETLASTENTRY: |
|
| 8 | 2879 |
ld hl, 8E2Ah |
2880 |
ld b, (hl) |
|
2881 |
ld a, (numLastEntries) |
|
2882 |
cp b |
|
2883 |
jr z, page0_1755 |
|
2884 |
inc (hl) |
|
2885 |
jr page0_1757 |
|
| 4 | 2886 |
; --------------------------------------------------------------------------- |
2887 |
||
| 7 | 2888 |
page0_1755: |
| 8 | 2889 |
ld (hl), 0 |
| 4 | 2890 |
|
| 7 | 2891 |
page0_1757: |
| 8 | 2892 |
ld a, b |
2893 |
or a |
|
2894 |
jr nz, GETLASTENTRYPTR |
|
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2895 |
call command_buf_to_OP1 |
| 4 | 2896 |
call FINDPROGSYM |
| 8 | 2897 |
ex de, hl |
| 4 | 2898 |
ret |
2899 |
; --------------------------------------------------------------------------- |
|
2900 |
||
| 7 | 2901 |
GETLASTENTRYPTR: |
| 8 | 2902 |
ld hl, 8DA9h |
| 4 | 2903 |
|
| 7 | 2904 |
page0_1766: |
| 8 | 2905 |
dec a |
2906 |
ret z |
|
2907 |
ld e, (hl) |
|
2908 |
inc hl |
|
2909 |
ld d, (hl) |
|
2910 |
add hl, de |
|
2911 |
inc hl |
|
2912 |
jr page0_1766 |
|
| 4 | 2913 |
; --------------------------------------------------------------------------- |
2914 |
||
2915 |
page0_176F: |
|
2916 |
call CheckSplitFlag |
|
| 8 | 2917 |
ret z |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
2918 |
bit grfSChanged, (iy+sGrFlags) |
| 8 | 2919 |
jr z, page0_1799 |
| 4 | 2920 |
|
2921 |
REGCLRCHNG: |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2922 |
call j_ClrLCDFull |
|
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2923 |
call j_RunIndicOn |
| 8 | 2924 |
ld hl, (mcxErrorEP) |
| 4 | 2925 |
push hl |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2926 |
call j_loadnoeentry |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
2927 |
res plotLoc, (iy+plotFlags) |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2928 |
call j_Regraph |
| 8 | 2929 |
pop hl |
2930 |
ld (mcxErrorEP), hl |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2931 |
call j_RunIndicOff |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
2932 |
res grfSChanged, (iy+sGrFlags) |
| 4 | 2933 |
ret |
2934 |
||
| 7 | 2935 |
page0_1799: |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
2936 |
call j_GrBufCpy |
| 4 | 2937 |
ret |
2938 |
||
2939 |
page0_179D: |
|
| 8 | 2940 |
ld a, (mcxCurApp) |
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2941 |
ld hl, {+}
|
| 8 | 2942 |
ld bc, 7 |
| 4 | 2943 |
cpir |
2944 |
ret |
|
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2945 |
+: .db appStart |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2946 |
.db kYequ |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2947 |
.db kStatEd |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2948 |
.db kWindow |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2949 |
.db kGraph |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2950 |
.db kTable |
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2951 |
.db kTblSet |
| 4 | 2952 |
|
| 7 | 2953 |
page0_17B0: |
| 4 | 2954 |
call CkOP1Real |
2955 |
||
| 7 | 2956 |
page0_17B3: |
| 8 | 2957 |
cp 15h |
2958 |
ret z |
|
2959 |
cp 17h |
|
2960 |
ret z |
|
2961 |
jr page0_17BE |
|
| 4 | 2962 |
|
| 7 | 2963 |
page0_17BB: |
| 4 | 2964 |
call CkOP1Real |
2965 |
||
| 7 | 2966 |
page0_17BE: |
| 8 | 2967 |
cp 5 |
2968 |
ret z |
|
2969 |
cp 16h |
|
2970 |
ret z |
|
2971 |
cp 6 |
|
| 4 | 2972 |
ret |
2973 |
||
2974 |
page0_17C7: |
|
| 8 | 2975 |
ld a, d |
2976 |
or a |
|
2977 |
ret nz |
|
2978 |
ld a, e |
|
2979 |
cp 3Fh ; '?' |
|
| 4 | 2980 |
ret |
2981 |
||
| 7 | 2982 |
CheckSplitFlag: |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
2983 |
bit grfSplitOverride, (iy+sGrFlags) |
| 8 | 2984 |
jr z, page0_17D6 |
2985 |
cp a |
|
| 4 | 2986 |
ret |
2987 |
||
| 7 | 2988 |
page0_17D6: |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
2989 |
bit grfSplit, (iy+sGrFlags) |
| 4 | 2990 |
ret |
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2991 |
|
|
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2992 |
ResetSplitOverride: |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
2993 |
res grfSplitOverride, (iy+sGrFlags) |
| 4 | 2994 |
ret |
2995 |
||
2996 |
page0_17E0: |
|
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
2997 |
ld hl, OP1+2 |
| 8 | 2998 |
set 0, (hl) |
| 4 | 2999 |
ret |
3000 |
||
3001 |
page0_17E6: |
|
3002 |
call page0_16F4 |
|
3003 |
||
3004 |
page0_17E9: |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
3005 |
bit statsValid, (iy+statFlags) |
| 8 | 3006 |
ret z |
| 4 | 3007 |
call page0_16C4 |
| 8 | 3008 |
ret nz |
3009 |
rst 8 |
|
3010 |
rst 10h |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
3011 |
call j_DelRes |
| 8 | 3012 |
jp OP2ToOP1 |
| 4 | 3013 |
; --------------------------------------------------------------------------- |
3014 |
||
3015 |
RESETWINTOP: |
|
3016 |
push af |
|
| 8 | 3017 |
xor a |
| 4 | 3018 |
call CheckSplitFlag |
| 8 | 3019 |
jr z, page0_1803 |
3020 |
add a, 4 |
|
| 4 | 3021 |
|
| 7 | 3022 |
page0_1803: |
| 8 | 3023 |
ld (winTop), a |
3024 |
pop af |
|
| 4 | 3025 |
ret |
3026 |
; --------------------------------------------------------------------------- |
|
3027 |
||
3028 |
page0_1808: |
|
| 8 | 3029 |
cp 0FEh ; |
3030 |
ret nz |
|
3031 |
ld b, a |
|
3032 |
ld a, (keyExtend) |
|
3033 |
cp 0BDh ; 'ݧ |
|
3034 |
ld a, b |
|
| 4 | 3035 |
ret |
3036 |
; --------------------------------------------------------------------------- |
|
3037 |
||
3038 |
SetYUp: |
|
3039 |
push af |
|
| 8 | 3040 |
ld a, 7 |
| 4 | 3041 |
|
| 7 | 3042 |
page0_1816: |
| 4 | 3043 |
call lcd_busy |
| 8 | 3044 |
out (10h), a |
3045 |
pop af |
|
| 4 | 3046 |
ret |
3047 |
; --------------------------------------------------------------------------- |
|
3048 |
||
3049 |
SetXUp: |
|
3050 |
push af |
|
| 8 | 3051 |
ld a, 5 |
3052 |
jr page0_1816 |
|
| 4 | 3053 |
; --------------------------------------------------------------------------- |
3054 |
||
3055 |
ISO1NONTLSTorPROG: |
|
3056 |
call page0_17B0 |
|
| 8 | 3057 |
ret z |
| 4 | 3058 |
call page0_17BB |
| 8 | 3059 |
ret z |
| 4 | 3060 |
|
3061 |
; =============== S U B R O U T I N E ======================================= |
|
3062 |
||
3063 |
||
| 7 | 3064 |
ISO1NONTEMPLST: |
| 29 | 3065 |
ld a, (OP1+1) |
| 8 | 3066 |
cp 5Dh ; ']' |
| 4 | 3067 |
ret |
3068 |
; End of function ISO1NONTEMPLST |
|
3069 |
||
3070 |
||
3071 |
; =============== S U B R O U T I N E ======================================= |
|
3072 |
||
3073 |
||
| 7 | 3074 |
IS_A_LSTorCLST: |
| 6 | 3075 |
; page0_19F8+66p ... |
| 8 | 3076 |
cp 1 |
3077 |
ret z |
|
3078 |
cp 0Dh |
|
| 4 | 3079 |
ret |
3080 |
; End of function IS_A_LSTorCLST |
|
3081 |
||
3082 |
; --------------------------------------------------------------------------- |
|
3083 |
||
3084 |
CHK_HL_999: |
|
3085 |
push hl |
|
| 8 | 3086 |
ld de, 3E8h |
3087 |
or a |
|
3088 |
sbc hl, de |
|
3089 |
pop hl |
|
3090 |
ret c |
|
3091 |
jp ErrDimension |
|
| 4 | 3092 |
; --------------------------------------------------------------------------- |
3093 |
||
3094 |
page0_1842: |
|
| 8 | 3095 |
set 6, (iy+0Fh) |
| 4 | 3096 |
ret |
3097 |
; --------------------------------------------------------------------------- |
|
3098 |
||
3099 |
page0_1847: |
|
| 8 | 3100 |
res 6, (iy+0Fh) |
| 4 | 3101 |
ret |
3102 |
; --------------------------------------------------------------------------- |
|
3103 |
||
3104 |
page0_184C: |
|
| 8 | 3105 |
bit 6, (iy+0Fh) |
| 4 | 3106 |
ret |
3107 |
; --------------------------------------------------------------------------- |
|
3108 |
||
3109 |
page0_1851: |
|
3110 |
call EOP1NotReal |
|
| 8 | 3111 |
jp PushRealO1 |
| 4 | 3112 |
; --------------------------------------------------------------------------- |
3113 |
||
3114 |
equ_or_newequ: |
|
| 8 | 3115 |
and 1Fh |
3116 |
cp 3 |
|
3117 |
ret z |
|
3118 |
cp 0Bh |
|
| 4 | 3119 |
ret |
3120 |
; --------------------------------------------------------------------------- |
|
3121 |
||
3122 |
page0_185F: |
|
| 8 | 3123 |
ld a, (iy+17h) |
3124 |
and 3 |
|
3125 |
cp 1 |
|
| 4 | 3126 |
ret |
3127 |
; --------------------------------------------------------------------------- |
|
3128 |
||
3129 |
page0_1867: |
|
| 8 | 3130 |
ld hl, 91D0h |
| 4 | 3131 |
|
3132 |
page0_186A: |
|
3133 |
push hl |
|
| 8 | 3134 |
rst 20h |
| 4 | 3135 |
call Plus1 |
| 8 | 3136 |
pop de |
3137 |
jp MovFrOP1 |
|
| 4 | 3138 |
|
3139 |
; =============== S U B R O U T I N E ======================================= |
|
3140 |
||
3141 |
||
| 7 | 3142 |
errd_op1notpos: |
3143 |
||
3144 |
||
| 4 | 3145 |
|
3146 |
call CkOP1Pos |
|
3147 |
||
| 7 | 3148 |
page0_1876: |
| 8 | 3149 |
ret z |
| 4 | 3150 |
|
| 7 | 3151 |
page0_1877: |
| 8 | 3152 |
jp ErrDomain |
| 4 | 3153 |
; End of function errd_op1notpos |
3154 |
||
3155 |
; --------------------------------------------------------------------------- |
|
3156 |
||
3157 |
ErrD_OP1Not_R: |
|
3158 |
call CkOP1Real |
|
| 8 | 3159 |
jr page0_1876 |
| 4 | 3160 |
; --------------------------------------------------------------------------- |
3161 |
||
3162 |
ErrD_OP1NotPosInt: |
|
3163 |
call CKPosInt |
|
| 8 | 3164 |
jr page0_1876 |
| 4 | 3165 |
; --------------------------------------------------------------------------- |
3166 |
||
3167 |
ErrD_OP1_LE_0: |
|
3168 |
call errd_op1notpos |
|
3169 |
||
3170 |
ErrD_OP1_0: |
|
3171 |
call CkOP1FP0 |
|
| 8 | 3172 |
ret nz |
3173 |
jr page0_1877 |
|
| 4 | 3174 |
; --------------------------------------------------------------------------- |
3175 |
||
3176 |
FINDSYM_GET_SIZE: |
|
3177 |
call FIND_E_UNDEF |
|
3178 |
push de |
|
| 8 | 3179 |
ex de, hl |
| 4 | 3180 |
call ldHLind |
| 8 | 3181 |
pop de |
| 4 | 3182 |
ret |
3183 |
; --------------------------------------------------------------------------- |
|
3184 |
||
3185 |
STO_STATVAR: |
|
3186 |
push af |
|
3187 |
call CkValidNum |
|
| 8 | 3188 |
pop af |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
3189 |
call j_CMP_STATPTR |
| 8 | 3190 |
ex de, hl |
3191 |
jp MovFrOP1 |
|
| 4 | 3192 |
; --------------------------------------------------------------------------- |
3193 |
||
3194 |
Rcl_StatVar: |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
3195 |
call j_CMP_STATPTR |
| 8 | 3196 |
rst 20h |
| 4 | 3197 |
ret |
3198 |
; --------------------------------------------------------------------------- |
|
3199 |
||
3200 |
CkOP2Real: |
|
| 8 | 3201 |
ld a, (OP2) |
3202 |
and 1Fh |
|
| 4 | 3203 |
ret |
3204 |
; --------------------------------------------------------------------------- |
|
3205 |
||
3206 |
page0_18AE: |
|
| 29 | 3207 |
ld a, (OP1+1) |
| 8 | 3208 |
cp 5Eh ; '^' |
| 4 | 3209 |
scf |
| 8 | 3210 |
ret z |
3211 |
xor a |
|
| 4 | 3212 |
ret |
3213 |
; --------------------------------------------------------------------------- |
|
3214 |
||
3215 |
Bit_VertSplit: |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
3216 |
bit vertSplit, (iy+sGrFlags) |
| 4 | 3217 |
ret |
3218 |
; --------------------------------------------------------------------------- |
|
3219 |
||
3220 |
GET_X_INDIRECT: |
|
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
3221 |
call j_GET_INDEX_LST |
|
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
3222 |
call j_GETL1TOP1A |
| 4 | 3223 |
ret |
3224 |
||
3225 |
; =============== S U B R O U T I N E ======================================= |
|
3226 |
||
3227 |
||
| 7 | 3228 |
sub_18C3: |
| 4 | 3229 |
push bc |
| 8 | 3230 |
ld c, 9 |
3231 |
ld b, a |
|
3232 |
xor a |
|
3233 |
jr page0_18CB |
|
| 4 | 3234 |
; --------------------------------------------------------------------------- |
3235 |
||
| 7 | 3236 |
page0_18CA: |
| 8 | 3237 |
add a, c |
| 4 | 3238 |
|
| 7 | 3239 |
page0_18CB: |
| 8 | 3240 |
dec b |
3241 |
jp p, page0_18CA |
|
3242 |
ld c, a |
|
3243 |
ld b, 0 |
|
3244 |
add hl, bc |
|
| 4 | 3245 |
call Mov8B |
| 8 | 3246 |
pop bc |
| 4 | 3247 |
ret |
3248 |
; End of function sub_18C3 |
|
3249 |
||
3250 |
; --------------------------------------------------------------------------- |
|
3251 |
||
3252 |
GetBytePaged: |
|
| 8 | 3253 |
or a |
3254 |
ret z |
|
3255 |
ld b, a |
|
3256 |
in a, (6) |
|
3257 |
ld c, a |
|
3258 |
ld a, b |
|
3259 |
out (6), a |
|
3260 |
ld b, (hl) |
|
3261 |
ld a, c |
|
3262 |
jr page0_18F1 |
|
| 4 | 3263 |
; --------------------------------------------------------------------------- |
3264 |
||
| 27 | 3265 |
IsOP1Num5: |
| 4 | 3266 |
call sub_1901 |
| 8 | 3267 |
ld de, 812Bh |
3268 |
ld bc, 2Bh ; '+' |
|
| 4 | 3269 |
ldir |
3270 |
||
| 7 | 3271 |
page0_18F0: |
| 8 | 3272 |
pop af |
| 4 | 3273 |
; START OF FUNCTION CHUNK FOR sub_1901 |
3274 |
||
| 7 | 3275 |
page0_18F1: |
| 8 | 3276 |
out (6), a |
| 4 | 3277 |
ret |
3278 |
; END OF FUNCTION CHUNK FOR sub_1901 |
|
3279 |
; --------------------------------------------------------------------------- |
|
3280 |
||
3281 |
page0_18F4: |
|
3282 |
call sub_1901 |
|
3283 |
push bc |
|
| 8 | 3284 |
ld bc, 0FFFFh |
3285 |
xor a |
|
| 4 | 3286 |
cpir |
| 8 | 3287 |
pop bc |
3288 |
jr page0_18F0 |
|
| 4 | 3289 |
|
3290 |
; =============== S U B R O U T I N E ======================================= |
|
3291 |
||
3292 |
||
| 7 | 3293 |
sub_1901: |
3294 |
||
3295 |
||
3296 |
||
| 4 | 3297 |
|
| 8 | 3298 |
in a, (6) |
3299 |
pop de |
|
| 4 | 3300 |
push af |
3301 |
push de |
|
| 8 | 3302 |
ld a, (unk_8156) |
3303 |
jr page0_18F1 |
|
| 4 | 3304 |
; End of function sub_1901 |
3305 |
||
3306 |
; --------------------------------------------------------------------------- |
|
3307 |
||
3308 |
page0_190B: |
|
3309 |
push bc |
|
3310 |
call sub_1901 |
|
| 8 | 3311 |
ld b, (hl) |
3312 |
pop af |
|
3313 |
out (6), a |
|
3314 |
ld a, b |
|
3315 |
pop bc |
|
| 4 | 3316 |
ret |
3317 |
; --------------------------------------------------------------------------- |
|
3318 |
||
3319 |
IsEditEmpty: |
|
3320 |
call IsAtBtm |
|
| 8 | 3321 |
ret nz |
| 4 | 3322 |
|
3323 |
IsAtTop: |
|
| 8 | 3324 |
ld hl, (editCursor) |
| 4 | 3325 |
|
3326 |
page0_191D: |
|
| 8 | 3327 |
ld de, (editTop) |
3328 |
jr CpHLDE |
|
| 4 | 3329 |
|
3330 |
; =============== S U B R O U T I N E ======================================= |
|
3331 |
||
3332 |
||
| 7 | 3333 |
IsAtBtm: |
| 8 | 3334 |
ld de, (editTail) |
3335 |
ld hl, (editBtm) |
|
| 4 | 3336 |
; End of function IsAtBtm |
3337 |
||
3338 |
||
3339 |
; =============== S U B R O U T I N E ======================================= |
|
3340 |
||
3341 |
||
| 7 | 3342 |
CpHLDE: |
| 6 | 3343 |
; handleONKeyPress+1A0p ... |
| 4 | 3344 |
push hl |
| 8 | 3345 |
or a |
3346 |
sbc hl, de |
|
3347 |
pop hl |
|
| 4 | 3348 |
ret |
3349 |
; End of function CpHLDE |
|
3350 |
||
3351 |
; --------------------------------------------------------------------------- |
|
3352 |
||
3353 |
ExecuteNewPrgm: |
|
3354 |
push af |
|
| 8 | 3355 |
ld de, 8479h |
| 4 | 3356 |
call strcopy |
| 8 | 3357 |
inc hl |
| 4 | 3358 |
push hl |
3359 |
call FINDPROGSYM |
|
| 8 | 3360 |
jr c, page0_194C |
| 4 | 3361 |
call Page0Call_2420 |
3362 |
call CkOP1Real |
|
| 8 | 3363 |
cp 6 |
3364 |
jp nz, Page0Call_24E1 |
|
| 4 | 3365 |
call DelVar |
3366 |
||
| 7 | 3367 |
page0_194C: |
| 8 | 3368 |
pop hl |
3369 |
pop bc |
|
| 4 | 3370 |
push hl |
3371 |
call ldHLind |
|
3372 |
push hl |
|
| 8 | 3373 |
ld a, b |
| 4 | 3374 |
call CreateVar |
| 8 | 3375 |
pop bc |
3376 |
pop hl |
|
3377 |
inc bc |
|
3378 |
inc bc |
|
| 4 | 3379 |
ldir |
| 8 | 3380 |
jp Page0Call_3E2B |
| 4 | 3381 |
; --------------------------------------------------------------------------- |
3382 |
||
3383 |
FillBasePageTable: |
|
| 8 | 3384 |
in a, (6) |
| 4 | 3385 |
push af |
| 8 | 3386 |
ld de, 8245h |
| 4 | 3387 |
call NZIf83Plus |
| 8 | 3388 |
ld a, 15h |
3389 |
jr nz, page0_1972 |
|
3390 |
ld a, 69h ; 'i' |
|
3391 |
ld de, 9C6Fh |
|
| 4 | 3392 |
|
| 7 | 3393 |
page0_1972: |
| 4 | 3394 |
push af |
| 8 | 3395 |
out (6), a |
3396 |
ld hl, 4000h |
|
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
3397 |
call j_IsAHLAtValidAppHeader |
| 8 | 3398 |
jr nz, page0_1996 |
| 4 | 3399 |
push de |
| 8 | 3400 |
ld de, 8080h |
3401 |
or a |
|
3402 |
rst 28h |
|
3403 |
ld (hl), l |
|
3404 |
add a, b |
|
3405 |
pop de |
|
3406 |
jr nz, page0_1996 |
|
3407 |
pop af |
|
3408 |
inc hl |
|
3409 |
inc hl |
|
3410 |
ld b, (hl) |
|
3411 |
ld c, b |
|
| 4 | 3412 |
|
| 7 | 3413 |
page0_198D: |
| 8 | 3414 |
ld (de), a |
| 4 | 3415 |
call sub_19A4 |
3416 |
djnz page0_198D |
|
| 8 | 3417 |
sub c |
3418 |
jr page0_199C |
|
| 4 | 3419 |
; --------------------------------------------------------------------------- |
3420 |
||
| 7 | 3421 |
page0_1996: |
| 8 | 3422 |
pop af |
3423 |
ld (de), a |
|
| 4 | 3424 |
call sub_19A4 |
| 8 | 3425 |
dec a |
| 4 | 3426 |
|
| 7 | 3427 |
page0_199C: |
| 8 | 3428 |
cp 7 |
3429 |
jr nz, page0_1972 |
|
3430 |
pop af |
|
3431 |
out (6), a |
|
| 4 | 3432 |
ret |
3433 |
||
3434 |
; =============== S U B R O U T I N E ======================================= |
|
3435 |
||
3436 |
||
| 7 | 3437 |
sub_19A4: |
| 8 | 3438 |
dec de |
3439 |
ld hl, 9C25h |
|
3440 |
or a |
|
3441 |
sbc hl, de |
|
3442 |
ret nz |
|
3443 |
ld de, 824Fh |
|
| 4 | 3444 |
ret |
3445 |
; End of function sub_19A4 |
|
3446 |
||
3447 |
||
3448 |
; =============== S U B R O U T I N E ======================================= |
|
3449 |
||
3450 |
||
| 7 | 3451 |
MemChk: |
| 8 | 3452 |
ld hl, (OPS) |
3453 |
ld bc, (FPS) |
|
3454 |
or a |
|
3455 |
sbc hl, bc |
|
3456 |
jr nc, page0_19C0 |
|
3457 |
ld hl, 0 |
|
| 4 | 3458 |
ret |
3459 |
; --------------------------------------------------------------------------- |
|
3460 |
||
| 7 | 3461 |
page0_19C0: |
| 8 | 3462 |
inc hl |
| 4 | 3463 |
ret |
3464 |
; End of function MemChk |
|
3465 |
||
3466 |
; --------------------------------------------------------------------------- |
|
3467 |
||
3468 |
CMPPRGNAMLEN1: |
|
3469 |
push hl |
|
| 8 | 3470 |
jr page0_19C9 |
| 4 | 3471 |
|
3472 |
; =============== S U B R O U T I N E ======================================= |
|
3473 |
||
3474 |
||
| 7 | 3475 |
CMPPRGNAMLEN: |
| 4 | 3476 |
push hl |
| 8 | 3477 |
ld hl, 8479h |
| 4 | 3478 |
|
| 7 | 3479 |
page0_19C9: |
| 8 | 3480 |
ld a, (hl) |
3481 |
sub 5Dh ; ']' |
|
3482 |
ld d, a |
|
3483 |
ld bc, 8 |
|
3484 |
xor a |
|
| 4 | 3485 |
cpir |
| 8 | 3486 |
pop hl |
3487 |
ld a, 8 |
|
3488 |
ret nz |
|
3489 |
inc c |
|
3490 |
sub c |
|
3491 |
cp 1 |
|
3492 |
ret nz |
|
3493 |
ld e, a |
|
3494 |
ld a, d |
|
3495 |
or a |
|
3496 |
ld a, e |
|
3497 |
ret nz |
|
3498 |
inc a |
|
| 4 | 3499 |
ret |
3500 |
; End of function CMPPRGNAMLEN |
|
3501 |
||
3502 |
; --------------------------------------------------------------------------- |
|
3503 |
||
3504 |
FindGroupSym: |
|
| 8 | 3505 |
ld a, 17h |
3506 |
jr page0_19E9 |
|
| 4 | 3507 |
|
3508 |
; =============== S U B R O U T I N E ======================================= |
|
3509 |
||
3510 |
||
| 7 | 3511 |
FINDPROGSYM: |
| 8 | 3512 |
ld a, 5 |
| 4 | 3513 |
; End of function FINDPROGSYM |
3514 |
||
3515 |
; START OF FUNCTION CHUNK FOR ChkFindSym |
|
3516 |
||
| 7 | 3517 |
page0_19E9: |
| 6 | 3518 |
; ChkFindSym+3j |
| 4 | 3519 |
call Page0Call_3E13 |
3520 |
ret |
|
3521 |
; END OF FUNCTION CHUNK FOR ChkFindSym |
|
3522 |
||
3523 |
; =============== S U B R O U T I N E ======================================= |
|
3524 |
||
3525 |
||
| 7 | 3526 |
ChkFindSym: |
3527 |
||
3528 |
||
3529 |
||
| 4 | 3530 |
|
3531 |
call page0_17B0 |
|
| 8 | 3532 |
jr z, page0_19E9 |
| 4 | 3533 |
; End of function ChkFindSym |
3534 |
||
3535 |
||
3536 |
; =============== S U B R O U T I N E ======================================= |
|
3537 |
||
3538 |
||
| 7 | 3539 |
FindSym: |
| 4 | 3540 |
call Page0Call_3E19 |
3541 |
ret |
|
3542 |
||
| 7 | 3543 |
sub_19F6: |
| 8 | 3544 |
ld c, 9 |
| 7 | 3545 |
page0_19F8: |
| 8 | 3546 |
ld b, 0 |
| 4 | 3547 |
push bc |
| 8 | 3548 |
ld hl, (OPBase) |
3549 |
or a |
|
3550 |
sbc hl, bc |
|
3551 |
ld (OPBase), hl |
|
| 29 | 3552 |
ld a, (OP1+6) |
| 8 | 3553 |
cp 24h ; '$' |
3554 |
jr z, page0_1A32 |
|
3555 |
ld hl, (unk_982E) |
|
3556 |
or a |
|
3557 |
sbc hl, bc |
|
3558 |
ld (unk_982E), hl |
|
3559 |
cp 72h ; 'r' |
|
3560 |
jr z, page0_1A29 |
|
3561 |
cp 3Ah ; ':' |
|
3562 |
jr z, page0_1A29 |
|
| 4 | 3563 |
call CkOP1Real |
3564 |
call IS_A_LSTorCLST |
|
| 8 | 3565 |
jr z, page0_1A32 |
| 4 | 3566 |
call page0_17B0 |
| 8 | 3567 |
jr z, page0_1A32 |
| 4 | 3568 |
|
| 7 | 3569 |
page0_1A29: |
| 6 | 3570 |
; page0_19F8+22j |
| 8 | 3571 |
ld hl, (progPtr) |
3572 |
or a |
|
3573 |
sbc hl, bc |
|
3574 |
ld (progPtr), hl |
|
| 4 | 3575 |
|
| 7 | 3576 |
page0_1A32: |
| 6 | 3577 |
; page0_19F8+2Aj ... |
| 8 | 3578 |
ld de, (OPS) |
3579 |
add hl, bc |
|
| 4 | 3580 |
push hl |
| 8 | 3581 |
sbc hl, de |
| 4 | 3582 |
push af |
3583 |
push hl |
|
| 8 | 3584 |
ex de, hl |
3585 |
sbc hl, bc |
|
3586 |
ld (OPS), hl |
|
3587 |
inc hl |
|
3588 |
ld d, h |
|
3589 |
ld e, l |
|
3590 |
add hl, bc |
|
3591 |
pop bc |
|
3592 |
pop af |
|
3593 |
jr z, page0_1A4C |
|
| 4 | 3594 |
ldir |
3595 |
||
| 7 | 3596 |
page0_1A4C: |
| 8 | 3597 |
pop de |
3598 |
pop bc |
|
| 4 | 3599 |
push de |
3600 |
push bc |
|
| 8 | 3601 |
ld b, c |
3602 |
ld hl, 8478h |
|
3603 |
dec b |
|
| 4 | 3604 |
|
| 7 | 3605 |
page0_1A55: |
| 8 | 3606 |
ld a, (hl) |
3607 |
ld (de), a |
|
3608 |
inc hl |
|
3609 |
dec de |
|
| 4 | 3610 |
djnz page0_1A55 |
3611 |
call CkOP1Real |
|
3612 |
call IS_A_LSTorCLST |
|
| 8 | 3613 |
jr nz, page0_1A6C |
| 29 | 3614 |
ld a, (OP1+6) |
| 8 | 3615 |
cp 24h ; '$' |
3616 |
jr z, page0_1A6C |
|
3617 |
ld (hl), 0 |
|
| 4 | 3618 |
|
| 7 | 3619 |
page0_1A6C: |
| 6 | 3620 |
; page0_19F8+70j |
| 8 | 3621 |
ld a, (hl) |
3622 |
ld (de), a |
|
3623 |
pop bc |
|
| 29 | 3624 |
ld a, (OP1+6) |
| 8 | 3625 |
cp 24h ; '$' |
3626 |
jr z, page0_1A97 |
|
3627 |
cp 5Eh ; '^' |
|
3628 |
jr z, page0_1A82 |
|
3629 |
cp 21h ; '!' |
|
3630 |
jr z, page0_1A82 |
|
3631 |
cp 23h ; '#' |
|
3632 |
jr nz, page0_1A8E |
|
| 4 | 3633 |
|
| 7 | 3634 |
page0_1A82: |
| 6 | 3635 |
; page0_19F8+84j |
| 29 | 3636 |
ld a, (OP1+5) |
| 8 | 3637 |
or a |
3638 |
jr nz, page0_1A8E |
|
| 29 | 3639 |
ld hl, (OP1+3) |
| 8 | 3640 |
ld (newDataPtr), hl |
| 4 | 3641 |
|
| 7 | 3642 |
page0_1A8E: |
| 6 | 3643 |
; page0_19F8+8Ej |
| 4 | 3644 |
call sub_23C4 |
| 8 | 3645 |
pop de |
| 4 | 3646 |
push de |
| 8 | 3647 |
inc de |
| 4 | 3648 |
call page0_207C |
3649 |
||
| 7 | 3650 |
page0_1A97: |
| 8 | 3651 |
pop hl |
| 4 | 3652 |
ret |
3653 |
; End of function page0_19F8 |
|
3654 |
||
3655 |
||
3656 |
; =============== S U B R O U T I N E ======================================= |
|
3657 |
||
3658 |
||
| 7 | 3659 |
page0_1A99: |
| 4 | 3660 |
push af |
| 8 | 3661 |
ld hl, (fpBase) |
| 4 | 3662 |
push bc |
3663 |
push hl |
|
| 8 | 3664 |
add hl, bc |
3665 |
ld (fpBase), hl |
|
3666 |
sbc hl, bc |
|
3667 |
ex de, hl |
|
3668 |
ld hl, (FPS) |
|
3669 |
sbc hl, de |
|
| 4 | 3670 |
push hl |
3671 |
push af |
|
| 8 | 3672 |
add hl, de |
3673 |
add hl, bc |
|
3674 |
ld (FPS), hl |
|
3675 |
dec hl |
|
3676 |
ld d, h |
|
3677 |
ld e, l |
|
3678 |
sbc hl, bc |
|
3679 |
pop af |
|
3680 |
pop bc |
|
3681 |
jr z, page0_1AD2 |
|
| 4 | 3682 |
|
| 7 | 3683 |
page0_1ABB: |
| 4 | 3684 |
ldd |
3685 |
ldd |
|
3686 |
ldd |
|
3687 |
ldd |
|
3688 |
ldd |
|
3689 |
ldd |
|
3690 |
ldd |
|
3691 |
ldd |
|
3692 |
ldd |
|
| 8 | 3693 |
ld a, b |
3694 |
or c |
|
3695 |
jp nz, page0_1ABB |
|
| 4 | 3696 |
|
| 7 | 3697 |
page0_1AD2: |
| 8 | 3698 |
pop de |
3699 |
pop bc |
|
3700 |
pop af |
|
3701 |
jr z, page0_1B07 |
|
3702 |
ld hl, (tempMem) |
|
3703 |
add hl, bc |
|
3704 |
ld (tempMem), hl |
|
3705 |
ld hl, (newDataPtr) |
|
| 4 | 3706 |
push hl |
| 8 | 3707 |
ex de, hl |
3708 |
sbc hl, de |
|
3709 |
jr z, page0_1B08 |
|
| 4 | 3710 |
push bc |
| 8 | 3711 |
ld b, h |
3712 |
ld c, l |
|
3713 |
add hl, de |
|
3714 |
dec hl |
|
3715 |
ld de, (fpBase) |
|
3716 |
dec de |
|
| 4 | 3717 |
lddr |
| 8 | 3718 |
ex de, hl |
3719 |
pop bc |
|
| 4 | 3720 |
call sub_23C4 |
3721 |
call page0_1FF3 |
|
| 8 | 3722 |
ld bc, (freeRAM) |
| 4 | 3723 |
|
| 7 | 3724 |
page0_1AFF: |
| 4 | 3725 |
call ADJPARSER |
3726 |
call ADJMATH |
|
| 8 | 3727 |
pop de |
| 4 | 3728 |
ret |
3729 |
; --------------------------------------------------------------------------- |
|
3730 |
||
| 7 | 3731 |
page0_1B07: |
| 4 | 3732 |
push de |
3733 |
||
| 7 | 3734 |
page0_1B08: |
| 8 | 3735 |
dec de |
| 4 | 3736 |
call sub_23C4 |
| 8 | 3737 |
jr page0_1AFF |
| 4 | 3738 |
; End of function page0_1A99 |
3739 |
||
3740 |
||
3741 |
; =============== S U B R O U T I N E ======================================= |
|
3742 |
||
3743 |
||
| 7 | 3744 |
InsertMem: |
| 4 | 3745 |
call INSERTMEMA |
3746 |
push de |
|
| 8 | 3747 |
dec de |
| 4 | 3748 |
call DELVAR3DC |
| 8 | 3749 |
pop de |
| 4 | 3750 |
ret |
3751 |
; End of function InsertMem |
|
3752 |
||
3753 |
||
3754 |
; =============== S U B R O U T I N E ======================================= |
|
3755 |
||
3756 |
||
| 7 | 3757 |
INSERTMEMA: |
| 4 | 3758 |
push de |
3759 |
push hl |
|
| 8 | 3760 |
ld hl, (FPS) |
3761 |
or a |
|
3762 |
sbc hl, de |
|
3763 |
jr z, page0_1B30 |
|
3764 |
ld b, h |
|
3765 |
ld c, l |
|
3766 |
add hl, de |
|
3767 |
dec hl |
|
3768 |
pop de |
|
| 4 | 3769 |
push de |
| 8 | 3770 |
add hl, de |
3771 |
ex de, hl |
|
3772 |
ld hl, (FPS) |
|
3773 |
dec hl |
|
| 4 | 3774 |
lddr |
3775 |
||
| 7 | 3776 |
page0_1B30: |
| 8 | 3777 |
pop bc |
3778 |
pop de |
|
| 4 | 3779 |
ret |
3780 |
; End of function INSERTMEMA |
|
3781 |
||
3782 |
||
3783 |
; =============== S U B R O U T I N E ======================================= |
|
3784 |
||
3785 |
||
| 7 | 3786 |
EnoughMem: |
| 6 | 3787 |
; CMPMEMNEED+5p ... |
| 8 | 3788 |
ex de, hl |
| 4 | 3789 |
|
| 7 | 3790 |
page0_1B34: |
| 4 | 3791 |
call MemChk |
| 8 | 3792 |
or a |
3793 |
sbc hl, de |
|
3794 |
ret nc |
|
| 4 | 3795 |
push de |
| 8 | 3796 |
ld hl, (unk_982E) |
3797 |
ld bc, (OPBase) |
|
3798 |
inc bc |
|
3799 |
ld d, 0 |
|
| 4 | 3800 |
|
| 7 | 3801 |
page0_1B46: |
| 8 | 3802 |
xor a |
3803 |
sbc hl, bc |
|
3804 |
jr c, page0_1B69 |
|
3805 |
add hl, bc |
|
3806 |
bit 7, (hl) |
|
3807 |
jr z, page0_1B63 |
|
3808 |
dec hl |
|
3809 |
dec hl |
|
3810 |
dec hl |
|
3811 |
ld e, (hl) |
|
3812 |
dec hl |
|
3813 |
ld d, (hl) |
|
3814 |
dec hl |
|
3815 |
ld b, (hl) |
|
3816 |
inc hl |
|
3817 |
inc hl |
|
3818 |
inc hl |
|
3819 |
inc hl |
|
3820 |
inc hl |
|
| 4 | 3821 |
call DelVar |
| 8 | 3822 |
pop de |
3823 |
jr page0_1B34 |
|
| 4 | 3824 |
; --------------------------------------------------------------------------- |
3825 |
||
| 7 | 3826 |
page0_1B63: |
| 8 | 3827 |
ld e, 9 |
3828 |
sbc hl, de |
|
3829 |
jr page0_1B46 |
|
| 4 | 3830 |
; --------------------------------------------------------------------------- |
3831 |
||
| 7 | 3832 |
page0_1B69: |
| 8 | 3833 |
pop de |
| 4 | 3834 |
ret |
3835 |
; End of function EnoughMem |
|
3836 |
||
3837 |
; --------------------------------------------------------------------------- |
|
3838 |
||
3839 |
page0_1B6B: |
|
3840 |
call page0_17B0 |
|
| 8 | 3841 |
jr nz, page0_1B75 |
| 4 | 3842 |
call CMPPRGNAMLEN |
| 8 | 3843 |
jr sub_1B7E |
| 4 | 3844 |
; --------------------------------------------------------------------------- |
3845 |
||
| 7 | 3846 |
page0_1B75: |
| 4 | 3847 |
call ISO1NONTEMPLST |
| 8 | 3848 |
jr nz, sub_1B7E |
| 4 | 3849 |
call CMPPRGNAMLEN |
| 8 | 3850 |
inc a |
| 4 | 3851 |
|
3852 |
; =============== S U B R O U T I N E ======================================= |
|
3853 |
||
3854 |
||
| 7 | 3855 |
sub_1B7E: |
| 8 | 3856 |
add a, 7 |
3857 |
ld b, 0 |
|
3858 |
ld c, a |
|
| 4 | 3859 |
call page0_17B0 |
| 8 | 3860 |
ret z |
| 29 | 3861 |
ld a, (OP1+1) |
| 8 | 3862 |
cp 5Dh ; ']' |
3863 |
ret z |
|
3864 |
ld c, 9 |
|
| 4 | 3865 |
ret |
3866 |
; End of function sub_1B7E |
|
3867 |
||
3868 |
||
3869 |
; =============== S U B R O U T I N E ======================================= |
|
3870 |
||
3871 |
||
| 7 | 3872 |
CMPMEMNEED: |
| 22 | 3873 |
; sub_1BA3:HandleRunIndicatorFp ... |
| 4 | 3874 |
push hl |
3875 |
call sub_1B7E |
|
| 8 | 3876 |
add hl, bc |
| 4 | 3877 |
call EnoughMem |
| 8 | 3878 |
pop bc |
| 4 | 3879 |
ret |
3880 |
; End of function CMPMEMNEED |
|
3881 |
||
3882 |
; --------------------------------------------------------------------------- |
|
3883 |
||
3884 |
CREATEPVAR4: |
|
3885 |
push af |
|
| 8 | 3886 |
jr CREATEPVAR3 |
| 4 | 3887 |
|
3888 |
; =============== S U B R O U T I N E ======================================= |
|
3889 |
||
3890 |
||
| 7 | 3891 |
sub_1B9D: |
| 4 | 3892 |
call HLTimes9 |
3893 |
; End of function sub_1B9D |
|
3894 |
||
3895 |
; START OF FUNCTION CHUNK FOR sub_1BA3 |
|
3896 |
||
| 7 | 3897 |
page0_1BA0: |
| 8 | 3898 |
jp c, ErrMemory |
| 4 | 3899 |
; END OF FUNCTION CHUNK FOR sub_1BA3 |
3900 |
||
3901 |
; =============== S U B R O U T I N E ======================================= |
|
3902 |
||
3903 |
||
| 7 | 3904 |
sub_1BA3: |
3905 |
||
3906 |
||
3907 |
||
| 4 | 3908 |
|
| 8 | 3909 |
ld de, 2 |
3910 |
add hl, de |
|
3911 |
jr c, page0_1BA0 |
|
| 4 | 3912 |
|
| 7 | 3913 |
page0_1BA9: |
| 8 | 3914 |
ld (OP1), a |
| 4 | 3915 |
call page0_17B3 |
| 8 | 3916 |
jr z, page0_1BC3 |
| 29 | 3917 |
ld a, (OP1+1) |
| 8 | 3918 |
cp 5Dh ; ']' |
| 22 | 3919 |
jr nz, HandleRunIndicatorF |
| 4 | 3920 |
call CMPPRGNAMLEN |
| 8 | 3921 |
cp 7 |
3922 |
jp nc, ErrSyntax |
|
3923 |
inc a |
|
3924 |
jr page0_1BC6 |
|
| 4 | 3925 |
; --------------------------------------------------------------------------- |
3926 |
||
| 7 | 3927 |
page0_1BC3: |
| 4 | 3928 |
call CMPPRGNAMLEN |
3929 |
||
| 7 | 3930 |
page0_1BC6: |
| 4 | 3931 |
push af |
3932 |
call CMPMEMNEED |
|
| 8 | 3933 |
jr c, page0_1BA0 |
| 4 | 3934 |
|
| 7 | 3935 |
CREATEPVAR3: |
| 8 | 3936 |
or 1 |
| 4 | 3937 |
call page0_1A99 |
3938 |
push de |
|
3939 |
call OP1ToOP4 |
|
| 8 | 3940 |
ld de, 8486h |
3941 |
ld hl, 8480h |
|
3942 |
ld bc, 8 |
|
| 4 | 3943 |
lddr |
| 8 | 3944 |
pop de |
| 29 | 3945 |
ld (OP1+3), de |
| 8 | 3946 |
xor a |
| 4 | 3947 |
|
| 7 | 3948 |
page0_1BE6: |
| 8 | 3949 |
ld (OP1M), a |
3950 |
xor a |
|
| 29 | 3951 |
ld (OP1+5), a |
3952 |
ld (OP1+1), a |
|
| 8 | 3953 |
pop af |
| 29 | 3954 |
ld (OP1+6), a |
| 8 | 3955 |
add a, 7 |
3956 |
ld c, a |
|
| 4 | 3957 |
call page0_19F8 |
| 29 | 3958 |
ld de, (OP1+3) |
| 4 | 3959 |
ret |
3960 |
; --------------------------------------------------------------------------- |
|
3961 |
||
| 22 | 3962 |
HandleRunIndicatorF: |
| 4 | 3963 |
call CMPMEMNEED |
| 8 | 3964 |
jr c, page0_1BA0 |
| 4 | 3965 |
|
3966 |
CREATEVAR3: |
|
| 29 | 3967 |
ld a, (OP1+1) |
| 8 | 3968 |
cp 24h ; '$' |
| 4 | 3969 |
call page0_1A99 |
3970 |
push de |
|
3971 |
call OP1ToOP4 |
|
| 8 | 3972 |
ld de, 8480h |
3973 |
ld hl, 847Bh |
|
3974 |
ld bc, 3 |
|
| 4 | 3975 |
lddr |
| 8 | 3976 |
pop de |
| 29 | 3977 |
ld (OP1+3), de |
| 8 | 3978 |
xor a |
| 29 | 3979 |
ld (OP1+5), a |
3980 |
ld (OP1+1), a |
|
| 8 | 3981 |
ld (OP1M), a |
| 4 | 3982 |
call sub_19F6 |
| 29 | 3983 |
ld de, (OP1+3) |
| 4 | 3984 |
ret |
3985 |
; End of function sub_1BA3 |
|
3986 |
||
3987 |
; --------------------------------------------------------------------------- |
|
3988 |
||
3989 |
CreateCplx: |
|
| 8 | 3990 |
ld a, 0Ch |
3991 |
ld hl, 12h |
|
3992 |
jr page0_1C3D |
|
| 4 | 3993 |
; --------------------------------------------------------------------------- |
3994 |
||
3995 |
CreateReal: |
|
| 8 | 3996 |
xor a |
3997 |
ld hl, 9 |
|
| 4 | 3998 |
|
| 7 | 3999 |
page0_1C3D: |
| 8 | 4000 |
jp page0_1BA9 |
| 4 | 4001 |
; --------------------------------------------------------------------------- |
4002 |
||
4003 |
CreateTempRList: |
|
| 8 | 4004 |
ld a, 1 |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
4005 |
call j_CREATETEMP |
| 8 | 4006 |
ret c |
| 4 | 4007 |
|
4008 |
; =============== S U B R O U T I N E ======================================= |
|
4009 |
||
4010 |
||
| 7 | 4011 |
CreateRList: |
| 8 | 4012 |
ld a, 1 |
| 4 | 4013 |
push hl |
4014 |
||
| 7 | 4015 |
page0_1C49: |
| 4 | 4016 |
call sub_1B9D |
| 8 | 4017 |
pop bc |
| 4 | 4018 |
push hl |
| 8 | 4019 |
ld h, b |
4020 |
ld l, c |
|
4021 |
ld a, b |
|
4022 |
or c |
|
4023 |
jr nz, page0_1C5A |
|
4024 |
ld (de), a |
|
4025 |
inc de |
|
4026 |
ld (de), a |
|
4027 |
dec de |
|
4028 |
pop hl |
|
| 4 | 4029 |
ret |
4030 |
; --------------------------------------------------------------------------- |
|
4031 |
||
| 7 | 4032 |
page0_1C5A: |
| 8 | 4033 |
ex de, hl |
4034 |
ld (hl), e |
|
4035 |
inc hl |
|
4036 |
ld (hl), d |
|
4037 |
inc hl |
|
4038 |
ld (hl), 0 |
|
4039 |
ld a, (OP4) |
|
4040 |
bit 3, a |
|
4041 |
jr z, page0_1C6A |
|
4042 |
ld (hl), 0Ch |
|
| 4 | 4043 |
|
| 7 | 4044 |
page0_1C6A: |
| 8 | 4045 |
dec hl |
4046 |
dec hl |
|
4047 |
ex de, hl |
|
4048 |
pop hl |
|
| 4 | 4049 |
ret |
4050 |
; End of function CreateRList |
|
4051 |
||
4052 |
; --------------------------------------------------------------------------- |
|
4053 |
||
4054 |
CREATETCLIST: |
|
| 8 | 4055 |
ld a, 0Dh |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
4056 |
call j_CREATETEMP |
| 8 | 4057 |
ret c |
| 4 | 4058 |
|
4059 |
CreateCList: |
|
| 8 | 4060 |
ld a, 0Dh |
| 4 | 4061 |
push hl |
| 8 | 4062 |
add hl, hl |
4063 |
jr page0_1C49 |
|
| 4 | 4064 |
; --------------------------------------------------------------------------- |
4065 |
||
4066 |
CreateTempRMat: |
|
| 8 | 4067 |
ld a, 2 |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
4068 |
call j_CREATETEMP |
| 8 | 4069 |
ret c |
| 4 | 4070 |
|
4071 |
CreateRMat: |
|
4072 |
push hl |
|
4073 |
call HTimesL |
|
| 8 | 4074 |
ld a, 2 |
4075 |
jr page0_1C49 |
|
| 4 | 4076 |
; --------------------------------------------------------------------------- |
4077 |
||
4078 |
CreateTempString: |
|
| 8 | 4079 |
ld a, 4 |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
4080 |
call j_CREATETEMP |
| 8 | 4081 |
ret c |
| 4 | 4082 |
|
4083 |
CreateStrng: |
|
| 8 | 4084 |
ld a, 4 |
| 4 | 4085 |
|
4086 |
; =============== S U B R O U T I N E ======================================= |
|
4087 |
||
4088 |
||
| 7 | 4089 |
CreateVar: |
| 4 | 4090 |
push hl |
4091 |
call sub_1BA3 |
|
| 8 | 4092 |
pop bc |
4093 |
ex de, hl |
|
4094 |
ld (hl), c |
|
4095 |
inc hl |
|
4096 |
ld (hl), b |
|
4097 |
dec hl |
|
4098 |
ex de, hl |
|
| 4 | 4099 |
ret |
4100 |
; End of function CreateVar |
|
4101 |
||
4102 |
; --------------------------------------------------------------------------- |
|
4103 |
||
4104 |
Create0Equ: |
|
| 8 | 4105 |
ld hl, 0 |
4106 |
jr CreateEqu |
|
| 4 | 4107 |
; --------------------------------------------------------------------------- |
4108 |
||
4109 |
CreateTempEqu: |
|
| 8 | 4110 |
ld a, 3 |
|
16
27ca02d0d8aa
Give meaningful names to the page 0 calls we know about so far.
brandonlw
parents:
8
diff
changeset
|
4111 |
call j_CREATETEMP |
| 8 | 4112 |
ret c |
| 4 | 4113 |
|
| 7 | 4114 |
CreateEqu: |
| 8 | 4115 |
ld a, 3 |
4116 |
jr CreateVar |
|
| 4 | 4117 |
; --------------------------------------------------------------------------- |
4118 |
||
4119 |
CreatePict: |
|
| 8 | 4120 |
ld a, 7 |
4121 |
ld hl, 2F4h |
|
4122 |
jr CreateVar |
|
| 4 | 4123 |
; --------------------------------------------------------------------------- |
4124 |
||
4125 |
CreateGDB: |
|
| 8 | 4126 |
ld a, 8 |
4127 |
jr CreateVar |
|
| 4 | 4128 |
; --------------------------------------------------------------------------- |
4129 |
||
4130 |
CreateAppVar: |
|
| 8 | 4131 |
ld a, 15h |
4132 |
jr CreateVar |
|
| 4 | 4133 |
; --------------------------------------------------------------------------- |
4134 |
||
4135 |
CreateProtProg: |
|
| 8 | 4136 |
ld a, 6 |
4137 |
jr CreateVar |
|
| 4 | 4138 |
; --------------------------------------------------------------------------- |
4139 |
||
4140 |
CreateProg: |
|
| 8 | 4141 |
ld a, 5 |
4142 |
jr CreateVar |
|
| 4 | 4143 |
; --------------------------------------------------------------------------- |
4144 |
||
4145 |
page0_1CC3: |
|
| 8 | 4146 |
ld a, 17h |
4147 |
ld (OP1), a |
|
| 4 | 4148 |
push bc |
4149 |
call CMPPRGNAMLEN |
|
4150 |
push af |
|
| 8 | 4151 |
ld hl, 0 |
| 4 | 4152 |
call CMPMEMNEED |
| 8 | 4153 |
jp c, ErrMemory |
4154 |
ld de, 0 |
|
| 4 | 4155 |
push de |
4156 |
call OP1ToOP4 |
|
| 8 | 4157 |
ld de, 8486h |
4158 |
ld hl, 8480h |
|
4159 |
ld bc, 8 |
|
| 4 | 4160 |
lddr |
| 8 | 4161 |
pop de |
| 29 | 4162 |
ld (OP1+3), de |
| 8 | 4163 |
pop bc |
4164 |
pop af |
|
| 4 | 4165 |
push bc |
| 8 | 4166 |
jp page0_1BE6 |
| 4 | 4167 |
; --------------------------------------------------------------------------- |
4168 |
||
4169 |
CHKDEL: |
|
| 8 | 4170 |
ld a, (OP1) |
4171 |
ld hl, (chkDelPtr2) |
|
| 4 | 4172 |
call DataSize |
4173 |
||
4174 |
CHKDELA: |
|
4175 |
push de |
|
| 8 | 4176 |
ld a, (OP4) |
4177 |
ld hl, (chkDelPtr1) |
|
| 4 | 4178 |
call DataSize |
| 8 | 4179 |
ex de, hl |
4180 |
pop de |
|
4181 |
sbc hl, de |
|
4182 |
jr c, page0_1D24 |
|
4183 |
jr z, page0_1D17 |
|
4184 |
ld de, (chkDelPtr1) |
|
4185 |
inc de |
|
4186 |
ex de, hl |
|
| 4 | 4187 |
call DelMem |
4188 |
||
| 7 | 4189 |
page0_1D17: |
| 8 | 4190 |
ld hl, (chkDelPtr3) |
| 4 | 4191 |
call CkOP1Real |
| 8 | 4192 |
ld b, a |
4193 |
ld a, (hl) |
|
4194 |
and 0E0h ; '্ |
|
4195 |
or b |
|
4196 |
ld (hl), a |
|
| 4 | 4197 |
ret |
4198 |
; --------------------------------------------------------------------------- |
|
4199 |
||
| 7 | 4200 |
page0_1D24: |
| 8 | 4201 |
add hl, de |
4202 |
ex de, hl |
|
4203 |
or a |
|
4204 |
sbc hl, de |
|
| 4 | 4205 |
call ErrNotEnoughMem |
| 8 | 4206 |
ex de, hl |
4207 |
ld de, (chkDelPtr1) |
|
4208 |
inc de |
|
| 4 | 4209 |
call InsertMem |
| 8 | 4210 |
jr page0_1D17 |
| 4 | 4211 |
|
4212 |
; =============== S U B R O U T I N E ======================================= |
|
4213 |
||
4214 |
||
| 7 | 4215 |
ADJPARSER: |
| 6 | 4216 |
; sub_1FA3+2Fp |
| 8 | 4217 |
ld hl, (basic_start) |
4218 |
or a |
|
4219 |
sbc hl, de |
|
4220 |
ret c |
|
4221 |
ret z |
|
4222 |
add hl, de |
|
4223 |
sbc hl, bc |
|
4224 |
ld (basic_start), hl |
|
4225 |
ld hl, (nextParseByte) |
|
4226 |
or a |
|
4227 |
sbc hl, bc |
|
4228 |
ld (nextParseByte), hl |
|
4229 |
ld hl, (basic_end) |
|
4230 |
or a |
|
4231 |
sbc hl, bc |
|
4232 |
ld (basic_end), hl |
|
| 4 | 4233 |
ret |
4234 |
; End of function ADJPARSER |
|
4235 |
||
4236 |
||
4237 |
; =============== S U B R O U T I N E ======================================= |
|
4238 |
||
4239 |
||
| 7 | 4240 |
ADJMATH: |
| 6 | 4241 |
; sub_1FA3:DELVAR3Dp |
| 8 | 4242 |
ld hl, (iMathPtr1) |
4243 |
or a |
|
4244 |
sbc hl, de |
|
4245 |
jr c, page0_1D69 |
|
4246 |
jr z, page0_1D69 |
|
4247 |
add hl, de |
|
4248 |
or a |
|
4249 |
sbc hl, bc |
|
4250 |
ld (iMathPtr1), hl |
|
| 4 | 4251 |
|
| 7 | 4252 |
page0_1D69: |
| 8 | 4253 |
ld hl, (iMathPtr2) |
4254 |
or a |
|
4255 |
sbc hl, de |
|
4256 |
jr c, page0_1D7A |
|
4257 |
jr z, page0_1D7A |
|
4258 |
add hl, de |
|
4259 |
or a |
|
4260 |
sbc hl, bc |
|
4261 |
ld (iMathPtr2), hl |
|
| 4 | 4262 |
|
| 7 | 4263 |
page0_1D7A: |
| 8 | 4264 |
ld hl, (iMathPtr3) |
4265 |
or a |
|
4266 |
sbc hl, de |
|
4267 |
jr c, page0_1D8B |
|
4268 |
jr z, page0_1D8B |
|
4269 |
add hl, de |
|
4270 |
or a |
|
4271 |
sbc hl, bc |
|
4272 |
ld (iMathPtr3), hl |
|
| 4 | 4273 |
|
| 7 | 4274 |
page0_1D8B: |
| 8 | 4275 |
ld hl, (iMathPtr4) |
4276 |
or a |
|
4277 |
sbc hl, de |
|
4278 |
jr c, page0_1D9C |
|
4279 |
jr z, page0_1D9C |
|
4280 |
add hl, de |
|
4281 |
or a |
|
4282 |
sbc hl, bc |
|
4283 |
ld (iMathPtr4), hl |
|
| 4 | 4284 |
|
| 7 | 4285 |
page0_1D9C: |
| 8 | 4286 |
ld hl, (iMathPtr5) |
4287 |
or a |
|
4288 |
sbc hl, de |
|
4289 |
jr c, ADJM7 |
|
4290 |
jr z, ADJM7 |
|
4291 |
add hl, de |
|
4292 |
or a |
|
4293 |
sbc hl, bc |
|
4294 |
ld (iMathPtr5), hl |
|
| 4 | 4295 |
|
| 7 | 4296 |
ADJM7: |
| 8 | 4297 |
ld hl, (asm_data_ptr1) |
4298 |
or a |
|
4299 |
sbc hl, de |
|
4300 |
jr c, page0_1DBE |
|
4301 |
jr z, page0_1DBE |
|
4302 |
add hl, de |
|
4303 |
or a |
|
4304 |
sbc hl, bc |
|
4305 |
ld (asm_data_ptr1), hl |
|
| 4 | 4306 |
|
| 7 | 4307 |
page0_1DBE: |
| 8 | 4308 |
ld hl, (asm_data_ptr2) |
4309 |
or a |
|
4310 |
sbc hl, de |
|
4311 |
jr c, page0_1DCF |
|
4312 |
jr z, page0_1DCF |
|
4313 |
add hl, de |
|
4314 |
or a |
|
4315 |
sbc hl, bc |
|
4316 |
ld (asm_data_ptr2), hl |
|
| 4 | 4317 |
|
| 7 | 4318 |
page0_1DCF: |
| 8 | 4319 |
ld hl, (fmtMatMem) |
4320 |
or a |
|
4321 |
sbc hl, de |
|
4322 |
jr c, page0_1DE0 |
|
4323 |
jr z, page0_1DE0 |
|
4324 |
add hl, de |
|
4325 |
or a |
|
4326 |
sbc hl, bc |
|
4327 |
ld (fmtMatMem), hl |
|
| 4 | 4328 |
|
| 7 | 4329 |
page0_1DE0: |
| 8 | 4330 |
ld hl, (newDataPtr) |
4331 |
or a |
|
4332 |
sbc hl, de |
|
4333 |
jr c, page0_1DF1 |
|
4334 |
jr z, page0_1DF1 |
|
4335 |
add hl, de |
|
4336 |
or a |
|
4337 |
sbc hl, bc |
|
4338 |
ld (newDataPtr), hl |
|
| 4 | 4339 |
|
| 7 | 4340 |
page0_1DF1: |
| 8 | 4341 |
ld hl, (EQS) |
4342 |
or a |
|
4343 |
sbc hl, de |
|
4344 |
jr c, page0_1E02 |
|
4345 |
jr z, page0_1E02 |
|
4346 |
add hl, de |
|
4347 |
or a |
|
4348 |
sbc hl, bc |
|
4349 |
ld (EQS), hl |
|
| 4 | 4350 |
|
| 7 | 4351 |
page0_1E02: |
| 8 | 4352 |
ld hl, (unk_9313) |
4353 |
or a |
|
4354 |
sbc hl, de |
|
4355 |
jr c, page0_1E13 |
|
4356 |
jr z, page0_1E13 |
|
4357 |
add hl, de |
|
4358 |
or a |
|
4359 |
sbc hl, bc |
|
4360 |
ld (unk_9313), hl |
|
| 4 | 4361 |
|
| 7 | 4362 |
page0_1E13: |
| 8 | 4363 |
ld hl, (ES) |
4364 |
or a |
|
4365 |
sbc hl, de |
|
4366 |
jr c, page0_1E24 |
|
4367 |
jr z, page0_1E24 |
|
4368 |
add hl, de |
|
4369 |
or a |
|
4370 |
sbc hl, bc |
|
4371 |
ld (ES), hl |
|
| 4 | 4372 |
|
| 7 | 4373 |
page0_1E24: |
| 8 | 4374 |
ld hl, (insDelPtr) |
4375 |
or a |
|
4376 |
sbc hl, de |
|
4377 |
jr c, page0_1E35 |
|
4378 |
jr z, page0_1E35 |
|
4379 |
add hl, de |
|
4380 |
or a |
|
4381 |
sbc hl, bc |
|
4382 |
ld (insDelPtr), hl |
|
| 4 | 4383 |
|
| 7 | 4384 |
page0_1E35: |
| 8 | 4385 |
ld hl, (unk_9306) |
4386 |
or a |
|
4387 |
sbc hl, de |
|
4388 |
jr c, page0_1E46 |
|
4389 |
jr z, page0_1E46 |
|
4390 |
add hl, de |
|
4391 |
or a |
|
4392 |
sbc hl, bc |
|
4393 |
ld (unk_9306), hl |
|
| 4 | 4394 |
|
| 7 | 4395 |
page0_1E46: |
| 8 | 4396 |
ld hl, (unk_9311) |
4397 |
or a |
|
4398 |
sbc hl, de |
|
4399 |
jr c, page0_1E57 |
|
4400 |
jr z, page0_1E57 |
|
4401 |
add hl, de |
|
4402 |
or a |
|
4403 |
sbc hl, bc |
|
4404 |
ld (unk_9311), hl |
|
| 4 | 4405 |
|
| 7 | 4406 |
page0_1E57: |
| 8 | 4407 |
ld hl, (editDat) |
4408 |
or a |
|
4409 |
sbc hl, de |
|
4410 |
jr c, page0_1E68 |
|
4411 |
jr z, page0_1E68 |
|
4412 |
add hl, de |
|
4413 |
or a |
|
4414 |
sbc hl, bc |
|
4415 |
ld (editDat), hl |
|
| 4 | 4416 |
|
| 7 | 4417 |
page0_1E68: |
| 8 | 4418 |
ld hl, (chkDelPtr1) |
4419 |
or a |
|
4420 |
sbc hl, de |
|
4421 |
jr c, page0_1E79 |
|
4422 |
jr z, page0_1E79 |
|
4423 |
add hl, de |
|
4424 |
or a |
|
4425 |
sbc hl, bc |
|
4426 |
ld (chkDelPtr1), hl |
|
| 4 | 4427 |
|
| 7 | 4428 |
page0_1E79: |
| 8 | 4429 |
ld hl, (XOutDat) |
4430 |
or a |
|
4431 |
sbc hl, de |
|
4432 |
jr c, page0_1E8A |
|
4433 |
jr z, page0_1E8A |
|
4434 |
add hl, de |
|
4435 |
or a |
|
4436 |
sbc hl, bc |
|
4437 |
ld (XOutDat), hl |
|
| 4 | 4438 |
|
| 7 | 4439 |
page0_1E8A: |
| 8 | 4440 |
ld hl, (YOutDat) |
4441 |
or a |
|
4442 |
sbc hl, de |
|
4443 |
jr c, page0_1E9B |
|
4444 |
jr z, page0_1E9B |
|
4445 |
add hl, de |
|
4446 |
or a |
|
4447 |
sbc hl, bc |
|
4448 |
ld (YOutDat), hl |
|
| 4 | 4449 |
|
| 7 | 4450 |
page0_1E9B: |
| 8 | 4451 |
ld hl, (fOutDat) |
4452 |
or a |
|
4453 |
sbc hl, de |
|
4454 |
jr c, page0_1EAC |
|
4455 |
jr z, page0_1EAC |
|
4456 |
add hl, de |
|
4457 |
or a |
|
4458 |
sbc hl, bc |
|
4459 |
ld (fOutDat), hl |
|
| 4 | 4460 |
|
| 7 | 4461 |
page0_1EAC: |
| 8 | 4462 |
ld hl, (unk_84E7) |
4463 |
or a |
|
4464 |
sbc hl, de |
|
4465 |
jr c, page0_1EBD |
|
4466 |
jr z, page0_1EBD |
|
4467 |
add hl, de |
|
4468 |
or a |
|
4469 |
sbc hl, bc |
|
4470 |
ld (unk_84E7), hl |
|
| 4 | 4471 |
|
| 7 | 4472 |
page0_1EBD: |
| 8 | 4473 |
ld hl, (inputDat) |
4474 |
or a |
|
4475 |
sbc hl, de |
|
4476 |
jr c, page0_1ECE |
|
4477 |
jr z, page0_1ECE |
|
4478 |
add hl, de |
|
4479 |
or a |
|
4480 |
sbc hl, bc |
|
4481 |
ld (inputDat), hl |
|
| 4 | 4482 |
|
| 7 | 4483 |
page0_1ECE: |
| 8 | 4484 |
ld hl, (chkDelPtr2) |
4485 |
or a |
|
4486 |
sbc hl, de |
|
4487 |
ret c |
|
4488 |
ret z |
|
4489 |
add hl, de |
|
4490 |
or a |
|
4491 |
sbc hl, bc |
|
4492 |
ld (chkDelPtr2), hl |
|
| 4 | 4493 |
ret |
4494 |
; End of function ADJMATH |
|
4495 |
||
4496 |
||
4497 |
; =============== S U B R O U T I N E ======================================= |
|
4498 |
||
4499 |
||
| 7 | 4500 |
DELMEMA: |
| 4 | 4501 |
push de |
4502 |
push hl |
|
| 8 | 4503 |
add hl, de |
4504 |
ex de, hl |
|
4505 |
ld hl, (FPS) |
|
4506 |
or a |
|
4507 |
sbc hl, de |
|
4508 |
ld b, h |
|
4509 |
ld c, l |
|
4510 |
pop hl |
|
| 4 | 4511 |
push hl |
| 8 | 4512 |
ex de, hl |
4513 |
jr z, page0_1EF1 |
|
| 4 | 4514 |
ldir |
4515 |
||
| 7 | 4516 |
page0_1EF1: |
| 8 | 4517 |
pop de |
4518 |
pop bc |
|
| 4 | 4519 |
ret |
4520 |
; End of function DELMEMA |
|
4521 |
||
4522 |
||
4523 |
; =============== S U B R O U T I N E ======================================= |
|
4524 |
||
4525 |
||
| 7 | 4526 |
GET_FORM_NUM: |
| 4 | 4527 |
call Page0Call_2407 |
| 8 | 4528 |
ld a, (hl) |
4529 |
cp 24h ; '$' |
|
4530 |
jr nz, page0_1EFE |
|
4531 |
xor a |
|
| 4 | 4532 |
ret |
4533 |
; --------------------------------------------------------------------------- |
|
4534 |
||
| 7 | 4535 |
page0_1EFE: |
| 8 | 4536 |
ld b, 0 |
4537 |
ld c, a |
|
4538 |
or a |
|
4539 |
sbc hl, bc |
|
4540 |
ld a, (hl) |
|
| 4 | 4541 |
ret |
4542 |
; End of function GET_FORM_NUM |
|
4543 |
||
4544 |
||
4545 |
; =============== S U B R O U T I N E ======================================= |
|
4546 |
||
4547 |
||
| 7 | 4548 |
page0_1F06: |
| 6 | 4549 |
; sub_1FA3:page0_1FB0p |
| 4 | 4550 |
push hl |
| 8 | 4551 |
or a |
4552 |
sbc hl, bc |
|
4553 |
pop de |
|
| 4 | 4554 |
push bc |
| 8 | 4555 |
ld bc, (OPS) |
| 4 | 4556 |
push hl |
| 8 | 4557 |
sbc hl, bc |
4558 |
ld b, h |
|
4559 |
ld c, l |
|
4560 |
pop hl |
|
| 4 | 4561 |
push de |
| 8 | 4562 |
jr z, page0_1F1B |
| 4 | 4563 |
lddr |
4564 |
||
| 7 | 4565 |
page0_1F1B: |
| 8 | 4566 |
ld (OPS), de |
4567 |
pop de |
|
4568 |
pop bc |
|
4569 |
ld hl, (OPBase) |
|
4570 |
add hl, bc |
|
4571 |
ld (OPBase), hl |
|
| 4 | 4572 |
call DelVarEntry |
4573 |
ret |
|
4574 |
; End of function page0_1F06 |
|
4575 |
||
4576 |
; --------------------------------------------------------------------------- |
|
4577 |
||
4578 |
DelVarArc: |
|
| 24 | 4579 |
call IsBZero |
| 8 | 4580 |
jr z, DelVarNoArc |
| 4 | 4581 |
|
4582 |
page0_1F31: |
|
4583 |
call page0_1F38 |
|
4584 |
call Page0Call_3E25 |
|
4585 |
ret |
|
4586 |
||
4587 |
; =============== S U B R O U T I N E ======================================= |
|
4588 |
||
4589 |
||
| 7 | 4590 |
page0_1F38: |
| 4 | 4591 |
push af |
4592 |
push bc |
|
4593 |
push de |
|
| 8 | 4594 |
ld bc, 9 |
| 4 | 4595 |
call IsFixedName |
| 8 | 4596 |
jr nz, page0_1F4E |
| 4 | 4597 |
push hl |
4598 |
call Page0Call_2407 |
|
| 8 | 4599 |
ld a, (hl) |
4600 |
add a, 7 |
|
4601 |
ld b, 0 |
|
4602 |
ld c, a |
|
4603 |
pop hl |
|
| 4 | 4604 |
|
| 7 | 4605 |
page0_1F4E: |
| 4 | 4606 |
call page0_1F06 |
| 8 | 4607 |
pop de |
4608 |
pop bc |
|
4609 |
pop af |
|
| 4 | 4610 |
ret |
4611 |
; End of function page0_1F38 |
|
4612 |
||
4613 |
||
4614 |
; =============== S U B R O U T I N E ======================================= |
|
4615 |
||
4616 |
||
| 24 | 4617 |
IsBZero: |
| 8 | 4618 |
ld a, b |
4619 |
or a |
|
| 4 | 4620 |
ret |
| 24 | 4621 |
; End of function IsBZero |
| 4 | 4622 |
|
4623 |
||
4624 |
; =============== S U B R O U T I N E ======================================= |
|
4625 |
||
4626 |
||
| 7 | 4627 |
DelVar: |
| 6 | 4628 |
; EnoughMem+2Ap ... |
| 4 | 4629 |
|
| 7 | 4630 |
|
4631 |
||
| 4 | 4632 |
|
| 24 | 4633 |
call IsBZero |
| 8 | 4634 |
jp nz, Page0Call_254D |
| 4 | 4635 |
|
| 7 | 4636 |
DelVarNoArc: |
| 8 | 4637 |
ld a, (hl) |
| 4 | 4638 |
|
4639 |
DELVARIO: |
|
| 8 | 4640 |
bit 6, a |
| 4 | 4641 |
call nz, SetTblGraphDraw |
4642 |
push af |
|
| 8 | 4643 |
ld bc, 9 |
| 4 | 4644 |
push de |
4645 |
call IsFixedName |
|
| 8 | 4646 |
jr nz, page0_1FB0 |
4647 |
ld a, (hl) |
|
4648 |
and 1Fh |
|
| 4 | 4649 |
call IS_A_LSTorCLST |
| 8 | 4650 |
jr nz, page0_1FA5 |
4651 |
pop de |
|
| 4 | 4652 |
push hl |
4653 |
call GET_FORM_NUM |
|
| 8 | 4654 |
pop hl |
4655 |
or a |
|
4656 |
jr z, page0_1FA4 |
|
4657 |
pop bc |
|
| 4 | 4658 |
push af |
4659 |
call sub_1FA3 |
|
| 8 | 4660 |
ld de, 9315h |
| 4 | 4661 |
call sub_1103 |
| 8 | 4662 |
pop hl |
4663 |
ld l, 3Fh ; '?' |
|
| 4 | 4664 |
call page0_1671 |
| 8 | 4665 |
rst 10h |
| 4 | 4666 |
call nc, DelVar |
| 8 | 4667 |
ld a, (OP1M) |
| 4 | 4668 |
call Page0Call_25E7 |
4669 |
cpl |
|
| 8 | 4670 |
and (hl) |
4671 |
ld (hl), a |
|
4672 |
ld hl, 9315h |
|
4673 |
jp page0_117C |
|
| 4 | 4674 |
; End of function DelVar |
4675 |
||
4676 |
||
4677 |
; =============== S U B R O U T I N E ======================================= |
|
4678 |
||
4679 |
||
| 7 | 4680 |
sub_1FA3: |
| 4 | 4681 |
push bc |
4682 |
||
| 7 | 4683 |
page0_1FA4: |
| 4 | 4684 |
push de |
4685 |
||
| 7 | 4686 |
page0_1FA5: |
| 8 | 4687 |
ld b, 0 |
| 4 | 4688 |
push hl |
4689 |
call Page0Call_2407 |
|
| 8 | 4690 |
ld a, (hl) |
4691 |
add a, 7 |
|
4692 |
ld c, a |
|
4693 |
pop hl |
|
| 4 | 4694 |
|
| 7 | 4695 |
page0_1FB0: |
| 4 | 4696 |
call page0_1F06 |
| 8 | 4697 |
pop hl |
4698 |
pop af |
|
| 4 | 4699 |
call DataSize |
4700 |
||
| 7 | 4701 |
DelMem: |
| 4 | 4702 |
call DELMEMA |
4703 |
||
| 7 | 4704 |
DELVAR3D: |
| 4 | 4705 |
call ADJMATH |
4706 |
nop |
|
4707 |
nop |
|
4708 |
||
4709 |
DELVAR3C: |
|
| 8 | 4710 |
ld hl, (fpBase) |
4711 |
or a |
|
4712 |
sbc hl, bc |
|
4713 |
ld (fpBase), hl |
|
4714 |
ld hl, (FPS) |
|
4715 |
or a |
|
4716 |
sbc hl, bc |
|
4717 |
ld (FPS), hl |
|
| 4 | 4718 |
call ADJPARSER |
| 8 | 4719 |
ld hl, (tempMem) |
4720 |
or a |
|
4721 |
sbc hl, de |
|
4722 |
jr c, page0_1FED |
|
4723 |
jr z, page0_1FED |
|
4724 |
add hl, de |
|
4725 |
or a |
|
4726 |
sbc hl, bc |
|
4727 |
ld (tempMem), hl |
|
4728 |
jr page0_1FF3 |
|
| 4 | 4729 |
; --------------------------------------------------------------------------- |
4730 |
||
| 7 | 4731 |
DELVAR3DC: |
| 4 | 4732 |
call sub_23C4 |
| 8 | 4733 |
jr DELVAR3D |
| 4 | 4734 |
; --------------------------------------------------------------------------- |
4735 |
||
| 7 | 4736 |
page0_1FED: |
| 8 | 4737 |
ld hl, (unk_982E) |
4738 |
or a |
|
4739 |
jr page0_1FF6 |
|
| 4 | 4740 |
; --------------------------------------------------------------------------- |
4741 |
||
| 7 | 4742 |
page0_1FF3: |
| 6 | 4743 |
; sub_1FA3+43j |
| 8 | 4744 |
ld hl, 0FE66h |
| 4 | 4745 |
|
| 7 | 4746 |
page0_1FF6: |
| 8 | 4747 |
ld (freeRAM), bc |
4748 |
dec hl |
|
4749 |
dec hl |
|
4750 |
dec hl |
|
| 4 | 4751 |
|
| 7 | 4752 |
page0_1FFD: |
| 8 | 4753 |
ld c, (hl) |
4754 |
dec hl |
|
4755 |
ld b, (hl) |
|
4756 |
ex de, hl |
|
4757 |
or a |
|
4758 |
sbc hl, bc |
|
4759 |
jr nc, page0_2019 |
|
4760 |
add hl, bc |
|
| 4 | 4761 |
push hl |
| 8 | 4762 |
ld h, b |
4763 |
ld l, c |
|
4764 |
ld bc, (freeRAM) |
|
4765 |
or a |
|
4766 |
sbc hl, bc |
|
4767 |
ex de, hl |
|
4768 |
ld (hl), d |
|
4769 |
inc hl |
|
4770 |
ld (hl), e |
|
4771 |
dec hl |
|
4772 |
pop de |
|
4773 |
jr page0_201B |
|
| 4 | 4774 |
; --------------------------------------------------------------------------- |
4775 |
||
| 7 | 4776 |
page0_2019: |
| 8 | 4777 |
add hl, bc |
4778 |
ex de, hl |
|
| 4 | 4779 |
|
| 7 | 4780 |
page0_201B: |
| 8 | 4781 |
inc hl |
4782 |
inc hl |
|
4783 |
inc hl |
|
4784 |
inc hl |
|
| 4 | 4785 |
push af |
4786 |
call IsFixedName |
|
| 8 | 4787 |
ld c, 0Ch |
4788 |
jr nz, page0_202F |
|
| 4 | 4789 |
call Page0Call_2407 |
| 8 | 4790 |
ld c, (hl) |
4791 |
inc c |
|
4792 |
inc c |
|
4793 |
inc c |
|
4794 |
inc c |
|
| 4 | 4795 |
|
| 7 | 4796 |
page0_202F: |
| 8 | 4797 |
ld b, 0 |
4798 |
pop af |
|
4799 |
or a |
|
4800 |
sbc hl, bc |
|
4801 |
ld bc, (OPBase) |
|
4802 |
sbc hl, bc |
|
4803 |
ret c |
|
4804 |
add hl, bc |
|
4805 |
jp page0_1FFD |
|
| 4 | 4806 |
; End of function sub_1FA3 |
4807 |
||
4808 |
||
4809 |
; =============== S U B R O U T I N E ======================================= |
|
4810 |
||
4811 |
||
| 7 | 4812 |
IsFixedName: |
| 8 | 4813 |
ld a, (hl) |
4814 |
and 1Fh |
|
| 4 | 4815 |
call page0_17B3 |
| 8 | 4816 |
ret z |
| 4 | 4817 |
call IS_A_LSTorCLST |
| 8 | 4818 |
ret nz |
| 4 | 4819 |
push hl |
4820 |
call Page0Call_2407 |
|
| 8 | 4821 |
ld a, (hl) |
4822 |
cp 24h ; '$' |
|
4823 |
jr z, page0_205E |
|
4824 |
cp 72h ; 'r' |
|
4825 |
jr z, page0_205E |
|
4826 |
cp 3Ah ; ':' |
|
4827 |
jr z, page0_205E |
|
4828 |
ld a, 1 |
|
| 4 | 4829 |
|
| 7 | 4830 |
page0_205E: |
| 6 | 4831 |
; IsFixedName+16j ... |
| 8 | 4832 |
cp 1 |
4833 |
pop hl |
|
| 4 | 4834 |
ret |
4835 |
; End of function IsFixedName |
|
4836 |
||
4837 |
||
4838 |
; =============== S U B R O U T I N E ======================================= |
|
4839 |
||
4840 |
||
| 7 | 4841 |
DelVarEntry: |
| 8 | 4842 |
ld hl, (unk_982E) |
4843 |
or a |
|
4844 |
sbc hl, de |
|
4845 |
jr nc, page0_206F |
|
4846 |
add hl, de |
|
4847 |
add hl, bc |
|
4848 |
ld (unk_982E), hl |
|
| 4 | 4849 |
|
| 7 | 4850 |
page0_206F: |
| 8 | 4851 |
ld hl, (progPtr) |
4852 |
or a |
|
4853 |
sbc hl, de |
|
4854 |
jr nc, page0_207C |
|
4855 |
add hl, de |
|
4856 |
add hl, bc |
|
4857 |
ld (progPtr), hl |
|
| 4 | 4858 |
|
| 7 | 4859 |
page0_207C: |
| 6 | 4860 |
; DelVarEntry+13j |
| 8 | 4861 |
ld hl, (editSym) |
4862 |
or a |
|
4863 |
sbc hl, de |
|
4864 |
jr nc, page0_2089 |
|
4865 |
add hl, de |
|
4866 |
add hl, bc |
|
4867 |
ld (editSym), hl |
|
| 4 | 4868 |
|
| 7 | 4869 |
page0_2089: |
| 8 | 4870 |
ld hl, (tSymPtr1) |
4871 |
or a |
|
4872 |
sbc hl, de |
|
4873 |
jr nc, page0_2096 |
|
4874 |
add hl, de |
|
4875 |
add hl, bc |
|
4876 |
ld (tSymPtr1), hl |
|
| 4 | 4877 |
|
| 7 | 4878 |
page0_2096: |
| 8 | 4879 |
ld hl, (tSymPtr2) |
4880 |
or a |
|
4881 |
sbc hl, de |
|
4882 |
jr nc, page0_20A3 |
|
4883 |
add hl, de |
|
4884 |
add hl, bc |
|
4885 |
ld (tSymPtr2), hl |
|
| 4 | 4886 |
|
| 7 | 4887 |
page0_20A3: |
| 8 | 4888 |
ld hl, (chkDelPtr3) |
4889 |
or a |
|
4890 |
sbc hl, de |
|
4891 |
jr nc, page0_20B0 |
|
4892 |
add hl, de |
|
4893 |
add hl, bc |
|
4894 |
ld (chkDelPtr3), hl |
|
| 4 | 4895 |
|
| 7 | 4896 |
page0_20B0: |
| 8 | 4897 |
ld hl, (chkDelPtr4) |
4898 |
or a |
|
4899 |
sbc hl, de |
|
4900 |
jr nc, page0_20BD |
|
4901 |
add hl, de |
|
4902 |
add hl, bc |
|
4903 |
ld (chkDelPtr4), hl |
|
| 4 | 4904 |
|
| 7 | 4905 |
page0_20BD: |
| 8 | 4906 |
ld hl, (XOutSym) |
4907 |
or a |
|
4908 |
sbc hl, de |
|
4909 |
jr nc, page0_20CA |
|
4910 |
add hl, de |
|
4911 |
add hl, bc |
|
4912 |
ld (XOutSym), hl |
|
| 4 | 4913 |
|
| 7 | 4914 |
page0_20CA: |
| 8 | 4915 |
ld hl, (YOutSym) |
4916 |
or a |
|
4917 |
sbc hl, de |
|
4918 |
jr nc, page0_20D7 |
|
4919 |
add hl, de |
|
4920 |
add hl, bc |
|
4921 |
ld (YOutSym), hl |
|
| 4 | 4922 |
|
| 7 | 4923 |
page0_20D7: |
| 8 | 4924 |
ld hl, (inputSym) |
4925 |
or a |
|
4926 |
sbc hl, de |
|
4927 |
jr nc, page0_20E5 |
|
4928 |
add hl, de |
|
4929 |
add hl, bc |
|
4930 |
ld (inputSym), hl |
|
| 4 | 4931 |
ret |
4932 |
; --------------------------------------------------------------------------- |
|
4933 |
||
| 7 | 4934 |
page0_20E5: |
| 8 | 4935 |
ld hl, (fmtMatSym) |
4936 |
or a |
|
4937 |
sbc hl, de |
|
4938 |
ret nc |
|
4939 |
add hl, de |
|
4940 |
add hl, bc |
|
4941 |
ld (fmtMatSym), hl |
|
| 4 | 4942 |
ret |
4943 |
; End of function DelVarEntry |
|
4944 |
||
4945 |
; --------------------------------------------------------------------------- |
|
4946 |
||
4947 |
DataSizeA: |
|
| 8 | 4948 |
ld d, b |
4949 |
ld e, c |
|
4950 |
jr page0_211A |
|
| 4 | 4951 |
; --------------------------------------------------------------------------- |
4952 |
||
| 7 | 4953 |
page0_20F6: |
| 8 | 4954 |
pop bc |
| 4 | 4955 |
ret |
4956 |
; --------------------------------------------------------------------------- |
|
4957 |
||
4958 |
Page0Call_20F8: |
|
4959 |
push de |
|
| 8 | 4960 |
ld de, 9 |
4961 |
and 1Fh |
|
4962 |
jr z, page0_20F6 |
|
4963 |
ld de, 12h |
|
4964 |
cp 0Ch |
|
4965 |
jr z, page0_20F6 |
|
4966 |
pop de |
|
4967 |
jr page0_211A |
|
| 4 | 4968 |
|
4969 |
; =============== S U B R O U T I N E ======================================= |
|
4970 |
||
4971 |
||
| 7 | 4972 |
DataSize: |
4973 |
||
4974 |
||
| 4 | 4975 |
|
| 8 | 4976 |
ld de, 9 |
4977 |
and 1Fh |
|
4978 |
ret z |
|
4979 |
ld de, 12h |
|
4980 |
cp 0Ch |
|
4981 |
ret z |
|
4982 |
ld e, (hl) |
|
4983 |
inc hl |
|
4984 |
ld d, (hl) |
|
4985 |
dec hl |
|
| 4 | 4986 |
|
| 7 | 4987 |
page0_211A: |
| 4 | 4988 |
push hl |
| 8 | 4989 |
ex de, hl |
4990 |
cp 15h |
|
4991 |
jr z, page0_213D |
|
4992 |
cp 17h |
|
4993 |
jr z, page0_213D |
|
4994 |
cp 16h |
|
4995 |
jr z, page0_213D |
|
4996 |
cp 0Dh |
|
4997 |
jr nz, page0_212F |
|
4998 |
add hl, hl |
|
4999 |
jr page0_2138 |
|
| 4 | 5000 |
; --------------------------------------------------------------------------- |
5001 |
||
| 7 | 5002 |
page0_212F: |
| 8 | 5003 |
cp 3 |
5004 |
jr nc, page0_213D |
|
5005 |
cp 1 |
|
| 4 | 5006 |
call nz, HTimesL |
5007 |
||
| 7 | 5008 |
page0_2138: |
| 4 | 5009 |
call HLTimes9 |
| 8 | 5010 |
jr c, page0_2141 |
| 4 | 5011 |
|
| 7 | 5012 |
page0_213D: |
| 8 | 5013 |
ld de, 2 |
5014 |
add hl, de |
|
| 4 | 5015 |
|
| 7 | 5016 |
page0_2141: |
| 8 | 5017 |
jp c, ErrMemory |
5018 |
ex de, hl |
|
5019 |
pop hl |
|
5020 |
or a |
|
| 4 | 5021 |
ret |
5022 |
; End of function DataSize |
|
5023 |
||
5024 |
; --------------------------------------------------------------------------- |
|
5025 |
||
5026 |
POPMCPLXO1: |
|
| 8 | 5027 |
ld de, 8478h |
| 4 | 5028 |
|
5029 |
POPMCPLX: |
|
5030 |
call FPOPCPLX |
|
5031 |
||
5032 |
MOVCPLX: |
|
5033 |
call mov9B2 |
|
| 8 | 5034 |
inc de |
5035 |
inc de |
|
5036 |
jp mov9B2 |
|
| 4 | 5037 |
; --------------------------------------------------------------------------- |
5038 |
||
5039 |
popOP5: |
|
5040 |
call PopRealO5 |
|
| 8 | 5041 |
ld a, (OP5) |
5042 |
and 1Fh |
|
5043 |
cp 0Ch |
|
5044 |
ret nz |
|
| 4 | 5045 |
call OP5ToOP6 |
| 8 | 5046 |
jr PopRealO5 |
| 4 | 5047 |
; --------------------------------------------------------------------------- |
5048 |
||
5049 |
popOP3: |
|
5050 |
call PopRealO3 |
|
| 8 | 5051 |
ld a, (OP3) |
5052 |
and 1Fh |
|
5053 |
cp 0Ch |
|
5054 |
ret nz |
|
| 4 | 5055 |
call OP3ToOP4 |
| 8 | 5056 |
jr PopRealO3 |
| 4 | 5057 |
; --------------------------------------------------------------------------- |
5058 |
||
5059 |
popOP1: |
|
5060 |
call PopRealO1 |
|
5061 |
call CkOP1Real |
|
| 8 | 5062 |
cp 0Ch |
5063 |
ret nz |
|
5064 |
rst 8 |
|
5065 |
jr PopRealO1 |
|
| 4 | 5066 |
; --------------------------------------------------------------------------- |
5067 |
||
5068 |
PopRealO6: |
|
| 8 | 5069 |
ld de, 84AFh |
5070 |
jr PopReal |
|
| 4 | 5071 |
|
5072 |
; =============== S U B R O U T I N E ======================================= |
|
5073 |
||
5074 |
||
| 7 | 5075 |
PopRealO5: |
5076 |
||
| 8 | 5077 |
ld de, 84A4h |
5078 |
jr PopReal |
|
| 4 | 5079 |
; --------------------------------------------------------------------------- |
5080 |
||
5081 |
PopRealO4: |
|
| 8 | 5082 |
ld de, 8499h |
5083 |
jr PopReal |
|
| 4 | 5084 |
; --------------------------------------------------------------------------- |
5085 |
||
| 7 | 5086 |
PopRealO3: |
5087 |
||
| 8 | 5088 |
ld de, 848Eh |
5089 |
jr PopReal |
|
| 4 | 5090 |
; --------------------------------------------------------------------------- |
5091 |
||
5092 |
PopRealO2: |
|
| 8 | 5093 |
ld de, 8483h |
5094 |
jr PopReal |
|
| 4 | 5095 |
; --------------------------------------------------------------------------- |
5096 |
||
| 7 | 5097 |
PopRealO1: |
5098 |
||
| 8 | 5099 |
ld de, 8478h |
| 4 | 5100 |
|
| 7 | 5101 |
PopReal: |
| 4 | 5102 |
call FPOPREAL |
| 8 | 5103 |
jp mov9B2 |
| 4 | 5104 |
; End of function PopRealO5 |
5105 |
||
5106 |
||
5107 |
; =============== S U B R O U T I N E ======================================= |
|
5108 |
||
5109 |
||
| 7 | 5110 |
FPOPCPLX: |
| 4 | 5111 |
call FPOPREAL |
5112 |
||
| 7 | 5113 |
FPOPREAL: |
| 8 | 5114 |
ld bc, 9 |
| 4 | 5115 |
|
5116 |
FPOPFPS: |
|
| 8 | 5117 |
ld hl, (FPS) |
5118 |
or a |
|
5119 |
sbc hl, bc |
|
5120 |
jr page0_21BC |
|
| 4 | 5121 |
; --------------------------------------------------------------------------- |
5122 |
||
5123 |
DeallocFPS: |
|
5124 |
call HLTimes9 |
|
| 8 | 5125 |
ex de, hl |
| 4 | 5126 |
|
5127 |
DeallocFPS1: |
|
| 8 | 5128 |
ld hl, (FPS) |
5129 |
or a |
|
5130 |
sbc hl, de |
|
| 4 | 5131 |
|
| 7 | 5132 |
page0_21BC: |
| 8 | 5133 |
ld (FPS), hl |
| 4 | 5134 |
ret |
5135 |
; End of function FPOPCPLX |
|
5136 |
||
5137 |
; --------------------------------------------------------------------------- |
|
5138 |
||
5139 |
AllocFPS: |
|
5140 |
call HLTimes9 |
|
5141 |
||
5142 |
AllocFPS1: |
|
5143 |
call ErrNotEnoughMem |
|
| 8 | 5144 |
ld hl, (FPS) |
5145 |
add hl, de |
|
5146 |
jr page0_21BC |
|
| 4 | 5147 |
; --------------------------------------------------------------------------- |
5148 |
||
5149 |
PushRealO6: |
|
| 8 | 5150 |
ld hl, 84AFh |
5151 |
jr PushReal |
|
| 4 | 5152 |
; --------------------------------------------------------------------------- |
5153 |
||
| 7 | 5154 |
PushRealO5: |
| 8 | 5155 |
ld hl, 84A4h |
5156 |
jr PushReal |
|
| 4 | 5157 |
; --------------------------------------------------------------------------- |
5158 |
||
5159 |
PushRealO4: |
|
| 8 | 5160 |
ld hl, 8499h |
5161 |
jr PushReal |
|
| 4 | 5162 |
; --------------------------------------------------------------------------- |
5163 |
||
| 7 | 5164 |
PushRealO3: |
| 8 | 5165 |
ld hl, 848Eh |
5166 |
jr PushReal |
|
| 4 | 5167 |
; --------------------------------------------------------------------------- |
5168 |
||
5169 |
PushRealO2: |
|
| 8 | 5170 |
ld hl, 8483h |
5171 |
jr PushReal |
|
| 4 | 5172 |
|
5173 |
; =============== S U B R O U T I N E ======================================= |
|
5174 |
||
5175 |
||
| 7 | 5176 |
PushRealO1: |
5177 |
||
| 8 | 5178 |
ld hl, 8478h |
| 4 | 5179 |
|
| 7 | 5180 |
PushReal: |
| 4 | 5181 |
push hl |
| 8 | 5182 |
ld hl, 9 |
| 4 | 5183 |
call ErrNotEnoughMem |
| 8 | 5184 |
pop hl |
5185 |
ld de, (FPS) |
|
| 4 | 5186 |
|
| 7 | 5187 |
page0_21F4: |
| 4 | 5188 |
call mov9B2 |
| 8 | 5189 |
ld (FPS), de |
| 4 | 5190 |
ret |
5191 |
; End of function PushRealO1 |
|
5192 |
||
5193 |
; --------------------------------------------------------------------------- |
|
5194 |
||
5195 |
PushOP5: |
|
| 8 | 5196 |
ld a, (OP5) |
5197 |
and 1Fh |
|
5198 |
cp 0Ch |
|
5199 |
jr nz, PushRealO5 |
|
5200 |
ld hl, 84A4h |
|
5201 |
jr PUSHMCPLX |
|
| 4 | 5202 |
; --------------------------------------------------------------------------- |
5203 |
||
5204 |
PushOP3: |
|
| 8 | 5205 |
ld a, (OP3) |
5206 |
and 1Fh |
|
5207 |
cp 0Ch |
|
5208 |
jr nz, PushRealO3 |
|
5209 |
ld a, (OP4) |
|
5210 |
and 0E0h ; '্ |
|
5211 |
or 0Ch |
|
5212 |
ld (OP4), a |
|
| 4 | 5213 |
|
5214 |
PUSHMCPLXO3: |
|
| 8 | 5215 |
ld hl, 848Eh |
5216 |
jr PUSHMCPLX |
|
| 4 | 5217 |
; --------------------------------------------------------------------------- |
5218 |
||
5219 |
PushOP1: |
|
5220 |
call CkOP1Real |
|
| 8 | 5221 |
cp 0Ch |
5222 |
jr nz, PushRealO1 |
|
| 4 | 5223 |
call page0_104E |
5224 |
||
5225 |
PUSHMCPLXO1: |
|
| 8 | 5226 |
ld hl, 8478h |
| 4 | 5227 |
|
| 7 | 5228 |
PUSHMCPLX: |
| 4 | 5229 |
push hl |
| 8 | 5230 |
ld hl, 12h |
| 4 | 5231 |
call ErrNotEnoughMem |
| 8 | 5232 |
pop hl |
5233 |
ld de, (FPS) |
|
| 4 | 5234 |
call mov9B2 |
| 8 | 5235 |
inc hl |
5236 |
inc hl |
|
5237 |
jr page0_21F4 |
|
| 4 | 5238 |
; --------------------------------------------------------------------------- |
5239 |
||
5240 |
ExMCplxO1: |
|
| 8 | 5241 |
ld hl, (FPS) |
5242 |
ld bc, 0FFEEh |
|
5243 |
add hl, bc |
|
5244 |
ld de, 8478h |
|
5245 |
ld b, 9 |
|
| 4 | 5246 |
call ExLp |
| 8 | 5247 |
inc de |
5248 |
inc de |
|
| 4 | 5249 |
|
5250 |
Exch9: |
|
| 8 | 5251 |
ld b, 9 |
5252 |
jp ExLp |
|
| 4 | 5253 |
; --------------------------------------------------------------------------- |
5254 |
||
5255 |
CpyTo1FPS11: |
|
| 8 | 5256 |
ld de, 8478h |
5257 |
ld hl, (FPS) |
|
5258 |
ld c, 6Ch ; 'l' |
|
5259 |
jr page0_226F |
|
| 4 | 5260 |
; --------------------------------------------------------------------------- |
5261 |
||
5262 |
CpyTo2FPS5: |
|
| 8 | 5263 |
ld de, 8483h |
5264 |
jr page0_226A |
|
| 4 | 5265 |
; --------------------------------------------------------------------------- |
5266 |
||
5267 |
CpyTo1FPS5: |
|
| 8 | 5268 |
ld de, 8478h |
| 4 | 5269 |
|
| 7 | 5270 |
page0_226A: |
| 8 | 5271 |
ld hl, (FPS) |
5272 |
ld c, 36h ; '6' |
|
| 4 | 5273 |
|
| 7 | 5274 |
page0_226F: |
| 8 | 5275 |
jp CpyStack |
| 4 | 5276 |
; --------------------------------------------------------------------------- |
5277 |
||
5278 |
CpyTo2FPS6: |
|
| 8 | 5279 |
ld de, 8483h |
5280 |
jr page0_227A |
|
| 4 | 5281 |
; --------------------------------------------------------------------------- |
5282 |
||
5283 |
CpyTo1FPS6: |
|
| 8 | 5284 |
ld de, 8478h |
| 4 | 5285 |
|
| 7 | 5286 |
page0_227A: |
| 8 | 5287 |
ld hl, (FPS) |
5288 |
ld c, 3Fh ; '?' |
|
5289 |
jr page0_226F |
|
| 4 | 5290 |
; --------------------------------------------------------------------------- |
5291 |
||
5292 |
CpyTo2FPS7: |
|
| 8 | 5293 |
ld de, 8483h |
5294 |
jr page0_2289 |
|
| 4 | 5295 |
; --------------------------------------------------------------------------- |
5296 |
||
5297 |
CpyTo1FPS7: |
|
| 8 | 5298 |
ld de, 8478h |
| 4 | 5299 |
|
| 7 | 5300 |
page0_2289: |
| 8 | 5301 |
ld hl, (FPS) |
5302 |
ld c, 48h ; 'H' |
|
5303 |
jr CpyStack |
|
| 4 | 5304 |
; --------------------------------------------------------------------------- |
5305 |
||
5306 |
CpyTo1FPS8: |
|
| 8 | 5307 |
ld de, 8478h |
5308 |
jr page0_2298 |
|
| 4 | 5309 |
; --------------------------------------------------------------------------- |
5310 |
||
5311 |
CpyTo2FPS8: |
|
| 8 | 5312 |
ld de, 8483h |
| 4 | 5313 |
|
| 7 | 5314 |
page0_2298: |
| 8 | 5315 |
ld hl, (FPS) |
5316 |
ld c, 51h ; 'Q' |
|
5317 |
jr CpyStack |
|
| 4 | 5318 |
; --------------------------------------------------------------------------- |
5319 |
||
5320 |
CpyTo1FPS10: |
|
| 8 | 5321 |
ld de, 8478h |
5322 |
ld hl, (FPS) |
|
5323 |
ld c, 63h ; 'c' |
|
5324 |
jr CpyStack |
|
| 4 | 5325 |
; --------------------------------------------------------------------------- |
5326 |
||
5327 |
CpyTo1FPS9: |
|
| 8 | 5328 |
ld de, 8478h |
5329 |
ld hl, (FPS) |
|
5330 |
ld c, 5Ah ; 'Z' |
|
5331 |
jr CpyStack |
|
| 4 | 5332 |
; --------------------------------------------------------------------------- |
5333 |
||
5334 |
CpyTo2FPS4: |
|
| 8 | 5335 |
ld de, 8483h |
| 4 | 5336 |
|
| 7 | 5337 |
page0_22B6: |
| 8 | 5338 |
ld hl, (FPS) |
5339 |
ld c, 2Dh ; '-' |
|
5340 |
jr CpyStack |
|
| 4 | 5341 |
; --------------------------------------------------------------------------- |
5342 |
||
5343 |
CpyTo6FPS3: |
|
| 8 | 5344 |
ld de, 84AFh |
5345 |
jr CPYFPS3 |
|
| 4 | 5346 |
; --------------------------------------------------------------------------- |
5347 |
||
5348 |
CpyTo6FPS2: |
|
| 8 | 5349 |
ld de, 84AFh |
5350 |
jr CPYFPS2 |
|
| 4 | 5351 |
; --------------------------------------------------------------------------- |
5352 |
||
5353 |
CpyTo2FPS3: |
|
| 8 | 5354 |
ld de, 8483h |
5355 |
jr CPYFPS3 |
|
| 4 | 5356 |
; --------------------------------------------------------------------------- |
5357 |
||
5358 |
CPYCTO1FPS3: |
|
5359 |
call CpyTo2FPS2 |
|
5360 |
||
5361 |
CpyTo1FPS3: |
|
| 8 | 5362 |
ld de, 8478h |
| 4 | 5363 |
|
| 7 | 5364 |
CPYFPS3: |
| 8 | 5365 |
ld hl, (FPS) |
5366 |
ld c, 24h ; '$' |
|
5367 |
jr CpyStack |
|
| 4 | 5368 |
; --------------------------------------------------------------------------- |
5369 |
||
5370 |
CpyTo1FPS4: |
|
| 8 | 5371 |
ld de, 8478h |
5372 |
jr page0_22B6 |
|
| 4 | 5373 |
; --------------------------------------------------------------------------- |
5374 |
||
5375 |
CpyTo3FPS2: |
|
| 8 | 5376 |
ld de, 848Eh |
5377 |
jr CPYFPS2 |
|
| 4 | 5378 |
; --------------------------------------------------------------------------- |
5379 |
||
5380 |
CpyTo5FPST: |
|
| 8 | 5381 |
ld de, 84A4h |
5382 |
jr CPYFPST |
|
| 4 | 5383 |
; --------------------------------------------------------------------------- |
5384 |
||
5385 |
CpyTo6FPST: |
|
| 8 | 5386 |
ld de, 84AFh |
5387 |
jr CPYFPST |
|
| 4 | 5388 |
; --------------------------------------------------------------------------- |
5389 |
||
5390 |
CpyTo4FPST: |
|
| 8 | 5391 |
ld de, 8499h |
5392 |
jr CPYFPST |
|
| 4 | 5393 |
; --------------------------------------------------------------------------- |
5394 |
||
5395 |
CpyTo3FPST: |
|
| 8 | 5396 |
ld de, 848Eh |
5397 |
jr CPYFPST |
|
| 4 | 5398 |
; --------------------------------------------------------------------------- |
5399 |
||
5400 |
CpyTo2FPST: |
|
| 8 | 5401 |
ld de, 8483h |
5402 |
jr CPYFPST |
|
| 4 | 5403 |
; --------------------------------------------------------------------------- |
5404 |
||
5405 |
CpyTo1FPST: |
|
| 8 | 5406 |
ld de, 8478h |
| 4 | 5407 |
|
| 7 | 5408 |
CPYFPST: |
| 8 | 5409 |
ld hl, (FPS) |
| 4 | 5410 |
|
| 7 | 5411 |
page0_2302: |
| 8 | 5412 |
ld c, 9 |
| 4 | 5413 |
; START OF FUNCTION CHUNK FOR CpyTo2FPS2 |
5414 |
||
| 7 | 5415 |
CpyStack: |
5416 |
||
| 8 | 5417 |
xor a |
5418 |
ld b, a |
|
5419 |
sbc hl, bc |
|
5420 |
jp mov9B2 |
|
| 4 | 5421 |
; END OF FUNCTION CHUNK FOR CpyTo2FPS2 |
5422 |
; --------------------------------------------------------------------------- |
|
5423 |
||
5424 |
CpyTo3FPS1: |
|
| 8 | 5425 |
ld de, 848Eh |
5426 |
jr CPYFPS1 |
|
| 4 | 5427 |
; --------------------------------------------------------------------------- |
5428 |
||
5429 |
CpyTo2FPS1: |
|
| 8 | 5430 |
ld de, 8483h |
5431 |
jr CPYFPS1 |
|
| 4 | 5432 |
; --------------------------------------------------------------------------- |
5433 |
||
5434 |
CpyTo1FPS1: |
|
| 8 | 5435 |
ld de, 8478h |
| 4 | 5436 |
|
| 7 | 5437 |
CPYFPS1: |
| 8 | 5438 |
ld hl, (FPS) |
| 4 | 5439 |
|
| 7 | 5440 |
page0_231B: |
| 8 | 5441 |
ld c, 12h |
5442 |
jr CpyStack |
|
| 4 | 5443 |
|
5444 |
; =============== S U B R O U T I N E ======================================= |
|
5445 |
||
5446 |
||
| 7 | 5447 |
CpyTo2FPS2: |
5448 |
||
5449 |
||
| 4 | 5450 |
|
| 8 | 5451 |
ld de, 8483h |
5452 |
jr CPYFPS2 |
|
| 4 | 5453 |
; --------------------------------------------------------------------------- |
5454 |
||
5455 |
CpyTo1FPS2: |
|
| 8 | 5456 |
ld de, 8478h |
| 4 | 5457 |
|
| 7 | 5458 |
CPYFPS2: |
| 8 | 5459 |
ld hl, (FPS) |
| 4 | 5460 |
|
| 27 | 5461 |
_checkThirdBankA: |
| 8 | 5462 |
ld c, 1Bh |
5463 |
jr CpyStack |
|
| 4 | 5464 |
; End of function CpyTo2FPS2 |
5465 |
||
5466 |
; --------------------------------------------------------------------------- |
|
5467 |
||
5468 |
CpyO3ToFPST: |
|
| 8 | 5469 |
ld de, 848Eh |
5470 |
jr CpyToFPST |
|
| 4 | 5471 |
; --------------------------------------------------------------------------- |
5472 |
||
5473 |
CpyO2ToFPST: |
|
| 8 | 5474 |
ld de, 8483h |
5475 |
jr CpyToFPST |
|
| 4 | 5476 |
; --------------------------------------------------------------------------- |
5477 |
||
5478 |
CpyO6ToFPST: |
|
| 8 | 5479 |
ld de, 84AFh |
5480 |
jr CpyToFPST |
|
| 4 | 5481 |
; --------------------------------------------------------------------------- |
5482 |
||
5483 |
CpyO1ToFPST: |
|
| 8 | 5484 |
ld de, 8478h |
| 4 | 5485 |
|
| 7 | 5486 |
CpyToFPST: |
| 8 | 5487 |
ld hl, (FPS) |
| 4 | 5488 |
|
| 7 | 5489 |
page0_2343: |
| 8 | 5490 |
ld c, 9 |
| 4 | 5491 |
|
| 7 | 5492 |
CpyToStack: |
| 8 | 5493 |
xor a |
5494 |
ld b, a |
|
5495 |
sbc hl, bc |
|
5496 |
ex de, hl |
|
5497 |
jp mov9B2 |
|
| 4 | 5498 |
; --------------------------------------------------------------------------- |
5499 |
||
5500 |
CpyO3ToFPS1: |
|
| 8 | 5501 |
ld de, 848Eh |
5502 |
jr CpyToFPS1 |
|
| 4 | 5503 |
; --------------------------------------------------------------------------- |
5504 |
||
5505 |
CpyO5ToFPS1: |
|
| 8 | 5506 |
ld de, 84A4h |
5507 |
jr CpyToFPS1 |
|
| 4 | 5508 |
; --------------------------------------------------------------------------- |
5509 |
||
5510 |
CpyO2ToFPS1: |
|
| 8 | 5511 |
ld de, 8483h |
5512 |
jr CpyToFPS1 |
|
| 4 | 5513 |
; --------------------------------------------------------------------------- |
5514 |
||
5515 |
CpyO1ToFPS1: |
|
| 8 | 5516 |
ld de, 8478h |
| 4 | 5517 |
|
| 7 | 5518 |
CpyToFPS1: |
| 8 | 5519 |
ld hl, (FPS) |
5520 |
ld c, 12h |
|
5521 |
jr CpyToStack |
|
| 4 | 5522 |
; --------------------------------------------------------------------------- |
5523 |
||
5524 |
CpyO2ToFPS2: |
|
| 8 | 5525 |
ld de, 8483h |
5526 |
jr CpyToFPS2 |
|
| 4 | 5527 |
; --------------------------------------------------------------------------- |
5528 |
||
5529 |
CpyO3ToFPS2: |
|
| 8 | 5530 |
ld de, 848Eh |
5531 |
jr CpyToFPS2 |
|
| 4 | 5532 |
; --------------------------------------------------------------------------- |
5533 |
||
5534 |
CpyO6ToFPS2: |
|
| 8 | 5535 |
ld de, 84AFh |
5536 |
jr CpyToFPS2 |
|
| 4 | 5537 |
; --------------------------------------------------------------------------- |
5538 |
||
5539 |
CpyO1ToFPS2: |
|
| 8 | 5540 |
ld de, 8478h |
| 4 | 5541 |
|
| 7 | 5542 |
CpyToFPS2: |
| 8 | 5543 |
ld hl, (FPS) |
5544 |
ld c, 1Bh |
|
5545 |
jr CpyToStack |
|
| 4 | 5546 |
; --------------------------------------------------------------------------- |
5547 |
||
5548 |
CpyO5ToFPS3: |
|
| 8 | 5549 |
ld de, 84A4h |
5550 |
jr CpyToFPS3 |
|
| 4 | 5551 |
; --------------------------------------------------------------------------- |
5552 |
||
5553 |
CpyO2ToFPS3: |
|
| 8 | 5554 |
ld de, 8483h |
5555 |
jr CpyToFPS3 |
|
| 4 | 5556 |
; --------------------------------------------------------------------------- |
5557 |
||
5558 |
CpyO1ToFPS3: |
|
| 8 | 5559 |
ld de, 8478h |
| 4 | 5560 |
|
| 7 | 5561 |
CpyToFPS3: |
| 8 | 5562 |
ld hl, (FPS) |
5563 |
ld c, 24h ; '$' |
|
5564 |
jr CpyToStack |
|
| 4 | 5565 |
; --------------------------------------------------------------------------- |
5566 |
||
5567 |
CpyO1ToFPS6: |
|
| 8 | 5568 |
ld de, 8478h |
5569 |
ld c, 3Fh ; '?' |
|
5570 |
jr page0_239F |
|
| 4 | 5571 |
; --------------------------------------------------------------------------- |
5572 |
||
5573 |
CpyO1ToFPS7: |
|
| 8 | 5574 |
ld de, 8478h |
5575 |
ld c, 48h ; 'H' |
|
| 4 | 5576 |
|
| 7 | 5577 |
page0_239F: |
| 8 | 5578 |
ld hl, (FPS) |
5579 |
jr CpyToStack |
|
| 4 | 5580 |
; --------------------------------------------------------------------------- |
5581 |
||
5582 |
CpyO1ToFPS5: |
|
| 8 | 5583 |
ld de, 8478h |
5584 |
ld hl, (FPS) |
|
5585 |
ld c, 36h ; '6' |
|
5586 |
jr CpyToStack |
|
| 4 | 5587 |
; --------------------------------------------------------------------------- |
5588 |
||
5589 |
CpyO2ToFPS4: |
|
| 8 | 5590 |
ld de, 8483h |
5591 |
jr page0_23B6 |
|
| 4 | 5592 |
; --------------------------------------------------------------------------- |
5593 |
||
5594 |
CpyO1ToFPS4: |
|
| 8 | 5595 |
ld de, 8478h |
| 4 | 5596 |
|
| 7 | 5597 |
page0_23B6: |
| 8 | 5598 |
ld hl, (FPS) |
5599 |
ld c, 2Dh ; '-' |
|
5600 |
jr CpyToStack |
|
| 4 | 5601 |
|
5602 |
; =============== S U B R O U T I N E ======================================= |
|
5603 |
||
5604 |
||
| 7 | 5605 |
ErrNotEnoughMem: |
5606 |
||
| 4 | 5607 |
call EnoughMem |
| 8 | 5608 |
ret nc |
5609 |
jp ErrMemory |
|
| 4 | 5610 |
; End of function ErrNotEnoughMem |
5611 |
||
5612 |
||
5613 |
; =============== S U B R O U T I N E ======================================= |
|
5614 |
||
5615 |
||
| 7 | 5616 |
sub_23C4: |
| 6 | 5617 |
; page0_1A99+5Cp ... |
| 8 | 5618 |
xor a |
5619 |
ld h, a |
|
5620 |
ld l, a |
|
5621 |
sbc hl, bc |
|
5622 |
ld b, h |
|
5623 |
ld c, l |
|
| 4 | 5624 |
ret |
5625 |
; End of function sub_23C4 |
|
5626 |
||
5627 |
; --------------------------------------------------------------------------- |
|
5628 |
||
5629 |
FPSMINUS9: |
|
| 8 | 5630 |
ld hl, (FPS) |
| 4 | 5631 |
|
5632 |
HLMINUS9: |
|
| 8 | 5633 |
ld de, 0FFF7h |
5634 |
add hl, de |
|
| 4 | 5635 |
ret |
5636 |
; --------------------------------------------------------------------------- |
|
5637 |
||
5638 |
Page0Call_23D4: |
|
5639 |
push hl |
|
5640 |
call sub_1680 |
|
| 8 | 5641 |
rst 10h |
| 4 | 5642 |
call nc, DelVar |
| 8 | 5643 |
pop hl |
| 4 | 5644 |
ret |
5645 |
; --------------------------------------------------------------------------- |
|
5646 |
||
5647 |
Page0Call_23DE: |
|
5648 |
call sub_1680 |
|
| 8 | 5649 |
rst 10h |
| 4 | 5650 |
ret |
5651 |
; --------------------------------------------------------------------------- |
|
5652 |
||
5653 |
Page0Call_23E3: |
|
5654 |
call sub_1680 |
|
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
5655 |
ld hl, ErrMemory_NoGoTo |
| 4 | 5656 |
call pushErrorHandleR |
| 8 | 5657 |
ld hl, 0 |
| 4 | 5658 |
call CreateRList |
5659 |
call popErrorHandleR |
|
5660 |
ret |
|
5661 |
; --------------------------------------------------------------------------- |
|
5662 |
||
5663 |
Page0Call_23F6: |
|
| 8 | 5664 |
inc hl |
5665 |
inc hl |
|
5666 |
inc hl |
|
5667 |
inc hl |
|
| 4 | 5668 |
|
5669 |
Page0Call_23FA: |
|
| 8 | 5670 |
inc hl |
5671 |
inc hl |
|
| 4 | 5672 |
|
5673 |
Page0Call_23FC: |
|
| 8 | 5674 |
or a |
5675 |
bit 7, h |
|
5676 |
ret z |
|
5677 |
res 7, h |
|
5678 |
set 6, h |
|
| 4 | 5679 |
scf |
5680 |
ret |
|
5681 |
; --------------------------------------------------------------------------- |
|
5682 |
||
5683 |
Page0Call_2406: |
|
| 8 | 5684 |
dec hl |
| 4 | 5685 |
|
5686 |
; =============== S U B R O U T I N E ======================================= |
|
5687 |
||
5688 |
||
| 7 | 5689 |
Page0Call_2407: |
| 6 | 5690 |
; page0_1F38+Cp ... |
| 8 | 5691 |
dec hl |
| 4 | 5692 |
|
5693 |
HLMinus5: |
|
| 8 | 5694 |
dec hl |
5695 |
dec hl |
|
| 4 | 5696 |
|
5697 |
Page0Call_240A: |
|
| 8 | 5698 |
dec hl |
| 4 | 5699 |
|
5700 |
Page0Call_240B: |
|
| 8 | 5701 |
dec hl |
5702 |
dec hl |
|
| 4 | 5703 |
ret |
5704 |
; End of function Page0Call_2407 |
|
5705 |
||
5706 |
; --------------------------------------------------------------------------- |
|
5707 |
||
5708 |
Page0Call_240E: |
|
5709 |
call ChkFindSym |
|
| 8 | 5710 |
jr page0_2414 |
| 4 | 5711 |
; --------------------------------------------------------------------------- |
5712 |
||
5713 |
Page0Call_2413: |
|
| 8 | 5714 |
rst 10h |
| 4 | 5715 |
|
| 7 | 5716 |
page0_2414: |
| 8 | 5717 |
ret c |
| 4 | 5718 |
|
5719 |
Page0Call_2415: |
|
5720 |
push af |
|
| 24 | 5721 |
call IsBZero |
| 8 | 5722 |
jp nz, page0_2551 |
5723 |
pop af |
|
| 4 | 5724 |
ret |
5725 |
; --------------------------------------------------------------------------- |
|
5726 |
||
5727 |
Page0Call_241E: |
|
| 8 | 5728 |
rst 10h |
5729 |
ret c |
|
| 4 | 5730 |
|
5731 |
; =============== S U B R O U T I N E ======================================= |
|
5732 |
||
5733 |
||
| 7 | 5734 |
Page0Call_2420: |
| 6 | 5735 |
; FIND_E_UNDEF+4j |
| 4 | 5736 |
push af |
| 24 | 5737 |
call IsBZero |
| 8 | 5738 |
jp nz, Page0Call_254D |
5739 |
pop af |
|
| 4 | 5740 |
ret |
5741 |
; End of function Page0Call_2420 |
|
5742 |
||
5743 |
||
5744 |
; =============== S U B R O U T I N E ======================================= |
|
5745 |
||
5746 |
||
| 7 | 5747 |
FIND_E_UNDEF: |
| 8 | 5748 |
rst 10h |
5749 |
jp c, ErrUndefined |
|
5750 |
jr Page0Call_2420 |
|
| 4 | 5751 |
; End of function FIND_E_UNDEF |
5752 |
||
5753 |
; --------------------------------------------------------------------------- |
|
5754 |
||
5755 |
SetupPagedPtr: |
|
5756 |
push af |
|
| 8 | 5757 |
ld a, b |
5758 |
ld (pagedPN), a |
|
5759 |
ld (pagedGetPtr), de |
|
5760 |
xor a |
|
5761 |
ld (pagedCount), a |
|
5762 |
pop af |
|
| 4 | 5763 |
ret |
5764 |
; --------------------------------------------------------------------------- |
|
5765 |
||
5766 |
PagedGet: |
|
5767 |
push hl |
|
5768 |
||
| 7 | 5769 |
page0_243F: |
| 8 | 5770 |
ld a, (pagedCount) |
5771 |
or a |
|
5772 |
jr z, page0_2453 |
|
5773 |
dec a |
|
5774 |
ld (pagedCount), a |
|
5775 |
ld hl, (pagedPutPtr) |
|
5776 |
ld a, (hl) |
|
5777 |
inc hl |
|
5778 |
ld (pagedPutPtr), hl |
|
5779 |
pop hl |
|
| 4 | 5780 |
ret |
5781 |
; --------------------------------------------------------------------------- |
|
5782 |
||
| 7 | 5783 |
page0_2453: |
| 4 | 5784 |
push bc |
5785 |
push de |
|
| 8 | 5786 |
in a, (6) |
| 4 | 5787 |
push af |
| 8 | 5788 |
ld a, (pagedPN) |
5789 |
out (6), a |
|
5790 |
ld bc, 10h |
|
5791 |
ld a, c |
|
5792 |
ld (pagedCount), a |
|
5793 |
ld de, 983Ah |
|
5794 |
ld (pagedPutPtr), de |
|
5795 |
ld hl, (pagedGetPtr) |
|
5796 |
bit 7, h |
|
5797 |
jr nz, page0_2489 |
|
| 4 | 5798 |
|
| 7 | 5799 |
page0_2472: |
| 4 | 5800 |
ldi |
| 8 | 5801 |
bit 7, h |
5802 |
jr z, page0_2483 |
|
5803 |
in a, (6) |
|
5804 |
inc a |
|
5805 |
ld (pagedPN), a |
|
5806 |
out (6), a |
|
5807 |
ld hl, 4000h |
|
| 4 | 5808 |
|
| 7 | 5809 |
page0_2483: |
| 8 | 5810 |
ld a, b |
5811 |
or c |
|
5812 |
jr nz, page0_2472 |
|
5813 |
jr page0_248B |
|
| 4 | 5814 |
; --------------------------------------------------------------------------- |
5815 |
||
| 7 | 5816 |
page0_2489: |
| 4 | 5817 |
ldir |
5818 |
||
| 7 | 5819 |
page0_248B: |
| 8 | 5820 |
ld (pagedGetPtr), hl |
5821 |
pop af |
|
5822 |
out (6), a |
|
5823 |
pop de |
|
5824 |
pop bc |
|
5825 |
jr page0_243F |
|
| 4 | 5826 |
; --------------------------------------------------------------------------- |
5827 |
||
5828 |
Page0Call_2495: |
|
| 8 | 5829 |
and 1Fh |
| 4 | 5830 |
call IS_A_LSTorCLST |
| 8 | 5831 |
ret z |
| 4 | 5832 |
call page0_17B3 |
5833 |
ret |
|
5834 |
||
| 7 | 5835 |
sub_249F: |
| 4 | 5836 |
call NZIf83Plus |
| 8 | 5837 |
jr z, page0_24A6 |
5838 |
and 1Fh |
|
| 27 | 5839 |
;#ifdef DEVIATE_FROM_ORIGINAL_FILE |
|
25
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5840 |
; out (6), a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5841 |
; ret |
| 27 | 5842 |
;#endif |
| 7 | 5843 |
page0_24A6: |
|
25
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5844 |
;#ifdef DEVIATE_FROM_ORIGINAL_FILE |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5845 |
; push bc |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5846 |
; ld b, a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5847 |
; bit 0, (iy+asm_Flag3) |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5848 |
; jr z, {+}
|
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5849 |
; bit 7, a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5850 |
; ld a, 1 |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5851 |
; jr nz, {+}
|
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5852 |
; dec a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5853 |
;+: out (0Eh),a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5854 |
; ld a, b |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5855 |
; res 7, a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5856 |
; pop bc |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5857 |
;#endif |
| 8 | 5858 |
out (6), a |
| 4 | 5859 |
ret |
5860 |
||
| 7 | 5861 |
NZIf83Plus: |
| 4 | 5862 |
push bc |
5863 |
push af |
|
| 8 | 5864 |
in a, (2) |
|
25
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5865 |
and 80h |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5866 |
xor 80h |
| 8 | 5867 |
pop bc |
5868 |
ld a, b |
|
5869 |
pop bc |
|
| 4 | 5870 |
ret |
|
25
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5871 |
|
| 27 | 5872 |
;#ifdef DEVIATE_FROM_ORIGINAL_FILE |
|
25
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5873 |
;NZIfColorModel: |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5874 |
;;Return Z immediately if an 83+ or non-84+/SE |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5875 |
; in a, (2) |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5876 |
; bit 7, a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5877 |
; ret z |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5878 |
; bit 5, a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5879 |
; ret z |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5880 |
; ;Get the current LCD transfer mode to B |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5881 |
; push hl |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5882 |
; push bc |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5883 |
; in a, (10h) |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5884 |
; bit 6, a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5885 |
; ld b, 0 |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5886 |
; jr nz, {+}
|
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5887 |
; inc b |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5888 |
;+: ;Set 84+CSE LCD register 0000h |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5889 |
; ;NOTE: This only changes the transfer mode on the non-color |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5890 |
; xor a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5891 |
; out (10h), a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5892 |
; out (10h), a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5893 |
; ;Read the word from the register |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5894 |
; ;NOTE: This is garbage on the non-color |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5895 |
; push de |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5896 |
; in a, (11h) |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5897 |
; ld d, a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5898 |
; in a, (11h) |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5899 |
; ld e, a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5900 |
; ld hl, 9335h |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5901 |
; call cphlde |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5902 |
; ld a, b |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5903 |
; pop de |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5904 |
; pop bc |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5905 |
; pop hl |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5906 |
; jr nz, {+}
|
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5907 |
; ;Return NZ |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5908 |
; or 1 |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5909 |
; ret |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5910 |
;+: ;Non-color, so restore LCD transfer mode that we trashed |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5911 |
; out (10h),a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5912 |
; cp a |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5913 |
; ret |
|
fab1bedd3281
Commit some experimental commented-out code for 84+CSE detection and booting
brandonlw
parents:
24
diff
changeset
|
5914 |
;#endif |
| 4 | 5915 |
|
5916 |
Page0Call_24B5: |
|
| 8 | 5917 |
ld a, 0B2h ; 'ҧ |
5918 |
jr page0_24DF |
|
| 4 | 5919 |
; --------------------------------------------------------------------------- |
5920 |
||
5921 |
Page0Call_24B9: |
|
| 8 | 5922 |
ld a, 0B3h ; 'ӧ |
5923 |
jr page0_24DF |
|
| 4 | 5924 |
; --------------------------------------------------------------------------- |
5925 |
; START OF FUNCTION CHUNK FOR INCO1EXP |
|
5926 |
||
| 7 | 5927 |
ErrOverflow: |
| 8 | 5928 |
ld a, 81h ; 'g |
5929 |
jr page0_24DF |
|
| 4 | 5930 |
; END OF FUNCTION CHUNK FOR INCO1EXP |
5931 |
; --------------------------------------------------------------------------- |
|
5932 |
||
| 7 | 5933 |
ErrDivBy0: |
| 8 | 5934 |
ld a, 82h ; '§ |
5935 |
jr page0_24DF |
|
| 4 | 5936 |
; --------------------------------------------------------------------------- |
5937 |
||
5938 |
ErrSingularMat: |
|
| 8 | 5939 |
ld a, 83h ; 'ç |
5940 |
jr page0_24DF |
|
| 4 | 5941 |
; --------------------------------------------------------------------------- |
5942 |
; START OF FUNCTION CHUNK FOR errd_op1notpos |
|
5943 |
||
| 7 | 5944 |
ErrDomain: |
| 8 | 5945 |
ld a, 84h ; 'ħ |
5946 |
jr page0_24DF |
|
| 4 | 5947 |
; END OF FUNCTION CHUNK FOR errd_op1notpos |
5948 |
; --------------------------------------------------------------------------- |
|
5949 |
||
5950 |
ErrIncrement: |
|
| 8 | 5951 |
ld a, 85h ; 'ŧ |
5952 |
jr page0_24DF |
|
| 4 | 5953 |
; --------------------------------------------------------------------------- |
5954 |
||
| 7 | 5955 |
ErrNon_Real: |
| 8 | 5956 |
ld a, 87h ; 'ǧ |
5957 |
jr page0_24DF |
|
| 4 | 5958 |
; --------------------------------------------------------------------------- |
5959 |
; START OF FUNCTION CHUNK FOR sub_1BA3 |
|
5960 |
||
| 7 | 5961 |
ErrSyntax: |
| 8 | 5962 |
ld a, 88h ; 'ȧ |
5963 |
jr page0_24DF |
|
| 4 | 5964 |
; END OF FUNCTION CHUNK FOR sub_1BA3 |
5965 |
; --------------------------------------------------------------------------- |
|
5966 |
||
5967 |
Page0Call_24D9: |
|
| 8 | 5968 |
ld a, 9Eh ; 'ާ |
5969 |
jr page0_24DF |
|
| 4 | 5970 |
; --------------------------------------------------------------------------- |
5971 |
; START OF FUNCTION CHUNK FOR EOP1NotReal |
|
5972 |
||
| 7 | 5973 |
ErrDataType: |
| 8 | 5974 |
ld a, 89h ; 'ɧ |
| 4 | 5975 |
; END OF FUNCTION CHUNK FOR EOP1NotReal |
5976 |
; START OF FUNCTION CHUNK FOR INCO1EXP |
|
5977 |
||
| 7 | 5978 |
page0_24DF: |
| 8 | 5979 |
jr JError |
| 4 | 5980 |
; END OF FUNCTION CHUNK FOR INCO1EXP |
5981 |
; --------------------------------------------------------------------------- |
|
5982 |
||
| 7 | 5983 |
Page0Call_24E1: |
| 8 | 5984 |
ld a, 9Dh ; 'ݧ |
5985 |
jr JError |
|
| 4 | 5986 |
; --------------------------------------------------------------------------- |
5987 |
||
5988 |
ErrArgument: |
|
| 8 | 5989 |
ld a, 8Ah ; 'ʧ |
5990 |
jr JError |
|
| 4 | 5991 |
; --------------------------------------------------------------------------- |
5992 |
||
5993 |
ErrDimMismatch: |
|
| 8 | 5994 |
ld a, 8Bh ; '˧ |
5995 |
jr JError |
|
| 4 | 5996 |
; --------------------------------------------------------------------------- |
5997 |
||
| 7 | 5998 |
ErrDimension: |
| 8 | 5999 |
ld a, 8Ch ; '̧ |
6000 |
jr JError |
|
| 4 | 6001 |
; --------------------------------------------------------------------------- |
6002 |
; START OF FUNCTION CHUNK FOR page0_16F4 |
|
6003 |
||
| 7 | 6004 |
ErrUndefined: |
| 6 | 6005 |
; FIND_E_UNDEF+1j |
| 8 | 6006 |
ld a, 8Dh ; 'ͧ |
6007 |
jr JError |
|
| 4 | 6008 |
; END OF FUNCTION CHUNK FOR page0_16F4 |
6009 |
; --------------------------------------------------------------------------- |
|
6010 |
; START OF FUNCTION CHUNK FOR DataSize |
|
6011 |
||
| 7 | 6012 |
ErrMemory: |
6013 |
||
| 8 | 6014 |
ld a, 8Eh ; 'Χ |
6015 |
jr JError |
|
| 4 | 6016 |
; END OF FUNCTION CHUNK FOR DataSize |
6017 |
; --------------------------------------------------------------------------- |
|
6018 |
||
|
41
9ef17625274f
Finished _newContext and other page 0 cleanup. Still lots left to go...
brandonlw
parents:
38
diff
changeset
|
6019 |
ErrMemory_NoGoTo: |
| 8 | 6020 |
ld a, 0Eh |
6021 |
jr JError |
|
| 4 | 6022 |
; --------------------------------------------------------------------------- |
6023 |
; START OF FUNCTION CHUNK FOR EOP1NotReal |
|
6024 |
||
| 7 | 6025 |
ErrInvalid: |
6026 |
||
| 8 | 6027 |
ld a, 8Fh ; 'ϧ |
6028 |
jr JError |
|
| 4 | 6029 |
; END OF FUNCTION CHUNK FOR EOP1NotReal |
6030 |
; --------------------------------------------------------------------------- |
|
6031 |
||
6032 |
Page0Call_2501: |
|
| 8 | 6033 |
ld a, 90h ; 'Ч |
6034 |
jr JError |
|
| 4 | 6035 |
; --------------------------------------------------------------------------- |
6036 |
||
6037 |
Page0Call_2505: |
|
| 8 | 6038 |
ld a, 91h ; 'ѧ |
6039 |
jr JError |
|
| 4 | 6040 |
; --------------------------------------------------------------------------- |
6041 |
||
6042 |
Page0Call_2509: |
|
| 8 | 6043 |
ld a, 92h ; 'ҧ |
6044 |
jr JError |
|
| 4 | 6045 |
; --------------------------------------------------------------------------- |
6046 |
||
6047 |
Page0Call_250D: |
|
| 8 | 6048 |
ld a, 93h ; 'ӧ |
6049 |
jr JError |
|
| 4 | 6050 |
; --------------------------------------------------------------------------- |
6051 |
||
| 7 | 6052 |
ErrBreak: |
| 8 | 6053 |
ld a, 86h ; 'Ƨ |
6054 |
jr JError |
|
| 4 | 6055 |
; --------------------------------------------------------------------------- |
6056 |
||
6057 |
ErrStat: |
|
| 8 | 6058 |
ld a, 15h |
6059 |
jr JError |
|
6060 |
; --------------------------------------------------------------------------- |
|
6061 |
ld a, 96h ; '֧ |
|
6062 |
jr JError |
|
| 4 | 6063 |
; --------------------------------------------------------------------------- |
6064 |
||
6065 |
ErrSignChange: |
|
| 8 | 6066 |
ld a, 98h ; 'ا |
6067 |
jr JError |
|
| 4 | 6068 |
; --------------------------------------------------------------------------- |
6069 |
||
6070 |
ErrIterations: |
|
| 8 | 6071 |
ld a, 99h ; '٧ |
6072 |
jr JError |
|
| 4 | 6073 |
; --------------------------------------------------------------------------- |
6074 |
||
6075 |
ErrBadGuess: |
|
| 8 | 6076 |
ld a, 9Ah ; 'ڧ |
6077 |
jr JError |
|
| 4 | 6078 |
; --------------------------------------------------------------------------- |
6079 |
||
6080 |
ErrTolTooSmall: |
|
| 8 | 6081 |
ld a, 9Ch ; 'ܧ |
6082 |
jr JError |
|
| 4 | 6083 |
; --------------------------------------------------------------------------- |
6084 |
||
6085 |
ErrStatPlot: |
|
| 8 | 6086 |
ld a, 1Bh |
6087 |
jr JError |
|
6088 |
; --------------------------------------------------------------------------- |
|
6089 |
ld a, 0AAh ; 'ʧ |
|
6090 |
jr JError |
|
| 4 | 6091 |
; --------------------------------------------------------------------------- |
6092 |
||
6093 |
Page0Call_2535: |
|
| 8 | 6094 |
ld a, 26h ; '&' |
6095 |
jr JError |
|
| 4 | 6096 |
; --------------------------------------------------------------------------- |
6097 |
||
6098 |
Page0Call_2539: |
|
| 8 | 6099 |
ld a, 28h ; '('
|
6100 |
jr JError |
|
| 4 | 6101 |
; --------------------------------------------------------------------------- |
6102 |
||
6103 |
Page0Call_253D: |
|
| 8 | 6104 |
ld a, 2Dh ; '-' |
6105 |
jr JError |
|
| 4 | 6106 |
; --------------------------------------------------------------------------- |
6107 |
||
6108 |
Page0Call_2541: |
|
| 8 | 6109 |
ld a, 2Eh ; '.' |
6110 |
jr JError |
|
| 4 | 6111 |
; --------------------------------------------------------------------------- |
6112 |
||
6113 |
ErrCustom1: |
|
| 8 | 6114 |
ld a, 0ABh ; '˧ |
6115 |
jr JError |
|
| 4 | 6116 |
; --------------------------------------------------------------------------- |
6117 |
||
6118 |
ErrCustom2: |
|
| 8 | 6119 |
ld a, 0ACh ; '̧ |
6120 |
jr JError |
|
| 4 | 6121 |
; --------------------------------------------------------------------------- |
6122 |
; START OF FUNCTION CHUNK FOR DelVar |
|
6123 |
||
| 7 | 6124 |
Page0Call_254D: |
| 6 | 6125 |
; Page0Call_2420+4j |
| 8 | 6126 |
ld a, 0AFh ; 'ϧ |
6127 |
jr JError |
|
| 4 | 6128 |
; END OF FUNCTION CHUNK FOR DelVar |
6129 |
; --------------------------------------------------------------------------- |
|
6130 |
||
| 7 | 6131 |
page0_2551: |
| 8 | 6132 |
ld a, 2Fh ; '/' |
6133 |
jr JError |
|
| 4 | 6134 |
; --------------------------------------------------------------------------- |
6135 |
||
6136 |
Page0Call_2555: |
|
| 8 | 6137 |
ld a, 30h ; '0' |
6138 |
jr JError |
|
| 4 | 6139 |
; --------------------------------------------------------------------------- |
6140 |
||
6141 |
Page0Call_2559: |
|
| 8 | 6142 |
ld a, 31h ; '1' |
6143 |
jr JError |
|
| 4 | 6144 |
; --------------------------------------------------------------------------- |
6145 |
||
6146 |
ErrLinkXmit: |
|
| 8 | 6147 |
ld a, 9Fh ; 'ߧ |
| 4 | 6148 |
; START OF FUNCTION CHUNK FOR DelVar |
6149 |
||
| 7 | 6150 |
JError: |
6151 |
||
| 4 | 6152 |
call Page0Call_3E0D |
| 8 | 6153 |
ld (errNo), a |
| 4 | 6154 |
|
6155 |
JErrorNo: |
|
6156 |
call Page0Call_3E0D |
|
6157 |
call NZIf83Plus |
|
| 8 | 6158 |
jr z, page0_2573 |
6159 |
ld a, 0C0h ; '' |
|
6160 |
out (0), a |
|
6161 |
jr page0_257B |
|
| 4 | 6162 |
; --------------------------------------------------------------------------- |
6163 |
||
| 7 | 6164 |
page0_2573: |
| 8 | 6165 |
ld a, 80h ; '' |
6166 |
out (8), a |
|
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
6167 |
res silentLinkActive, (iy+silentLinkFlags) |
| 4 | 6168 |
|
| 7 | 6169 |
page0_257B: |
|
19
271dfee8e3ad
Set all known flags -- I'm amazed this actually worked.
brandonlw
parents:
16
diff
changeset
|
6170 |
res indicOnly, (iy+indicFlags) |
| 8 | 6171 |
res 4, (iy+24h) |
6172 |
ld sp, (errSP) |
|
6173 |
ld hl, (OPBase) |
|
6174 |
pop de |
|
6175 |
add hl, de |
|
6176 |
ld (OPS), hl |
|
6177 |
pop de |
|
6178 |
ld hl, (fpBase) |
|
6179 |
add hl, de |
|
6180 |
ld (FPS), hl |
|
6181 |
pop hl |
|
6182 |
ld (errSP), hl |
|
6183 |
pop af |
|
6184 |
out (6), a |
|
6185 |
ld a, (errNo) |
|
| 4 | 6186 |
|
6187 |
noErrorEntry: |
|
6188 |
ret |
|
6189 |
; END OF FUNCTION CHUNK FOR DelVar |
|
6190 |
||
6191 |
; =============== S U B R O U T I N E ======================================= |
|
6192 |
||
6193 |
||
| 7 | 6194 |
pushErrorHandleR: |
| 6 | 6195 |
; handleONKeyPress-3FFp ... |
| 8 | 6196 |
pop de |
| 4 | 6197 |
push hl |
| 8 | 6198 |
ld b, a |
6199 |
in a, (6) |
|
| 4 | 6200 |
push af |
| 8 | 6201 |
ld a, b |
6202 |
ld hl, (errSP) |
|
| 4 | 6203 |
push hl |
| 8 | 6204 |
ld bc, (fpBase) |
6205 |
ld hl, (FPS) |
|
6206 |
or a |
|
6207 |
sbc hl, bc |
|
| 4 | 6208 |
push hl |
| 8 | 6209 |
ld bc, (OPBase) |
6210 |
ld hl, (OPS) |
|
6211 |
sbc hl, bc |
|
| 4 | 6212 |
push hl |
| 8 | 6213 |
ld (errSP), sp |
6214 |
ex de, hl |
|
6215 |
jp (hl) |
|
| 4 | 6216 |
; End of function pushErrorHandleR |
6217 |
||
6218 |
||
6219 |
; =============== S U B R O U T I N E ======================================= |
|
6220 |
||
6221 |
||
| 7 | 6222 |
popErrorHandleR: |
| 6 | 6223 |
; handleONKeyPress:loc_400p ... |
| 8 | 6224 |
pop bc |
6225 |
ld sp, (errSP) |
|
6226 |
pop af |
|
6227 |
pop af |
|
6228 |
ex (sp), hl |
|
6229 |
ld (errSP), hl |
|
6230 |
pop hl |
|
6231 |
pop af |
|
6232 |
pop af |
|
| 4 | 6233 |
push bc |
6234 |
ret |
|
6235 |
; End of function popErrorHandleR |
|
6236 |
||
6237 |
||
6238 |
; =============== S U B R O U T I N E ======================================= |
|
6239 |
||
6240 |
||
| 7 | 6241 |
strcopy: |
| 8 | 6242 |
ld a, (hl) |
6243 |
ld (de), a |
|
6244 |
or a |
|
6245 |
ret z |
|
6246 |
inc hl |
|
6247 |
inc de |
|
6248 |
jr strcopy |
|
| 4 | 6249 |
; End of function strcopy |
6250 |
||
6251 |
; --------------------------------------------------------------------------- |
|
6252 |
||
| 7 | 6253 |
strCat: |
| 8 | 6254 |
ld a, (de) |
6255 |
or a |
|
6256 |
jr z, strcopy |
|
6257 |
inc de |
|
6258 |
jr strCat |
|
| 4 | 6259 |
|
6260 |
; =============== S U B R O U T I N E ======================================= |
|
6261 |
||
6262 |
||
| 7 | 6263 |
Page0Call_25E7: |
| 35 | 6264 |
ld hl, unk_9320 |
| 4 | 6265 |
|
6266 |
isInSet: |
|
6267 |
push bc |
|
| 8 | 6268 |
ld c, a |
| 35 | 6269 |
and 0F8h |
| 4 | 6270 |
rrca |
6271 |
rrca |
|
6272 |
rrca |
|
| 8 | 6273 |
ld e, a |
6274 |
ld d, 0 |
|
6275 |
add hl, de |
|
| 4 | 6276 |
push hl |
| 8 | 6277 |
ld a, c |
6278 |
and 7 |
|
6279 |
ld e, a |
|
6280 |
ld a, (hl) |
|
6281 |
ld hl, unk_2605 |
|
6282 |
add hl, de |
|
6283 |
ld c, (hl) |
|
6284 |
and c |
|
6285 |
ld a, c |
|
6286 |
pop hl |
|
6287 |
pop bc |
|
| 4 | 6288 |
ret |
6289 |
unk_2605: |
|
| 8 | 6290 |
.db 1 |
6291 |
.db 2 |
|
6292 |
.db 4 |
|
6293 |
.db 8 |
|
6294 |
.db 10h |
|
6295 |
.db 20h |
|
| 35 | 6296 |
.db 40h |
6297 |
.db 80h |