28118: Routine at 6DD6
28118 |
LD HL,3000 |
28121 |
LD (46868),HL |
28124 |
LD A,1 |
28126 |
LD (46849),A |
28129 |
LD (46842),A |
28132 |
LD A,62 |
28134 |
CALL 34187 |
28137 |
LD A,32 |
28139 |
CALL 34187 |
28142 |
LD HL,28665 |
28145 |
LD B,128 |
28147 |
LD C,0 |
28149 |
CALL 29257 |
28152 |
BIT 7,B |
28154 |
JR Z,28161 |
28156 |
CP 64 |
28158 |
JP Z,28282 |
28161 |
BIT 0,C |
28163 |
CALL Z,28239 |
28166 |
LD C,1 |
28168 |
CP 24 |
28170 |
JR NZ,28177 |
28172 |
CALL 28299 |
28175 |
JR 28147 |
28177 |
CP 8 |
28179 |
JR NZ,28194 |
28181 |
BIT 7,B |
28183 |
JR NZ,28149 |
28185 |
LD A,8 |
28187 |
CALL 34187 |
28190 |
INC B |
28191 |
DEC HL |
28192 |
JR 28149 |
28194 |
CP 64 |
28196 |
JR NC,28218 |
28198 |
CP 34 |
28200 |
JR Z,28218 |
28202 |
CP 32 |
28204 |
JR Z,28218 |
28206 |
CP 13 |
28208 |
JR Z,28218 |
28210 |
CP 46 |
28212 |
JR Z,28218 |
28214 |
CP 44 |
28216 |
JR NZ,28149 |
28218 |
LD (46852),A |
28221 |
DEC B |
28222 |
INC B |
28223 |
JR Z,28231 |
28225 |
CALL 34187 |
28228 |
LD (HL),A |
28229 |
INC HL |
28230 |
DEC B |
28231 |
CP 13 |
28233 |
JP NZ,28149 |
28236 |
OR 1 |
28238 |
RET |
28239 |
CP 9 |
28241 |
JR Z,28274 |
28243 |
CP 8 |
28245 |
JR Z,28278 |
28247 |
CP 10 |
28249 |
JR Z,28270 |
28251 |
CP 91 |
28253 |
RET NZ |
28254 |
LD A,78 |
28256 |
LD (HL),A |
28257 |
INC HL |
28258 |
CALL 34187 |
28261 |
DEC B |
28262 |
LD A,13 |
28264 |
LD (HL),A |
28265 |
INC HL |
28266 |
DEC B |
28267 |
OR 1 |
28269 |
RET |
28270 |
LD A,83 |
28272 |
JR 28256 |
28274 |
LD A,69 |
28276 |
JR 28256 |
28278 |
LD A,87 |
28280 |
JR 28256 |
28282 |
LD A,(46874) |
28285 |
AND A |
28286 |
JP NZ,28149 |
28289 |
LD A,8 |
28291 |
CALL 34187 |
28294 |
CALL 34187 |
28297 |
XOR A |
28298 |
RET |
28299 |
BIT 7,B |
28301 |
RET NZ |
28302 |
LD A,8 |
28304 |
CALL 34187 |
28307 |
INC B |
28308 |
DEC HL |
28309 |
JR 28299 |
28311 |
PUSH DE |
28312 |
LD A,(HL) |
28313 |
INC HL |
28314 |
CP 32 |
28316 |
JR Z,28312 |
28318 |
DEC HL |
28319 |
LD (46810),HL |
28322 |
CP 13 |
28324 |
JR Z,28382 |
28326 |
CALL 28464 |
28329 |
JR Z,28387 |
28331 |
CALL 28487 |
28334 |
JR NZ,28348 |
28336 |
PUSH HL |
28337 |
CALL 28602 |
28340 |
JR Z,28352 |
28342 |
CALL 28530 |
28345 |
JR Z,28337 |
28347 |
POP HL |
28348 |
LD A,208 |
28350 |
JR 28384 |
28352 |
LD A,(28810) |
28355 |
LD B,A |
28356 |
LD A,(28827) |
28359 |
CP B |
28360 |
JR NC,28395 |
28362 |
CP 4 |
28364 |
JR C,28342 |
28366 |
PUSH IX |
28368 |
CALL 28534 |
28371 |
JR NZ,28393 |
28373 |
CALL 28602 |
28376 |
JR NZ,28393 |
28378 |
POP IX |
28380 |
JR 28342 |
28382 |
LD A,192 |
28384 |
LD BC,0 |
28387 |
POP DE |
28388 |
LD D,A |
28389 |
ADD A,B |
28390 |
LD B,A |
28391 |
LD A,D |
28392 |
RET |
28393 |
POP IX |
28395 |
LD IX,(46871) |
28399 |
PUSH IX |
28401 |
XOR A |
28402 |
INC IX |
28404 |
INC A |
28405 |
BIT 7,(IX-1) |
28409 |
JR Z,28402 |
28411 |
CP 2 |
28413 |
JR Z,28402 |
28415 |
CP 3 |
28417 |
JR NZ,28425 |
28419 |
BIT 7,(IX-2) |
28423 |
JR NZ,28402 |
28425 |
BIT 6,(IX-1) |
28429 |
JR Z,28442 |
28431 |
LD L,(IX+0) |
28434 |
LD H,(IX+1) |
28437 |
LD DE,24576 |
28440 |
ADD HL,DE |
28441 |
EX (SP),HL |
28442 |
POP HL |
28443 |
LD A,(HL) |
28444 |
RLCA |
28445 |
AND 192 |
28447 |
LD B,A |
28448 |
INC HL |
28449 |
LD A,(HL) |
28450 |
RRCA |
28451 |
AND 48 |
28453 |
ADD A,B |
28454 |
DEC HL |
28455 |
LD DE,40960 |
28458 |
ADD HL,DE |
28459 |
PUSH HL |
28460 |
POP BC |
28461 |
POP HL |
28462 |
JR 28387 |
28464 |
LD B,176 |
28466 |
CP 46 |
28468 |
JR Z,28481 |
28470 |
LD B,160 |
28472 |
CP 44 |
28474 |
JR Z,28481 |
28476 |
CP 34 |
28478 |
RET NZ |
28479 |
LD B,144 |
28481 |
INC HL |
28482 |
LD A,B |
28483 |
LD BC,0 |
28486 |
RET |
28487 |
LD DE,28794 |
28490 |
LD B,0 |
28492 |
LD A,(HL) |
28493 |
CP 64 |
28495 |
JR C,28505 |
28497 |
AND 31 |
28499 |
LD (DE),A |
28500 |
INC DE |
28501 |
INC HL |
28502 |
INC B |
28503 |
JR 28492 |
28505 |
LD A,B |
28506 |
LD (28810),A |
28509 |
PUSH HL |
28510 |
LD HL,(28794) |
28513 |
LD H,0 |
28515 |
LD DE,24576 |
28518 |
ADD HL,HL |
28519 |
ADD HL,DE |
28520 |
LD E,(HL) |
28521 |
INC HL |
28522 |
LD D,(HL) |
28523 |
LD IX,24576 |
28527 |
ADD IX,DE |
28529 |
POP HL |
28530 |
LD (46871),IX |
28534 |
LD A,(IX+0) |
28537 |
AND 31 |
28539 |
LD B,A |
28540 |
LD A,(28794) |
28543 |
CP B |
28544 |
RET NZ |
28545 |
PUSH HL |
28546 |
LD HL,28811 |
28549 |
LD BC,0 |
28552 |
LD A,(IX+0) |
28555 |
AND 31 |
28557 |
JR Z,28562 |
28559 |
LD (HL),A |
28560 |
INC HL |
28561 |
INC B |
28562 |
INC IX |
28564 |
INC C |
28565 |
BIT 7,(IX-1) |
28569 |
JR Z,28552 |
28571 |
LD A,C |
28572 |
CP 2 |
28574 |
JR Z,28552 |
28576 |
CP 3 |
28578 |
JR NZ,28586 |
28580 |
BIT 7,(IX-2) |
28584 |
JR NZ,28552 |
28586 |
POP HL |
28587 |
LD A,B |
28588 |
LD (28827),A |
28591 |
BIT 6,(IX-1) |
28595 |
RET Z |
28596 |
INC IX |
28598 |
INC IX |
28600 |
XOR A |
28601 |
RET |
28602 |
LD A,(28810) |
28605 |
LD B,A |
28606 |
LD A,(28827) |
28609 |
CP B |
28610 |
JR NC,28613 |
28612 |
LD B,A |
28613 |
LD HL,28794 |
28616 |
LD DE,28811 |
28619 |
LD A,(DE) |
28620 |
CP (HL) |
28621 |
RET NZ |
28622 |
INC DE |
28623 |
INC HL |
28624 |
DJNZ 28619 |
28626 |
RET |