Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. section .bss
  2. num : resb ,5 ;variavel num reserva 5 bytes
  3. i : resb, 5 ;variavel i
  4.  
  5. global _start
  6.  
  7. _start
  8. ;funcao
  9. .global main
  10. main: ; funcao
  11.  
  12. mov eax,[num] ; variavel i recebe parametro n
  13. ret eax ; retorna i
  14.  
  15. ;main
  16. WhileLoop:
  17.  
  18. ebx,1 ;ebx = 1
  19. cmp ebx, 0 ;verifica se e igual a 0
  20. call mostra, ebx ;se diferente entao chama a funcao
  21. jmp whileLoop: ;depois sai do loop
  22.  
  23. WhileTerminado:
  24.  
  25. int 80h ;Chamada da Interrupcao
  26. mov eax,1 ;Interrupcao Exit
  27. mov ebx,0 ;Argumento em ebx
  28. int 80h ;Chamada da Interrupcao
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement