Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- msg1 db 10,13,"Enter 5 64 bit numbers:"
- len1 equ $-msg1
- msg2 db 10,13,"Entered 5 64 bit numbers:"
- len2 equ $-msg2
- section .bss
- array resd 200
- counter resb 1
- section .text
- global _start
- _start:
- ;display
- mov Rax, 1
- mov Rdi, 1
- mov Rsi, msg1
- mov Rdx, len1
- syscall
- ;accpet
- mov byte[counter],05
- mov rbx,00
- loop1:
- mov rax,0
- mov rdi,0
- mov rsi,array
- add rsi,rbx
- mov rdx,17
- syscall
- add rbx,17
- dec byte[counter]
- JNZ loop1
- ;display
- mov Rax,1
- mov Rdi,1
- mov Rsi,msg2
- mov Rdx,len2
- syscall
- ;display
- mov byte[counter],05
- mov rbx,00
- loop2:
- mov rax,1
- mov rdi,1
- mov rsi,array
- add rsi,rbx
- mov rdx,17
- syscall
- add rbx,17
- dec byte[counter]
- JNZ loop2
- ;exit
- mov rax,60
- mov rdi,0
- syscall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement