B921: Handle the count down.
CountDown |
B921 |
LD HL,(Plans_CountDownTime) |
|
B924 |
LD A,L |
|
B925 |
OR H |
|
B926 |
RET Z |
|
B927 |
LD HL,Plans_CountDownFrames |
|
B92A |
LD A,($5C78) |
|
B92D |
SUB (HL) |
|
B92E |
CP $32 |
|
B930 |
RET C |
|
B931 |
LD A,(HL) |
|
B932 |
ADD A,$32 |
|
B934 |
LD (HL),A |
|
B935 |
DEC HL |
|
B936 |
DEC HL |
|
B937 |
LD A,(HL) |
|
B938 |
SUB $01 |
|
B93A |
DAA |
|
B93B |
LD (HL),A |
|
B93C |
LD ($C588),A |
|
B93F |
INC HL |
|
B940 |
LD A,(HL) |
|
B941 |
SBC A,$00 |
|
B943 |
DAA |
|
B944 |
LD (HL),A |
|
B945 |
LD ($C589),A |
|
B948 |
LD A,$03 |
|
B94A |
LD BC,$5055 |
CountDown_Digit |
B94D |
PUSH AF |
|
B94E |
LD HL,($C589) |
|
B951 |
LD H,$00 |
|
B953 |
LD DE,Digit_LedLayout |
|
B956 |
ADD HL,DE |
|
B957 |
LD A,(HL) |
|
B958 |
LD IX,Digit_Info |
CountDown_Led |
B95C |
LD DE,Mem_zeroes |
|
B95F |
SRL A |
|
B961 |
JR NC,CountDown_0 |
|
B963 |
LD E,(IX+$01) |
|
B966 |
LD D,$00 |
|
B968 |
LD HL,Bmp_TimerLeds |
|
B96B |
ADD HL,DE |
|
B96C |
EX DE,HL |
CountDown_0 |
B96D |
LD L,(IX+$00) |
|
B970 |
LD H,$00 |
|
B972 |
ADD HL,BC |
|
B973 |
EX DE,HL |
|
B974 |
PUSH BC |
|
B975 |
LD BC,$0010 |
CountDown_BLitLed |
B978 |
LDI |
|
B97A |
DEC DE |
|
B97B |
INC D |
|
B97C |
DEC C |
|
B97D |
JR NZ,CountDown_BLitLed |
|
B97F |
POP BC |
|
B980 |
INC IX |
|
B982 |
INC IX |
|
B984 |
CP $01 |
|
B986 |
JR NZ,CountDown_Led |
|
B988 |
INC BC |
|
B989 |
INC BC |
|
B98A |
INC BC |
|
B98B |
LD HL,$C588 |
|
B98E |
XOR A |
|
B98F |
RLD |
|
B991 |
INC HL |
|
B992 |
LD (HL),A |
|
B993 |
POP AF |
|
B994 |
DEC A |
|
B995 |
JR NZ,CountDown_Digit |
|
B997 |
RET |