Prev: BC96 Up: Map Next: BD0D
BCB7: Routine at BCB7
Used by the routine at StartGame.
BCB7 LD IX,($C277) IX=*C277.
BCBB BIT 2,(IX+$21)
BCBF RES 2,(IX+$21)
BCC3 CALL NZ,$BCED Call BCED if bit 2 of *IX+21 is set.
BCC6 BIT 3,(IX+$21)
BCCA RES 3,(IX+$21)
BCCE CALL NZ,$BCED Call BCED if bit 3 of *IX+21 is set.
BCD1 LD DE,$000C DE=000C.
BCD4 ADD IX,DE IX+=DE.
BCD6 BIT 2,(IX+$21)
BCDA RES 2,(IX+$21)
BCDE CALL NZ,$BCED Call BCED if bit 2 of *IX+21 is set.
BCE1 BIT 3,(IX+$21)
BCE5 RES 3,(IX+$21)
BCE9 CALL NZ,$BCED Call BCED if bit 3 of *IX+21 is set.
BCEC RET Return.
BCED LD L,(IX+$22) L=*IX+22.
BCF0 LD E,L E=L.
BCF1 LD A,(IX+$23) A=*IX+23.
BCF4 CP $00 Return if A is 00.
BCF6 RET Z
BCF7 LD C,A C=A.
BCF8 AND %00000011 Keep only bits 0-1.
BCFA OR %00111000 Set bits 3-5.
BCFC LD H,A H=A.
BCFD ADD HL,HL HL+=HL.
BCFE LD A,C A=C.
BCFF LD BC,$0102 BC=0102.
BD02 RLCA RLCA.
BD03 RLCA RLCA.
BD04 RLCA RLCA.
BD05 AND %00111000 Keep only bits 3-5.
BD07 OR %01000000 Set bit 6.
BD09 LD D,A D=A.
BD0A JP Copier Jump to Copier.
Prev: BC96 Up: Map Next: BD0D