Created
August 7, 2011 07:33
-
-
Save ageekymonk/1130159 to your computer and use it in GitHub Desktop.
x86 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
.section .data | |
hello: | |
.ascii "Diving into Great Assembly World" | |
hello_end: | |
.set HELLO_SIZE, hello_end-hello | |
.section .text | |
.global _start | |
_start: | |
movl $4,%eax /* sys_write */ | |
movl $1,%ebx /* Arg1 - file descriptor - 1(stdout) */ | |
leal hello,%ecx /* Arg2 - mem address */ | |
movl $HELLO_SIZE,%edx /* Arg3 - size */ | |
int $0x80 /* call the system call */ | |
movl $1,%eax /* sys_exit */ | |
movl $0,%ebx /* Arg1 - status */ | |
int $0x80 /* call the system call */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment