Prev: ED8A Up: Map Next: EDEE
EDAF: Advance Input Pointer
Used by the routines at JumpTable and ScanInputSpaces.
Jump-table target JumpTable_AdvanceInputPointer: advance InputBuffer_TokenStart / InputBuffer_NextToken through InputBuffer. Skips a leading THE via Token_THE, then leaves ParserState_TokenDelimiter holding the delimiter that ended the token.
AdvanceInputPointer EDAF LD HL,($5BA7) Fetch the current token and compare it with end-of-line.
EDB2 LD A,(HL)
EDB3 CP $0D
EDB5 RET Z Return if the current token is already at end-of-line.
EDB6 LD HL,($5BA9) Promote InputBuffer_NextToken to InputBuffer_TokenStart and test for an empty token.
EDB9 LD ($5BA7),HL
EDBC LD A,(HL)
EDBD LD ($5BAB),A
EDC0 CP $0D
EDC2 RET Z Return if that token is empty.
AdvanceInputPointer_Scan EDC3 INC HL Jump to AdvanceInputPointer_Store at end-of-line or a quote.
EDC4 LD A,(HL)
EDC5 CP $0D
EDC7 JR Z,AdvanceInputPointer_Store
EDC9 CP $22 Jump to AdvanceInputPointer_Store on a quote.
EDCB JR Z,AdvanceInputPointer_Store
EDCD CP $20 Keep scanning until a space.
EDCF JR NZ,AdvanceInputPointer_Scan
AdvanceInputPointer_SkipSpaces EDD1 INC HL Skip any run of spaces.
EDD2 LD A,(HL)
EDD3 CP $20
EDD5 JR Z,AdvanceInputPointer_SkipSpaces
AdvanceInputPointer_Store EDD7 LD ($5BAC),A Store the delimiter and next-token pointer; require 03 matching characters for "THE".
EDDA LD ($5BA9),HL
EDDD LD A,$03
EDDF LD ($5BA4),A
EDE2 LD HL,($5BA7) Skip a leading "THE" via Token_THE.
EDE5 LD DE,$FBA4
EDE8 CALL CompareTokenToWord
EDEB JR NC,AdvanceInputPointer
EDED RET Return if "THE" was not skipped.
Prev: ED8A Up: Map Next: EDEE