Routines
| Prev: BC46 | Up: Map | Next: BC9C |
BC74: Count the waiting statements that can now be proven
|
B = how many; IX ($BA1E) = the last one.
|
||||||||||
| BC74 | LD IX,$9965 | Point IX at "The case: statements about the crime, and the..." (9965) - Walk the case table (9965) to its $FF end; B counts | ||||||||
| BC78 | LD B,$00 | Load B with $00 | ||||||||
| BC7A | LD A,(IX+$00) | Read the first byte of the record at IX into A | ||||||||
| BC7D | CP $FF | Compare A with $FF | ||||||||
| BC7F | JR Z,$BC96 | If A equals $FF, skip ahead to BC96 | ||||||||
| BC81 | BIT 0,(IX+$03) | Test bit 0 of byte +3 of the record at IX - Only statements Holmes has been told (+3 bit 0)... | ||||||||
| BC85 | JR Z,$BC91 | If bit 0 of byte +3 of the record at IX is clear, skip ahead to BC91 | ||||||||
| BC87 | CALL $BCC9 | Call the routine "Try to prove statement IX" (BCC9) - ...that can now be proved (BCC9) | ||||||||
| BC8A | JR Z,$BC91 | If the zero flag is set, skip ahead to BC91 | ||||||||
| BC8C | LD ($BA1E),IX | Store IX in $BA1E in "Variables used by the code at BA20-BF58" - Remember the last one found ($BA1E) | ||||||||
| BC90 | INC B | Add one to B | ||||||||
| BC91 | CALL $BE5A | Call the routine "Step IX over one case record (4 bytes, or 6 with a..." (BE5A) - Next record (BE5A) | ||||||||
| BC94 | JR $BC7A | Go back to BC7A | ||||||||
| BC96 | LD A,B | Copy B into A - A = how many; IX = the last of them | ||||||||
| BC97 | LD IX,($BA1E) | Read $BA1E in "Variables used by the code at BA20-BF58" into IX | ||||||||
| BC9B | RET | Return to the caller | ||||||||
| Prev: BC46 | Up: Map | Next: BC9C |