Cosmic UK Cosmic US Cosmic Germany Cosmic Italia Cosmic France

Cosmic Software Frequently Asked Questions

How can I use the MAC instructions from C?

you first need to include the mac header file:

	#include <mac.h>.
which predefines the variable mac.
After that, when you assign something to the variable "mac", the compiler will generate MAC instructions when possible:
	mac += *p1++ * *p2++;
will generate
	mov	r1,[r12+]
	comac	r1,[r13+]