5.3.7.4 How Can I Access SFRs From Within Assembly Code?

The easiest way to gain access to SFRs in assembly code is to use the device-generic include file (xc.h) that equates symbols to the corresponding SFR address.

There is no guarantee that you will be able to access symbols generated by the compilation of C code, even if it is code that accesses the SFR that you require. See the following section of this user’s guide:

Function Call Conventions