SW500009 Microchip Technology, SW500009 Datasheet - Page 73

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
the unsigned int result was converted back to unsigned char, the final result would be the same.
If an 8-bit addition is more efficient than a 16-bit addition, the compiler will encode the former.
to be performed to comply with the ANSI standard.
3.8.2 Shifts applied to integral types
The ANSI standard states that the result of right shifting (> > operator) signed integral types is
implementation defined when the operand is negative. Typically, the possible actions that can be
taken are that when an object is shifted right by one bit, the bit value shifted into the most significant
bit of the result can either be zero, or a copy of the most significant bit before the shift took place.
The latter case amounts to a sign extension of the number.
char, signed int or signed long). Thus an object with the signed int value 0x0124 shifted right
one bit will yield the value 0x0092 and the value 0x8024 shifted right one bit will yield the value
0xC012.
3.8.3 Division and modulus with integral types
The sign of the result of division with integers when either operand is negative is implementation
specific. Table
when compiled with HI-TECH C.
3.9 Psects
The compiler splits code and data objects into a number of standard program sections referred to
as psects. The HI-TECH assembler allows an arbitrary number of named psects to be included in
If, in the above example, the type of a was unsigned int, then integral promotion would have
HI-TECH PICC STD performs a sign extension of any signed integral type (for example signed
Right shifts of unsigned integral values always clear the most significant bit of the result.
Left shifts (< < operator), signed or unsigned, always clear the least significant bit of the result.
In the case where the second operand is zero (division by zero), the result will always be zero.
3.5
shows the expected sign of the result of the division of operand 1 with operand 2
Operand 1
+
+
-
-
Table 3.5: Integral division
Operand 2
+
+
-
-
Quotient
+
+
-
-
Remainder
+
+
-
-
Psects
59

Related parts for SW500009