Created
August 30, 2020 14:15
-
-
Save malfet/d162075055bcd6f51edac2647d15ffe9 to your computer and use it in GitHub Desktop.
HelloWorld in x86_64 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
# as -o hello.o hello.S ; cc -o hello hello.o -nostdlib | |
.text | |
.globl _start | |
.type _start, @function | |
_start: | |
movl $1, %eax # sys_write( | |
movl $1, %edi # fd = stdout, | |
movl $.LC0, %esi # buf = LC0, | |
movl $12, %edx # 12); | |
syscall | |
mov $60, %eax # sys_exit( | |
mov $0, %edi # 0); | |
syscall | |
.LC0: | |
.string "Hello World\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment