Routines |
Prev: 7047 | Up: Map | Next: 7087 |
|
||||
Handler_Refuel | 7048 | LD HL,($782E) | HL=*782E. | |
704B | LD (HL),$2E | Write 2E to *HL. | ||
704D | LD A,($7833) | A=*7833. | ||
7050 | CP $08 | Compare A with 08. | ||
7052 | LD H,$42 | H=42. | ||
7054 | JR C,Handler_Refuel_0 | Jump to Handler_Refuel_0 if A was lower than 08 (on line 7050). | ||
7056 | LD H,$4A | H=4A. | ||
Handler_Refuel_0 | 7058 | DEC A | Decrease A by one. | |
7059 | AND %00000110 | Keep only bits 1-2. | ||
705B | RRCA | RRCA. | ||
705C | RRCA | |||
705D | RRCA | |||
705E | ADD A,$0D | A+=0D. | ||
7060 | LD L,A | L=A. | ||
7061 | LD C,$03 | C=03. | ||
7063 | LD E,$02 | E=02. | ||
Handler_Refuel_1 | 7065 | LD B,$06 | B=06. | |
7067 | XOR A | Write 00 to *HL. | ||
Handler_Refuel_2 | 7068 | LD (HL),A | ||
7069 | INC L | Increment L by one. | ||
706A | DJNZ Handler_Refuel_2 | Decrease counter by one and loop back to Handler_Refuel_2 until counter is zero. | ||
706C | LD A,L | L-=06. | ||
706D | SUB $06 | |||
706F | LD L,A | |||
7070 | INC H | Increment H by two. | ||
7071 | INC H | |||
7072 | DEC C | Decrease C by one. | ||
7073 | JR NZ,Handler_Refuel_1 | Jump to Handler_Refuel_1 until C is zero. | ||
7075 | ADD A,$20 | A+=20. | ||
7077 | LD L,A | L=A. | ||
7078 | LD A,H | A=H. | ||
7079 | SUB $08 | A-=08. | ||
707B | LD H,A | H=A. | ||
707C | LD C,E | C=E. | ||
707D | DEC E | Decrease E by one. | ||
707E | JR NZ,Handler_Refuel_1 | Jump to Handler_Refuel_1 until E is zero. | ||
7080 | LD HL,$3400 | Write 3400 to *Fuel. | ||
7083 | LD ($783C),HL | |||
7086 | RET | Return. |
Prev: 7047 | Up: Map | Next: 7087 |