SW500007 Microchip Technology, SW500007 Datasheet - Page 76

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
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
015P
778-1002
778-1002
Psects
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.
signed int or signed long). Thus an object with the signed int value 0124h shifted right one
bit will yield the value 0092h and the value 8024h shifted right one bit will yield the value C012h.
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.
compiled with PICC-18.
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
assembler code. The linker will group all data for a particular psect into a single segment.
62
PICC-18 performs a sign extension of any signed integral type (for example signed char,
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.
If you are using PICC18 to invoke the linker, you don’t need to worry about the informa-
tion documented here, except as background knowledge. If you want to run the linker
manually (this is not recommended), or write your own assembly language subroutines,
3.9
shows the expected sign of the result of the division of operand 1 with operand 2 when
Operand 1
+
+
-
-
Table 3.9: Integral division
Operand 2
+
+
-
-
Quotient
+
+
-
-
Remainder
+
+
-
-
C Language Features

Related parts for SW500007