![]() |
Routines |
| Prev: CC62 | Up: Map | Next: CC77 |
|
Used by the routine at UpdateFuelGauge.
Used when the fuel gauge has reached the level of the fuel. If the ship is in its normal state, the gauge is at the empty row and the bottom seven bits of the frame counter are zero, the ship is put in state 1: out of fuel.
|
||||||||
| CheckFuelEmpty | CC63 | LD A,($8F53) | The state of the ship. | |||||
| CC66 | AND A | Return unless the ship is flying normally. | ||||||
| CC67 | RET NZ | |||||||
| CC68 | LD A,B | The row of the needle. | ||||||
| CC69 | CP $BE | Return unless the needle is on the empty row. | ||||||
| CC6B | RET NZ | |||||||
| CC6C | LD A,($9A64) | The frame counter. | ||||||
| CC6F | AND %01111111 | The bottom seven bits. | ||||||
| CC71 | RET NZ | Return unless they are all clear. | ||||||
| CC72 | INC A | The out-of-fuel state is one. | ||||||
| CC73 | LD ($8F53),A | Put the ship in that state. | ||||||
| CC76 | RET | Return. | ||||||
| Prev: CC62 | Up: Map | Next: CC77 |