Prev: 77D1 Up: Map Next: 781C
7809: Inglish: Patch The Matcher Word
Used by the routine at InglishStepOverAGroup.
Patches the matcher word at 7581 with the saved bytes. When those bytes do not match, the player is asked "what?".
Inglish_PatchTheMatcherWord 7809 LD HL,$7581 Point HL at the patched matcher word at 7581.
This entry point is used by the routine at Inglish_CountAnotherGrammarTry.
Inglish_PatchTheMatcherWord_Loop 780C LD A,(HL) Jump to Inglish_PatchTheMatcherWord_StoreTheSavedBytes if this grammar pair is empty.
780D INC HL
780E OR (HL)
780F JR Z,Inglish_PatchTheMatcherWord_StoreTheSavedBytes
7811 INC HL Jump to Inglish_AskWhat unless the next grammar pair is empty.
7812 LD A,(HL)
7813 INC HL
7814 OR (HL)
7815 JP NZ,Inglish_AskWhat
Inglish_PatchTheMatcherWord_StoreTheSavedBytes 7818 LD (HL),B Store the saved byte in the patched matcher word.
7819 DEC HL Step back one byte through the patched matcher word.
781A LD (HL),C Store the saved byte in the patched matcher word.
781B RET Return.
View the equivalent code in;
Prev: 77D1 Up: Map Next: 781C