B8D2: Routine at B8D2
sub_b8d2 |
B8D2 |
LD A,($A25A) |
|
B8D5 |
LD B,A |
|
B8D6 |
LD C,$00 |
|
B8D8 |
LD A,($A258) |
|
B8DB |
OR A |
|
B8DC |
JP P,sub_b8d2_0 |
|
B8DF |
NEG |
|
B8E1 |
INC C |
sub_b8d2_0 |
B8E2 |
SUB B |
|
B8E3 |
JR Z,sub_b8d2_2 |
|
B8E5 |
RR C |
|
B8E7 |
LD B,$00 |
|
B8E9 |
JR NC,sub_b8d2_1 |
|
B8EB |
NEG |
|
B8ED |
DEC B |
sub_b8d2_1 |
B8EE |
LD HL,($A171) |
|
B8F1 |
LD C,A |
|
B8F2 |
ADD HL,BC |
|
B8F3 |
LD ($A171),HL |
sub_b8d2_2 |
B8F6 |
LD A,($A240) |
|
B8F9 |
ADD A,$22 |
|
B8FB |
LD H,$EE |
|
B8FD |
LD L,A |
|
B8FE |
XOR A |
|
B8FF |
LD ($A25B),A |
|
B902 |
LD ($A25A),A |
|
B905 |
LD A,(HL) |
|
B906 |
SRA A |
|
B908 |
JP P,sub_b8d2_3 |
|
B90B |
INC A |
sub_b8d2_3 |
B90C |
LD ($A258),A |
|
B90F |
DEC L |
|
B910 |
DEC L |
|
B911 |
LD A,(HL) |
|
B912 |
LD C,A |
|
B913 |
OR A |
|
B914 |
LD B,$00 |
|
B916 |
JR Z,sub_b8d2_5 |
|
B918 |
LD B,$06 |
|
B91A |
JP P,sub_b8d2_4 |
|
B91D |
NEG |
|
B91F |
LD B,$03 |
sub_b8d2_4 |
B921 |
CP $03 |
|
B923 |
JR NC,sub_b8d2_5 |
|
B925 |
LD B,$00 |
sub_b8d2_5 |
B927 |
LD A,B |
|
B928 |
LD ($B5B0),A |
|
B92B |
LD HL,$A259 |
|
B92E |
LD A,(HL) |
|
B92F |
AND A |
|
B930 |
JP P,sub_b8d2_6 |
|
B933 |
BIT 7,C |
|
B935 |
JR NZ,sub_b8d2_6 |
|
B937 |
NEG |
|
B939 |
SUB $02 |
|
B93B |
JR C,sub_b8d2_6 |
|
B93D |
LD B,A |
|
B93E |
LD A,($B064) |
|
B941 |
AND A |
|
B942 |
JR NZ,sub_b8d2_6 |
|
B944 |
LD DE,($A24A) |
|
B948 |
RR D |
|
B94A |
LD A,E |
|
B94B |
RLA |
|
B94C |
RLA |
|
B94D |
AND $03 |
|
B94F |
CPL |
|
B950 |
ADD A,$04 |
|
B952 |
LD D,A |
|
B953 |
LD A,B |
|
B954 |
SUB D |
|
B955 |
JR C,sub_b8d2_6 |
|
B957 |
JR Z,sub_b8d2_6 |
|
B959 |
PUSH HL |
|
B95A |
RLCA |
|
B95B |
LD E,A |
|
B95C |
LD D,$00 |
|
B95E |
LD HL,$B057 |
|
B961 |
ADD HL,DE |
|
B962 |
LD E,(HL) |
|
B963 |
INC HL |
|
B964 |
LD A,(HL) |
|
B965 |
LD ($B064),A |
|
B968 |
LD HL,$B045 |
|
B96B |
ADD HL,DE |
|
B96C |
LD ($B07A),HL |
|
B96F |
POP HL |
sub_b8d2_6 |
B970 |
LD (HL),C |
|
B971 |
LD A,($A25C) |
|
B974 |
EX AF,AF' |
|
B975 |
LD A,($A240) |
|
B978 |
LD H,$EE |
|
B97A |
LD L,A |
|
B97B |
LD A,($A265) |
|
B97E |
AND A |
|
B97F |
LD A,(HL) |
|
B980 |
JR Z,sub_b8d2_7 |
|
B982 |
LD A,($A269) |
|
B985 |
AND A |
|
B986 |
JR Z,sub_b8d2_7 |
|
B988 |
LD A,($A249) |
|
B98B |
AND A |
|
B98C |
LD A,(HL) |
|
B98D |
JR Z,sub_b8d2_7 |
|
B98F |
NEG |
sub_b8d2_7 |
B991 |
LD ($A25C),A |
|
B994 |
AND A |
|
B995 |
LD E,A |
|
B996 |
JR Z,sub_b8d2_9 |
|
B998 |
LD E,$01 |
|
B99A |
JP P,sub_b8d2_8 |
|
B99D |
RL E |
|
B99F |
NEG |
sub_b8d2_8 |
B9A1 |
LD D,A |
|
B9A2 |
ADD A,A |
|
B9A3 |
ADD A,A |
|
B9A4 |
LD ($A25D),A |
|
B9A7 |
LD B,A |
|
B9A8 |
LD A,($A25E) |
|
B9AB |
AND A |
|
B9AC |
JR NZ,sub_b8d2_10 |
|
B9AE |
LD HL,($A24A) |
|
B9B1 |
LD A,L |
|
B9B2 |
RR H |
|
B9B4 |
RLA |
|
B9B5 |
RLA |
|
B9B6 |
RLA |
|
B9B7 |
AND $06 |
|
B9B9 |
ADD A,B |
|
B9BA |
LD C,A |
|
B9BB |
LD B,$00 |
|
B9BD |
LD HL,$B828 |
|
B9C0 |
ADD HL,BC |
|
B9C1 |
LD A,(HL) |
sub_b8d2_9 |
B9C2 |
LD ($A25E),A |
sub_b8d2_10 |
B9C5 |
LD A,($A262) |
|
B9C8 |
LD B,A |
|
B9C9 |
LD C,$00 |
|
B9CB |
EX AF,AF' |
|
B9CC |
AND A |
|
B9CD |
JP P,sub_b8d2_11 |
|
B9D0 |
NEG |
|
B9D2 |
INC C |
sub_b8d2_11 |
B9D3 |
SUB B |
|
B9D4 |
JR C,sub_b8d2_13 |
|
B9D6 |
JR Z,sub_b8d2_13 |
|
B9D8 |
LD B,A |
|
B9D9 |
ADD A,A |
|
B9DA |
ADD A,A |
|
B9DB |
SRL B |
|
B9DD |
ADD A,B |
|
B9DE |
RR C |
|
B9E0 |
LD B,$00 |
|
B9E2 |
JR NC,sub_b8d2_12 |
|
B9E4 |
DEC B |
|
B9E5 |
NEG |
sub_b8d2_12 |
B9E7 |
LD C,A |
|
B9E8 |
LD ($A25F),BC |
sub_b8d2_13 |
B9EC |
XOR A |
|
B9ED |
LD ($A261),A |
|
B9F0 |
LD ($A262),A |
|
B9F3 |
RET |