![]() |
Routines |
| Prev: 65FD | Up: Map | Next: 6628 |
|
Used by the routine at HandlerCar.
Continues HandlerCar when the car is moving towards lower X positions. Takes the distance away from the X position, stopping at zero.
|
||||||||||
| ReduceCarX | 661D | EX DE,HL | Swap DE and HL so that HL is the X position and DE is the distance. | |||||||
| 661E | AND A | Reset the carry flag. | ||||||||
| 661F | SBC HL,DE | HL=HL - DE. | ||||||||
| 6621 | JR NC,HandlerCar_StoreX | If the result is not negative then jump to HandlerCar_StoreX. | ||||||||
| 6623 | LD HL,$0000 | HL=0000 (stop at zero). | ||||||||
| 6626 | JR HandlerCar_StoreX | Jump to HandlerCar_StoreX. | ||||||||
| Prev: 65FD | Up: Map | Next: 6628 |