I couldn't tell you how Mach controls it. The G100 was not designed specifically to work with Mach3. Mach3 just happens to have a plugin to use it, and is the easiest way to use it at this time, imo. The Mach3 G100 plugin source code is available, if you want to see how it works (and you're a programmer so you can understand it). I'm pretty sure it's far more complicated than just sending text.
However, I think that programming the G100 by itself is basically some simple text commands, somewhat similar to g-code, although I think you need to have accel and velocity info in there as well. Still somewhat complicated, I think. All the documentation is on the Geckodrive Yahoo group as well as Geckos website.