Prev: 48863 Up: Map Next: 48968
48950: Print Percentage
Used by the routine at GameOver.
Prints the percentage complete from PercentageHundreds and PercentageTensAndUnits, with the hundreds digit only when the game is one hundred percent complete.
Input
HL Screen position of the first digit
Print the hundreds digit only when it is not zero.
PrintPercentage 48950 LD DE,48125 Point at the hundreds digit and set the number of digits to one.
48953 LD B,1
48955 LD A,(DE) Fetch the hundreds digit and jump to PrintPercentage_NoHundreds if it is zero.
48956 AND A
48957 JR Z,PrintPercentage_NoHundreds
48959 INC B Include the hundreds digit.
48960 JP PrintBCDNumber_LowerDigit Jump to PrintBCDNumber_LowerDigit to print the digits.
Print the tens and units.
PrintPercentage_NoHundreds 48963 INC L Move the screen position and the pointer on to the tens digit.
48964 INC DE
48965 JP PrintBCDNumber Jump to PrintBCDNumber to print the two digits.
Prev: 48863 Up: Map Next: 48968