Routines |
Prev: 55894 | Up: Map | Next: 56028 |
Used by the routines at 54793, 55498, 55609, 55689, 55792, 55894, 56039, Print_HelperPreviewImage, 56436, Draw_Cursor, 59423, 59450 and StaticAnimation.
|
||||||||||||||
Calculate_ScreenBlockAddress | 56013 | LD A,B | Load the X position into A. | |||||||||||
56014 | AND %11111000 | Divide X by 8 to extract only the column number. | ||||||||||||
56016 | ADD A,64 | Add 64 to get the high byte of screen address and store the result in H. | ||||||||||||
56018 | LD H,A | |||||||||||||
56019 | LD A,B | Load the X position into A again. | ||||||||||||
56020 | AND %00000111 | Extract only the pixel offset within the character block. | ||||||||||||
56022 | RRCA | Multiply A by 32. | ||||||||||||
56023 | RRCA | |||||||||||||
56024 | RRCA | |||||||||||||
56025 | ADD A,C | Add the Y co-ordinate store the result in L. | ||||||||||||
56026 | LD L,A | |||||||||||||
56027 | RET | Return. |
Prev: 55894 | Up: Map | Next: 56028 |