Prev: BE72 Up: Map Next: BF08
BE91: Test The Action Taken Flag
Used by the routine at CheckBitAndProcessEntry.
Tests the action-taken flag and the top bits of the action flags before looking the object up.
InspectActionTakenFlag BE91 BIT 1,(IX+$03) Jump to ProcessEntryWithCounter if the action-taken flag is set.
BE95 JR NZ,ProcessEntryWithCounter
BE97 LD A,(IX+$03) Jump to InspectActionTakenFlag_TestHighBit if either bit 6 or bit 7 of the action flags is set.
BE9A AND $C0
BE9C CP $00
BE9E JR NZ,InspectActionTakenFlag_TestHighBit
BEA0 LD A,(IX+$00) Call FetchObjectDataPointer to look up the current object.
BEA3 PUSH IX
BEA5 CALL FetchObjectDataPointer
BEA8 BIT 7,(IX+$06) Jump to ProcessEntryWithCounter if bit 7 of the looked-up object's byte at offset 06 is clear.
BEAC POP IX
BEAE JR Z,ProcessEntryWithCounter
BEB0 LD A,(IX+$02) Take the object id at offset 02 and call FetchObjectDataPointer to look it up.
BEB3 PUSH IX
BEB5 CALL FetchObjectDataPointer
BEB8 BIT 7,(IX+$06) Jump to ProcessEntryWithCounter if bit 7 of the looked-up object's byte at offset 06 is clear.
BEBC POP IX
BEBE JR Z,ProcessEntryWithCounter
InspectActionTakenFlag_SetTaken BEC0 SET 1,(IX+$03) Mark the action taken so the script will not repeat it.
BEC4 RES 0,(IX+$03)
BEC8 OR $01 Set A non-zero and jump back to ProcessEntryWithCounter.
BECA JP ProcessEntryWithCounter
The top bit counts the entry down. The bit under it reads the record itself.
InspectActionTakenFlag_TestHighBit BECD CP $80 Jump back to ProcessEntryWithCounter if it is 80.
BECF JR Z,ProcessEntryWithCounter
BED1 CP $40 Jump ahead to InspectActionTakenFlag_TestMarker if it is not 40.
BED3 JR NZ,InspectActionTakenFlag_TestMarker
BED5 LD A,(IX+$00) Call FetchObjectDataPointer to look up the current object.
BED8 PUSH IX
BEDA CALL FetchObjectDataPointer
BEDD BIT 6,(IX+$06) Jump to ProcessEntryWithCounter if bit 6 of the looked-up object's byte at offset 06 is clear.
BEE1 POP IX
BEE3 JR Z,ProcessEntryWithCounter
BEE5 LD A,(IX+$02) Call FetchObjectDataPointer to look up the current object.
BEE8 PUSH IX
BEEA CALL FetchObjectDataPointer
BEED BIT 6,(IX+$06) Jump to ProcessEntryWithCounter if bit 6 of the looked-up object's byte at offset 06 is clear.
BEF1 POP IX
BEF3 JP Z,ProcessEntryWithCounter
InspectActionTakenFlag_TestMarker BEF6 BIT 2,(IX+$03) Jump to InspectActionTakenFlag_SetTaken if a marker on the action flags is clear.
BEFA JR Z,InspectActionTakenFlag_SetTaken
BEFC PUSH IX Call CheckBitAndProcessEntry to test bit and process entry.
BEFE CALL CheckBitAndProcessEntry
BF01 POP IX
BF03 JR NZ,InspectActionTakenFlag_SetTaken Jump back to InspectActionTakenFlag_SetTaken when CheckBitAndProcessEntry returns non-zero.
BF05 JP ProcessEntryWithCounter The check at CheckBitAndProcessEntry passed, so count the entry again from ProcessEntryWithCounter.
Prev: BE72 Up: Map Next: BF08