<advertising_mode>
This is actually the forum for the grblshield, which is a spiffy single board solution that provides three stepper drivers in a convenient Arduino Shield format, and replaces those Allegro drivers and pesky wires with a simple, convenient, cost effective solution that lasts a long time.
</advertising_mode>
Seriously, I think – what you want is the source code from the grbl project, which can be found here:
https://github.com/simen/grbl
Instructions on loading grbl onto the Arduino hardware can be found here:
http://dank.bengler.no/-/page/show/5470_grbl?ref=mst
http://dank.bengler.no/-/page/show/5471_gettinggrbl
Note that when you load grbl onto the Arduino – is no longer an “Arduino” as everything (including the Arduino boot loader) are overwritten. The board can easily be returned to being an Arduino by reprogramming it from the Arduino IDE.