PaulHolland 0 Posted January 7, 2011 Report Share Posted January 7, 2011 (edited) Hi, I have found a sourceboost error in version 7.01. with the PIC16F1824 I am using the following inline assember code. movlw _Key ; movwf _fsr0 ; movwf _fsr1 ; addfsr FSR1,4 ; Normally FSR0 should be address of _Key and FSR1 should be address of _Key + 4 but addfsr does not work correct. The above code is compiled to: 01F7 0084 MOVWF gbl_fsr0 01F8 0086 MOVWF gbl_fsr1 01F9 3100 ADDFSR 0, 0x00 <-------------- This is wrong it should be opcode 3144 !! The compiler makes an error with ADDFSR instruction. I also found that the compiler makes an error with the moviw FSR0++ instruction since: moviw FSR0++ ; moviw FSR1++ ; are resulting in both a change of FSR0 register and not one increment on FSR0 and one increment on FSR1 as expected. The following instructions don't compile or with an error. MOVWF FSR1H MOVIW 0[FSR1] Edited January 7, 2011 by PaulHolland Quote Link to post Share on other sites
Pavel 0 Posted January 7, 2011 Report Share Posted January 7, 2011 Looks like compiler problem. We'll investigate. Thanks for reporting. Regards, Pavel Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.