Advertisement
juaniisuar

Arqui 3.1

Oct 10th, 2017
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. .data
  2. str1: .asciz "pepereloco"
  3. char: .asciz "r"
  4. iter: .quad 10
  5.  
  6. .text
  7.  
  8. .global main
  9. main:
  10. cld # izq a der
  11. movq iter, %rcx # iteraciones
  12. movq $str1, %rdi # cadena a buscar
  13. movq char, %rax # char a buscar
  14.  
  15. repne scasb # comparar rcx veces
  16.  
  17. movq $1, %rax
  18. je end # si no lo encontró
  19. movq $0, %rax
  20.  
  21. end:
  22. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement