![]() |
Routines |
| Prev: 89BF | Up: Map | Next: 8A11 |
|
Used by the routines at DisplayPlayerLives, Score_1UP, PrintStringColour, DrawHUDPanel, DrawGauge, NewHighScore_Suffix, F295, HallOfFame, HighScoreMessaging and PrintPlayerLevels.
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen | 89EF | PUSH BC | Stash BC, DE and HL on the stack. | ||||||||||||||||||||||||||||||||||||
| 89F0 | PUSH DE | ||||||||||||||||||||||||||||||||||||||
| 89F1 | PUSH HL | ||||||||||||||||||||||||||||||||||||||
| 89F2 | SUB $20 | Create an offset in HL. | |||||||||||||||||||||||||||||||||||||
| 89F4 | LD L,A | ||||||||||||||||||||||||||||||||||||||
| 89F5 | LD H,$00 | ||||||||||||||||||||||||||||||||||||||
| 89F7 | ADD HL,HL | HL=HL * 8. | |||||||||||||||||||||||||||||||||||||
| 89F8 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 89F9 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 89FA | LD DE,($5E04) | DE=FontPointer (main font is MainFont). | |||||||||||||||||||||||||||||||||||||
| 89FE | ADD HL,DE | DE=HL + DE. For examples of usage;
|
|||||||||||||||||||||||||||||||||||||
| 89FF | EX DE,HL | ||||||||||||||||||||||||||||||||||||||
|
Print the character to the screen.
|
|||||||||||||||||||||||||||||||||||||||
| 8A00 | POP HL | Restore HL, containing the screen buffer location, from the stack. | |||||||||||||||||||||||||||||||||||||
|
This entry point is used by the routine at DisplayPlayerLives.
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen_0 | 8A01 | LD B,$08 | B=08 (08 rows of pixels). | ||||||||||||||||||||||||||||||||||||
| PrintScreen_Loop | 8A03 | LD A,(DE) | Copy a byte from the font data to the screen buffer. | ||||||||||||||||||||||||||||||||||||
| 8A04 | LD (HL),A | ||||||||||||||||||||||||||||||||||||||
| 8A05 | INC DE | Increment the font data by one. | |||||||||||||||||||||||||||||||||||||
| 8A06 | INC H | Move onto the next pixel line. | |||||||||||||||||||||||||||||||||||||
| 8A07 | DJNZ PrintScreen_Loop | Decrease counter by one and loop back to PrintScreen_Loop until counter is zero. | |||||||||||||||||||||||||||||||||||||
| 8A09 | POP DE | Restore DE and BC from the stack. | |||||||||||||||||||||||||||||||||||||
| 8A0A | POP BC | ||||||||||||||||||||||||||||||||||||||
|
Reset HL and move to the next column, ready to print the next character.
|
|||||||||||||||||||||||||||||||||||||||
| 8A0B | LD A,H | H=H - 08 (reset the display line). | |||||||||||||||||||||||||||||||||||||
| 8A0C | SUB $08 | ||||||||||||||||||||||||||||||||||||||
| 8A0E | LD H,A | ||||||||||||||||||||||||||||||||||||||
| 8A0F | INC L | Increment screen column by one. | |||||||||||||||||||||||||||||||||||||
| 8A10 | RET | Return. | |||||||||||||||||||||||||||||||||||||
| Prev: 89BF | Up: Map | Next: 8A11 |