Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .bss
- num : resb ,5 ;variavel num reserva 5 bytes
- i : resb, 5 ;variavel i
- global _start
- _start
- ;funcao
- .global main
- main: ; funcao
- mov eax,[num] ; variavel i recebe parametro n
- ret eax ; retorna i
- ;main
- WhileLoop:
- ebx,1 ;ebx = 1
- cmp ebx, 0 ;verifica se e igual a 0
- call mostra, ebx ;se diferente entao chama a funcao
- jmp whileLoop: ;depois sai do loop
- WhileTerminado:
- int 80h ;Chamada da Interrupcao
- mov eax,1 ;Interrupcao Exit
- mov ebx,0 ;Argumento em ebx
- int 80h ;Chamada da Interrupcao
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement