This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

can i RET in the interrupt insted of RETI

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.

Parents
  • my guess is that your problem is that the highlighted above should be ljmp
    i check it with ljmp also it's working with only change of RETI to RET.

    In my application the bootloader was never modified in site.the application code only downloaded to it by IAP method.So the application code design by change the setting in options for target/c51/interrupt at address=0x4000.by the above change the interrupt vectors in apllication must be placed like interrupt 0 in 0x400b interrupt 4 in 0x4023 this will never change.so lcall or ljmp from bootloder is pointing the above fixed address.if i use the #pragma noiv the interrupt vector address address at 0x400b or 0x4023 are disabled.what is change in RETI compare to RET.
    regards,
    venkatesh.

Reply
  • my guess is that your problem is that the highlighted above should be ljmp
    i check it with ljmp also it's working with only change of RETI to RET.

    In my application the bootloader was never modified in site.the application code only downloaded to it by IAP method.So the application code design by change the setting in options for target/c51/interrupt at address=0x4000.by the above change the interrupt vectors in apllication must be placed like interrupt 0 in 0x400b interrupt 4 in 0x4023 this will never change.so lcall or ljmp from bootloder is pointing the above fixed address.if i use the #pragma noiv the interrupt vector address address at 0x400b or 0x4023 are disabled.what is change in RETI compare to RET.
    regards,
    venkatesh.

Children