Prev: 36675 Up: Map Next: 36703
36692: Convert leading zeroes to spaces in a string number
Used by the routine at 36647.
Input
C Number of required digits in string (e.g. 2)
HL Pointer to location within ASCII string
36692 LD A,(HL) Load ASCII character at HL into A
36693 CP 48 If character is not a zero ("0")...
36695 RET NZ ...then return
36696 LD (HL),32 Replace the zero character with a space (i.e. remove leading zeroes from number)
36698 INC HL Advance to next character in string
36699 DEC C Decrease C (number of remaining digits to process)
36700 RET Z Return if last digit has been processed
36701 JR 36692 Loop back for next digit
Prev: 36675 Up: Map Next: 36703