Sherlock: annotated disassembly

Data

Prev: EDE9 Up: Map Next: EE1F
EDF8: Plan script: cook (actor 9)
Entry point: EDF8 = cook (actor 9).
Each sub-block is one instruction. Split off from the block before, which it merely follows in memory.
In an instruction, 'plan dobj' and 'plan iobj' are not fixed objects: they mean the direct and indirect object currently held in the actor's plan registers (bytes +4 and +5 of its actor record), so the same step works on whatever the actor is dealing with - for the player, the objects of the command just typed. 'plan verb' is the verb register (+3), 'self' is the acting character, and '-' means none.
EDF8 DEFB $59,$04,$F8,$ED AWAIT 4 chief constable straker [busy; fail: wait here]
EDFC DEFB $57,$98,$F1,$32,$FF,$FC,$ED RUN F198 CHANCE: succeed if a random 1-99 is at most (dobj) (50, -) [busy; fail: wait here]
EE03 DEFB $57,$98,$F1,$32,$FF,$16,$EE RUN F198 CHANCE: succeed if a random 1-99 is at most (dobj) (50, -) [busy; fail EE16]
EE0A DEFB $02,$8A,$32,$50 DO 138 DOOR THEN CHANCE: 50 plain door, 80
EE0E DEFB $07,$28,$ED,$32,$FF RUN ED28 (50 plain door, -)
EE13 DEFB $0E,$FC,$ED GOTO EDFC
EE16 DEFB $02,$8B,$04,$3C DO 139 DO THEN CHANCE: verb 4 WEST, 60
EE1A DEFB $41,$03 DO 3 EAST [busy]
EE1C DEFB $0E,$FC,$ED GOTO EDFC
Prev: EDE9 Up: Map Next: EE1F