![]() |
Routines |
| Prev: 6319 | Up: Map | Next: 63D4 |
|
Plots A. A space that would sit on top of another space is rubbed out first. ENTER pads the row out to the margin.
|
||||
| PrintCharacter | 6394 | CP $20 | Jump to PrintCharacter_Other if this is not a space. | |
| 6396 | JR NZ,PrintCharacter_Other | |||
| 6398 | PUSH AF | Stash the space on the stack. | ||
| 6399 | JR PrintCharacter_Rub | Jump to PrintCharacter_Rub. | ||
|
Any other character, or a space that is not doubled.
|
||||
| PrintCharacter_Other | 639B | PUSH AF | Stash the character on the stack. | |
| 639C | LD A,($5B8A) | Jump to PrintCharacter_Keep if *PrintColumn is not 01. | ||
| 639F | CP $01 | |||
| 63A1 | JR NZ,PrintCharacter_Keep | |||
|
Rub out a previous space.
|
||||
| PrintCharacter_Rub | 63A3 | LD A,($5B9C) | Jump to PrintCharacter_Keep if *PreviousGlyph is not a space. | |
| 63A6 | CP $20 | |||
| 63A8 | JR NZ,PrintCharacter_Keep | |||
| 63AA | LD A,$0C | Rub it out. | ||
| 63AC | CALL PlotCharacter | |||
|
Plot this character.
|
||||
| PrintCharacter_Keep | 63AF | POP AF | Write it to *PreviousGlyph. | |
| 63B0 | LD ($5B9C),A | |||
| 63B3 | PUSH AF | Stash the registers around the plot. | ||
| 63B4 | PUSH HL | |||
| 63B5 | PUSH BC | |||
| 63B6 | PUSH DE | |||
| 63B7 | CP $0D | Jump to PrintCharacter_Plot if this is not ENTER. | ||
| 63B9 | JR NZ,PrintCharacter_Plot | |||
| 63BB | LD A,($5B8A) | Copy *PrintColumn into B. | ||
| 63BE | LD B,A | |||
|
Pad the row to the margin.
|
||||
| PrintCharacter_Pad | 63BF | INC B | One more column. | |
| 63C0 | LD A,$2B | Stop at column 2A. | ||
| 63C2 | CP B | |||
| 63C3 | JR Z,PrintCharacter_Done | |||
| 63C5 | LD A,$20 | Print a pad space. | ||
| 63C7 | CALL PlotCharacter | |||
| 63CA | JR PrintCharacter_Pad | Jump to PrintCharacter_Pad. | ||
|
Plot any other character.
|
||||
| PrintCharacter_Plot | 63CC | CALL PlotCharacter | Call PlotCharacter. | |
|
Restore the registers.
|
||||
| PrintCharacter_Done | 63CF | POP DE | Restore the registers from the stack. | |
| 63D0 | POP BC | |||
| 63D1 | POP HL | |||
| 63D2 | POP AF | |||
| 63D3 | RET | Return. | ||
| Prev: 6319 | Up: Map | Next: 63D4 |