SPARC, Intel Subroutines



save



restore



Pointer Arguments



Intel Subroutine Calls



Stack Frames



Subroutine definition

Caller:
        ...
        call foo
        ...
Callee (note, old value of EBP is lost):
foo:    mov   EBP, ESP
        ...
        ret



call



ret



push

and {\tt pop}



pusha

and {\tt popa}



Homework