![]() |
Routines |
| Prev: 67B2 | Up: Map | Next: 6825 |
|
Used by the routines at AddToScore and Print_HighScore.
Prints the current score to the screen buffer. Each digit is stored as a value 00-09 and is converted to an ASCII character by adding 30.
|
||||||||||
| PrintScore | 6811 | LD B,$07 | Set a digit counter in B of 07 digits. | |||||||
| PrintScore_Loop | 6813 | PUSH HL | Stash the screen buffer pointer and digit counter on the stack. | |||||||
| 6814 | PUSH BC | |||||||||
| 6815 | LD A,(IX+$00) | Fetch the current score digit value and store it in A. | ||||||||
| 6818 | ADD A,$30 | Add 30 to convert it to an ASCII character. | ||||||||
| 681A | CALL PrintCharacter | Call PrintCharacter. | ||||||||
| 681D | POP BC | Restore the digit counter and screen buffer pointer from the stack. | ||||||||
| 681E | POP HL | |||||||||
| 681F | INC IX | Advance to the next current score digit. | ||||||||
| 6821 | DEC L | Move one character to the left in the screen buffer. | ||||||||
| 6822 | DJNZ PrintScore_Loop | Decrease the digit counter by one and loop back to PrintScore_Loop until all 07 digits have been printed. | ||||||||
| 6824 | RET | Return. | ||||||||
| Prev: 67B2 | Up: Map | Next: 6825 |