Prev: BC9C Up: Map Next: BD06
BCC9: Check Bit And Process
Tests the action flags and runs CheckBitAndProcessEntry when bit 2 is set. Returns non-zero when that entry is accepted, and zero when it is not.
CheckBitAndProcess BCC9 BIT 2,(IX+$03) Jump to CheckBitAndProcess_Next if a marker on the action flags is clear.
BCCD JR Z,CheckBitAndProcess_Next
BCCF PUSH IX Call CheckBitAndProcessEntry to test bit and process entry.
BCD1 PUSH BC
BCD2 CALL CheckBitAndProcessEntry
BCD5 POP BC
BCD6 POP IX Go to CheckBitAndProcess_TestStepSucceedsScript if the entry check returns zero.
BCD8 JR Z,CheckBitAndProcess_TestStepSucceedsScript
CheckBitAndProcess_Next BCDA BIT 5,(IX+$03) Jump to CheckBitAndProcess_MarkActionTaken if a marker on the action flags is clear.
BCDE JR Z,CheckBitAndProcess_MarkActionTaken
BCE0 SET 0,(IX+$03) Set the action-pending flag and jump ahead to CheckBitAndProcess_ClearResult.
BCE4 JR CheckBitAndProcess_ClearResult
Mark the action taken and clear the bit that would repeat it.
CheckBitAndProcess_MarkActionTaken BCE6 SET 1,(IX+$03) Mark the action taken so the script will not repeat it.
BCEA RES 0,(IX+$03)
BCEE BIT 4,(IX+$03) Jump to CheckBitAndProcess_ClearResult if the action state flag is clear.
BCF2 JR Z,CheckBitAndProcess_ClearResult
BCF4 LD L,(IX+$04) Read the handler address from bytes 04-05 of the record and keep the record.
BCF7 LD H,(IX+$05)
BCFA PUSH IX
BCFC CALL JumpToHandler Call JumpToHandler to jump to handler.
BCFF POP IX
CheckBitAndProcess_ClearResult BD01 XOR A Clear A.
BD02 RET Return.
CheckBitAndProcess_TestStepSucceedsScript BD03 OR %00000001 Reset the zero flag.
BD05 RET Return.
Prev: BC9C Up: Map Next: BD06