AnsweredAssumed Answered

In-line assembly in Codewarrior for 8 bit v6.2

Question asked by rakesh parekh on Apr 26, 2009
Latest reply on Apr 28, 2009 by CompilerGuru



I am developing code using MC9S08QD2 and codewarrior v6.2


For certain critical operations, I want my generated code to be optimized in size and execution speed.


Are there ready to use intrinsic functions defined in codewarrior to use assembly instructions like ROR - rotate right through carry, SEC - set carry, CLC - clear carry etc?


As I do not find these intrinsic function, I tried to put down macro definition for these purpose.


However it does not compile.

For ex.
unsigned char VarC;
#defined RotateRight(x) {__asm ROR x;}

void main (void)

I get compiler error messages C18700 and C18701.

How to resolve it?

Same error messages go away if I first transfer operand to accumulator and work on accumulator.

Why so?
Kindly advice asap.
Thanks and regards,