Skip to content

Instantly share code, notes, and snippets.

@hummelchen
Last active August 10, 2017 17:10
Show Gist options
  • Save hummelchen/24731d5e27b890fbe9322a86adc14806 to your computer and use it in GitHub Desktop.
Save hummelchen/24731d5e27b890fbe9322a86adc14806 to your computer and use it in GitHub Desktop.
r2
.file "syscall_x86.s"
.intel_syntax noprefix
.section .rodata
.LC0:
msg: .string "Hello, world!\n"
.text
.globl _start
.type _start, @function
_start:
.LFB0:
mov rax, 1 # write
mov rdi, 1 # stdout
lea rsi, .LC0 # addr
mov rdx, 14 #length
syscall
xor rdi, rdi # rdi = 0
mov rax, 60 # exit
syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment