SW500008 Microchip Technology, SW500008 Datasheet - Page 74

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
Register Usage
single byte objects are also placed in one of the “big” psects (“big” refers to the size of the psect,
not the size of the objects within the psect). All auto and parameter variables from all functions are
overlapped by the linker if possible and then placed into an available RAM bank.
are positioned in the access bank as per the large model. The global and static local initialized
and uninitialized objects are also placed in the access bank as are all single byte objects. Objects
larger than the access bank size are positioned in a separate area (in one of the “big” psects) and this
area can grow across bank boundaries to a size limited only by the available space on the device. All
auto and parameter variables are positioned as per the large model.
3.7 Register Usage
The W register is used for register-based function argument passing and for function return values.
This register should be preserved by any assembly language routines which are called.
3.8 Operators
HI-TECH PICC-18 STD supports all the ANSI operators. The exact results of some of these are
implementation defined. The following sections illustrate code produced by the compiler.
3.8.1 Integral Promotion
When there is more than one operand to an operator, they typically must be of exactly the same type.
The compiler will automatically convert the operands, if necessary, so they have the same type. The
conversion is to a “larger” type so there is no loss of information. Even if the operands have the same
type, in some situations they are converted to a different type before the operation. This conversion
is called integral promotion. HI-TECH PICC-18 STD performs these integral promotions where
required. If you are not aware that these changes of type have taken place, the results of some
expressions are not what would normally be expected.
of char, short int or bitfield types to either signed int or unsigned int. If the result of the
conversion can be represented by a signed int, then that is the destination type, otherwise the
conversion is to unsigned int.
60
In small model, all objects qualified near are placed in a “near” psect (e.g. rbss, rdata) which
Integral promotion is the implicit conversion of enumerated types, signed or unsigned varieties
Consider the following example.
unsigned char count, a=0, b=50;
if(a - b < 10)
count++;
C Language Features

Related parts for SW500008