Created
January 10, 2012 14:03
-
-
Save sanjibnarzary/1589234 to your computer and use it in GitHub Desktop.
Adding Two Numbers and Display the Content of Register in Assembly Language using nasm
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
;Author : Sanjib Narzary | |
;Institute: NIT Calicut | |
;Email: [email protected] | |
;Assembly Code | |
section .text | |
global main | |
extern printf | |
main: | |
mov eax, 45 | |
mov ebx, 55 | |
add eax,ebx | |
push eax | |
push message | |
call printf | |
add esp, 8 | |
ret | |
message db "Value = %d", 10, 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment