If any axis is moving in the opposite direction, go into the Mach3 settings and first verify the hotkeys are set appropriately (example: Page Up for Z Axis up). If this does not solve the issue, check under Config>Ports and Pins> Motor Outputs: to verify all settings are correct (Pin and Port numbers and enabled/disabled signals).