Sherlock: annotated disassembly

Routines

Prev: A11C Up: Map Next: A1C7
A1AF: Free every node of the list starting at IX
Used by the routines at ACFB, B6FD, BA20, D87D and D88A.
Input
IX The first node of the list
Output
The whole list is freed
A1AF PUSH HL Save HL on the stack - HL = the first node
A1B0 PUSH IX Save IX on the stack
A1B2 POP HL Restore HL from the stack
A1B3 JR $A1C1 Skip ahead to A1C1
A1B5 LD L,(IX-$02) Read byte -2 of the record at IX into L - HL = this node's link (IX-2)
A1B8 LD H,(IX-$01) Read byte -1 of the record at IX into H
A1BB CALL $A1C7 Call the routine "Free node IX back to the heap" (A1C7) - Free this node (A1C7)
A1BE PUSH HL Save HL on the stack
A1BF POP IX Restore IX from the stack
A1C1 LD A,L Copy L into A - Until the link is 0
A1C2 OR H Set in A the bits that are set in H
A1C3 JR NZ,$A1B5 If the result is not zero, go back to A1B5
A1C5 POP HL Restore HL from the stack
A1C6 RET Return to the caller
Prev: A11C Up: Map Next: A1C7