A macro or m-code is a small program that has been written as an easy way to perform a function (or functions). Macros can range from very simple (e.g. turning an output on/off) to very complex (e.g. running a tool changer). In Mach3/Mach4, we create macros using a scripting language: VBScript for Mach3, LUA for Mach4. These macros can be embedded into on-screen buttons, so that clicking the button runs the macro. Macros that are accessible via G-code (e.g. M6) can also be created. The macro pump is a special Mach3 macro that loops continuously while the program is running.
For more information, check out the macro programming guide for Mach3 or Mach4.