I know that I can use 0x0008 in place of %1, but I would rather use the enum constant if at all possible.
Code: Select all
enum CTRL
{
CTRL_INUSE_OFF = 0x0000,
CTRL_INUSE_ON = 0x0008
};
template <TIMER T>
class timer
{
public:
timer()
{
asm ("setc res[%0], %1"
: /* No output */
:"r"(T), "r"(CTRL_INUSE_ON));
}
};