SW500009 Microchip Technology, SW500009 Datasheet - Page 65

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
C Language Features
3.4.11.3 Highend Pointers
Highend processors (17Cxxx processors) differ in many ways from baseline and midrange proces-
sors and this effects the way pointers have been implemented.
3.4.11.4 Qualifiers and Pointers
Pointers can be qualified like any other C objects, 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 an initialized pointer definition looks
like the following.
RAM pointers are 8-bits and therefore can only access 256 bytes. A pointer which is unqual-
ified or has a bank 1 qualifier can point to any object in bank 0 or bank 1. If the pointer is
qualified as bank 2 or bank 3, then it can access any object in banks 2 or 3. At present, there
is no general purpose pointer that can read and write to all four banks.
Const pointers are 16-bits wide. They can be used to access either ROM or RAM. If the upper
bit of the const pointer is non-zero, it is a pointer into RAM. A const pointer may be used to
read from any RAM location in any bank, but writing to such locations is not permitted. If
upper bit is zero, it is a pointer able to access the entire ROM space. The ability of this pointer
to access both ROM and RAM is very useful in string-related functions where a pointer passed
to the function may point to a string in ROM or RAM.
Function pointers reference functions. A function is called using the address assigned to the
pointer.
RAM banks in highend processors are 0xFF bytes long, so an 8-bit RAM pointer can only
access objects in one bank. Thus a bank 0 RAM pointer can only access bank 0; a bank 1
RAM pointer can only access bank 1, etc...
Const pointers for highend processors are 16-bits wide. Const pointers on highend processors
work in the same way as they do for midrange processors.
Far pointers are 16-bits wide and can be used to access objects in any available bank of RAM.
These pointers are similar to const pointers; they differ in that they may be used to indirectly
read from, or write to, RAM locations. Far pointers can also access ROM locations as per
const pointers. The far qualifier is used to specify the larger pointer size.
Function pointers reference function. A function is called using the address assigned to the
pointer.
Supported Data Types and Variables
51

Related parts for SW500009