![]() |
Routines |
Prev: 26914 | Up: Map |
Called from the main loop at 25129.
|
||||||||
26988 | LD HL,28070 | Point HL at the first guard countdown timer. | ||||||
26991 | LD B,4 | There are four guards to consider. | ||||||
26993 | LD E,(HL) | Pick up the countdown timer value in DE. | ||||||
26994 | INC HL | |||||||
26995 | LD D,(HL) | |||||||
26996 | DEC HL | |||||||
26997 | LD A,D | Is the value zero? | ||||||
26998 | OR E | |||||||
26999 | JR Z,27017 | Jump if so (this guard is already in play). | ||||||
27001 | DEC DE | Decrement the countdown timer. | ||||||
27002 | LD (HL),E | |||||||
27003 | INC HL | |||||||
27004 | LD (HL),D | |||||||
27005 | DEC HL | |||||||
27006 | LD A,D | |||||||
27007 | OR C | This should be OR E. | ||||||
27008 | JR NZ,27017 | Jump unless A is now zero. | ||||||
27010 | LD A,(27402) | Increment the active guard counter. | ||||||
27013 | INC A | |||||||
27014 | LD (27402),A | |||||||
27017 | INC HL | Point HL at the next guard's countdown timer. | ||||||
27018 | INC HL | |||||||
27019 | DJNZ 26993 | Jump back to consider the next guard. | ||||||
27021 | RET |
Prev: 26914 | Up: Map |