Sherlock: annotated disassembly

Routines

Prev: A745 Up: Map Next: A771
A75B: Code $0B: print a message at an offset from here
HL = IX + the two-byte offset that follows; prints the message there (A5C4) and steps over the offset: a sub-message.
Input
IX The position of the code ($0B), followed by a 16-bit offset
Output
IX Past the offset
A 0
F Z
A75B PUSH IX Save IX on the stack - Code $0B: IX is the control code; HL = IX + the offset in its next two bytes
A75D POP HL Restore HL from the stack
A75E PUSH HL Save HL on the stack
A75F LD E,(IX+$01) Read byte +1 of the record at IX into E
A762 LD D,(IX+$02) Read byte +2 of the record at IX into D
A765 ADD HL,DE Add DE to HL
A766 CALL $A5C4 Call the routine "Interpret message bytes until the end of the message" (A5C4) - Print that message (A5C4), then move IX past the operand
A769 POP IX Restore IX from the stack
A76B INC IX Step IX on to the next byte
A76D INC IX Step IX on to the next byte
A76F XOR A Set A to zero, which sets the zero flag for the caller
A770 RET Return to the caller
Prev: A745 Up: Map Next: A771