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
  • Actually my need is one main interrupt and one sub interrupt.the main interrupt was placed in actuall interrupt vector address [interrupt 0 in 0x000B] and the sub interrupt in 0x400B.the main interrupt was used in my own IAP bootloader code the sub interrupt is used in application code.i need to access the sub interrupt when the application code was executing.due to that i write a LCALL to the sub interrupt in the main interrupt

    this works if you use #pragma noiv
    CSEG at 0x0b
    jb flag, appT0x ; in app mode
    ljmp bootT0
    appT0x: ljmp appT0

    my guess is that your problem is that the highlighted above should be ljmp

    Erik

Reply
  • Actually my need is one main interrupt and one sub interrupt.the main interrupt was placed in actuall interrupt vector address [interrupt 0 in 0x000B] and the sub interrupt in 0x400B.the main interrupt was used in my own IAP bootloader code the sub interrupt is used in application code.i need to access the sub interrupt when the application code was executing.due to that i write a LCALL to the sub interrupt in the main interrupt

    this works if you use #pragma noiv
    CSEG at 0x0b
    jb flag, appT0x ; in app mode
    ljmp bootT0
    appT0x: ljmp appT0

    my guess is that your problem is that the highlighted above should be ljmp

    Erik

Children