|  | Routines | 
| Prev: CB03 | Up: Map | Next: CB88 | 
| 
Used by the routine at A89D.
 | ||||
| CB52 | LD HL,$5E66 | Reset enemy configuration buffer for the room | ||
| CB55 | LD DE,$5E67 | |||
| CB58 | LD BC,$017F | |||
| CB5B | LD (HL),$00 | |||
| CB5D | LDIR | |||
| CB5F | LD B,$10 | Set B to the max. number of static enemies per room | ||
| CB61 | LD IX,$5E66 | Set IX to the base addres for the enemy configuration buffer | ||
| CB65 | LD IY,($A020) | Set IY to the address for the static enemy definition of the current room | ||
| CB69 | PUSH BC | Save BC | ||
| CB6A | LD A,(IY+$00) | Pick up the first byte of the static enemy defintion | ||
| CB6D | CP $FF | is end of marker - no more enemies? | ||
| CB6F | JP Z,$CB86 | Jump forward and return | ||
| CB72 | CALL $CB88 | Configure the current enemy | ||
| CB75 | INC IY | Point IY to the next enemy defintion | ||
| CB77 | INC IY | |||
| CB79 | INC IY | |||
| CB7B | LD DE,$0018 | Point IX to the next address for the enemy configuration buffer | ||
| CB7E | ADD IX,DE | |||
| CB80 | POP BC | Recover and decrement counter at BC | ||
| CB81 | DEC B | |||
| CB82 | JP NZ,$CB69 | Jump while there are static enemies to configure | ||
| CB85 | RET | |||
| CB86 | POP BC | Recover BC | ||
| CB87 | RET | |||
| Prev: CB03 | Up: Map | Next: CB88 |