Sherlock: annotated disassembly

Routines

Prev: AE59 Up: Map Next: AE7F
AE6A: Add a new node to the end of the sentence list
Finds the last node (AEEA), allocates 30 bytes (A11C) and links the new block in after it; IY = the new node.
Output
IY The new 30-byte node, linked after the last
AE6A CALL $AEEA Go to the last node of the list (AEEA)
AE6D LD A,$1E Load A with $1E - Allocate a node of $1E bytes (A11C)
AE6F CALL $A11C Call the routine "Allocate A + 3 bytes from the free list, cleared" (A11C)
AE72 PUSH IX Save IX on the stack - Link it after the last: the old last node's link (IY-2)...
AE74 POP HL Restore HL from the stack
AE75 LD (IY-$02),L Store L in byte -2 of the record at IY
AE78 LD (IY-$01),H Store H in byte -1 of the record at IY
AE7B PUSH HL Save HL on the stack - ...points to it; IY = the new node
AE7C POP IY Restore IY from the stack
AE7E RET Return to the caller
Prev: AE59 Up: Map Next: AE7F