Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Include irvine32.inc
- ;irvine32.inc already uses this directive for us:
- ; .model flat, STDCALL
- .data
- result DWORD ?
- .code
- add_func PROC C
- ; Save the base pointer
- push ebp
- mov ebp, esp
- ; Get the arguments
- mov eax, [ebp+8] ; a
- mov ecx, [ebp+12] ; b
- ; Add a and b
- add eax, ecx
- ; Store the result in a variable
- mov result, eax
- call WriteInt
- exit_function:
- ; Restore the base pointer
- pop ebp
- ; Return the result in EAX
- mov eax, result
- ret
- add_func ENDP
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement