![]() |
Routines |
| Prev: 53930 | Up: Map | Next: 53961 |
|
Used by the routine at DrawBountyDigits.
Draws a number which is held as pairs of packed decimal digits, as double height characters from Font_Digits.
|
|||||||||||||||
|
Prepare the upper digit.
|
|||||||||||||||
| DrawDigits | 53936 | LD A,(DE) | Fetch the byte. | ||||||||||||
| 53937 | RRCA | Move the upper digit to the lower four bits. | |||||||||||||
| 53938 | RRCA | ||||||||||||||
| 53939 | RRCA | ||||||||||||||
| 53940 | RRCA | ||||||||||||||
| 53941 | AND %00001111 | Keep only bits 0-3. | |||||||||||||
| 53943 | PUSH BC | Stash the counter on the stack. | |||||||||||||
| 53944 | LD BC,36528 | Point BC at Font_Digits. | |||||||||||||
|
Draw the upper digit.
|
|||||||||||||||
| 53947 | CALL DrawCharacter | Call DrawCharacter. | |||||||||||||
|
Prepare the lower digit.
|
|||||||||||||||
| 53950 | LD A,(DE) | Fetch the byte again, and move to the next one. | |||||||||||||
| 53951 | INC DE | ||||||||||||||
| 53952 | AND %00001111 | Keep only bits 0-3. | |||||||||||||
|
Draw the lower digit.
|
|||||||||||||||
| 53954 | CALL DrawCharacter | Call DrawCharacter. | |||||||||||||
| 53957 | POP BC | Restore the counter from the stack. | |||||||||||||
| 53958 | DJNZ DrawDigits | Jump to DrawDigits if there are any left. | |||||||||||||
| 53960 | RET | Return. | |||||||||||||
| Prev: 53930 | Up: Map | Next: 53961 |