SW500008 Microchip Technology, SW500008 Datasheet - Page 67

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
C Language Features
then ignored. If Bit number 21 is clear, then the address is assumed to be of an object in the program
space and the access is performed using table read or table write instructions. Again, no writes to
objects are permitted using a pointer to const.
21) of the TBLPTRU register may be overwritten. This bit may be used to enable access to the
configuration area of the PIC18 device. If loading the table pointer registers from hand-written
assembler code, make no assumptions about the state of bit number 21 prior to executing table read
or write instructions.
3.4.12.3 Function Pointers
Function pointers can be defined to indirectly call functions or routines in the program space. The
size of these pointers are 16 or 24 bits wide and is controlled by the --CP=24/--CP=16 command
line option. When 16-bit wide function pointers are used only routines within the lower 64k bytes
can be indirectly called. The larger 24-bit function pointer allows indirect calls to be made to any
routine, but at the expense of increased code size and RAM usage.
affect code that calls functions directly, i.e. by their name rather than indirectly via a pointer. Thus
you can still directly call functions residing at any location even if you are using the --CP=16 option,
however you can only indirectly call functions that reside in the lower 64k byte area of the program
space.
regardless of the options used.
3.4.12.4 Combining Type Qualifiers and Pointers
Pointers can be qualified like any other C object, but care must be taken when doing so as there are
two quantities associated with pointers. The first is the actual pointer itself, which is treated like
any ordinary C variable and has memory reserved for it. The second is the object that the pointer
references, or to which the pointer points. The general form of a pointer definition looks like the
following.
Note that when dereferencing a 24-bit pointer, the most significant implemented bit (bit number
It should be stressed that the --CP=16 option affects function pointer sizes and that it does not
The addresses for all code labels are always shown in the map file as an untruncated byte address
“object’s type & qualifiers” * “pointer’s qualifiers” “pointer’s name” ;
T
Here are three examples, highlighting the fields with spacing:
near int * nip ;
int * near inp ;
near int * near ninp ;
UT RIAL
Supported Data Types and Variables
53

Related parts for SW500008