rminnig 0 Report post Posted February 28, 2004 There is a serious code generation error with the C2C++ compiler. Note the generated assebly snippet: ... _adresl equ 0x9e ;1 _adcon1 equ 0x9f ;1 _eedata equ 0x10c ;1 _eeadr equ 0x10d ;1 _eedath equ 0x10e ;1 _eeadrh equ 0x10f ;1 _eecon1 equ 0x18c ;1 _eecon2 equ 0x18d ;1 _this_tick_CPWM_00 equ 0xffffffff ;2 ORG 0 goto start__code ORG 4 ;;;;;;;; ;;;;;;;;// The 16F818 has only 1 interrupt vector ;;;;;;;; ;;;;;;;;void interrupt(void) _interrupt _interrupt_code movwf _int_save_cont_W swapf _int_save_cont_W, F swapf STATUS, W movwf _int_save_cont_STATUS ... and when the above is manually changed to: ... _adresl equ 0x9e ;1 _adcon1 equ 0x9f ;1 _eedata equ 0x10c ;1 _eeadr equ 0x10d ;1 _eedath equ 0x10e ;1 _eeadrh equ 0x10f ;1 _eecon1 equ 0x18c ;1 _eecon2 equ 0x18d ;1 _this_tick_CPWM_00 equ 0x18e ;2 ORG 0 goto start_code ORG 4 ;;;;;;;; ;;;;;;;;// The 16F818 has only 1 interrupt vector ;;;;;;;; ;;;;;;;;void interrupt(void) _interrupt _interrupt_code movwf _int_save_cont_W swapf _int_save_cont_W, F swapf STATUS, W movwf _int_save_cont_STATUS ... it works. The exact same code works for about a hundred compiles during the day, buat after some amount of time in the same project the code all of a sudden gets messed up as in the bolded lines above. If the EXACT same code is duplicated in a new project then it compiles without error. Any ideas on this one? Note because of a bug in the forum some of the double underscores in the generated assembly have been trucated to singel underscores. -Ryan Quote Share this post Link to post Share on other sites