![]() |
Routines |
| Prev: AD66 | Up: Map | Next: ADC9 |
|
Used by the routine at UpdateLightYears.
Prints one digit of the light years counter. The upper four bits of the byte hold the digit and the lower three bits are an animation step. The glyph is taken from the font that number of rows later than the start of the glyph, so that the digit scrolls up like an odometer as it changes.
|
||||||||||||||
|
Find the glyph and print it.
|
||||||||||||||
| PrintCounterDigit | ADB0 | PUSH BC | Stash the registers on the stack. | |||||||||||
| ADB1 | PUSH DE | |||||||||||||
| ADB2 | PUSH HL | |||||||||||||
| ADB3 | LD L,A | Copy the digit and step to L. | ||||||||||||
| ADB4 | SRL L | Divide it by sixteen. | ||||||||||||
| ADB6 | SRL L | |||||||||||||
| ADB8 | SRL L | |||||||||||||
| ADBA | SRL L | |||||||||||||
| ADBC | LD H,$00 | Set H to 00. | ||||||||||||
| ADBE | ADD HL,HL | Multiply the digit by eight. | ||||||||||||
| ADBF | ADD HL,HL | |||||||||||||
| ADC0 | ADD HL,HL | |||||||||||||
| ADC1 | AND %00001111 | Keep bits 0 to 3. | ||||||||||||
| ADC3 | CALL AddAToHL | Call AddAToHL. | ||||||||||||
| ADC6 | JP PrintCharacter_Offset | Jump to PrintCharacter_Offset. | ||||||||||||
| Prev: AD66 | Up: Map | Next: ADC9 |