I don't know what you mean by B and C axes, but it sounds like you need a 5 axis tool setting macro for mach4. There are loads of tool setting macros around for M3 and I'm sure also for Mach 4. Whether they handle B & C axes too I haven't a clue. Searching on this forum will turn up many 3 axis M3 macros which might provide a basis. I'm afraid I don't have the time to search or modify any of them, but it isn't that hard.