Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- numb db 4
- lc db 5
- section .bss
- valami resb 10
- section .text
- global _start ;must be declared for linker (ld)
- _start: ;tells linker entry point
- add dword[numb],'0'
- ;push exit
- mov ecx,4 ; loop count
- quattro:
- push ecx
- ; print nr4
- mov edx,1
- mov ecx,numb
- mov ebx,1
- mov eax,4
- int 0x80
- pop ecx
- dec ecx
- cmp ecx,0
- jne quattro
- input:
- mov edx,10
- mov ecx,valami
- mov ebx,0
- mov eax,3
- int 0x80
- mov ebx,1
- mov eax,4
- int 0x80
- exit:
- mov eax,1 ;system call number (sys_exit)
- int 0x80 ;call kernel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement