SW500008 Microchip Technology, SW500008 Datasheet - Page 146

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
Map Files
132
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 obvious;
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 functions.
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 du-
plicate 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 re-
served and used by the program. The difference shows the amount of memory saved by
overlapping of these blocks by the linker.
if(crv((my_long%10)) != 5) // ...
if(crv(srv(8)) != 6) // ...
Linker and Utilities

Related parts for SW500008