Hi Steve,
I am not sure why you should want to invert the code as machines are usually set up with +Z being away from the work and -Z being towards the work as your example code shows. Do you have your Z axis configured correctly ?
Mach does have a 'Multipass Wizard' which should do, more or less, exactly as your example code.
Tweakie.