Sherlock: annotated disassembly

Routines

Prev: BDC2 Up: Map Next: BE72
BE5A: Step IX over one case record (4 bytes, or 6 with a routine)
Used by the routines at BB67, BC46, BC74, BD51, BE72 and BF08.
Input
IX A case record
Output
IX The next case record (4 bytes on, or 6 if a routine address follows)
AF Kept
BE5A PUSH AF Save AF on the stack - Step IX four bytes on...
BE5B LD DE,$0002 Load DE with $0002, the amount that is added next
BE5E ADD IX,DE Add DE to IX
BE60 ADD IX,DE Add DE to IX
BE62 BIT 5,(IX-$01) Test bit 5 of byte -1 of the record at IX - ...and two more if the record's last byte has bit 5 or bit 4 set (a routine address follows)
BE66 JR NZ,$BE6E If bit 5 of byte -1 of the record at IX is set, skip ahead to BE6E
BE68 BIT 4,(IX-$01) Test bit 4 of byte -1 of the record at IX
BE6C JR Z,$BE70 If bit 4 of byte -1 of the record at IX is clear, skip ahead to BE70
BE6E ADD IX,DE Add DE to IX
BE70 POP AF Restore AF from the stack
BE71 RET Return to the caller
Prev: BDC2 Up: Map Next: BE72