![]() |
Routines |
| Prev: 7C23 | Up: Map | Next: 7CAC |
|
Used by the routine at ASSIGN_PHRASES.
Six bytes from the frame offset in C -- 8 for the first noun phrase's noun, 18 for the second's -- into a slot, and sets bit 0 of the flag byte in HL if anything was there. The code before it chooses which phrase goes to TARGET_NAME and which to INSTRUMENT_NAME, by whether the second phrase's prepositions are the ones the command expects: ATTACK THE TROLL WITH THE SWORD makes the troll the target and the sword the instrument.
|
||||
| COPY_PHRASE | 7C91 | PUSH BC | ||
| 7C92 | LD C,A | HL = the phrase in the frame, at offset A | ||
| 7C93 | LD B,$00 | |||
| 7C95 | PUSH HL | |||
| 7C96 | PUSH IY | |||
| 7C98 | POP HL | |||
| 7C99 | ADD HL,BC | |||
| 7C9A | LD BC,$0006 | Copy its noun and two adjectives to DE | ||
| 7C9D | LDIR | |||
| 7C9F | XOR A | Walk back over the six bytes just copied: were any of them set? | ||
| 7CA0 | LD B,$06 | |||
| COPY_PHRASE_0 | 7CA2 | DEC HL | ||
| 7CA3 | OR (HL) | |||
| 7CA4 | DJNZ COPY_PHRASE_0 | |||
| 7CA6 | POP HL | |||
| 7CA7 | POP BC | |||
| 7CA8 | RET Z | No: nothing was named here | ||
| 7CA9 | SET 0,(HL) | Yes: set bit 0 of the flag byte | ||
| 7CAB | RET | |||
| Prev: 7C23 | Up: Map | Next: 7CAC |