Prev: 918D Up: Map Next: 9226
9194: Routine at 9194
Used by the routine at Initialise_SubGame.
9194 LD DE,$0006 DE=0006.
9197 LD HL,($99CD) HL=*99CD.
919A LD IX,$6240 IX=6240.
919E LD A,(HL) A=*HL.
919F LD B,A B=A.
91A0 SRL B Shift B right two positions.
91A2 SRL B
91A4 JR Z,$91B6 Jump to 91B6 if HL is zero.
91A6 AND %00000011 Keep only bits 0-1.
91A8 LD C,A C=A.
91A9 SRL C Shift C right.
91AB RLA RLA.
91AC AND %00000011 Keep only bits 0-1.
91AE OR %00000100 Set bits 2.
91B0 CALL $921B Call 921B.
91B3 INC HL Increment HL by one.
91B4 JR $919E Jump to 919E.
91B6 LD IX,$6000 IX=ShadowBuffer.
91BA LD C,$07 C=07.
91BC LD A,$01 A=01.
91BE LD B,$60 B=60.
91C0 CALL $921B Call 921B.
91C3 LD IX,$6FC0 IX=6FC0.
91C7 LD B,$60 B=60.
91C9 CALL $921B Call 921B.
91CC LD B,$12 B=12.
91CE LD IX,$6240 IX=6240.
91D2 LD DE,$00C0 DE=00C0.
91D5 LD (IX+$00),$05 Write 05 to *IX+00.
91D9 LD (IX+$01),$07 Write 07 to *IX+01.
91DD ADD IX,DE IX+=DE.
91DF LD (IX-$06),$05 Write 05 to *IX+FA.
91E3 LD (IX-$05),$07 Write 07 to *IX+FB.
91E7 DJNZ $91D5 Decrease counter by one and loop back to 91D5 until counter is zero.
91E9 LD IX,$6F06 IX=6F06.
91ED LD BC,$121E BC=121E.
91F0 LD DE,$FF40 DE=FF40.
91F3 PUSH BC Stash BC on the stack.
91F4 PUSH IX Stash IX on the stack.
91F6 LD A,$06 A=06.
91F8 BIT 0,(IX+$01) Test bit 0 of *IX+01.
91FC JR NZ,$9213 Jump to 9213 if HL is not zero.
91FE LD A,$00 A=00.
9200 LD (IX+$01),A Write A to *IX+01.
9203 ADD IX,DE IX+=DE.
9205 DJNZ $91F8 Decrease counter by one and loop back to 91F8 until counter is zero.
9207 POP IX Restore IX from the stack.
9209 LD BC,$0006 BC=0006.
920C ADD IX,BC IX+=BC.
920E POP BC Restore BC from the stack.
920F DEC C Decrease C by one.
9210 JR NZ,$91F3 Jump to 91F3 if C is not zero.
9212 RET Return.
9213 CP $06 Compare A with 06.
9215 JR Z,$9200 Jump to 9200 if A is zero.
9217 ADD A,$01 A+=01.
9219 JR $9200 Jump to 9200.
921B LD (IX+$00),A Write A to *IX+00.
921E LD (IX+$01),C Write C to *IX+01.
9221 ADD IX,DE IX+=DE.
9223 DJNZ $921B Decrease counter by one and loop back to 921B until counter is zero.
9225 RET Return.
Prev: 918D Up: Map Next: 9226