PLUSW instruction. PIC18F2221

Thread Starter

MaxHeadRoom

Joined Jul 18, 2013
28,686
I haven't used the PLUSW0 instruction yet, but looking in different forums there seems to be some dispute as to whether the definition in the manuals is correct?
'Value of FSR0 pr-incremented, value of FSR offset by W'
Some say it is not incremented, others the opposite.
Anybody have any experience?
Max.
 

Thread Starter

MaxHeadRoom

Joined Jul 18, 2013
28,686
To verify if the FSR0 pre-increment statement True or False?
The way I read it the FSR0 is just offset by the WREG the FSR is not otherwise affected ?
Max.
 

Thread Starter

MaxHeadRoom

Joined Jul 18, 2013
28,686
This is virtually all there is in the manual.

PLUSW0 Uses contents of FSR0 to address data memory - value of FSR0 pre-incremented (not a physical register) -Value of FSR0 offset by W

• PLUSW: adds the signed value of the W register (range of -127 to 128) to that of the FSR and uses the new value in the operation.

I also understand that the command does not change or affect the existing FSR0 itself? although the first statement seems to contradict it?
Max.
 

MMcLaren

Joined Feb 14, 2010
861
Yeah, the statement doesn't make sense and I couldn't find anything like that in one of the 18F' datasheets I have on hand here.

Your understanding is correct. That is, the FSRx pair is not affected by use of the PLUSWx operand.
 
Top