Created
June 26, 2019 14:52
-
-
Save asantos2000/90d7106fe35a77feb3d828b50c6d5f24 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ; /usr/local/bin/nasm -f macho64 64.asm && ld -macosx_version_min 10.7.0 -lSystem -o 64 64.o && ./64 | |
| global start | |
| section .text | |
| start: | |
| mov rax, 0x2000004 ; write | |
| mov rdi, 1 ; stdout | |
| mov rsi, msg | |
| mov rdx, msg.len | |
| syscall | |
| mov rax, 0x2000001 ; exit | |
| mov rdi, 0 | |
| syscall | |
| 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