Guest User

Untitled

a guest
Jul 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .bss
  2.     term:       resb    0x40
  3.     term_size:  resb    1
  4.    
  5. section .text
  6. global _start
  7.  
  8. _start:
  9. loop1:
  10.     ; read the string
  11.     mov     eax, 3
  12.     mov     ebx, 1
  13.     mov     ecx, term
  14.     mov     edx, 0x40
  15.     int     0x80
  16.     mov     [term_size], eax
  17.    
  18.     ; find if string is empty
  19.     mov     ah, [term]
  20.     cmp     ah, 0x0a
  21.     jz      end
  22.    
  23.     ; write the string
  24.     mov     eax, 4
  25.     mov     ebx, 1
  26.     mov     ecx, term
  27.     mov     edx, term_size
  28.     int     0x80
  29.    
  30.     jmp     loop1
  31.    
  32. end:
  33.     ; end of program
  34.     mov     ebx, 0
  35.     mov     eax, 1
  36.     int     0x80
Add Comment
Please, Sign In to add comment