![]() |
Routines |
| Prev: B585 | Up: Map | Next: B5AF |
|
Used by the routine at HallOfFame.
Prints a number stored as three BCD bytes using the normal character set, which is used in the hall of fame.
|
||||||||||||||||
| PrintSmallNumber | B58F | PUSH HL | Save the screen address. | |||||||||||||
| B590 | LD HL,($5C36) | Fetch the address of the character set. | ||||||||||||||
| B593 | LD ($9618),HL | Use it as the current character set. | ||||||||||||||
| B596 | POP HL | Restore the screen address. | ||||||||||||||
| PrintSmallNumber_Byte | B597 | LD A,(DE) | Fetch a byte of the number. | |||||||||||||
| B598 | RRCA | Move the tens digit down into the bottom four bits. | ||||||||||||||
| B599 | RRCA | |||||||||||||||
| B59A | RRCA | |||||||||||||||
| B59B | RRCA | |||||||||||||||
| B59C | AND $0F | Keep only that digit. | ||||||||||||||
| B59E | ADD A,$30 | Convert it to the character code of the digit. | ||||||||||||||
| B5A0 | CALL PrintScreen | Print it using PrintScreen. | ||||||||||||||
| B5A3 | LD A,(DE) | Fetch the byte again. | ||||||||||||||
| B5A4 | AND $0F | Keep only the units digit. | ||||||||||||||
| B5A6 | ADD A,$30 | Convert it to the character code of the digit. | ||||||||||||||
| B5A8 | CALL PrintScreen | Print it. | ||||||||||||||
| B5AB | INC DE | Move on to the next byte of the number. | ||||||||||||||
| B5AC | DJNZ PrintSmallNumber_Byte | Loop back until all of the bytes have been printed. | ||||||||||||||
| B5AE | RET | Return. | ||||||||||||||
| Prev: B585 | Up: Map | Next: B5AF |