SW006013 Microchip Technology, SW006013 Datasheet - Page 97

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2008 Microchip Technology Inc.
atexit (Continued)
int main(void)
{
}
void good_msg(void)
{
}
void bad_msg(void)
{
}
void end_msg(void)
{
}
Input:
With contents of UartIn.txt (used as stdin input for simulator):
5
Output:
Enter your favorite number: 5
Good Choice
That's an excellent number
Now go count something
Input:
With contents of UartIn.txt (used as stdin input for simulator):
42
Output:
Enter your favorite number: 42
42!?
That's an awful number
Now go count something
int number;
atexit(end_msg);
printf("Enter your favorite number:");
scanf("%d", &number);
printf(" %d\n", number);
if (number == 5)
{
}
else
{
}
printf("That's an excellent number\n");
printf("That's an awful number\n");
printf("Now go count something\n");
printf("Good Choice\n");
atexit(good_msg);
exit(0);
printf("%d!?\n", number);
atexit(bad_msg);
exit(0);
DS51456E-page 93

Related parts for SW006013