G-code does not have a "GOTO" function but I believe that I could use an M98 (Subroutine call) to cause the branch and then just never use the M99 (Return). That will allow me to branch around sections of code. I can later "NO-OP" the call and have the original code back. The program will run until it encounters the M30 (Or manual STOP and REWIND), skipping over some portions, then hit the M30 and stop/rewind.
My concern is that I am leaving the call stack (or whatever implementation Mach3 uses) unbalanced. There are some number of subroutine CALLs with no RETURNS. The question is "Does Mach clean up the stack on the M30 or manual STOP/REWIND?" I would assume that it does because I use subroutines and can manually STOP and REWIND a program in the middle of a sub even if nested several levels deep, but I don't know that it will still work if the program is repeated enough times.
Also, what is the stack depth for CALLS? That would be useful info for general information.
Any other suggestions on how to implement a GOTO welcome.