Prev: 51824 Up: Map Next: 51858
51849: Bring Speed Closer To Zero
Takes one off the size of a speed.
Input
A The speed
Output
A The new speed
F The zero flag is set if the new speed is zero
BringSpeedCloserToZero 51849 AND A Test whether the speed is zero.
51850 RET Z Return if it is.
51851 JP P,BringSpeedCloserToZero_Step Jump to BringSpeedCloserToZero_Step if it is positive.
51854 INC A Add two to the negative speed.
51855 INC A
BringSpeedCloserToZero_Step 51856 DEC A Take one off the speed.
51857 RET Return.
View the equivalent code in;
Prev: 51824 Up: Map Next: 51858