#139 Data addressing wrong (PIC18 w/ extended instruction mode)

None
closed-fixed
Roy Rankin
None
5
2013-12-02
2012-03-22
Brad Normand
No

Part of the extended instruction mode is a change to the data addressing behavior when a=0 and f<=0x5f.

With extended mode on, a=0, f<=0x5f map to memory location FSR2+f instead of 0+f. Behavior for a=0 f>=0x60 is the same as without extended mode (map to 0xf00+f).

I suspect this difference is very important for running C code compiled for the extended instruction set (to support local variables).

For details, see the "INDEXED ADDRESSING WITH LITERAL OFFSET" section in the datasheets.

It's on page 92 in this PDF: http://ww1.microchip.com/downloads/en/DeviceDoc/41412D.pdf

Discussion

  • Roy Rankin
    Roy Rankin
    2013-05-04

    • status: open --> closed-fixed
    • assigned_to: Roy Rankin
    • Group: -->
     

  • Anonymous
    2013-12-02

    Thank you for this fix, much appreciated tho a little late for my project! I was still able to use gpsim to do the tests I needed, because my use of the FSR2 could be aimed at address 0 with the same results to help debug problems.

     


Anonymous


Cancel   Add attachments