I have noticed that the Kiel compiler doesn't produce the correct interrupt vector if 8051 interrupt numbers are used. For example for external interrupt 0 (IE0), the interrupt number has to be 0, instead of 1 to produce a jump at location 1. Example:
void edge1 (void) interrupt 0{ /*produces correct code
while
void edge1 (void) interrupt 1{ /*produces wrong code
This is the case with all the interrupts I have used. My questions is what do you have to do to produce a reset vector? Reset is interrupt number 0 in 8051 numbering. Using -1 or 255 both produce a compile error.
Maybe it's possible to use the INTVECTOR directive (http://www.keil.com/support/man/docs/c51/c51_intvector.htm) to set the interrupt vector table starting at 0xFFFD so that the LJMP for interrupt 0 (at offset 3) is coded at address 0x0000.
Then, you could exclude the Keil startup code from the linkage (so you don't get reset vector conflicts).
But, I have no tried this and don't know if it would work.
Jon
And...while it MAY be possible to do, I personally think it's kinda silly.
Every 8051 derivative has different startup characteristics. Some REQUIRE startup in assembler. Some are dirt simple. And some are simply diabolical. The Keil startup code is quite simple and manages to get to the main C routine quickly. I have thousands of products in the field developed using the startup code (or a tweaked version of it) and never ran into a case where creating the reset vector and reset code in C would have been useful.
But, I haven't seen everything, yet.