Prev: C24F Up: Map Next: C29E
C26F: Parser: Advance To Separator
Parser_AdvanceToSeparator C26F EX DE,HL Hand the typed tokens to the phrase walk.
C270 JR Parser_AdvanceToSeparator_Next
Parser_AdvanceToSeparator_Loop C272 INC DE Advance to the next byte.
Parser_AdvanceToSeparator_Next C273 LD HL,$BB37 Compare against the typed tokens.
C276 JR Parser_AdvanceToSeparator_Compare
Parser_AdvanceToSeparator_Match C278 INC HL Advance through both phrases while the characters still match.
C279 INC DE
Parser_AdvanceToSeparator_Compare C27A LD A,(DE)
C27B CP (HL)
C27C JR Z,Parser_AdvanceToSeparator_Match
C27E CP $FE Jump to Parser_AdvanceToSeparator_Alt unless the end of a phrase matches.
C280 JR NZ,Parser_AdvanceToSeparator_Alt
C282 LD A,(HL) Fetch the next phrase byte and test for the end marker.
C283 CP $FF
C285 RET Return.
Parser_AdvanceToSeparator_Alt C286 CP $FD Jump to Parser_AdvanceToSeparator_SkipAlt unless the alternative in a phrase matches.
C288 JR NZ,Parser_AdvanceToSeparator_SkipAlt
C28A LD A,(HL) Jump back to Parser_AdvanceToSeparator_Loop if the end-of-list marker was not pressed.
C28B CP $FF
C28D JR NZ,Parser_AdvanceToSeparator_Loop
C28F RET Return.
Parser_AdvanceToSeparator_SkipAlt C290 INC DE Jump to Parser_AdvanceToSeparator_Done when the end of a phrase matches.
C291 LD A,(DE)
C292 CP $FE
C294 JR Z,Parser_AdvanceToSeparator_Done
C296 CP $FD Jump back to Parser_AdvanceToSeparator_SkipAlt unless the alternative in a phrase matches.
C298 JR NZ,Parser_AdvanceToSeparator_SkipAlt
C29A JR Parser_AdvanceToSeparator_Loop Jump back to Parser_AdvanceToSeparator_Loop to try the phrase's other wording.
Parser_AdvanceToSeparator_Done C29C OR A Clear the carry flag; the phrase matched.
C29D RET Return.
Prev: C24F Up: Map Next: C29E