Skip to content

Instantly share code, notes, and snippets.

@warabanshi
Last active December 10, 2015 12:28
Show Gist options
  • Save warabanshi/4434201 to your computer and use it in GitHub Desktop.
Save warabanshi/4434201 to your computer and use it in GitHub Desktop.
write character for stdout by system call
.intel_syntax noprefix
.comm mem, 30000
.globl main
main:
lea rbx, mem
mov byte ptr [rbx], 0x41
mov rax, 1 # specify write system call
mov edx, 0x1 # 3nd argument (count)
mov rsi, rbx # 2nd argument (string pointer)
mov edi, 0x1 # 1st argument (stdout)
syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment