Prev: B230 Up: Map Next: B342
B29C: Routine at B29C
Used by the routine at AFB5.
B29C PUSH HL Stash HL on the stack.
B29D LD D,A D=A.
B29E SRL C Shift C right.
B2A0 JR NC,$B2AC Jump to B2AC if the result is greater than or equal to 00.
B2A2 LD ($B410),A Write A to *B410.
B2A5 LD A,$54 Write 54 to *B418.
B2A7 LD ($B418),A
B2AA JR $B2B4 Jump to B2B4.
B2AC LD ($B410),A Write A to *B410.
B2AF LD A,$53 Write 53 to *B418.
B2B1 LD ($B418),A
B2B4 LD A,D A=D.
B2B5 CALL $B402 Call B402.
B2B8 LD DE,$00C8 DE=00C8.
B2BB CALL $A875 Call A875.
B2BE CP (IX+$00) Jump to B2CE if *IX+00 is greater than or equal to 53.
B2C1 JR NC,$B2CE
B2C3 LD A,$53 Write 53 to *B419.
B2C5 LD ($B419),A
B2C8 LD A,(HL) Write *HL to *B411.
B2C9 LD ($B411),A
B2CC JR $B337 Jump to B337.
B2CE CP (IX+$01) Jump to B2E1 if *IX+01 is greater than or equal to 53.
B2D1 JR NC,$B2E1
B2D3 LD A,$54 Write 54 to *B419.
B2D5 LD ($B419),A
B2D8 LD A,(HL) Write *HL to *B411.
B2D9 LD ($B411),A
B2DC LD C,A C=A.
B2DD ADD A,A A+=A.
B2DE ADD A,C A+=C.
B2DF JR $B337 Jump to B337.
B2E1 CP (IX+$02) Jump to B2F2 if *IX+02 is greater than or equal to 54.
B2E4 JR NC,$B2F2
B2E6 LD A,$53 Write 53 to *B419.
B2E8 LD ($B419),A
B2EB DEC HL Decrease HL by one.
B2EC LD A,(HL) Write *HL to *B411.
B2ED LD ($B411),A
B2F0 JR $B337 Jump to B337.
B2F2 CP (IX+$03) Jump to B306 if *IX+03 is greater than or equal to 53.
B2F5 JR NC,$B306
B2F7 LD A,$54 Write 54 to *B419.
B2F9 LD ($B419),A
B2FC DEC HL Decrease HL by one.
B2FD LD A,(HL) Write *HL to *B411.
B2FE LD ($B411),A
B301 LD C,A C=A.
B302 ADD A,A A+=A.
B303 ADD A,C A+=C.
B304 JR $B337 Jump to B337.
B306 CP (IX+$04) Jump to B317 if *IX+04 is greater than or equal to 54.
B309 JR NC,$B317
B30B LD A,$53 Write 53 to *B419.
B30D LD ($B419),A
B310 INC HL Increment HL by one.
B311 LD A,(HL) Write *HL to *B411.
B312 LD ($B411),A
B315 JR $B337 Jump to B337.
B317 CP (IX+$05) Jump to B32B if *IX+05 is greater than or equal to 53.
B31A JR NC,$B32B
B31C LD A,$54 Write 54 to *B419.
B31E LD ($B419),A
B321 INC HL Increment HL by one.
B322 LD A,(HL) A=*HL.
B323 LD ($B411),A Write A to *B411.
B326 LD C,A C=A.
B327 ADD A,A A+=A.
B328 ADD A,C A+=C.
B329 JR $B337 Jump to B337.
B32B LD A,(HL) D=*HL.
B32C LD D,A
B32D LD A,$44 Write 44 to *B419.
B32F LD ($B419),A
B332 LD A,D Write D to *B411.
B333 LD ($B411),A
B336 ADD A,A A+=A.
B337 POP HL Restore HL from the stack.
B338 LD D,$00 D=00.
B33A LD E,A E=A.
B33B AND A Set flags.
B33C SBC HL,DE HL-=DE (with carry).
B33E LD ($B40C),A Write A to *B40C.
B341 RET Return.
Prev: B230 Up: Map Next: B342