Prev: 42102 Up: Map Next: 42128
42112: Print One Decimal Digit
Used by the routine at PrintHundredsTensAndUnits.
Prints one decimal digit, suppressing leading zeros.
PrintOneDecimalDigit 42112 CALL DivideBySubtraction Call DivideBySubtraction to divide HL by DE (quotient in A, remainder in HL).
42115 ADD A,48 Turn the number into a character.
42117 DEC C Print the digit at once if an earlier digit was printed.
42118 INC C
42119 JR NZ,PrintOneDecimalDigit_0
42121 CP 48 Return when the character is the digit zero.
42123 RET Z
42124 INC C Note that a digit has been printed.
PrintOneDecimalDigit_0 42125 JP Print_Character Jump to Print_Character to print the digit.
Prev: 42102 Up: Map Next: 42128