rem This program makes the X-motor to move back and forth rem Concepts demonstrated; velx, accx, posx, movax, rem, wait, goto, setbit, clrbit rem Set the velocity velx 2000 rem Set the acceleration accx 20000 clrbit 1 200 rem Set the position to move to posx 5000 rem Start the absolute move movax rem Wait until the move is completed donex? setbit 1 rem Wait for 250 msec wait 250 rem Set the position to move to posx 0 rem Start the absolute move movax rem Wait until the move is completed donex? rem Wait for 250 msec wait 250 clrbit 1 rem Start all over again goto 200 end $