Prev: 44390 Up: Map Next: 44489
44464: Print Counter Digit
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.
Input
A Digit and animation step
HL Address in the screen buffer
Output
HL Address of the next character
Find the glyph and print it.
PrintCounterDigit 44464 PUSH BC Stash the registers on the stack.
44465 PUSH DE
44466 PUSH HL
44467 LD L,A Copy the digit and step to L.
44468 SRL L Divide it by sixteen.
44470 SRL L
44472 SRL L
44474 SRL L
44476 LD H,0 Set H to 0.
44478 ADD HL,HL Multiply the digit by eight.
44479 ADD HL,HL
44480 ADD HL,HL
44481 AND %00001111 Keep bits 0 to 3.
44483 CALL AddAToHL Call AddAToHL.
44486 JP PrintCharacter_Offset Jump to PrintCharacter_Offset.
Prev: 44390 Up: Map Next: 44489