SW500010 Microchip Technology, SW500010 Datasheet - Page 88

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
Storage Class and Object Placement
3.4 Storage Class and Object Placement
Objects are positioned in different memory areas dependant on their storage class and declaration.
This is discussed in the following sections.
3.4.1 Local Variables
A local variable is one which only has scope within the block in which it was defined. That is, it
may only be referenced within that block. C supports two classes of local variables in functions:
auto variables which are normally allocated in the function’s stack frame, and static variables
which are always given a fixed memory location and have permanent duration.
3.4.1.1 Auto Variables
Auto (short for automatic) variables are the default type of local variable. Unless explicitly declared
to be static a local variable will be made auto, however the auto keyword may be used if desired.
Auto variables are allocated in the auto-variable block and referenced by indexing off the symbol
that represents that block. The variables will not necessarily be allocated in the order declared - in
contrast to parameters which are always in lexical order. Note that most type qualifiers cannot be
used with auto variables, since there is no control over the storage location. The exceptions are
const and volatile.
be used with objects of type auto.
are never called at the same time.
with a_function plus some offset, where function is the name of the function in which the object
is defined. For example, if the int object test is the first object placed in main’s auto-variable
block it will be accessed using the addresses ??_main and ??_main+1 since an int is two bytes
long.
88
All auto variables are allocated memory wholly within one bank. The bank qualifiers cannot
The auto-variable blocks for a number of functions are overlapped by the linker if those functions
Auto objects are referenced with a symbol that consists of a question mark, ?, concatenated
Note that standard version compilers use the prefix ?a instead of ?? However the
allocation and access of auto variables is otherwise the same.
C Language Features

Related parts for SW500010