Prev: 49743 Up: Map Next: 49822
49775: Parser: Advance To Separator
Parser_AdvanceToSeparator 49775 EX DE,HL Hand the typed tokens to the phrase walk.
49776 JR Parser_AdvanceToSeparator_Next
Parser_AdvanceToSeparator_Loop 49778 INC DE Advance to the next byte.
Parser_AdvanceToSeparator_Next 49779 LD HL,47927 Compare against the typed tokens.
49782 JR Parser_AdvanceToSeparator_Compare
Parser_AdvanceToSeparator_Match 49784 INC HL Advance through both phrases while the characters still match.
49785 INC DE
Parser_AdvanceToSeparator_Compare 49786 LD A,(DE)
49787 CP (HL)
49788 JR Z,Parser_AdvanceToSeparator_Match
49790 CP 254 Jump to Parser_AdvanceToSeparator_Alt unless the end of a phrase matches.
49792 JR NZ,Parser_AdvanceToSeparator_Alt
49794 LD A,(HL) Fetch the next phrase byte and test for the end marker.
49795 CP 255
49797 RET Return.
Parser_AdvanceToSeparator_Alt 49798 CP 253 Jump to Parser_AdvanceToSeparator_SkipAlt unless the alternative in a phrase matches.
49800 JR NZ,Parser_AdvanceToSeparator_SkipAlt
49802 LD A,(HL) Jump back to Parser_AdvanceToSeparator_Loop if the end-of-list marker was not pressed.
49803 CP 255
49805 JR NZ,Parser_AdvanceToSeparator_Loop
49807 RET Return.
Parser_AdvanceToSeparator_SkipAlt 49808 INC DE Jump to Parser_AdvanceToSeparator_Done when the end of a phrase matches.
49809 LD A,(DE)
49810 CP 254
49812 JR Z,Parser_AdvanceToSeparator_Done
49814 CP 253 Jump back to Parser_AdvanceToSeparator_SkipAlt unless the alternative in a phrase matches.
49816 JR NZ,Parser_AdvanceToSeparator_SkipAlt
49818 JR Parser_AdvanceToSeparator_Loop Jump back to Parser_AdvanceToSeparator_Loop to try the phrase's other wording.
Parser_AdvanceToSeparator_Done 49820 OR A Clear the carry flag; the phrase matched.
49821 RET Return.
Prev: 49743 Up: Map Next: 49822