Created
November 25, 2012 01:57
-
-
Save tuttlem/4142091 to your computer and use it in GitHub Desktop.
Add program - Assembly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global add | |
section .text | |
add: | |
mov eax, [esp+4] ; get the 1st param | |
mov ecx, [esp+8] ; get the 2nd param | |
add eax, ecx ; add them together | |
; leaving the return value in eax | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment