The C51 pre-processor treats the "#" character as the "Stringize" operator. How do I override this operator when desired? For example:
#define X mov A,#10
mov A,10
mov A,#10
hi, Regardless, it would still be useful to know if it possible to generate a "#" from within a #define macro when using the Ax51 assembler. If you use the assembler and needs with such definitions then I suggest you to use macro. For example:
XCOM MACRO mov A,#10 ENDM
#define XCOM(x) MOV A,x //... somewhere in program: #pragma ASM XCOM(#10) #pragma ENDASM