![]() |
Routines |
| Prev: 41372 | Up: Map | Next: 41427 |
|
Used by the routine at DrawSidePanel.
Prints the score, as six digits, in the side panel.
|
||||||||
| Score_1UP | 41390 | LD HL,49100 | Write MainFont_Zero to FontPointer. | |||||
| 41393 | LD (24065),HL | |||||||
| 41396 | LD HL,20680 | HL=20680 (the Y position is 80 and the X position is 200). | ||||||
|
This entry point is used by the routine at GameStats.
|
||||||||
| PrintScore | 41399 | CALL ScreenAddress | Call ScreenAddress to get the screen address of the position. | |||||
| 41402 | LD DE,24106 | Point DE at the first byte of the score at Score_1. | ||||||
| 41405 | LD B,3 | B=3 (the number of bytes). | ||||||
| PrintScore_Loop | 41407 | LD A,(DE) | Fetch the next byte of the score. | |||||
| 41408 | RRCA | Rotate right four times, which moves the high digit into the low nibble. | ||||||
| 41409 | RRCA | |||||||
| 41410 | RRCA | |||||||
| 41411 | RRCA | |||||||
| 41412 | AND %00001111 | Keep only bits 0-3. | ||||||
| 41414 | CALL PrintScreen | Call PrintScreen to print the digit. | ||||||
|
This entry point is used by the routine at ClockTick.
|
||||||||
| PrintScore_LowDigit | 41417 | LD A,(DE) | Fetch the byte of the score again. | |||||
| 41418 | AND %00001111 | Keep only bits 0-3. | ||||||
| 41420 | CALL PrintScreen | Call PrintScreen to print the digit. | ||||||
| 41423 | INC DE | Move on to the next byte of the score. | ||||||
| 41424 | DJNZ PrintScore_Loop | Decrease the byte counter by one and loop back to PrintScore_Loop until all the bytes of the score have been printed. | ||||||
| 41426 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 41372 | Up: Map | Next: 41427 |