What do I need to do to get the code to output to a format that mach3 understands?
Like any language, Gcode has "dialects". The attached file is a listing of Mach M & G codes ( you can find them in the Mach directory ).
Do a quick review to determine those not supported by Mach or different than the program your using.
Clicking the G & M code buttons while in Mach provides a description of each.
The M13 is a good example that was pointed out by Gerry.
BTW, the post processor specific for say Mach, if there is one for your CAM program, is set-up to modify code posting such that you don't have problems.
Fanuc is very close. I remember Brian saying that Mach would be modified over time,in general, to agree with programming as shown in Peter Smid's
Handbooks.
RICH