Guest User

Untitled

a guest
Apr 16th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. EXIT = 1
  2. READ = 3
  3. WRITE = 4
  4. STDOUT = 1
  5. STDIN = 0
  6. SYSCALL = 0x80
  7. ERR_CODE = 0
  8.  
  9. .data
  10.  
  11.  
  12. messageo: .ascii "wprowadź wysokość:\n"
  13. message_leno = . - messageo
  14.  
  15. height: .space LENGTH
  16. width: .space LENGTH
  17.  
  18. LENGTH = 32
  19.  
  20.  
  21. .global _start
  22.  
  23. _start:
  24.  
  25.  
  26. movl $WRITE, %eax
  27. movl $STDOUT, %ebx
  28. movl $messageo, %ecx
  29. movl $message_leno, %edx
  30. int $SYSCALL
  31.  
  32. movl $READ, %eax
  33. movl $STDIN, %ebx
  34. movl $height, %ecx
  35. movl $LENGTH, %edx
  36. int $SYSCALL
  37.  
  38.  
  39.  
  40. mov (%ecx), %edi
  41.  
  42.  
  43. mov $1, %eax
  44. int $0x80
Advertisement
Add Comment
Please, Sign In to add comment