![]() |
Routines |
| Prev: 7438 | Up: Map | Next: 7488 |
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen | 7468 | PUSH BC | Stash BC, DE and HL on the stack. | ||||||||||||||||||||||||||||||||||||
| 7469 | PUSH DE | ||||||||||||||||||||||||||||||||||||||
| 746A | PUSH HL | ||||||||||||||||||||||||||||||||||||||
| 746B | LD L,A | Create an offset in HL. | |||||||||||||||||||||||||||||||||||||
| 746C | LD H,$00 | ||||||||||||||||||||||||||||||||||||||
| 746E | ADD HL,HL | HL=HL * 8. | |||||||||||||||||||||||||||||||||||||
| 746F | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 7470 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 7471 | LD DE,($5C36) | DE=CHARS. | |||||||||||||||||||||||||||||||||||||
| 7475 | ADD HL,DE | DE=HL + 3C00. For examples of usage;
|
|||||||||||||||||||||||||||||||||||||
| 7476 | EX DE,HL | ||||||||||||||||||||||||||||||||||||||
|
Print the character to the screen.
|
|||||||||||||||||||||||||||||||||||||||
| 7477 | POP HL | Restore HL, containing the screen buffer location, from the stack. | |||||||||||||||||||||||||||||||||||||
|
This entry point is used by the routine at 7378.
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen_0 | 7478 | LD B,$08 | B=08 (08 rows of pixels). | ||||||||||||||||||||||||||||||||||||
| PrintScreen_Loop | 747A | LD A,(DE) | Copy a byte from the font data to the screen buffer. | ||||||||||||||||||||||||||||||||||||
| 747B | LD (HL),A | ||||||||||||||||||||||||||||||||||||||
| 747C | INC DE | Increment the font data by one. | |||||||||||||||||||||||||||||||||||||
| 747D | INC H | Move onto the next pixel line. | |||||||||||||||||||||||||||||||||||||
| 747E | DJNZ PrintScreen_Loop | Decrease counter by one and loop back to PrintScreen_Loop until counter is zero. | |||||||||||||||||||||||||||||||||||||
| 7480 | POP DE | Restore DE and BC from the stack. | |||||||||||||||||||||||||||||||||||||
| 7481 | POP BC | ||||||||||||||||||||||||||||||||||||||
|
Reset HL and move to the next column, ready to print the next character.
|
|||||||||||||||||||||||||||||||||||||||
| 7482 | LD A,H | H=H - 08 (reset the display line). | |||||||||||||||||||||||||||||||||||||
| 7483 | SUB $08 | ||||||||||||||||||||||||||||||||||||||
| 7485 | LD H,A | ||||||||||||||||||||||||||||||||||||||
| 7486 | INC L | Increment screen column by one. | |||||||||||||||||||||||||||||||||||||
| 7487 | RET | Return. | |||||||||||||||||||||||||||||||||||||
|
View the equivalent code in;
|
|||||||||||||||||||||||||||||||||||||||
| Prev: 7438 | Up: Map | Next: 7488 |