Prev: 52121 Up: Map Next: 52286
52124: Routine at CB9C
Used by the routines at Controller_NameSelect, PressAnyKey and StartGame.
52124 LD HL,52285 HL=52285.
52127 RES 7,(HL) Reset bit 7 of *HL.
52129 LD A,(HL) A=*HL.
52130 RRCA Rotate A right one bit (with carry).
52131 JR C,52176 Jump to 52176 if the carry bit was set.
52133 RRCA Rotate A right one bit (with carry).
52134 JR C,52219 Jump to 52219 if the carry bit was set.
52136 RRCA Rotate A right one bit (with carry).
52137 JR C,52235 Jump to 52235 if the carry bit was set.
52139 RRCA Rotate A right one bit (with carry).
52140 JR C,52156 Jump to 52156 if the carry bit was set.
52142 RRCA Rotate A right one bit (with carry).
52143 JR C,52167 Jump to 52167 if the carry bit was set.
52145 RRCA Rotate A right one bit (with carry).
52146 JR C,52210 Jump to 52210 if the carry bit was set.
52148 LD A,6 Set border to YELLOW.
52150 OUT (254),A
52152 HALT Halt operation (suspend CPU until the next interrupt).
52153 RES 7,(HL) Reset bit 7 of *HL.
52155 RET Return.
52156 LD DE,112 DE=0112.
52159 LD (52283),DE Write DE to *52283.
52163 RES 3,(HL) Reset bit 3 of *HL.
52165 JR 52176 Jump to 52176.
52167 LD DE,256 DE=0256.
52170 LD (52283),DE Write DE to *52283.
52174 RES 4,(HL) Reset bit 4 of *HL.
52176 RES 0,(HL) Reset bit 0 of *HL.
52178 LD A,6 A=6.
52180 LD DE,65535 DE=65535.
52183 LD IX,(52283) IX=52283.
52187 ADD IX,DE IX+=DE.
52189 JR NC,52197 Jump to 52197 if {} is higher.
52191 BIT 7,(HL) Jump to 52207 if bit 7 of *HL is not zero.
52193 JR NZ,52207
52195 JR 52187 Jump to 52187.
52197 BIT 7,(HL) Jump to 52207 if bit 7 of *HL is not zero.
52199 JR NZ,52207
52201 XOR %00011000 XOR bits 3-4 (if they are set, unset them and if they are unset, set them).
52203 OUT (254),A OUT 254
52205 JR 52183 Jump to 52183.
52207 RES 7,(HL) Reset bit 7 of *HL.
52209 RET Return.
52210 RES 5,(HL) Reset bit 5 of *HL.
52212 LD C,0 C=0.
52214 LD DE,64 DE=0064.
52217 JR 52242 Jump to 52242.
52219 RES 1,(HL) Reset bit 1 of *HL.
52221 CALL 49613 Call 49613.
52224 BIT 0,(IX+0) Jump to 52136 if bit 0 of *IX+0 is not zero.
52228 JR NZ,52136
52230 LD DE,32 DE=0032.
52233 JR 52240 Jump to 52240.
52235 RES 2,(HL) Reset bit 2 of *HL.
52237 LD DE,96 DE=0096.
52240 LD C,6 C=6.
52242 LD (52283),DE Write DE to *52283.
52246 LD DE,65535 DE=65535.
52249 LD IX,(52283) IX=52283.
52253 ADD IX,DE IX+=DE.
52255 JR NC,52263 Jump to 52263 if {} is higher.
52257 BIT 7,(HL) Jump to 52280 if bit 7 of *HL is not zero.
52259 JR NZ,52280
52261 JR 52253 Jump to 52253.
52263 BIT 7,(HL) Jump to 52280 if bit 7 of *HL is not zero.
52265 JR NZ,52280
52267 CALL 49613 Call 49613.
52270 LD A,(49637) A=*49637.
52273 AND %00011000 Keep only bits 3-4.
52275 OR C Set the bits from C.
52276 OUT (254),A OUT 254
52278 JR 52249 Jump to 52249.
52280 RES 7,(HL) Reset bit 7 of *HL.
52282 RET Return.
52283 DEFW 256
52285 DEFB 0
Prev: 52121 Up: Map Next: 52286