Both steppers moving same direction when commands given

Clintoj:
I will do that and can I use the CNC shield and a4988 setup to test this code ?

I believe so. You just need to know which Arduino pins are for step and direction for each motor.

...R