Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .section .data
  2. poruka: .ascii "Unesite string:\0"
  3. br_poruka = . - poruka
  4. nijep:  .ascii "String nije palindrom.\n\0"
  5. br_nijep = . - nijep
  6. jestep: .ascii "String je palindrom.\n\0"
  7. br_jestep = . - jestep
  8. unos:   .fill 50,1,42
  9. br_unos = . - unos
  10.  
  11. .section .text
  12. .globl main
  13.  
  14. main:
  15.     movl $4, %eax   #unesite str
  16.     movl $1, %ebx
  17.     leal poruka, %ecx
  18.     movl $br_poruka, %edx
  19.     int $0x80
  20.    
  21.     movl $3, %eax   #unosimo str
  22.     movl $0, %ebx
  23.     leal unos, %ecx
  24.     movl $br_unos, %edx
  25.     int $0x80
  26.    
  27.     movl %eax, %edi
  28.    
  29. kraj:
  30.     movl $1, %eax
  31.     movl $0, %ebx
  32.     int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement