Sherlock: annotated disassembly

Routines

Prev: AF38 Up: Map Next: AF67
AF4E: Copy 6, 10 or 2 bytes from IX + DE to IY + DE
Entries AF4E (6), AF52 (10) and AF56 (2).
Input
DE The offset
IX, IY The two nodes
Output
6 bytes copied (entry $AF52 copies 10, $AF56 copies 2)
AF4E LD C,$06 Load C with $06 - Copy 6 bytes (AF4E), 10 (AF52) or 2 (AF56) - entry points set the count in C
AF50 JR $AF58 Skip ahead to AF58
This entry point is used by the routine at AEF1.
AF52 LD C,$0A Load C with $0A - ...10...
AF54 JR $AF58 Skip ahead to AF58
This entry point is used by the routine at AEF1.
AF56 LD C,$02 ...or 2
AF58 PUSH IY Save IY on the stack - Source = IY + DE, destination = IX + DE
AF5A POP HL Restore HL from the stack
AF5B ADD HL,DE Add DE to HL
AF5C PUSH HL Save HL on the stack
AF5D PUSH IX Save IX on the stack
AF5F POP HL Restore HL from the stack
AF60 ADD HL,DE Add DE to HL
AF61 POP DE Restore DE from the stack
AF62 LD B,$00 Load B with $00 - BC = the count; block copy
AF64 LDIR Copy BC bytes from where HL points to where DE points, counting up
AF66 RET Return to the caller
Prev: AF38 Up: Map Next: AF67