Within an XC16 assembly code portion, I want to use a C variable as a literal. Here's a portion of my code :
C function :
int x=4; int *TrisCSX = (int*) 0x2C8; x and *TrixCSX are declared as global variables.
Assembly code :
.global _x .global _TrisCSX bclr _*TrisCSX, _x This leads to an error : "Error: Invalid operands specified. Check operand #0".
If I change _x by #1, the error disappears.
I had this error before when I omitted the "#" before the literal expression when writing it as a number, but writing #_x doesn't work.
Processor used is PIC24FV32KA302.
Any idea?
#define X 4? \$\endgroup\$