SW500011 Microchip Technology, SW500011 Datasheet - Page 89

HI-TECH X PRO FOR PIC32

SW500011

Manufacturer Part Number
SW500011
Description
HI-TECH X PRO FOR PIC32
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC32r
Datasheet

Specifications of SW500011

No. Of User Licenses
1
Supported Families
PIC32
Core Architecture
PIC
Supported Hosts
Windows XP, Vista, Linux, Mac OS X
Software Edition
Professional
Kit Contents
Software And Docs
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC32 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
032
778-1007
778-1007
C Language Features
3.10.1 External Assembly Language Functions
Entire functions may be coded in assembly language as separate .as source files, assembled by the
assembler, ASPIC32 , and combined into the binary image using the linker. This technique allows
arguments and return values to be passed between C and assembly code.
that is callable from C code.
A mapping is performed on the names of all C functions and non-static global variables. See
3.10.3
The following are guidelines that must be adhered to when writing a routine in assembly code
select, or define, a suitable psect for the executable assembly code
select a name (label) for the routine so that its corresponding C identifier is valid
ensure that the routine’s label is globally accessible, i.e. from other modules
select an appropriate equivalent C prototype for the routine on which argument passing can be
modelled
ensure any symbol used to hold arguments to the routine is globally accessible
ensure any symbol used to hold a return value is globally accessible
optionally, use a signature value to enable type checking of parameters when the function is
called
write the routine ensuring arguments are read from the correct location and the return value is
loaded to the correct storage location before returning
ensure any local variables required by the routine have space reserved by the appropriate
directive
T
C-
two 16-bit values together. The routine must be callable from C code. Both the values
are passed in as arguments when the routine is called from the C code. The assembly
routine should return the result of the addition as a 16-bit quantity.
Most compiler-generated executable code is placed in a psect called text32 (or text16
for mips16e functions - see Section 3.8.1). As we do not need to have this assembly
routine linked at any particular location, we can use this same psect so the code is
bundled with other executable code and stored at any location in the program space.
for a description of mappings between C and assembly identifiers.
UT RIAL
CALLABLE ASSEMBLY ROUTINES
An assembly routine is required which can add
Mixing C and Assembly Code
89

Related parts for SW500011