Skip to content

Instantly share code, notes, and snippets.

@amanuel2
Created July 12, 2016 23:05
Show Gist options
  • Save amanuel2/bbd44ccabd1c22ad358227b3984ce0c6 to your computer and use it in GitHub Desktop.
Save amanuel2/bbd44ccabd1c22ad358227b3984ce0c6 to your computer and use it in GitHub Desktop.
.section .data
.section .text
.globl _start
_start:
movl $1, %eax # this is the linux kernel command
# number (system call) for exiting
# a program
movl $0, %ebx # this is the status number we will
# return to the operating system.
# Change this around and it will
# return different things to
# echo $?
int $0x80 # this wakes up the kernel to run
# the exit command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment