Skip to content

Instantly share code, notes, and snippets.

@tuttlem
Created November 25, 2012 01:57
Show Gist options
  • Save tuttlem/4142091 to your computer and use it in GitHub Desktop.
Save tuttlem/4142091 to your computer and use it in GitHub Desktop.
Add program - Assembly
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