Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
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.
That should be:
"the only safe way to get Keil's so-called 'interrupt number' for C51 is by the formula ((interrupt_vector_address/8 ) -3)"
and, in fact, it's not completely safe - as it doesn't state the upper-bound on Keil's so-called C51 "interrupt numbers".
Therefore, the only really safe way to get Keil's so-called 'interrupt number' for C51 is to Please read the manual: http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm