Prev: BC1F Up: Map Next: BC61
BC38: Add 100/156 per point
scale_to_percent BC38 ADD HL,BC the carry out of the fraction is a whole 1 per cent
BC39 ADC A,$00
BC3B DAA
BC3C DEC E
BC3D JR NZ,scale_to_percent
BC3F LD BC,$0028 the correction that lets 156 points reach 100
BC42 ADD HL,BC
BC43 ADC A,$00
BC45 DAA
BC46 LD ($5BCA),A tens and units, BCD
BC49 LD A,$00 the hundreds digit, 0 or 1
BC4B ADC A,$00
BC4D DAA
BC4E LD ($5BC9),A
BC51 LD HL,$E4E6 into the buffer at y=95, column 19
BC54 LD DE,$5BC9
BC57 LD B,$01
BC59 LD A,(DE) three digits when it is 100: the low digit of $5BC9, then $5BCA
BC5A AND A
BC5B JR Z,print_percent_two_digits
BC5D INC B
BC5E JP print_BCD_lsd
Prev: BC1F Up: Map Next: BC61