Prev: B197 Up: Map Next: B288
B1A6: Routine at B1A6
Used by the routines at AB60, AB9B and B09F.
B1A6 LD A,(IY+$3C)
B1A9 OR A
B1AA JR NZ,$B1B2
B1AC LD A,(IY+$41)
B1AF LD (IY+$3C),A
B1B2 LD (IY+$46),A
B1B5 LD (IY+$4B),$00
This entry point is used by the routines at Handler_Move_Characters and B09F.
B1B9 LD A,(IY+$3C) If IY+3C is 01 jump to B21C.
B1BC CP $01
B1BE JR Z,$B21C
B1C0 LD A,(IY+$4B) E=(*IY+4B)*03.
B1C3 LD E,A
B1C4 ADD A,A
B1C5 ADD A,E
B1C6 LD E,A
B1C7 LD D,$00 D=00.
B1C9 LD HL,$B264 HL=B264+DE.
B1CC ADD HL,DE
B1CD LD E,(HL)
B1CE INC HL
B1CF LD D,(HL)
B1D0 INC HL
B1D1 LD B,(HL)
B1D2 LD A,D
B1D3 DEC A
B1D4 BIT 7,A
B1D6 JR NZ,$B1ED
B1D8 LD A,(IY+$37)
B1DB OR A
B1DC JR NZ,$B1ED
B1DE LD A,(IY+$0A)
B1E1 AND %00000111 Keep only bits 0-2.
B1E3 JR NZ,$B1ED
B1E5 LD (IY+$4B),$0B Write 0B to IY+4B.
B1E9 LD B,$00 B=00.
B1EB JR $B205 Jump to B205.
B1ED LD A,(IY-$3C)
B1F0 OR A
B1F1 CALL NZ,$81D4
B1F4 LD A,(IY+$0A)
B1F7 ADD A,D
B1F8 LD (IY+$0A),A
B1FB LD A,(IY+$05)
B1FE SUB E
B1FF JR NC,$B202
B201 XOR A Write 00 to IY+05.
B202 LD (IY+$05),A
B205 LD (IY+$00),B Write B to IY+00.
B208 INC (IY+$4B)
B20B LD A,(IY+$4B)
B20E CP $0C
B210 RET NZ
B211 LD (IY+$3C),$00 Write 00 to IY+3C.
B215 LD (IY+$46),$00 Write 00 to IY+46.
B219 JP $E315 Jump to E315.
B21C LD A,(IY+$4B) E=(*IY+4B)*03.
B21F LD E,A
B220 ADD A,A
B221 ADD A,E
B222 LD E,A
B223 LD D,$00 D=00.
B225 LD HL,$B264 HL=B264+DE.
B228 ADD HL,DE
B229 LD E,(HL)
B22A INC HL
B22B LD D,(HL)
B22C INC HL
B22D LD B,(HL)
B22E LD A,D
B22F DEC A
B230 BIT 7,A
B232 JR NZ,$B249
B234 LD A,(IY+$37)
B237 OR A
B238 JR NZ,$B249
B23A LD A,(IY+$0A)
B23D AND %00000111 Keep only bits 0-2.
B23F JR NZ,$B249
B241 LD (IY+$4B),$0B Write 0B to IY+4B.
B245 LD B,$00 B=00.
B247 JR $B205 Jump to B205.
B249 LD A,(IY-$3C)
B24C OR A
B24D CALL Z,$81D4
B250 LD A,(IY+$0A)
B253 ADD A,D
B254 LD (IY+$0A),A
B257 LD A,(IY+$05)
B25A ADD A,E
B25B CP $F0
B25D JR C,$B202
B25F LD A,$F0 A=F0.
B261 JP $B202 Jump to B202.
B264 DEFB $02,$FC,$06
B267 DEFB $02,$FC,$06
B26A DEFB $02,$FC,$06
B26D DEFB $02,$FC,$06
B270 DEFB $02,$FC,$07
B273 DEFB $02,$FC,$07
B276 DEFB $02,$04,$07
B279 DEFB $02,$04,$07
B27C DEFB $02,$04,$06
B27F DEFB $02,$04,$06
B282 DEFB $02,$04,$06
B285 DEFB $02,$04,$00
Prev: B197 Up: Map Next: B288