Prev: 7CC9 Up: Map Next: 7CFC
7CCB: Inglish: Find The First Noun
Used by the routine at Inglish_ResolveTheFirstNoun.
Finds the first noun. When the noun-print flag at B6FE is 01 it uses the place-by-exit test at ExitsFindTheExitToANamedPlace; otherwise it uses the object test at ConditionSamePlaceAsThePlayer, which looks in the same place as the player. The record found is kept in the saved object pointer at 794E.
Inglish_FindTheFirstNoun 7CCB PUSH IY Use the saved object pointer as the record being walked.
7CCD LD IX,($794E)
7CD1 LD A,($B6FE) Read *B6FE.
7CD4 DEC A Jump to Inglish_FindTheFirstNoun_PointAtTheNounTest if the noun-print flag is 01.
7CD5 JR Z,Inglish_FindTheFirstNoun_PointAtTheNounTest
7CD7 LD IY,$9DD9 Point IY at ConditionSamePlaceAsThePlayer to use as the noun test.
7CDB LD A,($B71E) Read *B71E.
7CDE RRCA Keep the low two bits of the clause marker.
7CDF RRCA
7CE0 AND $03
7CE2 LD ($B710),A Update *B710.
7CE5 CALL Inglish_RunTheFirstNounTest Call Inglish_RunTheFirstNounTest to run the first noun test.
7CE8 CP $FF Compare the result of the noun test with FF.
Inglish_FindTheFirstNoun_SaveTheObjectRecord 7CEA LD ($794E),IX Remember this record in the saved object pointer.
7CEE POP IY Restore IY from the stack.
7CF0 RET Return.
Inglish_FindTheFirstNoun_PointAtTheNounTest 7CF1 LD IY,$9EA0 Point IY at ExitsFindTheExitToANamedPlace to use as the noun test.
7CF5 CALL Inglish_RunTheFirstNounTest Call Inglish_RunTheFirstNounTest to run the first noun test.
7CF8 CP $FF Compare the clause marker with FF.
7CFA JR Inglish_FindTheFirstNoun_SaveTheObjectRecord Jump back to Inglish_FindTheFirstNoun_SaveTheObjectRecord to save this object record.
View the equivalent code in;
Prev: 7CC9 Up: Map Next: 7CFC