![]() |
Routines |
| Prev: 7CCB | Up: Map | Next: 7D17 |
|
Used by the routine at NEXT_TARGET.
Finds the next object matching TARGET_NAME, makes it the target in TARGET, and tries the command on it; if that did not take, it goes round again for the next. So PICK UP THE KEY where there are several keys tries them in turn.
|
||||
| TRY_TARGETS | 7CFC | LD HL,TARGET_NAME | Next object fitting the target's name; none left, and the command fails | |
| 7CFF | CALL CALL_IY | |||
| 7D02 | CP $FF | |||
| 7D04 | RET Z | |||
| 7D05 | LD (TARGET),A | It is the target | ||
| 7D08 | LD HL,PHRASES | Note that a target was found | ||
| 7D0B | SET 1,(HL) | |||
| 7D0D | CALL HANDLED | Try the command on it | ||
| 7D10 | LD A,(SUCCEEDED) | It did not take: try the next object that fits | ||
| 7D13 | AND A | |||
| 7D14 | JR Z,TRY_TARGETS | |||
| 7D16 | RET | |||
| Prev: 7CCB | Up: Map | Next: 7D17 |