Routines |
Prev: 55286 | Up: Map | Next: 55721 |
Used by the routines at PrintSprite and PrintSprite_Mirrored.
|
||||
55686 | EXX | Switch to the shadow registers. | ||
55687 | PUSH HL | Stash HL on the stack. | ||
55688 | LD A,B | A=B. | ||
55689 | RRCA | Rotate A left three positions (bits 5 to 7 are now in positions 0 to 2). | ||
55690 | RRCA | |||
55691 | RRCA | |||
55692 | LD L,A | L=A. | ||
55693 | AND %00000111 | Keep only bits 0-2. | ||
55695 | ADD A,104 | A+=104. | ||
55697 | LD H,A | H=A. | ||
55698 | LD A,L | A=L. | ||
55699 | AND %11111000 | Keep only bits 3-7. | ||
55701 | ADD A,C | A+=C. | ||
55702 | LD L,A | L=A. | ||
55703 | LD A,(53780) | A=*53780. | ||
55706 | CP 230 | Jump to 55717 if A is lower than 230. | ||
55708 | JR C,55717 | |||
55710 | CP 239 | Jump to 55717 if A is higher than 239. | ||
55712 | JR NC,55717 | |||
55714 | LD A,(54280) | Write *54280 to *HL. | ||
55717 | LD (HL),A | |||
55718 | POP HL | Restore HL from the stack. | ||
55719 | EXX | Switch back to the normal registers. | ||
55720 | RET | Return. |
Prev: 55286 | Up: Map | Next: 55721 |