Prev: 763B Up: Map Next: 76D3
763C: Routine at 763C
Used by the routine at 6C00.
763C CALL $7420 Call 7420.
763F LD HL,($783C) HL=*Fuel.
7642 LD A,H Jump to 769A if H is lower than 80.
7643 CP $80
7645 JR C,$769A
7647 LD HL,($782E) HL=*782E.
764A LD A,(HL) A=*HL.
764B DEC A Decrease A by one.
764C JR Z,$765C Jump to 765C if A is zero.
764E CP $31 Call EBF3 if A is higher than 31.
7650 CALL NC,$EBF3
7653 CP $2D Call EBF3 if A is lower than 2D.
7655 CALL C,$EBF3
7658 NOP No operation.
7659 NOP
765A NOP
765B NOP
765C CALL RemoveSprite Call RemoveSprite.
765F LD A,($7822) A=*Speed.
7662 BIT 7,A Test bit 7 of A.
7664 LD A,$87 A=87.
7666 JR NZ,$766A Jump to 766A if {} is not zero.
7668 ADD A,$40 A+=40.
766A LD ($7834),A Write A to *7834.
766D CALL $6B2D Call 6B2D.
Print the "OUT OF FUEL" messaging in the footer.
out-of-fuel
7670 LD A,$A9 A=A9 (INK: BLUE, PAPER: CYAN FLASH: ON).
7672 LD HL,$BA86 HL=Messaging_OutOfFuel.
7675 CALL PrintFooterColourString Call PrintFooterColourString.
7678 LD D,$10 D=10.
767A LD C,$01 C=01.
767C LD HL,$1E00 HL=1E00.
767F LD A,C A=C.
7680 LD B,C B=C.
7681 OUT ($FE),A OUT FE
7683 XOR %00010000 Flip bits 4.
7685 DJNZ $7685 Decrease counter by one and loop back to 7685 until counter is zero.
7687 DEC L Decrease L by one.
7688 JR NZ,$7680 Jump to 7680 if L is not zero.
768A DEC H Decrease H by one.
768B JR NZ,$7680 Jump to 7680 if H is not zero.
768D INC C Increment C by one.
768E DEC D Decrease D by one.
768F JR NZ,$767C Jump to 767C if D is not zero.
7691 LD HL,$3400 Write 3400 to *Fuel.
7694 LD ($783C),HL
7697 JP $7161 Jump to 7161.
769A LD A,($7822) A=*Speed.
769D BIT 7,A Test bit 7 of A.
769F JR NZ,$76A2 Jump to 76A2 if {} is not zero.
76A1 CPL Invert the bits in A.
76A2 SUB $7E A-=7E.
76A4 SRL A Shift A right.
76A6 LD E,A E=A.
76A7 LD D,$00 D=00.
76A9 AND A Set flags.
76AA SBC HL,DE HL-=DE (with carry).
76AC LD ($783C),HL Write HL to *Fuel.
76AF JR C,$76D0 Jump to 76D0 if {} is lower.
76B1 LD A,H A=H.
76B2 SRL A Shift A right.
76B4 SRL A Shift A right.
76B6 CPL Invert the bits in A.
76B7 SUB $0C A-=0C.
76B9 LD L,A L=A.
76BA LD H,$BA H=BA.
76BC LD DE,$5A65 DE=5A65 (attribute buffer location).
76BF CALL $6893 Call 6893.
76C2 LD HL,($783C) HL=*Fuel.
76C5 LD A,H A=H.
76C6 CP $04 Compare A with 04.
76C8 CALL NC,$6D50 Call 6D50 is higher.
76CB BIT 6,L Test bit 6 of L.
76CD CALL NZ,$6D50 Call 6D50 not zero.
76D0 JP $EBF3 Jump to EBF3.
Prev: 763B Up: Map Next: 76D3