Created
November 4, 2012 02:26
-
-
Save manvscode/4009855 to your computer and use it in GitHub Desktop.
Hello World
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
# as -o hello-world.o hello-world.s ; ld -o hello-world hello-world.o | |
.data | |
hello_world_str: .ascii "Hello World!\n" | |
hello_world_len: .int 13 | |
.text | |
.globl _start | |
_start: | |
movl $4, %eax # load sys call 4 into EAX | |
movl $1, %ebx # load stdout(1) into EBX | |
movl $hello_world_str, %ecx | |
movl hello_world_len, %edx | |
int $0x80 | |
#exit the program | |
movl $1, %eax # load sys call 1 into EAX | |
movl $0, %ebx # load exit status into EBX | |
int $0x80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment