![]() |
Routines |
| Prev: 739D | Up: Map | Next: 73ED |
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen | 73CD | PUSH BC | Stash BC, DE and HL on the stack. | ||||||||||||||||||||||||||||||||||||
| 73CE | PUSH DE | ||||||||||||||||||||||||||||||||||||||
| 73CF | PUSH HL | ||||||||||||||||||||||||||||||||||||||
| 73D0 | LD L,A | Create an offset in HL. | |||||||||||||||||||||||||||||||||||||
| 73D1 | LD H,$00 | ||||||||||||||||||||||||||||||||||||||
| 73D3 | ADD HL,HL | HL=HL * 8. | |||||||||||||||||||||||||||||||||||||
| 73D4 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 73D5 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 73D6 | LD DE,($5C36) | DE=CHARS. | |||||||||||||||||||||||||||||||||||||
| 73DA | ADD HL,DE | DE=HL + 3C00. For examples of usage;
|
|||||||||||||||||||||||||||||||||||||
| 73DB | EX DE,HL | ||||||||||||||||||||||||||||||||||||||
|
Print the character to the screen.
|
|||||||||||||||||||||||||||||||||||||||
| 73DC | POP HL | Restore HL, containing the screen buffer location, from the stack. | |||||||||||||||||||||||||||||||||||||
|
This entry point is used by the routine at DisplayPlayerLives.
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen_0 | 73DD | LD B,$08 | B=08 (08 rows of pixels). | ||||||||||||||||||||||||||||||||||||
| PrintScreen_Loop | 73DF | LD A,(DE) | Copy a byte from the font data to the screen buffer. | ||||||||||||||||||||||||||||||||||||
| 73E0 | LD (HL),A | ||||||||||||||||||||||||||||||||||||||
| 73E1 | INC DE | Increment the font data by one. | |||||||||||||||||||||||||||||||||||||
| 73E2 | INC H | Move onto the next pixel line. | |||||||||||||||||||||||||||||||||||||
| 73E3 | DJNZ PrintScreen_Loop | Decrease counter by one and loop back to PrintScreen_Loop until counter is zero. | |||||||||||||||||||||||||||||||||||||
| 73E5 | POP DE | Restore DE and BC from the stack. | |||||||||||||||||||||||||||||||||||||
| 73E6 | POP BC | ||||||||||||||||||||||||||||||||||||||
|
Reset HL and move to the next column, ready to print the next character.
|
|||||||||||||||||||||||||||||||||||||||
| 73E7 | LD A,H | H=H - 08 (reset the display line). | |||||||||||||||||||||||||||||||||||||
| 73E8 | SUB $08 | ||||||||||||||||||||||||||||||||||||||
| 73EA | LD H,A | ||||||||||||||||||||||||||||||||||||||
| 73EB | INC L | Increment screen column by one. | |||||||||||||||||||||||||||||||||||||
| 73EC | RET | Return. | |||||||||||||||||||||||||||||||||||||
|
View the equivalent code in;
|
|||||||||||||||||||||||||||||||||||||||
| Prev: 739D | Up: Map | Next: 73ED |