Routines |
Prev: 28743 | Up: Map | Next: 28807 |
|
||||
Handler_Refuel | 28744 | LD HL,(30766) | HL=*LevelProgressPointer. | |
28747 | LD (HL),46 | Write 46 to *HL. | ||
28749 | LD A,(30771) | A=*30771. | ||
28752 | CP 8 | Compare A with 8. | ||
28754 | LD H,66 | H=66. | ||
28756 | JR C,Handler_Refuel_0 | Jump to Handler_Refuel_0 if A was lower than 8 (on line 28752). | ||
28758 | LD H,74 | H=74. | ||
Handler_Refuel_0 | 28760 | DEC A | Decrease A by one. | |
28761 | AND %00000110 | Keep only bits 1-2. | ||
28763 | RRCA | RRCA. | ||
28764 | RRCA | |||
28765 | RRCA | |||
28766 | ADD A,13 | A+=13. | ||
28768 | LD L,A | L=A. | ||
28769 | LD C,3 | C=3. | ||
28771 | LD E,2 | E=2. | ||
Handler_Refuel_1 | 28773 | LD B,6 | B=6. | |
28775 | XOR A | Write 0 to *HL. | ||
Handler_Refuel_2 | 28776 | LD (HL),A | ||
28777 | INC L | Increment L by one. | ||
28778 | DJNZ Handler_Refuel_2 | Decrease counter by one and loop back to Handler_Refuel_2 until counter is zero. | ||
28780 | LD A,L | L-=6. | ||
28781 | SUB 6 | |||
28783 | LD L,A | |||
28784 | INC H | Increment H by two. | ||
28785 | INC H | |||
28786 | DEC C | Decrease C by one. | ||
28787 | JR NZ,Handler_Refuel_1 | Jump to Handler_Refuel_1 until C is zero. | ||
28789 | ADD A,32 | A+=32. | ||
28791 | LD L,A | L=A. | ||
28792 | LD A,H | A=H. | ||
28793 | SUB 8 | A-=8. | ||
28795 | LD H,A | H=A. | ||
28796 | LD C,E | C=E. | ||
28797 | DEC E | Decrease E by one. | ||
28798 | JR NZ,Handler_Refuel_1 | Jump to Handler_Refuel_1 until E is zero. | ||
28800 | LD HL,13312 | Write 13312 to *Fuel. | ||
28803 | LD (30780),HL | |||
28806 | RET | Return. |
Prev: 28743 | Up: Map | Next: 28807 |