Routines |
Prev: 56395 | Up: Map | Next: 56529 |
Used by the routines at Handler_Bonus, 55999, Print_Numbers, MoveTile_Right, MoveTile_Left, MoveTile_Down, MoveTile_Up, Print_HelperPreviewImage, Draw_Tile, Draw_Cursor, Print_Score, Print_Level and StaticAnimation.
|
||||||||||||||
Calculate_ScreenBlockAddress | 56514 | LD A,B | Load the X position into A. | |||||||||||
56515 | AND %11111000 | Divide X by 8 to extract only the column number. | ||||||||||||
56517 | ADD A,64 | Add 64 to get the high byte of screen address and store the result in H. | ||||||||||||
56519 | LD H,A | |||||||||||||
56520 | LD A,B | Load the X position into A again. | ||||||||||||
56521 | AND %00000111 | Extract only the pixel offset within the character block. | ||||||||||||
56523 | RRCA | Multiply A by 32. | ||||||||||||
56524 | RRCA | |||||||||||||
56525 | RRCA | |||||||||||||
56526 | ADD A,C | Add the Y co-ordinate store the result in L. | ||||||||||||
56527 | LD L,A | |||||||||||||
56528 | RET | Return. |
Prev: 56395 | Up: Map | Next: 56529 |