![]() |
Routines |
Prev: 27778 | Up: Map | Next: 27830 |
|
|||||||||||||||||||||||||||||||||||||||
PrintScreen | 27798 | PUSH BC | Stash BC, DE and HL on the stack. | ||||||||||||||||||||||||||||||||||||
27799 | PUSH DE | ||||||||||||||||||||||||||||||||||||||
27800 | PUSH HL | ||||||||||||||||||||||||||||||||||||||
27801 | LD L,A | Create an offset in HL. | |||||||||||||||||||||||||||||||||||||
27802 | LD H,0 | ||||||||||||||||||||||||||||||||||||||
27804 | ADD HL,HL | Calculate offset for ASCII character (HL=HL * 8). | |||||||||||||||||||||||||||||||||||||
27805 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
27806 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
27807 | LD DE,(23606) | DE=CHARS. | |||||||||||||||||||||||||||||||||||||
27811 | ADD HL,DE | DE=HL + 15360. For examples of usage;
|
|||||||||||||||||||||||||||||||||||||
27812 | EX DE,HL | ||||||||||||||||||||||||||||||||||||||
Print the character to the screen.
|
|||||||||||||||||||||||||||||||||||||||
27813 | POP HL | Restore HL, containing the screen buffer location, from the stack. | |||||||||||||||||||||||||||||||||||||
27814 | LD B,8 | B=8 (8 rows of pixels). | |||||||||||||||||||||||||||||||||||||
PrintScreen_Loop | 27816 | LD A,(DE) | Copy a byte from the font data to the screen buffer. | ||||||||||||||||||||||||||||||||||||
27817 | LD (HL),A | ||||||||||||||||||||||||||||||||||||||
27818 | INC DE | Increment the font data by one. | |||||||||||||||||||||||||||||||||||||
27819 | INC H | Move onto the next pixel line. | |||||||||||||||||||||||||||||||||||||
27820 | DJNZ PrintScreen_Loop | Decrease counter by one and loop back to PrintScreen_Loop until counter is zero. | |||||||||||||||||||||||||||||||||||||
27822 | POP DE | Restore DE and BC from the stack. | |||||||||||||||||||||||||||||||||||||
27823 | POP BC | ||||||||||||||||||||||||||||||||||||||
Reset HL and move to the next column, ready to print the next character.
|
|||||||||||||||||||||||||||||||||||||||
27824 | LD A,H | H=H - 8 (reset the display line). | |||||||||||||||||||||||||||||||||||||
27825 | SUB 8 | ||||||||||||||||||||||||||||||||||||||
27827 | LD H,A | ||||||||||||||||||||||||||||||||||||||
27828 | INC L | Increment screen column by one. | |||||||||||||||||||||||||||||||||||||
27829 | RET | Return. | |||||||||||||||||||||||||||||||||||||
View the equivalent code in;
|
Prev: 27778 | Up: Map | Next: 27830 |