Prev: B58F Up: Map Next: B5CB
B5AF: Print Big Number
Used by the routine at PrintScore.
Prints a number stored as BCD bytes using big digits, which are two characters tall.
Input
B Number of bytes of the number
DE Address of the number
HL Screen address
Output
DE Address after the number
PrintBigNumber B5AF PUSH HL Save the screen address.
B5B0 LD HL,$6003 Point HL at DigitGraphics.
B5B3 LD ($9618),HL Use them as the current character set.
B5B6 POP HL Restore the screen address.
PrintBigNumber_Byte B5B7 LD A,(DE) Fetch a byte of the number.
B5B8 RRCA Move the upper digit down into the bottom four bits.
B5B9 RRCA
B5BA RRCA
B5BB RRCA
B5BC AND $0F Keep only that digit.
B5BE CALL PrintBigDigit Print it using PrintBigDigit.
B5C1 LD A,(DE) Fetch the byte again.
B5C2 AND $0F Keep only the lower digit.
B5C4 CALL PrintBigDigit Print it.
B5C7 INC DE Move on to the next byte of the number.
B5C8 DJNZ PrintBigNumber_Byte Loop back until every byte has been printed.
B5CA RET Return.
View the equivalent code in;
Prev: B58F Up: Map Next: B5CB