Do a google search for Mach3 macro programming, and similar, there are a few documents that will help you a lot, there is no actual g-code for an output, its all done via macro's
you will need a couple of custom macro's say M1450 and M1451 maybe - M1450 would contain ActivateSignal(Output1) and M1451 would contain DeactivateSignal(Output1)
when you want to turn your output on the code will call M1450 etc, the macros live your macros folder and do not use any numbers that exist already in there.
the trick is getting the code into your post processor.
but dont forget - there will be a glitch in your X/Y motion when the macro is called, will it matter? Thats up to you

edit
Get the list of macro commands - if i recall there is a built-in call that can turn THC on an off, maybe that will be better.