global _start:
_start:
;creating macro functions
%macro disp_macro 2
mov rax,1;
mov rdi,1;
mov rsi,%1;
mov rdx,%2;
syscall
%endm
%macro exitm 0
mov rax,60
mov rdi,0
syscall
%endm

disp_macro msg1,len1
;----------to display array
mov rsi,arr1
label3: 
mov rax,[rsi]
push rsi
call display

disp_macro msg2,len2

pop rsi
add rsi,8
dec byte[cnt]
jnz label3


exitm

display:
mov rsi,disparr+15
mov rcx,16

label2:
mov rdx,0
mov rbx,10h 
div rbx
cmp dl,09h
jbe label1
add dl,07h
label1:
add dl,30h
mov [rsi],dl
dec rsi
dec rcx
jnz label2

mov rax,1
mov rdi,1
mov rsi,disparr
mov rdx,16
syscall

ret

section .data
msg1 db "the Array is::",0Ah
len1 equ $-msg1

arr1 dq 1122334455667788h,8877665544332211h,1234567891234567h,1245789865321425h,9876543211236548h
cnt db 05h

msg2 db "",0Ah
len2 equ $-msg2

section .bss
disparr resb 20

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: