Prev: EB51 Up: Map Next: ED1C
ECC0: Input Line Redraw
Used by the routine at InputLine.
Redraws the input row, then the cursor at InputLine_DrawCursor.
InputLine_Redraw ECC0 LD HL,$5BAE Point HL at InputBuffer.
ECC3 SUB A Write 00 to *PrintState_Flags and *PrintState_Column.
ECC4 LD ($5BF6),A
ECC7 LD ($5BF7),A
ECCA LD A,$05 Write 05 to *PrintState.
ECCC LD ($5BF5),A
ECCF LD A,$16 Write 16 to *PrintState_Row.
ECD1 LD ($5BF8),A
ECD4 LD A,($5BFB) Jump to InputLine_Redraw_Pad if the line is empty.
ECD7 AND A
ECD8 JR Z,InputLine_Redraw_Pad
ECDA LD B,A B=the line length.
Print each buffered character.
InputLine_Redraw_Loop ECDB LD A,(HL) Call PrintCharacter for the next character.
ECDC LD ($5BF9),A
ECDF CALL PrintCharacter
ECE2 INC HL
ECE3 DJNZ InputLine_Redraw_Loop
Pad the rest of the row with spaces.
InputLine_Redraw_Pad ECE5 LD A,$20 Write a space to *PrintState_Character.
ECE7 LD ($5BF9),A
ECEA CALL PrintCharacter Call PrintCharacter.
ECED CALL PrintCharacter Call PrintCharacter.
This entry point is used by the routine at InputLine.
Draw the blinking cursor.
InputLine_DrawCursor ECF0 LD A,$28 Write 28 to *PrintState.
ECF2 LD ($5BF5),A
This entry point is used by the routine at InputLine_ClearCursor.
Set XOR mode and load a space glyph.
InputLine_DrawCursor_Body ECF5 LD A,$01 Set XOR mode in *PrintState_Flags.
ECF7 LD ($5BF6),A
ECFA LD A,$20 Write a space to *PrintState_Character.
ECFC LD ($5BF9),A
ECFF LD A,$16 Write 16 to *PrintState_Row.
ED01 LD ($5BF8),A
ED04 LD A,($5BFA) Copy *InputLineState to *PrintState_Column.
ED07 LD ($5BF7),A
ED0A CP $20 Jump to InputLine_DrawCursor_Print if the column is still on this row.
ED0C JR C,InputLine_DrawCursor_Print
ED0E SUB $20 Wrap onto row 17.
ED10 LD ($5BF7),A
ED13 LD A,$17
ED15 LD ($5BF8),A
Print the cursor glyph.
InputLine_DrawCursor_Print ED18 CALL PrintCharacter Call PrintCharacter.
ED1B RET Return.
Prev: EB51 Up: Map Next: ED1C