Skip to content

Instantly share code, notes, and snippets.

@dgalling
Created November 25, 2011 05:59
Show Gist options
  • Select an option

  • Save dgalling/1392895 to your computer and use it in GitHub Desktop.

Select an option

Save dgalling/1392895 to your computer and use it in GitHub Desktop.
section .data
filename: db 'begin.asm', 0x00
message: db 'Welcome to Reader', 0x0a, 0x00
section .bss
buffer: resb 64
section .text
global start
start:
mov rax, 0x2000003
mov rdi, 2
mov rsi, buffer
mov rdx, 64
syscall
mov rax, 0x2000004 ; write()
mov rdi, 1 ; stdout
mov rsi, buffer
mov rdx, 64
syscall
mov rax, 0x2000001 ; exit()
mov rdi, 0 ; return 0
syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment