Prev: 50029 Up: Map Next: 50063
50054: Bring Speed Closer To Zero
Takes one off the size of a speed.
Input
A The speed
Output
A The new speed
F Zero flag set if the speed is zero
BringSpeedCloserToZero 50054 AND A Return if the speed is zero.
50055 RET Z
50056 JP P,BringSpeedCloserToZero_Step Jump to BringSpeedCloserToZero_Step if the sign flag is clear.
50059 INC A Add two to the negative speed.
50060 INC A
BringSpeedCloserToZero_Step 50061 DEC A Decrement A.
50062 RET Return.
View the equivalent code in;
Prev: 50029 Up: Map Next: 50063