![]() |
Routines |
| Prev: 26546 | Up: Map | Next: 26661 |
|
Used by the routines at AddToScore and Print_HighScore.
Prints the current score to the screen buffer. Each digit is stored as a value 0-9 and is converted to an ASCII character by adding 48.
|
||||||||||
| PrintScore | 26641 | LD B,7 | Set a digit counter in B of 7 digits. | |||||||
| PrintScore_Loop | 26643 | PUSH HL | Stash the screen buffer pointer and digit counter on the stack. | |||||||
| 26644 | PUSH BC | |||||||||
| 26645 | LD A,(IX+0) | Fetch the current score digit value and store it in A. | ||||||||
| 26648 | ADD A,48 | Add 48 to convert it to an ASCII character. | ||||||||
| 26650 | CALL PrintCharacter | Call PrintCharacter. | ||||||||
| 26653 | POP BC | Restore the digit counter and screen buffer pointer from the stack. | ||||||||
| 26654 | POP HL | |||||||||
| 26655 | INC IX | Advance to the next current score digit. | ||||||||
| 26657 | DEC L | Move one character to the left in the screen buffer. | ||||||||
| 26658 | DJNZ PrintScore_Loop | Decrease the digit counter by one and loop back to PrintScore_Loop until all 7 digits have been printed. | ||||||||
| 26660 | RET | Return. | ||||||||
| Prev: 26546 | Up: Map | Next: 26661 |