Stepper motor backward movement - I'm lost

Make it easy on yourself

    i = Serial.read();
    if ((i >= '0')&&(i <='9'))
    {
      i -= '0';