Prev: B703 Up: Map Next: BADD
B724: Routine at B724
Used by the routine at StartGame.
B724 LD DE,$C36E DE=C36E.
B727 LD HL,$C375 HL=C375.
B72A LD BC,$0007 BC=0007.
B72D LDIR LDIR.
B72F LD HL,$C28E HL=C28E.
B732 DEC (HL) Decrease *HL by one.
B733 RET NZ Return if {} is not zero.
B734 LD (HL),$06 Write 06 to *HL.
B736 INC HL Increment HL by one.
B737 DEC (HL) Decrease *HL by one.
B738 RET NZ Return if {} is not zero.
B739 LD (HL),$01 Write 01 to *HL.
B73B LD IX,$C36E IX=C36E.
B73F INC HL Increment HL by one.
B740 DEC (HL) Decrease *HL by one.
B741 JR NZ,$B74B Jump to B74B if {} is not zero.
B743 LD (HL),$01 Write 01 to *HL.
B745 RES 5,(IX+$17) Reset bit 5 of *IX+17.
B749 JR $B75D Jump to B75D.
B74B SET 5,(IX+$17) Set bit 5 of *IX+17.
B74F BIT 5,(IX+$13) Jump to B75D if bit 5 of *IX+13 is set.
B753 JR NZ,$B75D
B755 LD A,($C28E) A=*C28E.
B758 ADD A,$06 A+=06.
B75A LD ($C28E),A Write A to *C28E.
B75D BIT 4,(IX+$17) Jump to B76D if bit 4 of *IX+17 is not set.
B761 JR Z,$B76D
B763 LD A,($C28E) A=*C28E.
B766 ADD A,$04 A+=04.
B768 LD ($C28E),A Write A to *C28E.
B76B JR $B781 Jump to B781.
B76D BIT 1,(IX+$17) Jump to B77B if bit 1 of *IX+17 is not set.
B771 JR Z,$B77B
B773 INC HL Increment HL by one.
B774 LD (HL),$01 Write 01 to *HL.
B776 INC HL Increment HL by one.
B777 LD (HL),$01 Write 01 to *HL.
B779 JR $B7A1 Jump to B7A1.
B77B INC HL Increment HL by one.
B77C DEC (HL) Decrease *HL by one.
B77D JR NZ,$B763 Jump to B763 if *HL is set.
B77F LD (HL),$01 Write 01 to *HL.
B781 INC HL Increment HL by one.
B782 DEC (HL) Decrease *HL by one.
B783 JR Z,$B79F Jump to B79F if *HL is zero.
B785 BIT 1,(HL) Jump to B7A1 if bit 1 of *HL is not set.
B787 JR Z,$B7A1
B789 BIT 0,(HL) Test bit 0 of *HL.
B78B LD A,(IX+$13) A=*IX+13.
B78E JR NZ,$B79A Jump to B79A if bit 0 of *HL is set.
B790 CALL $C1CD Call C1CD.
B793 LD IX,$C36E IX=C36E.
B797 LD A,($C1E5) A=*C1E5.
B79A AND %00011000 Keep only bits 3-4.
B79C LD E,A E=A.
B79D JR $B7A7 Jump to B7A7.
B79F LD (HL),$01 Write 01 to *HL.
B7A1 CALL Handler_Controls Call Handler_Controls.
B7A4 BIT 7,E Return if bit 7 of E is set.
B7A6 RET NZ
B7A7 BIT 0,(IX+$18) Jump to B7CB if bit 0 of *IX+18 is not set.
B7AB JR Z,$B7CB
B7AD LD A,$08 A=08.
B7AF CP E Compare A with E.
B7B0 RET NZ Return if {} is not zero.
B7B1 RES 1,(IX+$17) Reset bit 1 of *IX+17.
B7B5 LD HL,($C277) HL=*C277.
B7B8 LD BC,$0021 BC=0021.
B7BB BIT 4,(IX+$10) Jump to B7C4 if bit 4 of *IX+10 is not set.
B7BF JR Z,$B7C4
B7C1 LD BC,$002D BC=002D.
B7C4 ADD HL,BC HL+=BC.
B7C5 SET 2,(HL) Set bit 2 of *HL.
B7C7 OR %01000000 Set bits 6.
B7C9 JR $B7E4 Jump to B7E4.
B7CB LD HL,($C277) HL=*C277.
B7CE LD BC,$0021 BC=0021.
B7D1 BIT 4,(IX+$10) Jump to B7DA if bit 4 of *IX+10 is not set.
B7D5 JR Z,$B7DA
B7D7 LD BC,$002D BC=002D.
B7DA ADD HL,BC HL+=BC.
B7DB BIT 1,(HL) Jump to B7E1 if bit 1 of *HL is set.
B7DD JR NZ,$B7E1
B7DF SET 3,(HL) Set bit 3 of *HL.
B7E1 LD A,(IX+$13) A=*IX+13.
B7E4 LD B,A B=A.
B7E5 AND %00011000 Keep only bits 3-4.
B7E7 CP E Jump to B7F3 if A is equal to E.
B7E8 JR Z,$B7F3
B7EA LD A,B A=B.
B7EB AND %01000000 Keep only bits 6.
B7ED OR E Set the bits from E.
B7EE LD (IX+$13),A Write A to *IX+13.
B7F1 JR $B7FC Jump to B7FC.
B7F3 BIT 5,B Jump to B81E if bit 5 of B is not set.
B7F5 JR Z,$B81E
B7F7 RES 5,B Reset bit 5 of B.
B7F9 LD (IX+$13),B Write B to *IX+13.
B7FC BIT 0,(IX+$17) Jump to B809 if bit 0 of *IX+17 is set.
B800 JR NZ,$B809
B802 BIT 2,(IX+$17) Jump to B8A6 if bit 2 of *IX+17 is not set.
B806 JP Z,$B8A6
B809 BIT 3,(IX+$17) Test bit 3 of *IX+17.
B80D LD A,$02 A=02.
B80F JR Z,$B813 Jump to B813 if bit 3 of *IX+17 is not set.
B811 LD A,$00 A=00.
B813 OR (IX+$17) Set the bits of A with *IX+17.
B816 AND %11111010 Keep only bits 1, 3-7.
B818 LD (IX+$17),A Write A to *IX+17.
B81B JP $B8A6 Jump to B8A6.
B81E LD HL,$C1E7 HL=C1E7.
B821 SRA E Shift E right (with carry).
B823 SRA E Shift E right (with carry).
B825 LD D,$00 D=00.
B827 ADD HL,DE HL+=DE.
B828 LD E,(HL) E=*HL.
B829 INC HL Increment HL by one.
B82A LD D,(HL) D=*HL.
B82B LD L,(IX+$10) L=*IX+10.
B82E LD H,(IX+$11) H=*IX+11.
B831 ADD HL,DE HL+=DE.
B832 BIT 7,(HL) Jump to B870 if bit 7 of *HL is set.
B834 JR NZ,$B870
B836 PUSH HL Stash HL on the stack.
B837 LD DE,$78A0 DE=78A0.
B83A AND A Set flags.
B83B SBC HL,DE HL-=DE (with carry).
B83D POP HL Restore HL from the stack.
B83E JP C,$B591 Jump to B591 if {} is lower.
B841 PUSH HL Stash HL on the stack.
B842 LD DE,$7A60 DE=7A60.
B845 SBC HL,DE HL-=DE (with carry).
B847 POP HL Restore HL from the stack.
B848 JP NC,$B4FC Jump to B4FC if {} is higher.
B84B BIT 3,(IX+$13) Jump to B85F if bit 3 of *IX+13 is set.
B84F JR NZ,$B85F
B851 BIT 4,(IX+$13) Test bit 4 of *IX+13.
B855 LD A,$00 A=00.
B857 JR Z,$B85B Jump to B85B if bit 4 of *IX+13 is not set.
B859 LD A,$1F A=1F.
B85B XOR L Reset the bits from L.
B85C AND %00011111 Keep only bits 0-4.
B85E RET Z Return if the result is zero.
B85F PUSH HL Stash HL on the stack.
B860 SET 3,(IX+$17) Set bit 3 of *IX+17.
B864 BIT 1,(IX+$17) Jump to B886 if bit 1 of *IX+17 is not set.
B868 JR Z,$B886
B86A RES 1,(IX+$17) Reset bit 1 of *IX+17.
B86E JR $B881 Jump to B881.
B870 PUSH HL Stash HL on the stack.
B871 RES 3,(IX+$17) Reset bit 3 of *IX+17.
B875 BIT 6,B Call BAAA if bit 6 of B is not set.
B877 CALL Z,$BAAA
B87A POP HL Restore HL from the stack.
B87B PUSH HL Stash HL on the stack.
B87C CALL $B919 Call B919.
B87F JR $B889 Jump to B889.
B881 CALL $B919 Call B919.
B884 POP HL Restore HL from the stack.
B885 PUSH HL Stash HL on the stack.
B886 CALL $B99F Call B99F.
B889 POP HL Restore HL from the stack.
This entry point is used by the routine at BE75.
B88A SET 5,B Set bit 5 of B.
B88C LD (IX+$13),B Write B to *IX+13.
B88F LD (IX+$10),L Write L to *IX+10.
B892 LD (IX+$11),H Write H to *IX+11.
B895 BIT 3,B Jump to B8A6 if bit 3 of B is not set.
B897 JR Z,$B8A6
B899 INC (IX+$07) Increment *IX+07 by one.
B89C BIT 4,B Jump to B8A6 if bit 4 of B is set.
B89E JR NZ,$B8A6
B8A0 DEC (IX+$07) Decrease *IX+07 by one.
B8A3 DEC (IX+$07) Decrease *IX+07 by one.
This entry point is used by the routines at B4B8, B591 and BD89.
B8A6 LD A,(IX+$13) A=*IX+13.
B8A9 LD E,A E=A.
B8AA LD D,$00 D=00.
B8AC LD L,(IX+$14) L=*IX+14.
B8AF LD H,(IX+$15) H=*IX+15.
B8B2 ADD HL,DE HL+=DE.
B8B3 LD A,(HL) A=*HL.
B8B4 LD (IX+$0A),A Write A to *IX+0A.
B8B7 INC HL Increment HL by one.
B8B8 LD A,(HL) A=*HL.
B8B9 LD (IX+$0B),A Write A to *IX+0B.
B8BC INC HL Increment HL by one.
B8BD LD A,(HL) A=*HL.
B8BE LD (IX+$0E),A Write A to *IX+0E.
B8C1 INC HL Increment HL by one.
B8C2 LD A,(HL) A=*HL.
B8C3 LD (IX+$0F),A Write A to *IX+0F.
B8C6 INC HL Increment HL by one.
B8C7 LD E,(HL) E=*HL.
B8C8 INC HL Increment HL by one.
B8C9 LD D,(HL) D=*HL.
B8CA LD L,(IX+$10) L=*IX+10.
B8CD LD H,(IX+$11) H=*IX+11.
B8D0 ADD HL,DE HL+=DE.
B8D1 RES 5,H Reset bit 5 of H.
B8D3 LD (IX+$0C),L Write L to *IX+0C.
B8D6 LD (IX+$08),L Write L to *IX+08.
B8D9 LD (IX+$0D),H Write H to *IX+0D.
B8DC LD A,H A=H.
B8DD RLCA RLCA.
B8DE RLCA RLCA.
B8DF RLCA RLCA.
B8E0 AND %00011000 Keep only bits 3-4.
B8E2 OR %01000000 Set bits 6.
B8E4 LD (IX+$09),A Write A to *IX+09.
B8E7 LD A,(IX+$0A) A=*IX+0A.
B8EA RLCA RLCA.
B8EB RLCA RLCA.
B8EC RLCA RLCA.
B8ED RLCA RLCA.
B8EE LD (IX+$16),A Write A to *IX+16.
B8F1 BIT 0,(IX+$17) Jump to B8FC if bit 0 of *IX+17 is not set.
B8F5 JR Z,$B8FC
B8F7 LD (IX+$0B),$01 Write 0B to *IX+0B.
B8FB RET Return.
B8FC BIT 2,(IX+$17) Return if bit 2 of *IX+17 is not set.
B900 RET Z
B901 LD (IX+$0B),$01 Write 0B to *IX+0B.
B905 INC (IX+$08) Increment *IX+08 by one.
B908 INC (IX+$0C) Increment *IX+0C by one.
B90B LD L,(IX+$0E) L=*IX+0E.
B90E ADD A,L A+=L.
B90F LD (IX+$0E),A Write A to *IX+0E.
B912 RET NC Return if {} is higher.
B913 INC (IX+$0F) Increment *IX+0F by one.
B916 RET Return.
B917 DEC B Decrease B by one.
B918 INC C Increment C by one.
B919 PUSH IX Stash IX on the stack.
B91B LD IX,($C277) IX=C277.
B91F PUSH HL Stash HL on the stack.
B920 BIT 4,L Jump to B929 if bit 4 of L is not set.
B922 JR Z,$B929
B924 LD DE,$000C DE=000C.
B927 ADD IX,DE IX+=DE.
B929 LD E,(IX+$22) E=*IX+22.
B92C LD D,(IX+$23) D=*IX+23.
B92F AND A Set flags.
B930 SBC HL,DE HL-=DE (with carry).
B932 POP HL Restore HL from the stack.
B933 JR Z,$B948 Jump to B948 if {} is zero.
B935 LD A,L A=L.
B936 ADD HL,HL HL+=HL.
B937 ADD HL,HL HL+=HL.
B938 ADD HL,HL HL+=HL.
B939 AND %00011111 Keep only bits 0-4.
B93B LD C,A C=A.
B93C CP $0A Jump to B96C if A is lower than 0A.
B93E JR C,$B96C
B940 CP $16 Jump to B988 if A is higher than 16.
B942 JR NC,$B988
B944 POP HL Restore HL, HL and HL from the stack.
B945 POP HL
B946 POP HL
B947 RET Return.
B948 PUSH IX Stash IX on the stack.
B94A POP HL Restore HL from the stack.
B94B LD DE,$0021 DE=0021.
B94E ADD HL,DE HL+=DE.
B94F BIT 4,(HL) Test bit 4 of *HL.
B951 JR Z,$B944 Jump to B944 if {} is zero.
B953 POP IX Restore IX from the stack.
B955 BIT 3,B Test bit 3 of B.
B957 JR Z,$B945 Jump to B945 if {} is zero.
B959 BIT 4,B Test bit 4 of B.
B95B JR Z,$B945 Jump to B945 if {} is zero.
B95D BIT 6,B Test bit 6 of B.
B95F JR Z,$B945 Jump to B945 if {} is zero.
B961 SET 3,(HL) Set bit 3 of *HL.
B963 SET 1,(IX+$17) Set bit 1 of *IX+17.
B967 SET 0,(IX+$18) Set bit 0 of *IX+18.
B96B RET Return.
B96C LD A,H A=H.
B96D CP (IX+$20) Compare A with *IX+20.
B970 JR NZ,$B944 Jump to B944 if {} is not zero.
B972 POP IX Restore IX from the stack.
B974 BIT 1,(IX+$17) Test bit 1 of *IX+17.
B978 RET NZ Return if {} is not zero.
B979 LD A,C A=C.
B97A CP $05 Compare A with 05.
B97C JR NC,$B983 Jump to B983 if {} is higher.
B97E SET 0,(IX+$17) Set bit 0 of *IX+17.
B982 RET Return.
B983 SET 2,(IX+$17) Set bit 2 of *IX+17.
B987 RET Return.
B988 LD A,H A=H.
B989 CP (IX+$20) Compare A with *IX+20.
B98C JR NZ,$B944 Jump to B944 if {} is not zero.
B98E POP IX Restore IX from the stack.
B990 BIT 1,(IX+$17) Test bit 1 of *IX+17.
B994 RET NZ Return if {} is not zero.
B995 LD A,C A=C.
B996 CP $1B Compare A with 1B.
B998 JR NC,$B983 Jump to B983 if {} is higher.
B99A SET 0,(IX+$17) Set bit 0 of *IX+17.
B99E RET Return.
B99F PUSH IX Stash IX on the stack.
B9A1 LD IX,($C277) IX=C277.
B9A5 BIT 4,L Test bit 4 of L.
B9A7 JR Z,$B9AE Jump to B9AE if {} is zero.
B9A9 LD DE,$000C DE=000C.
B9AC ADD IX,DE IX+=DE.
B9AE PUSH HL Stash HL on the stack.
B9AF LD DE,$0020 DE=0020.
B9B2 ADD HL,DE HL+=DE.
B9B3 LD A,(HL) A=*HL.
B9B4 AND %00111000 Keep only bits 3-5.
B9B6 CP $20 Compare A with 20.
B9B8 LD A,L A=L.
B9B9 JR NZ,$B9D7 Jump to B9D7 if {} is not zero.
B9BB LD E,(IX+$1E) E=*IX+1E.
B9BE LD D,(IX+$1F) D=*IX+1F.
B9C1 POP HL Restore HL from the stack.
B9C2 PUSH HL Stash HL on the stack.
B9C3 AND A Set flags.
B9C4 SBC HL,DE HL-=DE (with carry).
B9C6 JR Z,$B9D7 Jump to B9D7 if {} is zero.
B9C8 SET 0,(IX+$21) Set bit 0 of *IX+21.
B9CC RES 1,(IX+$21) Reset bit 1 of *IX+21.
B9D0 LD HL,$C386 HL=C386.
B9D3 SET 4,(HL) Set bit 4 of *HL.
B9D5 JR $B9F6 Jump to B9F6.
B9D7 LD HL,$C386 HL=C386.
B9DA RES 4,(HL) Reset bit 4 of *HL.
B9DC BIT 1,(IX+$21) Jump to B9F6 if bit 1 of *IX+21 is not set.
B9E0 JR Z,$B9F6
B9E2 BIT 0,(IX+$21) Jump to B9F6 if bit 0 of *IX+21 is set.
B9E6 JR NZ,$B9F6
B9E8 AND %00011111 Keep only bits 0-4.
B9EA CP $08 Jump to B9F2 if A is equal to 08.
B9EC JR Z,$B9F2
B9EE CP $17 Jump to B9F6 if A is not equal to 17.
B9F0 JR NZ,$B9F6
B9F2 SET 2,(IX+$21) Set bit 2 of *IX+21.
B9F6 POP HL Restore HL from the stack.
B9F7 LD A,L A=L.
B9F8 CP (IX+$1A) Compare A with *IX+1A.
B9FB JR NZ,$BA04 Jump to BA04 if {} is not zero.
B9FD LD A,H A=H.
B9FE CP (IX+$1B) Compare A with *IX+1B.
BA01 JR Z,$BA2C Jump to BA2C if {} is zero.
BA03 LD A,L A=L.
BA04 CP (IX+$1E) Compare A with *IX+1E.
BA07 JR NZ,$BA1D Jump to BA1D if {} is not zero.
BA09 LD A,H A=H.
BA0A CP (IX+$1F) Compare A with *IX+1F.
BA0D JR NZ,$BA1D Jump to BA1D if {} is not zero.
BA0F POP IX Restore IX from the stack.
BA11 CALL $C144 Call C144.
BA14 INC HL Increment HL by one.
BA15 SET 3,(HL) Set bit 3 of *HL.
BA17 LD HL,$CC3D HL=CC3D.
BA1A SET 2,(HL) Set bit 2 of *HL.
BA1C RET Return.
BA1D LD L,(IX+$1E) L=*IX+1E.
BA20 LD H,(IX+$1F) H=*IX+1F.
BA23 POP IX Restore IX from the stack.
BA25 CALL $C144 Call C144.
BA28 INC HL Increment HL by one.
BA29 RES 3,(HL) Reset bit 3 of *HL.
BA2B RET Return.
BA2C CALL $C144 Call C144.
BA2F LD DE,$0041 DE=0041.
BA32 ADD HL,DE HL+=DE.
BA33 BIT 6,B Jump to BA54 if bit 6 of B is not set.
BA35 JR Z,$BA54
BA37 RES 3,(HL) Reset bit 3 of *HL.
BA39 RES 6,B Reset bit 6 of B.
BA3B SET 6,(IX+$21) Set bit 6 of *IX+21.
BA3F BIT 7,(IX+$21) Test bit 7 of *IX+21.
BA43 POP IX Restore IX from the stack.
BA45 LD HL,$CC3D HL=CC3D.
BA48 JR Z,$BA4D Jump to BA4D if bit 7 of *IX+21 is not set.
BA4A SET 3,(HL) Set bit 3 of *HL.
BA4C RET Return.
BA4D SET 4,(HL) Set bit 4 of *HL.
BA4F SET 4,(IX+$17) Set bit 4 of *IX+17.
BA53 RET Return.
BA54 BIT 3,(HL) Jump to BAA5 if bit 3 of *HL is set.
BA56 JR NZ,$BAA5
BA58 SET 3,(HL) Set bit 3 of *HL.
BA5A SET 6,B Set bit 6 of B.
BA5C RES 6,(IX+$21) Reset bit 6 of *IX+21.
BA60 BIT 5,(IX+$21) Jump to BA6E if bit 5 of *IX+21 is not set.
BA64 JR Z,$BA6E
BA66 LD A,($C36D) A=*C36D.
BA69 OR %00000000 Set bits .
BA6B LD ($C36D),A Write A to *C36D.
BA6E PUSH IX Stash IX on the stack.
BA70 POP HL Restore HL from the stack.
BA71 LD DE,$0021 DE=0021.
BA74 ADD HL,DE HL+=DE.
BA75 POP IX Restore IX from the stack.
BA77 BIT 4,(IX+$17) Test bit 4 of *IX+17.
BA7B RES 4,(IX+$17) Reset bit 4 of *IX+17.
BA7F JR NZ,$BA9F Jump to BA9F if bit 4 of *IX+17 is set.
BA81 BIT 7,(HL) Test bit 7 of *HL.
BA83 SET 7,(HL) Set bit 7 of *HL.
BA85 JR NZ,$BA99 Jump to BA99 if *HL is set.
BA87 SET 1,(HL) Set bit 1 of *HL.
BA89 LD HL,$CC3D HL=CC3D.
BA8C SET 3,(HL) Set bit 3 of *HL.
BA8E LD HL,$C274 HL=C274.
BA91 PUSH IX Stash IX on the stack.
BA93 CALL AddPointsToScore Call AddPointsToScore.
BA96 POP IX Restore IX from the stack.
BA98 RET Return.
BA99 LD HL,$CC3D HL=CC3D.
BA9C SET 3,(HL) Set bit 3 of *HL.
BA9E RET Return.
BA9F LD HL,$CC3D HL=CC3D.
BAA2 SET 2,(HL) Set bit 2 of *HL.
BAA4 RET Return.
BAA5 POP IX Restore IX from the stack.
BAA7 POP HL Restore HL and HL from the stack.
BAA8 POP HL
BAA9 RET Return.
BAAA BIT 3,B Return if bit 3 of B is not set.
BAAC RET Z
BAAD BIT 4,B Return if bit 4 of B is not set.
BAAF RET Z
BAB0 LD DE,$0060 DE=0060.
BAB3 RES 5,H Reset bit 5 of H.
BAB5 AND A Set flags.
BAB6 SBC HL,DE HL-=DE (with carry).
BAB8 LD DE,($C2CC) DE=*C2CC.
BABC SBC HL,DE HL-=DE (with carry).
BABE JR Z,$BAC7 Jump to BAC7 if {} is zero.
BAC0 LD DE,$0001 DE=0001.
BAC3 AND A Set flags.
BAC4 SBC HL,DE HL-=DE (with carry).
BAC6 RET NZ Return if {} is not zero.
BAC7 POP HL Restore HL and HL from the stack.
BAC8 POP HL
BAC9 SET 5,B Set bit 5 of B.
BACB LD A,B A=B.
BACC LD (IX+$13),A Write A to *IX+13.
BACF AND %00111000 Keep only bits 3-5.
BAD1 OR %10000000 Set bits 7.
BAD3 RES 4,(IX+$17) Reset bit 4 of *IX+17.
BAD7 CALL $BA9F Call BA9F.
BADA JP $B8A9 Jump to B8A9.
Prev: B703 Up: Map Next: BADD