Skip to content

Instantly share code, notes, and snippets.

@maluta
Created January 19, 2010 18:01
Show Gist options
  • Save maluta/281128 to your computer and use it in GitHub Desktop.
Save maluta/281128 to your computer and use it in GitHub Desktop.
/*
Before run this program *read* the documentation and check
what this program do.
$KDIR/arch/x86/include/asm/unistd_32.h (32 bits)
$KDIR/arch/x86/include/asm/unistd_64.h (64 bits)
THERE IS NO WARRANTY.
*/
int main() {
__asm__(
"push $37;"
"pop %eax;"
"push $-1;"
"pop %ebx;"
"push $9;"
"pop %ecx;"
"int $0x80;"
);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment