Routines |
Prev: 54985 | Up: Map | Next: 55686 |
|
||||
PrintSprite_Mirrored | 55286 | LD (53780),A | Write A to 53780. | |
55289 | DEC C | Decrease C by one. | ||
55290 | PUSH BC | Stash BC on the stack. | ||
55291 | CALL InitialiseSprite | Call InitialiseSprite. | ||
55294 | POP BC | Restore BC from the stack. | ||
55295 | LD D,A | D=A. | ||
This entry point is used by the routine at PrintSprite.
|
||||
PrintSprite_Mirrored_0 | 55296 | EX AF,AF' | Exchange the AF register with the shadow AF register. | |
55297 | LD L,A | L=A. | ||
55298 | LD E,C | E=C. | ||
55299 | LD C,A | C=A. | ||
55300 | EXX | Switch to the shadow registers. | ||
55301 | LD A,(HL) | A=*HL. | ||
55302 | INC HL | Increment HL by one. | ||
55303 | LD H,(HL) | H=*HL. | ||
55304 | LD L,A | L=A. | ||
PrintSprite_Mirrored_1 | 55305 | EXX | Switch to the shadow registers. | |
55306 | LD A,C | Jump to PrintSprite_Mirrored_2 if C is not equal to L. | ||
55307 | CP L | |||
55308 | JP NZ,PrintSprite_Mirrored_2 | |||
55311 | LD A,B | A=B. | ||
55312 | AND %11111000 | Keep only bits 3-7. | ||
55314 | ADD A,107 | A+=107. | ||
55316 | LD H,A | H=A. | ||
55317 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55318 | LD A,B | A=B. | ||
55319 | AND %00000111 | Keep only bits 0-2. | ||
55321 | RRCA | RRCA. | ||
55322 | RRCA | |||
55323 | RRCA | |||
55324 | ADD A,C | A+=C. | ||
55325 | EXX | Switch to the shadow registers. | ||
55326 | LD C,A | C=A. | ||
55327 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55328 | LD B,A | B=A. | ||
55329 | JP PrintSprite_Mirrored_3 | Jump to PrintSprite_Mirrored_3. | ||
PrintSprite_Mirrored_2 | 55332 | LD A,H | A=H. | |
55333 | EXX | Switch to the shadow registers. | ||
55334 | DEC C | Decrease C by one. | ||
55335 | LD B,A | B=A. | ||
PrintSprite_Mirrored_3 | 55336 | EXX | Switch to the shadow registers. | |
55337 | LD A,C | Jump to PrintSprite_Mirrored_6 if C is higher than 32. | ||
55338 | CP 32 | |||
55340 | JP NC,PrintSprite_Mirrored_6 | |||
55343 | LD A,B | Jump to PrintSprite_Mirrored_6 if B is higher than 24. | ||
55344 | CP 24 | |||
55346 | JP NC,PrintSprite_Mirrored_6 | |||
55349 | EXX | Switch to the shadow registers. | ||
55350 | LD A,(HL) | Jump to PrintSprite_Mirrored_8 if *HL is equal to 54. | ||
55351 | CP 54 | |||
55353 | JP Z,PrintSprite_Mirrored_8 | |||
55356 | LD A,(DE) | Jump to PrintSprite_Mirrored_9 if *DE is equal to 54. | ||
55357 | CP 54 | |||
55359 | JP Z,PrintSprite_Mirrored_9 | |||
55362 | INC HL | Increment HL by one. | ||
55363 | INC DE | Increment DE by one. | ||
55364 | PUSH HL | Stash HL on the stack. | ||
55365 | LD A,(BC) | A=*BC. | ||
55366 | LD L,(HL) | L=*HL. | ||
55367 | LD H,198 | H=198. | ||
55369 | AND (HL) | Merge the bits from *HL. | ||
55370 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55371 | LD A,(DE) | A=*DE. | ||
55372 | LD L,A | L=A. | ||
55373 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55374 | OR (HL) | Set the bits from *HL. | ||
55375 | LD (BC),A | Write A to *BC. | ||
55376 | POP HL | Restore HL from the stack. | ||
55377 | INC DE | Increment DE by one. | ||
55378 | INC HL | Increment HL by one. | ||
55379 | INC B | Increment B by one. | ||
55380 | PUSH HL | Stash HL on the stack. | ||
55381 | LD A,(BC) | A=*BC. | ||
55382 | LD L,(HL) | L=*HL. | ||
55383 | LD H,198 | H=198. | ||
55385 | AND (HL) | Merge the bits from *HL. | ||
55386 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55387 | LD A,(DE) | A=*DE. | ||
55388 | LD L,A | L=A. | ||
55389 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55390 | OR (HL) | Set the bits from *HL. | ||
55391 | LD (BC),A | Write A to *BC. | ||
55392 | POP HL | Restore HL from the stack. | ||
55393 | INC DE | Increment DE by one. | ||
55394 | INC HL | Increment HL by one. | ||
55395 | INC B | Increment B by one. | ||
55396 | PUSH HL | Stash HL on the stack. | ||
55397 | LD A,(BC) | A=*BC. | ||
55398 | LD L,(HL) | L=*HL. | ||
55399 | LD H,198 | H=198. | ||
55401 | AND (HL) | Merge the bits from *HL. | ||
55402 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55403 | LD A,(DE) | A=*DE. | ||
55404 | LD L,A | L=A. | ||
55405 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55406 | OR (HL) | Set the bits from *HL. | ||
55407 | LD (BC),A | Write A to *BC. | ||
55408 | POP HL | Restore HL from the stack. | ||
55409 | INC DE | Increment DE by one. | ||
55410 | INC HL | Increment HL by one. | ||
55411 | INC B | Increment B by one. | ||
55412 | PUSH HL | Stash HL on the stack. | ||
55413 | LD A,(BC) | A=*BC. | ||
55414 | LD L,(HL) | L=*HL. | ||
55415 | LD H,198 | H=198. | ||
55417 | AND (HL) | Merge the bits from *HL. | ||
55418 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55419 | LD A,(DE) | A=*DE. | ||
55420 | LD L,A | L=A. | ||
55421 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55422 | OR (HL) | Set the bits from *HL. | ||
55423 | LD (BC),A | Write A to *BC. | ||
55424 | POP HL | Restore HL from the stack. | ||
55425 | INC DE | Increment DE by one. | ||
55426 | INC HL | Increment HL by one. | ||
55427 | INC B | Increment B by one. | ||
55428 | PUSH HL | Stash HL on the stack. | ||
55429 | LD A,(BC) | A=*BC. | ||
55430 | LD L,(HL) | L=*HL. | ||
55431 | LD H,198 | H=198. | ||
55433 | AND (HL) | Merge the bits from *HL. | ||
55434 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55435 | LD A,(DE) | A=*DE. | ||
55436 | LD L,A | L=A. | ||
55437 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55438 | OR (HL) | Set the bits from *HL. | ||
55439 | LD (BC),A | Write A to *BC. | ||
55440 | POP HL | Restore HL from the stack. | ||
55441 | INC DE | Increment DE by one. | ||
55442 | INC HL | Increment HL by one. | ||
55443 | INC B | Increment B by one. | ||
55444 | PUSH HL | Stash HL on the stack. | ||
55445 | LD A,(BC) | A=*BC. | ||
55446 | LD L,(HL) | L=*HL. | ||
55447 | LD H,198 | H=198. | ||
55449 | AND (HL) | Merge the bits from *HL. | ||
55450 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55451 | LD A,(DE) | A=*DE. | ||
55452 | LD L,A | L=A. | ||
55453 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55454 | OR (HL) | Set the bits from *HL. | ||
55455 | LD (BC),A | Write A to *BC. | ||
55456 | POP HL | Restore HL from the stack. | ||
55457 | INC DE | Increment DE by one. | ||
55458 | INC HL | Increment HL by one. | ||
55459 | INC B | Increment B by one. | ||
55460 | PUSH HL | Stash HL on the stack. | ||
55461 | LD A,(BC) | A=*BC. | ||
55462 | LD L,(HL) | L=*HL. | ||
55463 | LD H,198 | H=198. | ||
55465 | AND (HL) | Merge the bits from *HL. | ||
55466 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55467 | LD A,(DE) | A=*DE. | ||
55468 | LD L,A | L=A. | ||
55469 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55470 | OR (HL) | Set the bits from *HL. | ||
55471 | LD (BC),A | Write A to *BC. | ||
55472 | POP HL | Restore HL from the stack. | ||
55473 | INC DE | Increment DE by one. | ||
55474 | INC HL | Increment HL by one. | ||
55475 | INC B | Increment B by one. | ||
55476 | PUSH HL | Stash HL on the stack. | ||
55477 | LD A,(BC) | A=*BC. | ||
55478 | LD L,(HL) | L=*HL. | ||
55479 | LD H,198 | H=198. | ||
55481 | AND (HL) | Merge the bits from *HL. | ||
55482 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55483 | LD A,(DE) | A=*DE. | ||
55484 | LD L,A | L=A. | ||
55485 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
55486 | OR (HL) | Set the bits from *HL. | ||
55487 | LD (BC),A | Write A to *BC. | ||
55488 | POP HL | Restore HL from the stack. | ||
55489 | CALL 55686 | Call 55686. | ||
PrintSprite_Mirrored_4 | 55492 | INC DE | Increment DE by one. | |
55493 | INC HL | Increment HL by one. | ||
PrintSprite_Mirrored_5 | 55494 | EXX | Switch to the shadow registers. | |
55495 | DEC C | Decrease C by one. | ||
55496 | LD A,E | Compare E with C... | ||
55497 | CP C | |||
55498 | EXX | Switch to the shadow registers. | ||
55499 | JP NZ,PrintSprite_Mirrored_1 | Jump to PrintSprite_Mirrored_1 if E is not equal to C on line 55496. | ||
55502 | EXX | Switch to the shadow registers. | ||
55503 | LD C,L | C=L. | ||
55504 | INC B | Increment B by one. | ||
55505 | LD A,D | Compare D with B... | ||
55506 | CP B | |||
55507 | EXX | Switch to the shadow registers. | ||
55508 | JP NZ,PrintSprite_Mirrored_1 | Jump to PrintSprite_Mirrored_1 if D is not equal to B on line 55505. | ||
55511 | RET | Return. | ||
PrintSprite_Mirrored_6 | 55512 | EXX | Switch to the shadow registers. | |
55513 | LD A,(DE) | A=*DE. | ||
55514 | INC DE | Increment DE by one. | ||
55515 | CP 54 | Jump to PrintSprite_Mirrored_7 if A is equal to 54. | ||
55517 | JP Z,PrintSprite_Mirrored_7 | |||
55520 | INC DE | Increment DE by eight. | ||
55521 | INC DE | |||
55522 | INC DE | |||
55523 | INC DE | |||
55524 | INC DE | |||
55525 | INC DE | |||
55526 | INC DE | |||
55527 | INC DE | |||
PrintSprite_Mirrored_7 | 55528 | LD A,(HL) | A=*HL. | |
55529 | INC HL | Increment HL by one. | ||
55530 | CP 54 | Jump to PrintSprite_Mirrored_5 if A is equal to 54. | ||
55532 | JP Z,PrintSprite_Mirrored_5 | |||
55535 | INC HL | Increment HL by eight. | ||
55536 | INC HL | |||
55537 | INC HL | |||
55538 | INC HL | |||
55539 | INC HL | |||
55540 | INC HL | |||
55541 | INC HL | |||
55542 | INC HL | |||
55543 | JP PrintSprite_Mirrored_5 | Jump to PrintSprite_Mirrored_5. | ||
PrintSprite_Mirrored_8 | 55546 | LD A,(DE) | Jump to PrintSprite_Mirrored_4 if *DE is equal to 54. | |
55547 | CP 54 | |||
55549 | JP Z,PrintSprite_Mirrored_4 | |||
55552 | INC DE | Increment DE by one. | ||
55553 | INC HL | Increment HL by one. | ||
55554 | PUSH HL | Stash HL on the stack. | ||
55555 | LD H,198 | H=198. | ||
55557 | LD A,(DE) | A=*DE. | ||
55558 | LD L,A | L=A. | ||
55559 | LD A,(HL) | A=*HL. | ||
55560 | LD (BC),A | Write A to *BC. | ||
55561 | INC DE | Increment DE by one. | ||
55562 | INC B | Increment B by one. | ||
55563 | LD A,(DE) | A=*DE. | ||
55564 | LD L,A | L=A. | ||
55565 | LD A,(HL) | A=*HL. | ||
55566 | LD (BC),A | Write A to *BC. | ||
55567 | INC DE | Increment DE by one. | ||
55568 | INC B | Increment B by one. | ||
55569 | LD A,(DE) | A=*DE. | ||
55570 | LD L,A | L=A. | ||
55571 | LD A,(HL) | A=*HL. | ||
55572 | LD (BC),A | Write A to *BC. | ||
55573 | INC DE | Increment DE by one. | ||
55574 | INC B | Increment B by one. | ||
55575 | LD A,(DE) | A=*DE. | ||
55576 | LD L,A | L=A. | ||
55577 | LD A,(HL) | A=*HL. | ||
55578 | LD (BC),A | Write A to *BC. | ||
55579 | INC DE | Increment DE by one. | ||
55580 | INC B | Increment B by one. | ||
55581 | LD A,(DE) | A=*DE. | ||
55582 | LD L,A | L=A. | ||
55583 | LD A,(HL) | A=*HL. | ||
55584 | LD (BC),A | Write A to *BC. | ||
55585 | INC DE | Increment DE by one. | ||
55586 | INC B | Increment B by one. | ||
55587 | LD A,(DE) | A=*DE. | ||
55588 | LD L,A | L=A. | ||
55589 | LD A,(HL) | A=*HL. | ||
55590 | LD (BC),A | Write A to *BC. | ||
55591 | INC DE | Increment DE by one. | ||
55592 | INC B | Increment B by one. | ||
55593 | LD A,(DE) | A=*DE. | ||
55594 | LD L,A | L=A. | ||
55595 | LD A,(HL) | A=*HL. | ||
55596 | LD (BC),A | Write A to *BC. | ||
55597 | INC DE | Increment DE by one. | ||
55598 | INC B | Increment B by one. | ||
55599 | LD A,(DE) | A=*DE. | ||
55600 | LD L,A | L=A. | ||
55601 | LD A,(HL) | A=*HL. | ||
55602 | LD (BC),A | Write A to *BC. | ||
55603 | INC DE | Increment DE by one. | ||
55604 | POP HL | Restore HL from the stack. | ||
55605 | CALL 55686 | Call 55686. | ||
55608 | JP PrintSprite_Mirrored_5 | Jump to PrintSprite_Mirrored_5. | ||
PrintSprite_Mirrored_9 | 55611 | INC DE | Increment DE by one. | |
55612 | INC HL | Increment HL by one. | ||
55613 | PUSH DE | Stash DE on the stack. | ||
55614 | LD D,198 | D=198. | ||
55616 | LD E,(HL) | E=*HL. | ||
55617 | LD A,(DE) | A=*DE. | ||
55618 | LD E,A | E=A. | ||
55619 | LD A,(BC) | A=*BC. | ||
55620 | AND E | Merge the bits from E. | ||
55621 | LD (BC),A | Write A to *BC. | ||
55622 | INC HL | Increment HL by one. | ||
55623 | INC B | Increment B by one. | ||
55624 | LD E,(HL) | E=*HL. | ||
55625 | LD A,(DE) | A=*DE. | ||
55626 | LD E,A | E=A. | ||
55627 | LD A,(BC) | A=*BC. | ||
55628 | AND E | Merge the bits from E. | ||
55629 | LD (BC),A | Write A to *BC. | ||
55630 | INC HL | Increment HL by one. | ||
55631 | INC B | Increment B by one. | ||
55632 | LD E,(HL) | E=*HL. | ||
55633 | LD A,(DE) | A=*DE. | ||
55634 | LD E,A | E=A. | ||
55635 | LD A,(BC) | A=*BC. | ||
55636 | AND E | Merge the bits from E. | ||
55637 | LD (BC),A | Write A to *BC. | ||
55638 | INC HL | Increment HL by one. | ||
55639 | INC B | Increment B by one. | ||
55640 | LD E,(HL) | E=*HL. | ||
55641 | LD A,(DE) | A=*DE. | ||
55642 | LD E,A | E=A. | ||
55643 | LD A,(BC) | A=*BC. | ||
55644 | AND E | Merge the bits from E. | ||
55645 | LD (BC),A | Write A to *BC. | ||
55646 | INC HL | Increment HL by one. | ||
55647 | INC B | Increment B by one. | ||
55648 | LD E,(HL) | E=*HL. | ||
55649 | LD A,(DE) | A=*DE. | ||
55650 | LD E,A | E=A. | ||
55651 | LD A,(BC) | A=*BC. | ||
55652 | AND E | Merge the bits from E. | ||
55653 | LD (BC),A | Write A to *BC. | ||
55654 | INC HL | Increment HL by one. | ||
55655 | INC B | Increment B by one. | ||
55656 | LD E,(HL) | E=*HL. | ||
55657 | LD A,(DE) | A=*DE. | ||
55658 | LD E,A | E=A. | ||
55659 | LD A,(BC) | A=*BC. | ||
55660 | AND E | Merge the bits from E. | ||
55661 | LD (BC),A | Write A to *BC. | ||
55662 | INC HL | Increment HL by one. | ||
55663 | INC B | Increment B by one. | ||
55664 | LD E,(HL) | E=*HL. | ||
55665 | LD A,(DE) | A=*DE. | ||
55666 | LD E,A | E=A. | ||
55667 | LD A,(BC) | A=*BC. | ||
55668 | AND E | Merge the bits from E. | ||
55669 | LD (BC),A | Write A to *BC. | ||
55670 | INC HL | Increment HL by one. | ||
55671 | INC B | Increment B by one. | ||
55672 | LD E,(HL) | E=*HL. | ||
55673 | LD A,(DE) | A=*DE. | ||
55674 | LD E,A | E=A. | ||
55675 | LD A,(BC) | A=*BC. | ||
55676 | AND E | Merge the bits from E. | ||
55677 | LD (BC),A | Write A to *BC. | ||
55678 | INC HL | Increment HL by one. | ||
55679 | POP DE | Restore DE from the stack. | ||
55680 | CALL 55686 | Call 55686. | ||
55683 | JP PrintSprite_Mirrored_5 | Jump to PrintSprite_Mirrored_5. |
Prev: 54985 | Up: Map | Next: 55686 |