For my library of functions I am coding without macros in Gnu Assembler.
The functions work, but im interested in feedback on the function prolog/epilog.
Essentially im just asking you if all looks right.
The functions are for a 'C' calling convention and currently do nothing and
return 0.
Rgs, James.
push ebp
mov ebp, esp
push ebx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
James,
It looks fine but note that if you pass parameters on the stack like normal, you either balance the stack with RET NUMBER or if its C calling convention, you balance the stack after the function has returned.
Yep, looks good, assuming a) the function has arguments and/or 'local' variables (otherwise there's no need for the stack frame), and b) ebx will be used. (Yes I'm quite sure you know all of this already - too many people on high horses around here ::) :bdg)
Just depends how picky you want to be :wink