Sorry, I don't know anything about your 4th axis.
I would recommend that you go to the Haas website and download the mill control workbooks. There is plenty of good info in there. It may not all apply to an older machine, but it can be better than thrashing in the deep end
They give an example in there of how to do thread milling with arc commands, using cutter radius compensation and repeated passes. So it is not a special gcode per se, but a special command line.
Or you could go with a software thread milling solution. There are various thread mill wizards available from some of the thread mill manufacturers. Of course, you have to cut and paste the code. The code is longhand: written out in full so that any controller can cut it with simple helical command movements.
OneCNCXR4 provides a software thread milling facility that allows you to include the thread milling code right in its nc manager so it is all neatly included in your regular machining files, which makes for easier file-keeping. OneCNC also permits fancier things like 'overlap' on the thread mill pass so as to ensure there is no raised blip on the threads, and an inclined approach/depart so that the thread mill doesn't score the threads as it enters/exits the cut. This can be a concern when the thread mill is large in proportion to the hole it is working within.
First you get good, then you get fast. Then grouchiness sets in.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)