Skip to content

Instantly share code, notes, and snippets.

@taida957789
Created October 6, 2017 01:34
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 taida957789/0b13ebdf3bbc9d956d53fa7c51c2380e to your computer and use it in GitHub Desktop.
Save taida957789/0b13ebdf3bbc9d956d53fa7c51c2380e to your computer and use it in GitHub Desktop.
hello.asm
global _start
section .text:
_start:
call main
db 'Hello World', 00
main:
xor rax, rax
xor rdi, rdi
xor rdx, rdx
xor rcx, rcx
mov rax, 1 ; rax = sys_write
mov rdi, 1 ; stdout
mov rsi, [rsp] ; buffer
mov rdx, 12 ; len(buffer)
syscall
mov rax, 60 ; rax = sys_exit
mov rdi, 0
syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment