Sherlock: annotated disassembly

Routines

Prev: E57A Up: Map Next: E5A8
E588: Script helper: cancel the actor's countdown
Unlinks the actor's countdown node from 9FE5 and frees it; the pre-check refuses when there is none. E58C is the shared tail also used by E57A.
Used by: RUN at E467; RUN at E7B2; RUN at E7B6; RUN at EF96; RUN at F2D0; RUN at F2FC; RUN at F32E; RUN at F359; RUN at F366; RUN at F3A2.
Input
IX The actor's countdown node
Output
F NZ; the node unlinked and freed
E588 DEFB $40,$00,$73,$E5 Action record header: flags $40; bit 6: pre-check at E573; byte 1 $00
This entry point is used by the routine at E57A.
E58C PUSH IX Save IX on the stack - DE = the node
E58E POP DE Restore DE from the stack
E58F LD IY,$9FE5 Point IY at countdowns (9FE5) - Find the node before it
E593 CALL $A104 Call the routine "Find the node before node DE in the list at IY" (A104)
E596 LD L,(IX-$02) Read byte -2 of the record at IX into L - Unlink it
E599 LD H,(IX-$01) Read byte -1 of the record at IX into H
E59C LD (IY-$02),L Store L in byte -2 of the record at IY
E59F LD (IY-$01),H Store H in byte -1 of the record at IY
E5A2 CALL $A1C7 Free it
E5A5 OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller - Done
E5A7 RET Return to the caller
Prev: E57A Up: Map Next: E5A8