Routines
| Prev: A480 | Up: Map | Next: A4AB |
A490: Print the number B (0-255) in decimal
|
Used by the routine at A419.
|
||||||||||||
| A490 | PUSH HL | Save HL on the stack - HL = the number in B (0-255) | ||||||||||
| A491 | PUSH DE | Save DE on the stack | ||||||||||
| A492 | LD L,B | Copy B into L | ||||||||||
| A493 | LD H,$00 | Load H with $00 | ||||||||||
| A495 | LD C,H | Copy H into C | ||||||||||
| A496 | LD DE,$0064 | Load DE with $0064 - The hundreds digit (A480, with a leading zero suppressed) | ||||||||||
| A499 | CALL $A480 | Call the routine "Print one digit of HL / DE, skipping leading zeros (C)" (A480) | ||||||||||
| A49C | LD DE,$000A | Load DE with $000A - The tens digit | ||||||||||
| A49F | CALL $A480 | Call the routine "Print one digit of HL / DE, skipping leading zeros (C)" (A480) | ||||||||||
| A4A2 | LD A,L | Copy L into A - The units digit, always printed | ||||||||||
| A4A3 | ADD A,$30 | Add $30 to A | ||||||||||
| A4A5 | CALL $A9B7 | Call the routine "Print character A, a word at a time (word wrap)" (A9B7) | ||||||||||
| A4A8 | POP DE | Restore DE from the stack | ||||||||||
| A4A9 | POP HL | Restore HL from the stack | ||||||||||
| A4AA | RET | Return to the caller | ||||||||||
| Prev: A480 | Up: Map | Next: A4AB |