![]() ![]() |
Routines |
Prev: 29597 | Up: Map | Next: 29677 |
|
|||||||||||||||||||||||||||||||||||||||
PrintScreen | 29645 | PUSH BC | Stash BC, DE and HL on the stack. | ||||||||||||||||||||||||||||||||||||
29646 | PUSH DE | ||||||||||||||||||||||||||||||||||||||
29647 | PUSH HL | ||||||||||||||||||||||||||||||||||||||
29648 | LD L,A | Create an offset in HL. | |||||||||||||||||||||||||||||||||||||
29649 | LD H,0 | ||||||||||||||||||||||||||||||||||||||
29651 | ADD HL,HL | HL=HL * 8. | |||||||||||||||||||||||||||||||||||||
29652 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
29653 | ADD HL,HL | ||||||||||||||||||||||||||||||||||||||
29654 | LD DE,(23606) | DE=CHARS. | |||||||||||||||||||||||||||||||||||||
29658 | ADD HL,DE | DE=HL + 15360. For examples of usage;
|
|||||||||||||||||||||||||||||||||||||
29659 | EX DE,HL | ||||||||||||||||||||||||||||||||||||||
Print the character to the screen.
|
|||||||||||||||||||||||||||||||||||||||
29660 | POP HL | Restore HL, containing the screen buffer location, from the stack. | |||||||||||||||||||||||||||||||||||||
This entry point is used by the routine at DisplayPlayerLives.
|
|||||||||||||||||||||||||||||||||||||||
PrintScreen_0 | 29661 | LD B,8 | B=8 (8 rows of pixels). | ||||||||||||||||||||||||||||||||||||
PrintScreen_Loop | 29663 | LD A,(DE) | Copy a byte from the font data to the screen buffer. | ||||||||||||||||||||||||||||||||||||
29664 | LD (HL),A | ||||||||||||||||||||||||||||||||||||||
29665 | INC DE | Increment the font data by one. | |||||||||||||||||||||||||||||||||||||
29666 | INC H | Move onto the next pixel line. | |||||||||||||||||||||||||||||||||||||
29667 | DJNZ PrintScreen_Loop | Decrease counter by one and loop back to PrintScreen_Loop until counter is zero. | |||||||||||||||||||||||||||||||||||||
29669 | POP DE | Restore DE and BC from the stack. | |||||||||||||||||||||||||||||||||||||
29670 | POP BC | ||||||||||||||||||||||||||||||||||||||
Reset HL and move to the next column, ready to print the next character.
|
|||||||||||||||||||||||||||||||||||||||
29671 | LD A,H | H=H - 8 (reset the display line). | |||||||||||||||||||||||||||||||||||||
29672 | SUB 8 | ||||||||||||||||||||||||||||||||||||||
29674 | LD H,A | ||||||||||||||||||||||||||||||||||||||
29675 | INC L | Increment screen column by one. | |||||||||||||||||||||||||||||||||||||
29676 | RET | Return. | |||||||||||||||||||||||||||||||||||||
View the equivalent code in;
|
Prev: 29597 | Up: Map | Next: 29677 |