Created
November 24, 2018 02:11
-
-
Save seisvelas/1a0609278d81c0b7fee4fecbc0b66afa to your computer and use it in GitHub Desktop.
My first asm!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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