SW500010 Microchip Technology, SW500010 Datasheet - Page 164

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
Map Files
164
at the same time as init is active, so its APB can overlap with that of init and is
placed at offset 4 within the auto/parameter psect.
The function byteconv may call several functions: float, ldiv, crv and srv.
(Any function name that does not start with an underscore must be an assembly routine.
The routine float and ldiv in this case relating to floating point and long division
library routines.) All these functions have their APB placed at the same offset in the
auto/parameter psect. Of these functions, srv also may call convert.
The call to crv from byteconv indicates that other functions might be called to
obtain crv’s parameter values. Those other functions are listed in a “flattened” call list
below the ARG function line which shows every possible function that might be called,
regardless of call depth. The functions which might be called are: ldiv, convert
and srv. The function srv, which also calls convert still indicates this fact by also
listing convert below and indented in the more conventional call graph format. The
two lines of C code that produced this outcome were:
where crv accepts one char parameter and returns a char. The call to srv is obvi-
ous; the other call come from the modulus operator, calling ldiv.
The other call tree rooted at intlevel1 relates to the interrupt function. intlevel1
is not a real function, but is used to represent the interrupt level associated with the
interrupt function. There is no call from intlevel1 to the function isr and no
stack usage. Note that an additional level of call depth is indicated for interrupt func-
tions. This is used to mark the place of the return address of the stack. The selected
device may use a differing number of stack locations when interrupts occur and this
needs to be factored into any stack calculations.
Notice that the interrupt function isr calls a function called i1ldiv. This is
a duplicate of the ldiv routine that is callable by functions under the intlevel1
call tree. Having duplicate routines means that these implicitly called assembly library
routines can safely be called from both code under the main call tree and code under the
interrupt tree. PRO compilers will have as many duplicates of these routines as there
are interrupt levels.
The call graph shows that the functions: main, byteconv, srv, convert, isr
and i1ldiv are all consuming APB memory that does not fully overlap with that of
other functions. Reducing the auto/parameter memory requirements for these functions
will reduce the program’s memory requirements. The call graph reveals that 82 bytes
of memory are required by the program for autos and parameters, but that only 58 are
if(crv((my_long%10)) != 5) // ...
if(crv(srv(8)) != 6) // ...
Linker and Utilities

Related parts for SW500010