ATC Macro projekt

I´m retrofitting a Brother TC211 for UCCNC and now its time for the toolchange macro.
First of all, where do I find documentation about the macro programming and reference syntax?
First of all, where do I find documentation about the macro programming and reference syntax?