![]() |
Routines |
| Prev: 6C82 | Up: Map | Next: 6CB6 |
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen | 6C96 | PUSH BC | Stash BC, DE and HL on the stack. | ||||||||||||||||||||||||||||||||||||
| 6C97 | PUSH DE | ||||||||||||||||||||||||||||||||||||||
| 6C98 | PUSH HL | ||||||||||||||||||||||||||||||||||||||
| 6C99 | LD L,A | Create an offset in HL. | |||||||||||||||||||||||||||||||||||||
| 6C9A | LD H,$00 | ||||||||||||||||||||||||||||||||||||||
| 6C9C | ADD HL,HL | Calculate offset for ASCII character (HL=HL * 8). | |||||||||||||||||||||||||||||||||||||
| 6C9D | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 6C9E | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 6C9F | LD DE,($5C36) | DE=CHARS. | |||||||||||||||||||||||||||||||||||||
| 6CA3 | ADD HL,DE | DE=HL + 3C00. For examples of usage;
|
|||||||||||||||||||||||||||||||||||||
| 6CA4 | EX DE,HL | ||||||||||||||||||||||||||||||||||||||
|
Print the character to the screen.
|
|||||||||||||||||||||||||||||||||||||||
| 6CA5 | POP HL | Restore HL, containing the screen buffer location, from the stack. | |||||||||||||||||||||||||||||||||||||
| 6CA6 | LD B,$08 | B=08 (08 rows of pixels). | |||||||||||||||||||||||||||||||||||||
| PrintScreen_Loop | 6CA8 | LD A,(DE) | Copy a byte from the font data to the screen buffer. | ||||||||||||||||||||||||||||||||||||
| 6CA9 | LD (HL),A | ||||||||||||||||||||||||||||||||||||||
| 6CAA | INC DE | Increment the font data by one. | |||||||||||||||||||||||||||||||||||||
| 6CAB | INC H | Move onto the next pixel line. | |||||||||||||||||||||||||||||||||||||
| 6CAC | DJNZ PrintScreen_Loop | Decrease counter by one and loop back to PrintScreen_Loop until counter is zero. | |||||||||||||||||||||||||||||||||||||
| 6CAE | POP DE | Restore DE and BC from the stack. | |||||||||||||||||||||||||||||||||||||
| 6CAF | POP BC | ||||||||||||||||||||||||||||||||||||||
|
Reset HL and move to the next column, ready to print the next character.
|
|||||||||||||||||||||||||||||||||||||||
| 6CB0 | LD A,H | H=H - 08 (reset the display line). | |||||||||||||||||||||||||||||||||||||
| 6CB1 | SUB $08 | ||||||||||||||||||||||||||||||||||||||
| 6CB3 | LD H,A | ||||||||||||||||||||||||||||||||||||||
| 6CB4 | INC L | Increment screen column by one. | |||||||||||||||||||||||||||||||||||||
| 6CB5 | RET | Return. | |||||||||||||||||||||||||||||||||||||
|
View the equivalent code in;
|
|||||||||||||||||||||||||||||||||||||||
| Prev: 6C82 | Up: Map | Next: 6CB6 |