Sherlock: annotated disassembly

Data

Prev: ED4B Up: Map Next: EDE9
EDDD: Sub-script: internal verb 139 (sub-script: do verb (direct object), then CHANCE (indirect object))
Entry points: EDDF = body of record EDDD.
Each sub-block is one instruction. Room and object numbers are as the game uses them (the reference pages list both).
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.
EDDD DEFB $87,$07 Action record header: flags $87; bit 7: checks only; byte 1 $07 - checks-only: the script follows
EDDF DEFB $41,$FD DO plan dobj [busy]
EDE1 DEFB $57,$98,$F1,$FC,$FF,$E1,$ED RUN F198 CHANCE: succeed if a random 1-99 is at most (dobj) (plan iobj, -) [busy; fail: wait here]
EDE8 DEFB $0B RETURN OK
Prev: ED4B Up: Map Next: EDE9