| The Hobbit (v1.0) | Routines |
| Prev: 9392 | Up: Map | Next: 93ED |
|
The target must be closed and not already locked (A129). The instrument must not be broken (bit 3 of its flags) or 'the key is broken'. Then bit 0 (locked) of the target's flags is set.
|
||||
| 93CD | CALL $A129 | Is the target already locked, or not even closed? | ||
| 93D0 | JP NZ,$A09C | If either, say why it cannot be locked | ||
| 93D3 | LD A,$C6 | A = $C6, the machine-code for a SET instruction | ||
|
This entry point is used by the routine at 93ED.
|
||||
| 93D5 | LD ($93EB),A | Poke that into the instruction at $93EB below, so that from now on it locks rather than unlocks - this and 93ED share their final steps by rewriting each other | ||
| 93D8 | LD IY,($B5FA) | IY = the instrument's (the key's) own record | ||
| 93DC | BIT 3,(IY+$07) | Is the key broken? | ||
| 93E0 | LD A,$83 | A = the state code for BROKEN | ||
| 93E2 | JP NZ,$A094 | If it is broken, say so and stop | ||
| 93E5 | CALL $9C99 | Dry run? Then stop here: it would work | ||
| 93E8 | SET 0,(IX+$07) | Lock the target (this very byte is what 93ED rewrites to RES, to unlock instead) | ||
| 93EC | RET | |||
| Prev: 9392 | Up: Map | Next: 93ED |