If you have Mach3, or not, have a look at Probe-IT [developed by Eric]
http://www.craftycnc.com/probe-it-wizard-mach3/You can install it in demo, and there is one for turning centers too
Nice manual too:
http://www.craftycnc.com/help/The licence is not expensive, and there is little point in trying to re-invent the wheel by developing something yourself unless you're bored and your time is free as Eric did a nice job with that IMHO, nice guy to chat to too as I "metrified" my copy of Probe-It which required shorter DRO's [less digits after the decimal point, and more on the other side + for a bigger table]
+1 for combined axis probing (which seems to be the holdup to anyone developing probing routines other than single axis).