Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualParadigm Shifter

Posted 02 July 2013 - 04:07 AM

Presumably it must use a C-style calling convention for that then? (Another possibility is that the number/size of arguments is passed as a hidden parameter so that the called function can clean up the stack rather than the callee). EDIT: I'd have to look at the disassembly of the call to see what is going on in that case.

 

Anyway, that's the difference between pascal and C calling conventions (apart from the left to right parameter passing, again, it is easier to pass right to left if you use variable length argument lists, since the first argument is always bottom of the stack frame), and the reason for use in Win32 API was originally to save memory.


#1Paradigm Shifter

Posted 02 July 2013 - 03:54 AM

Presumably it must use a C-style calling convention for that then? (Another possibility is that the number/size of arguments is passed as a hidden parameter so that the called function can clean up the stack rather than the callee).

 

Anyway, that's the difference between pascal and C calling conventions (apart from the left to right parameter passing, again, it is easier to pass right to left if you use variable length argument lists, since the first argument is always bottom of the stack frame), and the reason for use in Win32 API was originally to save memory.


PARTNERS