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

which rigisters must pushed into stack when i call asm from c or call c funciton from asm?

hi,i am a newbie to c51,now i am am confused at this question that which rigisters must i push into stack when i call asm from c or call c function from asm,except the registers that i apparent used.be PSW?DPTR?else register else?

  • The below apply to non-interrupt functions only
    am am confused at this question that which rigisters must i push into stack when i call asm from c or call c function from asm>/i>
    The compiler assumes NO registers saved, so an assembler function can blow every register with no ill effect. The reverse, assembler calling a C function, the assembler code must assume that the C function blow all registers.

    Erik

  • There is a section in the manual entiltiled, "interfacing 'C' to assembler"

    Have you read it?