Prev: C36D Up: Map Next: C38F
C386: 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 C386 AND A Return if the speed is zero.
C387 RET Z
C388 JP P,BringSpeedCloserToZero_Step Jump to BringSpeedCloserToZero_Step if the sign flag is clear.
C38B INC A Add two to the negative speed.
C38C INC A
BringSpeedCloserToZero_Step C38D DEC A Decrement A.
C38E RET Return.
View the equivalent code in;
Prev: C36D Up: Map Next: C38F