Skip to content

Instantly share code, notes, and snippets.

@mariusvn
Created February 27, 2019 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariusvn/d48319d4f4c118cbfaba3d1c1a3d7c2d to your computer and use it in GitHub Desktop.
Save mariusvn/d48319d4f4c118cbfaba3d1c1a3d7c2d to your computer and use it in GitHub Desktop.
To compile this just use nasm -f elf64 helloworld.asm && gcc helloworld.o
BITS 64
global main
SECTION .text
main:
push rbp
mov rbp, rsp
mov rax, 1
mov rdi, 1
mov rsi, message
mov rdx, 14
syscall
leave
ret
SECTION .data
message: db "Hello World!", 10, 0
@Leodau
Copy link

Leodau commented Feb 27, 2019

👍

@mariusvn
Copy link
Author

check strace ./a.out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment