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.
My questions is what do you have to do to produce a reset vector?
you can't, THE '51 CAN NOT BE RESET 'BY VECTOR'
If address 0 was interrupt 0 you could restart the processor, but the SFRs would not default.
to reset the processor you can time out a watchdog, some derivatives have a SFR bit that will cause a reset, but just a jump to 0 will not do.
Erik
Of course a vector will not reset an 8051, the very idea is ridiculous. A vector is the address the 8051 jumps to in response to an interrupt. The reset vector for an 8051 is address 0. Reset is a non-maskable event that occurs when the reset line is asserted. The Kiel compiler doesn't have any way of producing code for the reset vector using the interrupt statement. The EX0 vector is 3. Reading the manual doesn't provide any new information. No mention is made of how to code the reset vector. Comparing the table on that manual page to 8051 chip docs, the interrupt numbering is off by 1, as I mentioned above. Instead of starting at reset (0), it starts at EX0 (which is 1 in the 8051 chip docs). There are other ways of course.
Of course a vector will not reset an 8051, the very idea is ridiculous.
He's a master of the art of misunderstanding, just ignore him.
If you want to modify what happens on reset the place to do would be in startup.a51. In the normal course of things you wouldn't want to, though, as the startup and initialisation code needs to run before your main() is entered. The 'interrupt' keyword is only for use with interrupt handlers so it seems fairly reasonable that it won't allow a vector to be inserted at location zero.