hi arthur,
Code:
push ebp
mov ebp, esp
add esp, FFFFFFFCh
leave
ret
note:
this is basically esp := esp -4
reason for being -4 is because a cardinal is 4 bytes.
also the leave is basically to restore the stack for the procedure exit.
ret is to return to the line that called the procedure
this is equive something along the lines of.
Code:
procedure Blah;
var
xxx: Cardinal;
begin
//do nothing.
end;
also a quick note, passing an argument is different to storing a local variable.
this whole proc would take 8 bytes, it is the smallest and quickest way todo it.
hope this helps.
-MM
Bookmarks