070306-1051 EST USA
Miguel:
It does not help you much to compare two different parts on two different softtware packages.
You probably can not drop the first %. I would say it is a necessity that a first % exist. The problem is that your old
CNC interprets the M of MAIN as an M code and no number is associated with M.
Generally DOS programs are reliable.
Your first G-code sample is relatively standard.
On-line you can download the HAAS mill manual from
http://www.haascnc.com/customer_serv...mc/96-8000.pdf
A generic postprocessor directed at Fanuc might produce code close to what you want.
You can manually write your own G-code program.
The P-line just after the first % is probably the program name. May or may not be required. In a HAAS or Fanuc program this would be an O-number.
Study the HAAS manual as that may help you understand the normal G-codes. And program structure.
.