GitHub_collection_hello-world/a/Assembler NASM Macho64.asm
Richie Bendall dad1ce8fa0
Meta tweaks
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
2021-02-17 17:39:48 +13:00

18 lines
332 B
NASM

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