![]() |
Routines |
| Prev: 28956 | Up: Map | Next: 29036 |
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen | 29004 | PUSH BC | Stash BC, DE and HL on the stack. | ||||||||||||||||||||||||||||||||||||
| 29005 | PUSH DE | ||||||||||||||||||||||||||||||||||||||
| 29006 | PUSH HL | ||||||||||||||||||||||||||||||||||||||
| 29007 | LD L,A | Create an offset in HL. | |||||||||||||||||||||||||||||||||||||
| 29008 | LD H,0 | ||||||||||||||||||||||||||||||||||||||
| 29010 | ADD HL,HL | HL=HL * 8. | |||||||||||||||||||||||||||||||||||||
| 29011 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 29012 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 29013 | LD DE,(23606) | DE=CHARS. | |||||||||||||||||||||||||||||||||||||
| 29017 | ADD HL,DE | DE=HL + 15360. For examples of usage;
|
|||||||||||||||||||||||||||||||||||||
| 29018 | EX DE,HL | ||||||||||||||||||||||||||||||||||||||
|
Print the character to the screen.
|
|||||||||||||||||||||||||||||||||||||||
| 29019 | POP HL | Restore HL, containing the screen buffer location, from the stack. | |||||||||||||||||||||||||||||||||||||
|
This entry point is used by the routine at DisplayPlayerLives.
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen_0 | 29020 | LD B,8 | B=8 (8 rows of pixels). | ||||||||||||||||||||||||||||||||||||
|
This entry point is used by the routine at 30317.
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen_Loop | 29022 | LD A,(DE) | Copy a byte from the font data to the screen buffer. | ||||||||||||||||||||||||||||||||||||
| 29023 | LD (HL),A | ||||||||||||||||||||||||||||||||||||||
| 29024 | INC DE | Increment the font data by one. | |||||||||||||||||||||||||||||||||||||
| 29025 | INC H | Move onto the next pixel line. | |||||||||||||||||||||||||||||||||||||
| 29026 | DJNZ PrintScreen_Loop | Decrease counter by one and loop back to PrintScreen_Loop until counter is zero. | |||||||||||||||||||||||||||||||||||||
| 29028 | POP DE | Restore DE and BC from the stack. | |||||||||||||||||||||||||||||||||||||
| 29029 | POP BC | ||||||||||||||||||||||||||||||||||||||
|
Reset HL and move to the next column, ready to print the next character.
|
|||||||||||||||||||||||||||||||||||||||
| 29030 | LD A,H | H=H - 8 (reset the display line). | |||||||||||||||||||||||||||||||||||||
| 29031 | SUB 8 | ||||||||||||||||||||||||||||||||||||||
| 29033 | LD H,A | ||||||||||||||||||||||||||||||||||||||
| 29034 | INC L | Increment screen column by one. | |||||||||||||||||||||||||||||||||||||
| 29035 | RET | Return. | |||||||||||||||||||||||||||||||||||||
|
View the equivalent code in;
|
|||||||||||||||||||||||||||||||||||||||
| Prev: 28956 | Up: Map | Next: 29036 |