main proc
push ebp
mov ebp,esp
sub esp,018h
; 12 a = 1;
mov dword ptr
a,01h
; 13 b = 2;
mov dword ptr [ebp-04h],02h;b
; 14 do_it(a,&b,c,d,e,f,g);
push dword ptr [ebp-018h];g
push dword ptr [ebp-014h];f
push dword ptr [ebp-010h];e
push dword ptr [ebp-0ch];d
mov ecx,[ebp-08h];
c
lea edx,[ebp-04h];
b
mov eax,dword ptr
a
sub esp,0ch
call do_it
; 15 printf("a %d b %d
\n",a,b);
push dword ptr [ebp-04h];b
push dword ptr
a
mov eax,offset FLAT:@STAT1
sub esp,04h
call _printfieee
add esp,028h
leave
ret
main endp
Note: this is code for a 386
or higher, extended registers...
Compiler is smart, it
didn’t push
a,c and address of b,
they are in
ax, dx and cx, advance
the sp as
if they were pushed,
called rou-
tine will push them if
necessary