RTEMS Logo

RTEMS 4.6.1 On-Line Library


Calling Conventions Processor Background

PREV UP NEXT Bookshelf RTEMS Intel i386 Applications Supplement

2.2: Processor Background

The i386 architecture supports a simple yet effective call and return mechanism. A subroutine is invoked via the call (call) instruction. This instruction pushes the return address on the stack. The return from subroutine (ret) instruction pops the return address off the current stack and transfers control to that instruction. It is is important to note that the i386 call and return mechanism does not automatically save or restore any registers. It is the responsibility of the high-level language compiler to define the register preservation and usage convention.


PREV UP NEXT Bookshelf RTEMS Intel i386 Applications Supplement

Copyright © 1988-2004 OAR Corporation