Skip to content

Instantly share code, notes, and snippets.

@seisvelas
Created November 24, 2018 02:11
Show Gist options
  • Save seisvelas/1a0609278d81c0b7fee4fecbc0b66afa to your computer and use it in GitHub Desktop.
Save seisvelas/1a0609278d81c0b7fee4fecbc0b66afa to your computer and use it in GitHub Desktop.
My first asm!
.section .data
.section .text
.globl _start
_start:
mov $1, %eax # this is the linux kernel command
# number (system call) for exiting
# a program
mov $6, %ebx # this is the status number we will
imull $5, %ebx
# 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