THe reason I am doing it in C is simply because I want learn the language.
IRstuff :
"By what test did you determine that the header files were at fault?".
Tom: I eliminating the lines.
IRstuff :
"If they really are, there should be a means of linking only the functions you're actually using."
I did just that, and didnot make any difference.
Then I relized that only one line is making the problem and it is:
printf("This is an RS232 test message\n");
By eliminating this line the hex file size was reduced to only 133 Bytes!
This line occurs in a for loop, in fact the whole progam is these few lines:
//----------------------------
main()
{
serial_init(); /*initialize serial port */
for(;

/*Start of loop */
{
printf("This is an RS232 test message\n");
}
}
//----------------------------
So I gave up and went to the next example which was an alternative to the first one, without using the printf().
This time around a hex file of 1.2 K was produced. But I get the following message from the Programmers software:
"Data Address, 95FH, in Hex File is outside valid memory range, 0000H - 0800H, for selected chip. Programming aborted"
I am using UVISION2 V2.31.
Then after alot of tries I realized that when the
"memory model", "Code ROM size" in
"Projects/option for target/Target" is changed the
"Data Address, 95FH" changes to different addresses.
But I havn't been able to fix the problem yet.
Tom