![]() |
Routines |
| Prev: 25574 | Up: Map | Next: 25731 |
|
Puts A on the screen. 12 rubs out the previous character. 13 moves to the next row, pausing and scrolling when the text hits the bottom of the window.
|
||||
|
DELETE is printed as a space and then another DELETE, so the cursor steps back.
|
||||
| PlotCharacter | 25596 | CP 12 | DELETE prints a space and then rubs it out. | |
| 25598 | JR NZ,PlotCharacter_Byte | |||
| 25600 | CALL PlotCharacter_Byte | Plot the space, then pass DELETE on. | ||
| 25603 | LD A,32 | |||
| 25605 | CALL PlotCharacter_Byte | |||
| 25608 | LD A,12 | DELETE is the character that falls through. | ||
| PlotCharacter_Byte | 25610 | PUSH HL | Save the screen address and the character. | |
| 25611 | PUSH BC | |||
| 25612 | PUSH DE | |||
| 25613 | PUSH AF | |||
| 25614 | CP 13 | ENTER starts a new row. | ||
| 25616 | JP Z,PlotCharacter_Newline | |||
| 25619 | CP 12 | Anything except DELETE is a glyph. | ||
| 25621 | JR NZ,PlotGlyph | |||
| 25623 | LD A,(23434) | Column 0 wraps to the previous row. | ||
| 25626 | OR A | |||
| 25627 | JR NZ,PlotCharacter_Back | |||
| 25629 | LD A,41 | Column 41 of the row above. | ||
| 25631 | LD (23434),A | |||
| 25634 | LD A,(23433) | The previous row, then the pixel address moves back. | ||
| 25637 | DEC A | |||
| 25638 | LD (23433),A | |||
| 25641 | JR PlotCharacter_Pixel | |||
| PlotCharacter_Back | 25643 | DEC A | Step one column left. | |
| 25644 | LD (23434),A | |||
| 25647 | AND 3 | A column whose low bits are 2 does not move the pixel address. | ||
| 25649 | CP 2 | |||
| 25651 | JP Z,PlotGlyph_Done | |||
| PlotCharacter_Pixel | 25654 | LD HL,(23431) | Otherwise the pixel address moves back one byte. | |
| 25657 | DEC HL | |||
| 25658 | LD (23431),HL | |||
| 25661 | JP PlotGlyph_Done | |||
|
This entry point is used by the routine at PlotGlyph.
ENTER on row 19 while a description is on screen waits for a key. Below the window, the text scrolls.
|
||||
| PlotCharacter_Newline | 25664 | LD A,(23433) | Row 19 is the pause row while a description is on screen. | |
| 25667 | CP 19 | |||
| 25669 | JR NZ,PlotCharacter_Low | |||
| 25671 | LD A,(24966) | The pause only happens when PauseFlag is set. | ||
| 25674 | OR A | |||
| 25675 | JR Z,PlotCharacter_Low | |||
| 25677 | LD A,13 | The pause row's bottom is 13. | ||
| 25679 | LD (23447),A | |||
| 25682 | CALL WaitKeyDown | Wait for a key and scroll. | ||
| 25685 | CALL ScrollWindow | |||
| 25688 | LD A,19 | Stay on row 19. | ||
| 25690 | JR PlotCharacter_Stay | |||
| PlotCharacter_Low | 25692 | CP 23 | A row below 23 simply advances. | |
| 25694 | JR C,PlotCharacter_Down | |||
| 25696 | CALL ScrollWindow | Row 23 scrolls and stays put. | ||
| 25699 | LD A,23 | |||
| PlotCharacter_Stay | 25701 | LD (23433),A | Home the cursor on that row. | |
| 25704 | CALL HomeRow | |||
| 25707 | XOR A | |||
| 25708 | LD (23434),A | |||
| 25711 | JP PlotGlyph_Done | Return to the plotter. | ||
| PlotCharacter_Down | 25714 | LD A,(23433) | Advance one row. | |
| 25717 | INC A | |||
| 25718 | LD (23433),A | |||
| 25721 | CALL HomeRow | Home the cursor on it. | ||
| 25724 | XOR A | |||
| 25725 | LD (23434),A | |||
| 25728 | JP PlotGlyph_Done | Return to the plotter. | ||
| Prev: 25574 | Up: Map | Next: 25731 |