![]() |
Routines |
| Prev: 63E6 | Up: Map | Next: 6483 |
|
Puts A on the screen. 0C rubs out the previous character. 0D 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 | 63FC | CP $0C | Jump to PlotCharacter_Byte if this is not DELETE. | |
| 63FE | JR NZ,PlotCharacter_Byte | |||
| 6400 | CALL PlotCharacter_Byte | Call PlotCharacter_Byte. | ||
| 6403 | LD A,$20 | Plot a space. | ||
| 6405 | CALL PlotCharacter_Byte | |||
| 6408 | LD A,$0C | DELETE is the character that falls through. | ||
|
Plot this byte, or handle ENTER and DELETE.
|
||||
| PlotCharacter_Byte | 640A | PUSH HL | Save the screen address and the character. | |
| 640B | PUSH BC | |||
| 640C | PUSH DE | |||
| 640D | PUSH AF | |||
| 640E | CP $0D | ENTER starts a new row. | ||
| 6410 | JP Z,PlotCharacter_Newline | |||
| 6413 | CP $0C | Anything except DELETE is a glyph. | ||
| 6415 | JR NZ,PlotGlyph | |||
| 6417 | LD A,($5B8A) | Jump to PlotCharacter_Back if *PrintColumn is not zero. | ||
| 641A | OR A | |||
| 641B | JR NZ,PlotCharacter_Back | |||
| 641D | LD A,$29 | Write 29 to *PrintColumn. | ||
| 641F | LD ($5B8A),A | |||
| 6422 | LD A,($5B89) | Decrement *PrintRow. | ||
| 6425 | DEC A | |||
| 6426 | LD ($5B89),A | |||
| 6429 | JR PlotCharacter_Pixel | Jump to PlotCharacter_Pixel. | ||
|
Step one column left.
|
||||
| PlotCharacter_Back | 642B | DEC A | Decrement *PrintColumn. | |
| 642C | LD ($5B8A),A | |||
| 642F | AND %00000011 | Keep only bits 0-1. | ||
| 6431 | CP $02 | Jump to PlotGlyph_Done if the column is 02. | ||
| 6433 | JP Z,PlotGlyph_Done | |||
|
Move the pixel address back one byte.
|
||||
| PlotCharacter_Pixel | 6436 | LD HL,($5B87) | Decrement *PrintAddress. | |
| 6439 | DEC HL | |||
| 643A | LD ($5B87),HL | |||
| 643D | JP PlotGlyph_Done | Jump to PlotGlyph_Done. | ||
|
This entry point is used by the routine at PlotGlyph.
ENTER on row 13 while a description is on screen waits for a key. Below the window, the text scrolls.
|
||||
| PlotCharacter_Newline | 6440 | LD A,($5B89) | Jump to PlotCharacter_Low if *PrintRow is not 13. | |
| 6443 | CP $13 | |||
| 6445 | JR NZ,PlotCharacter_Low | |||
| 6447 | LD A,($6186) | The pause only happens when PauseFlag is set. | ||
| 644A | OR A | |||
| 644B | JR Z,PlotCharacter_Low | |||
| 644D | LD A,$0D | The pause row's bottom is 0D. | ||
| 644F | LD ($5B97),A | |||
| 6452 | CALL WaitKeyDown | Call WaitKeyDown. | ||
| 6455 | CALL ScrollWindow | Call ScrollWindow. | ||
| 6458 | LD A,$13 | Stay on row 13. | ||
| 645A | JR PlotCharacter_Stay | |||
|
Rows below the pause line.
|
||||
| PlotCharacter_Low | 645C | CP $17 | A row below 17 simply advances. | |
| 645E | JR C,PlotCharacter_Down | |||
| 6460 | CALL ScrollWindow | Call ScrollWindow. | ||
| 6463 | LD A,$17 | Stay on row 17. | ||
|
Stay on this row.
|
||||
| PlotCharacter_Stay | 6465 | LD ($5B89),A | Write the row to PrintRow. | |
| 6468 | CALL HomeRow | Call HomeRow. | ||
| 646B | XOR A | Write 00 to PrintColumn. | ||
| 646C | LD ($5B8A),A | |||
| 646F | JP PlotGlyph_Done | Jump to PlotGlyph_Done. | ||
|
Advance one row.
|
||||
| PlotCharacter_Down | 6472 | LD A,($5B89) | Increment *PrintRow. | |
| 6475 | INC A | |||
| 6476 | LD ($5B89),A | |||
| 6479 | CALL HomeRow | Call HomeRow. | ||
| 647C | XOR A | Write 00 to PrintColumn. | ||
| 647D | LD ($5B8A),A | |||
| 6480 | JP PlotGlyph_Done | Jump to PlotGlyph_Done. | ||
| Prev: 63E6 | Up: Map | Next: 6483 |