Prev: F0D3 Up: Map Next: F140
F0E6: Submit Input Line
Used by the routine at InputLine.
Reached from InputLine_Enter when ENTER is pressed. Token walks and vocabulary lookup are separate jump-table entries (AdvanceInputPointer, SearchVocabulary_Commands and neighbours).
SubmitInputLine F0E6 LD A,$20 Write a space to *PrintState_Character.
F0E8 LD ($5BF9),A
F0EB LD B,$40 B=40.
F0ED SUB A Write 00 to *PrintState_Flags, *PrintState and *PrintState_Column.
F0EE LD ($5BF6),A
F0F1 LD ($5BF5),A
F0F4 LD ($5BF7),A
F0F7 LD A,$16 Write 16 to *PrintState_Row.
F0F9 LD ($5BF8),A
Clear the input rows.
SubmitInputLine_ClearLoop F0FC CALL PrintCharacter Call PrintCharacter until the count is done.
F0FF DJNZ SubmitInputLine_ClearLoop
F101 SUB A Write 00 to *PrintState_Column.
F102 LD ($5BF7),A
F105 CALL ScrollAdjust Call ScrollAdjust.
Print a ">" prompt on the lower screen.
F108 LD A,($5C89) Write the prompt row to *PrintState_Row.
F10B LD B,A
F10C LD A,$18
F10E SUB B
F10F LD ($5BF8),A
F112 LD A,$07 Write 07 to *PrintState.
F114 LD ($5BF5),A
F117 LD A,$3E Write > to *PrintState_Character.
F119 LD ($5BF9),A
F11C CALL PrintCharacter Call PrintCharacter.
Echo the submitted line.
F11F LD A,$05 Write 05 to *PrintState.
F121 LD ($5BF5),A
F124 LD HL,$5BAE Point HL at InputBuffer.
SubmitInputLine_Echo F127 LD A,(HL) Fetch the next character.
F128 CP $0D Jump to SubmitInputLine_ScrollBack if it is ENTER.
F12A JR Z,SubmitInputLine_ScrollBack
F12C INC HL Write this character to *PrintState_Character.
F12D LD ($5BF9),A
F130 CALL PrintCharacter Call PrintCharacter.
F133 JR SubmitInputLine_Echo Jump to SubmitInputLine_Echo.
Scroll the lower screen back two rows.
SubmitInputLine_ScrollBack F135 LD A,($5C89) Subtract 02 from the line byte of S_POSN.
F138 SUB $02
F13A LD ($5C89),A
F13D JP ScrollAdjust Jump to ScrollAdjust.
Prev: F0D3 Up: Map Next: F140