4.57 Udata_acs Directive
For PIC18 devices, the MPASM UDATA_ACS
directive creates a
section for Access bank objects that are uninitialised..
Suggested Replacement
Use the predefined udata_acs
psect or a create a
similar psect, ensuring the flags are suitable for a section containing Access bank
variables on the PIC18 device.
The PIC Assembler provides the udata_acs
psect once you
include
. You can use this psect
without having to specify any psect flags, for example:<xc.inc>
#include <xc.inc>
PSECT udata_acs
;data goes here
Alternatively, you can define your own psect with any name and suitable
psect flags. The psect's
space
flag must be 1, to indicate that the
psect should be positioned in data memory. Typically, you would use the
class
flag to assign the psect to one of the
COMRAM
linker classes, which is also predefined by the driver,
so that the psect will be positioned somewhere in the memory associated with the
specified class without you having to specify any linker options. You could also
position this psect at a particular address using the linker's -p
option, passed to the linker from the driver's -Wl
option. For
example:PSECT myData,space=1,class=COMRAM
;data goes here