Last active
April 16, 2016 22:17
-
-
Save hgiesel/1b7050390cae11231a524f7e025eb7de to your computer and use it in GitHub Desktop.
x86_64 syscall in GAS at&t syntax on OS X
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
.globl start | |
.cstring | |
str: | |
.asciz "Hello World!\n" | |
str_length: | |
.set str_lngth, .-str | |
.text | |
start: | |
movq $0x2000004, %rax | |
movq $1, %rdi | |
movq str@GOTPCREL(%rip), %rsi | |
movq str_length@GOTPCREL(%rip), %rdx | |
syscall | |
movq $0x2000001, %rax | |
movq $0, %rdi | |
syscall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment