Prev: 7B9E Up: Map Next: 7C91
7C23: Decide which noun phrase is the target and which the instrument
Used by the routine at MATCH_PATTERN.
The pattern's preposition is compared with the frame's two phrases' prepositions, and with bit 5 of the pattern's flags decides which of the two phrases -- at +4 or +14 in the frame -- is the target: it goes by where the preposition the pattern wants is found, not simply by which phrase came first. The phrases go to TARGET_NAME and INSTRUMENT_NAME, and the target's name is also kept at IT_NAME for IT.
ASSIGN_PHRASES 7C23 AND A
7C24 JR Z,ASSIGN_PHRASES_0
7C26 LD HL,(PROBE_WORD1)
7C29 LD DE,(PROBE_WORD2)
7C2D LD (PROBE_WORD1),DE
7C31 LD (PROBE_WORD2),HL
ASSIGN_PHRASES_0 7C34 CALL PATTERN_FLAGS
7C37 LD HL,PROBE_WORD1
7C3A LD A,(HL)
7C3B INC HL
7C3C OR (HL)
7C3D JR NZ,ASSIGN_PHRASES_1
7C3F LD A,(FLAGS_LAST_WORDS)
7C42 JR ASSIGN_PHRASES_4
ASSIGN_PHRASES_1 7C44 DEC HL
7C45 LD A,(HL)
7C46 CP (IY+$0E)
7C49 JR NZ,ASSIGN_PHRASES_2
7C4B INC HL
7C4C LD A,(HL)
7C4D CP (IY+$0F)
7C50 JR Z,ASSIGN_PHRASES_3
7C52 DEC HL
ASSIGN_PHRASES_2 7C53 LD A,(HL)
7C54 CP (IY+$10)
7C57 JR NZ,ASSIGN_PHRASES_3
7C59 INC HL
7C5A LD A,(HL)
7C5B CP (IY+$11)
ASSIGN_PHRASES_3 7C5E LD A,(FLAGS_FIRST_WORDS)
7C61 JR NZ,ASSIGN_PHRASES_5
ASSIGN_PHRASES_4 7C63 XOR $20
ASSIGN_PHRASES_5 7C65 BIT 5,A
7C67 LD BC,$1208
7C6A JR Z,ASSIGN_PHRASES_6
7C6C LD BC,$0812
ASSIGN_PHRASES_6 7C6F LD HL,TARGET_PHRASE_AT
7C72 LD (HL),B
7C73 INC HL
7C74 LD (HL),C
7C75 LD A,B
7C76 LD DE,TARGET_NAME
7C79 LD HL,PHRASES
7C7C CALL COPY_PHRASE
7C7F LD A,C
7C80 LD HL,TARGET_NAME
7C83 LD DE,IT_NAME
7C86 LD BC,$0006
7C89 LDIR
7C8B LD DE,INSTRUMENT_NAME
7C8E LD HL,INSTRUMENT_STATE
Prev: 7B9E Up: Map Next: 7C91