djulien 0 Report post Posted August 14, 2012 Bug description: The wrong opcode is being generated. (no errors are being reported) #include "<system.h>" typedef unsigned char uint8; //define an inline function so multiple asm can be used within macros: inline void ADDLW(uint8& value) { asm addlw _value; //generates a movlw instead of addlw } void main(void) { uint8 var @0x300 + 12; //kludge: create var with desired value as its address so it can be passed by reference to inline function ADDLW(var); //should generate "addlw 12", but generates "movlw 12" instead } Expected behavior: The example code above should generate "addlw 12", not "movlw 12". Is the problem 100% reproduceable: yes Compiler: BoostC Compiler version: 7.10 Target device:PIC16F1827, '1823, '688, etc. OS: Windows XP don Quote Share this post Link to post Share on other sites
djulien 0 Report post Posted August 24, 2012 BTW, same problem exists for movlp, andlw, xorlw, etc. Seems like there is a movlw hard-coded in the code generator somewhere. don Quote Share this post Link to post Share on other sites