Hi! i use p89v51rd2fa microcontroller and microversion 3 C51 compiler. if i write an interrupt function in c the compiler create a asm code like
push ACC push PSW a=b; pop PSW pop ACC RETI
can i change the RETI to RET. regrads, venkatesh.
Sorry sir! now i understand.thank you for your valuable reply.thank you once again...:-) regards, venkatesh.
why bother with some very convoluted C code (C was never intended for absolute addresses) when some extremely simple assembly code will do?
Erik
Yes! you are correct but i am not familiar with asm coading also most part of the program was also done by c language.Since i have one more asm file [iap.a51] for the IAP calls so i can use asm coading in this file.
regards, venkatesh.
when you use RET instead RETI the code will still be executet at interruptlevel. So at some point there has to be a RETI. see my solution: http://www.keil.com/forum/docs/thread129.asp
but before use that you should first fully understand it. I use this code to change interrupt functions at runtime. works perfect here
Thomas
Hi! it works with RETI also when i make the changes denoted by Erik.Thanks Erik and Thanks Thomas.here is the code.
CSEG at 0x0B JB FLAG,?appT0x ; in app mode ljmp 02456H ?appT0x: ljmp 0400BH RET CSEG at 0x23 JB FLAG,?appT4x ; in app mode ljmp 2468H ?appT4x: ljmp 04023h RET
there is no change in interrupt [RETI]. regards, venkatesh.