Skip to content

Instantly share code, notes, and snippets.

@AnatolyShirykalov
AnatolyShirykalov / hello_world_into_file.asm
Last active January 19, 2018 11:24 — forked from armicron/hello_world_into_file.asm
NASM x86_64 open file and write 'Hello world'
section .text
global _start ;must be declared for linker (ld)
_start: ;tell linker entry point
mov rdi, filename
mov rsi, 0102o ;O_CREAT, man open
mov rdx, 0666o ;umode_t
mov rax, 2
syscall