Skip to content

Instantly share code, notes, and snippets.

@bumfo
Created November 19, 2016 14:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bumfo/2f74d274fa9d70a430f0174639c71f60 to your computer and use it in GitHub Desktop.
Save bumfo/2f74d274fa9d70a430f0174639c71f60 to your computer and use it in GitHub Desktop.
NASM x86_64 on macOS 10.12
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