Dear sdcc-users,

 

I’m new to SDCC, so I apologize if this is not the correct avenue for help.

 

If I access any SFR above F80h, the access goes to the GPR starting at 080h, i.e. instead of selecting the Access Bank (a=0) the BSR is used to select the GPR bank (a=1).

 

For example:

            PORTAbits.RA3 = 0;

 

correctly yields:

 

0000b4  9680     bcf        0x80, 0x3, 0      BCF      _PORTAbits, 3

 

But

            UEP15bits.EPCONDIS = 0;

 

incorrectly generates:

 

0000b6  977f      bcf        0x7f, 0x3, 0x1   BCF      _UEP15bits, 3

 

What causes this to happen?

 

I'm using SDCC version 2.5 with the included pic18f4550.h and gputils-0.13.3 with 18f4550.lkr.

 

Gene