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.
I don't understand why precise definitions are needed when different manufacturers use different terminology.
I'd say this entire thread is an example of why we not only need precise definitions but we need people to use them.
The only thing I'm concerned with is that if Keil had used the same numbering scheme as the chip manufacturers (RESET = 0, int0 = 1, etc) your code would be capable of producing a RESET vector.
The question remains, however, as to what one could possibly want to achieve (in the context of a C program) by "producing a reset vector". I am assuming that by this you mean using the 'interrupt' function qualifier to either place the function code at location zero or place a jump to the function at location zero?
Note also that the reset vector would have to be treated as a special case by the compiler as reset does not cause a return address to be pushed onto the stack unlike a, dare I say it, real interrupt.