Prev: 46884 Up: Map Next: 47926
47837: Routine at BADD
Used by the routine at StartGame.
47837 LD IX,50030 IX=50030.
47841 LD B,(IX+10) B=*IX+10.
47844 LD C,(IX+11) C=*IX+11.
47847 LD DE,32 DE=0032.
47850 LD L,(IX+12) L=*IX+12.
47853 LD H,(IX+13) H=*IX+13.
47856 SET 5,H Set bit 5 of H.
47858 LD A,L A=L.
47859 AND %00011111 Keep only bits 0-4.
47861 CP 0 Compare A with 0.
47863 JR C,47878 Jump to 47878 if {} is lower.
47865 CP 0 Compare A with 0.
47867 JR NC,47878 Jump to 47878 if {} is higher.
47869 PUSH HL Stash HL and BC on the stack.
47870 PUSH BC
47871 SET 6,(HL) Set bit 6 of *HL.
47873 ADD HL,DE HL+=DE.
47874 DJNZ 47871 Decrease counter by one and loop back to 47871 until counter is zero.
47876 POP BC Restore BC and HL from the stack.
47877 POP HL
47878 INC HL Increment HL by one.
47879 DEC C Decrease C by one.
47880 JR NZ,47858 Jump to 47858 if {} is not zero.
47882 LD C,(IX+11) C=*IX+11.
47885 LD L,(IX+12) L=*IX+12.
47888 LD A,(IX+13) A=*IX+13.
47891 LD DE,64 DE=0064.
47894 AND %00000011 Keep only bits 0-1.
47896 OR %00111000 Set bits 3-5.
47898 LD H,A H=A.
47899 ADD HL,HL HL+=HL.
47900 INC HL Increment HL by one.
47901 LD A,L A=L.
47902 AND %00111111 Keep only bits 0-5.
47904 CP 0 Compare A with 0.
47906 JR C,47921 Jump to 47921 if {} is lower.
47908 CP 0 Compare A with 0.
47910 JR NC,47921 Jump to 47921 if {} is higher.
47912 PUSH HL Stash HL and BC on the stack.
47913 PUSH BC
47914 RES 7,(HL) Reset bit 7 of *HL.
47916 ADD HL,DE HL+=DE.
47917 DJNZ 47914 Decrease counter by one and loop back to 47914 until counter is zero.
47919 POP BC Restore BC and HL from the stack.
47920 POP HL
47921 INC HL Increment HL by one.
47922 DEC C Decrease C by one.
47923 JR NZ,47900 Jump to 47900 if {} is not zero.
47925 RET Return.
Prev: 46884 Up: Map Next: 47926