Advertisement
Guest User

Untitled

a guest
Feb 13th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <asm/unistd_32.h>
  2.     .data
  3.     .text
  4.     .global _start
  5. _start:
  6. loopa:
  7.     movl    $__NR_read, %eax
  8.     movl    $0, %ebx
  9.     addl    $4, %ebp
  10.     movl    %esp, %ecx
  11.     movl    $1, %edx
  12.     int     $0x80
  13.  
  14.     cmpl    $0, %eax
  15.     jle     exit
  16.  
  17. write:
  18.     movl    $__NR_write, %eax
  19.     movl    $1, %ebx
  20.     movl    (%esp), %ecx
  21.     subl    $4, %esp
  22.     movl    $1, %edx
  23.     int     $0x80
  24.    
  25.     jmp loopa
  26. exit:
  27.     movl    $__NR_exit, %eax
  28.     movl    $0, %ebx
  29.     int     $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement