Prev: C1FB Up: Map Next: C240
C1FC: Process Character Input
Used by the routine at CheckTVFlagAndProcess.
Input
A Character code
ProcessCharacterInput C1FC POP AF Restore AF from the stack.
This entry point is used by the routines at PrintStringAndWaitForKeypress and PrintString.
ProcessCharacterInput_0 C1FD PUSH HL Stash HL, BC and AF on the stack.
C1FE PUSH BC
C1FF PUSH AF
C200 LD A,($C1FB) C=*C1FB.
C203 LD C,A
C204 POP AF Restore AF from the stack.
C205 PUSH AF Stash AF on the stack.
C206 LD HL,($C1F6) HL=*DecorativeLine_ScreenPosition.
C209 CP $0D Jump to ProcessCharacterInput_2 if A is not equal to 0D.
C20B JR NZ,ProcessCharacterInput_2
C20D LD A,$20 A=20.
This entry point is used by the routine at E6BC.
ProcessCharacterInput_1 C20F CALL PrintCharacter Call PrintCharacter.
C212 JR ProcessCharacterInput_3 Jump to ProcessCharacterInput_3.
ProcessCharacterInput_2 C214 CP $08 Jump to HandleBackspaceKey if A is equal to 08.
C216 JR Z,HandleBackspaceKey
C218 CALL ValidateKeypress Call ValidateKeypress.
C21B CALL PrintCharacter Call PrintCharacter.
C21E LD A,($C1F4) A=*DecorativeLine_Width.
C221 DEC A Decrease A by one.
C222 JR NZ,ProcessCharacterInput_4 Jump to ProcessCharacterInput_4 if A is not equal to 08.
ProcessCharacterInput_3 C224 LD L,$E0 L=E0.
C226 LD C,$02 C=02.
C228 CALL ScrollScreenUp Call ScrollScreenUp.
C22B LD A,$24 A=24.
This entry point is used by the routine at HandleBackspaceKey.
ProcessCharacterInput_4 C22D LD ($C1F4),A Write A to *DecorativeLine_Width.
C230 LD A,C Write C to *C1FB.
C231 LD ($C1FB),A
C234 LD ($C1F6),HL Write HL to *DecorativeLine_ScreenPosition.
C237 LD A,$2B Load A with ASCII code 2B ("+").
C239 CALL PrintCharacter Call PrintCharacter.
C23C POP AF Restore AF, BC and HL from the stack.
C23D POP BC
C23E POP HL
C23F RET Return.
Prev: C1FB Up: Map Next: C240