Passing argv and argc
From Free media library
{{#switch: |Category = Pages in this category have | This page has }} been marked for eventual deletion.
{{#switch: |Category= They have
| It has}} been identified as reference material per the exclusion guidelines, which the community has decided to exclude from Wikisource (see "Inclusion of reference data on Wikisource"). These works will be phased out gradually; if you have found this page by following a link from another page, please go back and remove that link.{{#switch::Passing argv and argc
|Category:Deletion requests/Reference data = |Wikisource:Scriptorium = |
}}
passing argv and argc
By Reference:
push ebp
mov ebp, esp
sub esp, 8
lea eax, [ebp+12] ; push ptr to argv
push eax
lea eax, [ebp+8] ; push ptr to argc
push eax
call some_function
add esp, 8 ; clean the stack
By Value:
push ebp
mov ebp, esp
sub esp, 8
push dword [ebp+12] ;argv by value
push dword [ebp+8] ;argc by value
call some_function
add esp, 8