SW500007 Microchip Technology, SW500007 Datasheet - Page 97

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
C Language Features
3.13.3 Linker-Defined Symbols
The link address of a psect can be obtained from the value of a global symbol with name __Lname
where name is the name of the psect. For example, __Lbss is the low bound of the bss psect. The
highest address of a psect (i.e. the link address plus the size) is symbol __Hname.
3.14 Standard I/O Functions and Serial I/O
A number of the standard I/O functions are provided in the C library with the compiler, specifically
those functions intended to read and write formatted text on standard output and input. A list of the
available functions is in Table 3.15. More details of these functions can be found in Appendix A.
functions must be written. Other routines which may be required include getche() and kbhit().
If the psect has different load and link addresses the load start address is specified as __Bname.
Before any characters can be written or read using these functions, the putch() and getch()
and compile it to assembler code using
PICC18 -S x.c
The resultant assembler code includes the following line:
SIGNAT _widget,8249
The SIGNAT pseudo-op tells the assembler to include a record in the .obj file which
associates the value 8249 with symbol _widget. The value 8249 is the correct signature
for a function with two int arguments and a char return value. If this line is copied into
the .as file where _widget is defined, it will associate the correct signature with the
function and the linker will be able to check for correct argument passing. For example,
if another .c file contains the declaration:
extern char widget(long);
then a different signature will be generated and the linker will report a signature mis-
match which will alert you to the possible existence of incompatible calling conventions.
printf(const char * s, ...)
sprintf(char * buf, const char * s, ...)
Function name
Table 3.15: Supported standard I/O functions
Standard I/O Functions and Serial I/O
Formatted printing to stdout
Writes formatted text to buf
Purpose
83

Related parts for SW500007