Created
November 19, 2016 14:27
-
-
Save bumfo/2f74d274fa9d70a430f0174639c71f60 to your computer and use it in GitHub Desktop.
NASM x86_64 on macOS 10.12
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
global _main | |
section .text | |
_main: | |
mov rax, 0x2000004 ; write | |
mov rdi, 1 ; stdout | |
mov rsi, msg | |
mov rdx, msg.len | |
syscall | |
ret | |
section .data | |
msg: db "Hello, world!", 10 | |
.len: equ $ - msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment