Routines |
Prev: 30267 | Up: Map | Next: 30419 |
Used by the routine at 27648.
|
||||
30268 | CALL 29728 | Call 29728. | ||
30271 | LD HL,(30780) | HL=*Fuel. | ||
30274 | LD A,H | Jump to 30362 if H is lower than 128. | ||
30275 | CP 128 | |||
30277 | JR C,30362 | |||
30279 | LD HL,(30766) | HL=*30766. | ||
30282 | LD A,(HL) | A=*HL. | ||
30283 | DEC A | Decrease A by one. | ||
30284 | JR Z,30300 | Jump to 30300 if A is zero. | ||
30286 | CP 49 | Call 60403 if A is higher than 49. | ||
30288 | CALL NC,60403 | |||
30291 | CP 45 | Call 60403 if A is lower than 45. | ||
30293 | CALL C,60403 | |||
30296 | NOP | No operation. | ||
30297 | NOP | |||
30298 | NOP | |||
30299 | NOP | |||
30300 | CALL RemoveSprite | Call RemoveSprite. | ||
30303 | LD A,(30754) | A=*Speed. | ||
30306 | BIT 7,A | Test bit 7 of A. | ||
30308 | LD A,135 | A=135. | ||
30310 | JR NZ,30314 | Jump to 30314 if {} is not zero. | ||
30312 | ADD A,64 | A+=64. | ||
30314 | LD (30772),A | Write A to *30772. | ||
30317 | CALL 27437 | Call 27437. | ||
Print the "OUT OF FUEL" messaging in the footer.
|
||||
30320 | LD A,169 | A=169 (INK: BLUE, PAPER: CYAN FLASH: ON). | ||
30322 | LD HL,47750 | HL=Messaging_OutOfFuel. | ||
30325 | CALL PrintFooterColourString | Call PrintFooterColourString. | ||
30328 | LD D,16 | D=16. | ||
30330 | LD C,1 | C=1. | ||
30332 | LD HL,7680 | HL=7680. | ||
30335 | LD A,C | A=C. | ||
30336 | LD B,C | B=C. | ||
30337 | OUT (254),A | OUT 254 | ||
30339 | XOR %00010000 | Flip bits 4. | ||
30341 | DJNZ 30341 | Decrease counter by one and loop back to 30341 until counter is zero. | ||
30343 | DEC L | Decrease L by one. | ||
30344 | JR NZ,30336 | Jump to 30336 if L is not zero. | ||
30346 | DEC H | Decrease H by one. | ||
30347 | JR NZ,30336 | Jump to 30336 if H is not zero. | ||
30349 | INC C | Increment C by one. | ||
30350 | DEC D | Decrease D by one. | ||
30351 | JR NZ,30332 | Jump to 30332 if D is not zero. | ||
30353 | LD HL,13312 | Write 13312 to *Fuel. | ||
30356 | LD (30780),HL | |||
30359 | JP 29025 | Jump to 29025. | ||
30362 | LD A,(30754) | A=*Speed. | ||
30365 | BIT 7,A | Test bit 7 of A. | ||
30367 | JR NZ,30370 | Jump to 30370 if {} is not zero. | ||
30369 | CPL | Invert the bits in A. | ||
30370 | SUB 126 | A-=126. | ||
30372 | SRL A | Shift A right. | ||
30374 | LD E,A | E=A. | ||
30375 | LD D,0 | D=0. | ||
30377 | AND A | Set flags. | ||
30378 | SBC HL,DE | HL-=DE (with carry). | ||
30380 | LD (30780),HL | Write HL to *Fuel. | ||
30383 | JR C,30416 | Jump to 30416 if {} is lower. | ||
30385 | LD A,H | A=H. | ||
30386 | SRL A | Shift A right. | ||
30388 | SRL A | Shift A right. | ||
30390 | CPL | Invert the bits in A. | ||
30391 | SUB 12 | A-=12. | ||
30393 | LD L,A | L=A. | ||
30394 | LD H,186 | H=186. | ||
30396 | LD DE,23141 | DE=23141 (attribute buffer location). | ||
30399 | CALL 26771 | Call 26771. | ||
30402 | LD HL,(30780) | HL=*Fuel. | ||
30405 | LD A,H | A=H. | ||
30406 | CP 4 | Compare A with 4. | ||
30408 | CALL NC,27984 | Call 27984 is higher. | ||
30411 | BIT 6,L | Test bit 6 of L. | ||
30413 | CALL NZ,27984 | Call 27984 not zero. | ||
30416 | JP 60403 | Jump to 60403. |
Prev: 30267 | Up: Map | Next: 30419 |