![]() |
Routines |
| Prev: 7ACC | Up: Map | Next: 7AED |
|
Used by the routines at MATCH_AND_TRY and TARGET_TROUBLE.
Only for a pattern with a second object -- an instrument, bit 2 of FLAGS_FIRST_WORDS, "second object" on the actions page -- and not once INSTRUMENT_STATE says one has been settled (bit 0). Returns NZ while one is still wanted: when bit 1 of the pattern flags is clear. MATCH_AND_TRY calls it as "wants an instrument? try each with it". (Renamed 2026-09-27 from WANTS_TARGET, reported by the how-it-works agent and checked against the pattern flags.)
|
||||
| WANTS_INSTRUMENT | 7AD8 | LD A,(FLAGS_FIRST_WORDS) | ||
| 7ADB | BIT 2,A | |||
| 7ADD | RET Z | |||
| 7ADE | LD HL,INSTRUMENT_STATE | |||
| 7AE1 | BIT 0,(HL) | |||
| 7AE3 | RET NZ | |||
| 7AE4 | BIT 1,A | |||
| 7AE6 | JR NZ,WANTS_INSTRUMENT_0 | |||
| 7AE8 | OR $01 | |||
| 7AEA | RET | |||
| WANTS_INSTRUMENT_0 | 7AEB | XOR A | ||
| 7AEC | RET | |||
| Prev: 7ACC | Up: Map | Next: 7AED |