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
  • 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.

Reply
  • 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.

Children
No data