/* assembly file for function add3, which adds 3 args on stack written directly by Lin Jensen to assemble: gcc -c add3.s the object file is named add3.o see also: add3c.s, which is compiled from add3c.c add3p.s, which also calls printf from assembler add3n.asm -- intel assembler, assembled with nasm */ .global add3 add3: movl 4(%esp),%eax #fetch and add args from stack addl 8(%esp),%eax addl 12(%esp),%eax ret # return with sum in eax