![]() |
Routines |
| Prev: 29752 | Up: Map | Next: 29832 |
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen | 29800 | PUSH BC | Stash BC, DE and HL on the stack. | ||||||||||||||||||||||||||||||||||||
| 29801 | PUSH DE | ||||||||||||||||||||||||||||||||||||||
| 29802 | PUSH HL | ||||||||||||||||||||||||||||||||||||||
| 29803 | LD L,A | Create an offset in HL. | |||||||||||||||||||||||||||||||||||||
| 29804 | LD H,0 | ||||||||||||||||||||||||||||||||||||||
| 29806 | ADD HL,HL | HL=HL * 8. | |||||||||||||||||||||||||||||||||||||
| 29807 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 29808 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
| 29809 | LD DE,(23606) | DE=CHARS. | |||||||||||||||||||||||||||||||||||||
| 29813 | ADD HL,DE | DE=HL + 15360. For examples of usage;
|
|||||||||||||||||||||||||||||||||||||
| 29814 | EX DE,HL | ||||||||||||||||||||||||||||||||||||||
|
Print the character to the screen.
|
|||||||||||||||||||||||||||||||||||||||
| 29815 | POP HL | Restore HL, containing the screen buffer location, from the stack. | |||||||||||||||||||||||||||||||||||||
|
This entry point is used by the routine at 29560.
|
|||||||||||||||||||||||||||||||||||||||
| PrintScreen_0 | 29816 | LD B,8 | B=8 (8 rows of pixels). | ||||||||||||||||||||||||||||||||||||
| PrintScreen_Loop | 29818 | LD A,(DE) | Copy a byte from the font data to the screen buffer. | ||||||||||||||||||||||||||||||||||||
| 29819 | LD (HL),A | ||||||||||||||||||||||||||||||||||||||
| 29820 | INC DE | Increment the font data by one. | |||||||||||||||||||||||||||||||||||||
| 29821 | INC H | Move onto the next pixel line. | |||||||||||||||||||||||||||||||||||||
| 29822 | DJNZ PrintScreen_Loop | Decrease counter by one and loop back to PrintScreen_Loop until counter is zero. | |||||||||||||||||||||||||||||||||||||
| 29824 | POP DE | Restore DE and BC from the stack. | |||||||||||||||||||||||||||||||||||||
| 29825 | POP BC | ||||||||||||||||||||||||||||||||||||||
|
Reset HL and move to the next column, ready to print the next character.
|
|||||||||||||||||||||||||||||||||||||||
| 29826 | LD A,H | H=H - 8 (reset the display line). | |||||||||||||||||||||||||||||||||||||
| 29827 | SUB 8 | ||||||||||||||||||||||||||||||||||||||
| 29829 | LD H,A | ||||||||||||||||||||||||||||||||||||||
| 29830 | INC L | Increment screen column by one. | |||||||||||||||||||||||||||||||||||||
| 29831 | RET | Return. | |||||||||||||||||||||||||||||||||||||
|
View the equivalent code in;
|
|||||||||||||||||||||||||||||||||||||||
| Prev: 29752 | Up: Map | Next: 29832 |