SHARE
TWEET

Untitled

a guest May 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. read = 0
  2. write = 1
  3. exit  = 60
  4. bufor = 300
  5.  
  6.         .global _start
  7.         .type _start, @function
  8.         .section .text
  9.  
  10. _start:
  11.        // ; exit(int status)
  12.       //  movq    $bufor, %rax
  13.      
  14. // wywolanie syscall, przyjmuje kolejno argumenty: numer instrukcji do wykonania,
  15. // wskaznik na stod gdzie ma wykonac instrukcje, rozmiar bufora
  16. // w rax zapisuje ile wczytal znakow + /0 na koncu
  17.      
  18.      // mov %rsp,%r8
  19.      
  20.         mov    $read,%rdi
  21.        
  22.         sub $bufor,%rsp
  23.         mov %rsp,%rsi
  24.        
  25.         mov $bufor,%rdx
  26.         syscall
  27.        
  28.         mov $write,%rdi
  29.        
  30.     //    mov %r8,%rsi
  31.    
  32.         mov %rsp,%rsi
  33.         mov $20,%rax
  34.         mov %rax,%rdx
  35.        
  36.         add $bufor,%rsp
  37.        
  38.         syscall
  39.         .size   _start, . - _start
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top