Sherlock: annotated disassembly

Routines

Prev: B0D7 Up: Map Next: B0FD
B0EE: The block a saved game holds: $840B up to $A01F
Addresses named in the title: 840B, $A01F.
IX = 840B (the room table), DE = $A01F - 840B. So a saved game is the rooms, the entities, the case table, the actor table, the heap and the variables - but not the plan scripts, which never change (no script uses one-shot instructions).
Output
IX $840B, the start of the saved block
DE Its length ($A01F - $840B)
HL $A01F - $840B before the swap
B0EE LD IX,$840B IX = the start of the saved-game block (840B)
B0F2 LD HL,$A01F Point HL at $A01F in "Game variables" - DE = HL - 840B... with HL = $A01F, the end
B0F5 LD DE,$840B Point DE at the room table (840B)
B0F8 AND A Clear the carry flag, so that the subtraction that follows is a plain one (a compare)
B0F9 SBC HL,DE Subtract DE from HL (a compare: carry = HL was smaller, zero = equal)
B0FB EX DE,HL Swap DE and HL - DE = its length
B0FC RET Return to the caller
Prev: B0D7 Up: Map Next: B0FD