SW500008 Microchip Technology, SW500008 Datasheet - Page 70

PICC-18 STD

SW500008

Manufacturer Part Number
SW500008
Description
PICC-18 STD
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500008

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Standard
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015
778-1001
778-1001
Storage Class and Object Placement
3.5.2 Absolute Variables
A global or static variable can be located at an absolute address by following its declaration with
the construct @ address, for example:
will declare a variable called Portvar located at F80h. Note that the compiler does not reserve
any storage, but merely equates the variable to that address, the compiler-generated assembler will
include a line of the form:
Note also that the compiler and linker do not make any checks for overlap of absolute variables with
other variables of any kind, so it is entirely the programmer’s responsibility to ensure that absolute
variables are allocated only in memory not in use for other purposes.
cessor special function register. To place a user-defined variable at an absolute address, define it in a
separate psect and instruct the linker to place this psect at the required address as specified in Section
3.12.3.3.
3.5.3 Objects in Program Space
Const objects are usually placed in program space. On the PIC18 devices, the program space is
byte-wide, the compiler stores one character per byte location and values are read using the table
read instructions. All const-qualified data objects and string literals are placed in the const psect.
The const psect is placed at an address above the upper limit of RAM since RAM and const
pointers use this address to determine if an access to ROM or RAM is required. See Section 3.4.12.
56
This construct is primarily intended for equating the address of a C identifier with a micropro-
volatile unsigned char Portvar @ 0xF80;
_Portvar EQU F80h
Absolute variables are accessed using the address specified with their definition, thus
there are no symbols associated with them. Because the linker never sees any symbols
for these objects it is not aware that they have been allocated space and it cannot make
any checks for overlap of absolute variables with other objects. It is entirely the pro-
grammer’s responsibility to ensure that absolute variables are allocated memory that is
not already in use.
C Language Features

Related parts for SW500008