; sp0.asm , renzo diomedi
;
section .data
DI_0 equ 0
SYS_exit equ 60 
numeri dq 100, 200, 300, 400, 500
lunghezza dq 5
;
section .text
global _start
_start:
mov rcx, qword [lunghezza]
mov rbx, qword [numeri]
mov r12, 0
mov rax, 0
;
push_loop:
push qword [rbx+r12*8]
inc r12
loop push_loop
;
mov rcx, qword [lunghezza]
mov rbx,  qword [numeri]
mov r12, 0
;
pop_loop:
pop rax
mov qword [rbx+r12*8], rax
inc r12
loop pop_loop
;
_Fine:
mov rax, SYS_exit
mov rdi, DI_0
syscall
