Supposedly, M64 P# and M65 P# where # is a output port is built-in to Mach4. They are, but seem to be completely broken.
I have a autodustboot setup to use output port 2 which controls up/down motion. Port is setup correctly with ESS pin config Port 2-1 and Output port 2 set correctly. Executing M64P2 should turn that port off and M65 on. What actually happens is port 2-14 and port 2-16 briefly toggle toggle on/off. Ports which are not even supposed to turn on/off, toggle instead.