Jump to content
Sign in to follow this  
PaulHolland

Addfsr Fsr1, 0x04 ; Inline Assember

Recommended Posts

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 by PaulHolland

Share this post


Link to post
Share on other sites

Looks like compiler problem. We'll investigate. Thanks for reporting.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...