; caller0x1.asm
section .data
; standard constants:
LF equ 10   
NULL equ 0   ;end of string
TRUE equ 1
FALSE equ 0
EXIT_SUCCESS equ 0
SYS_exit equ 60
; decalre the data:
lst1 dd 1, -2, 3, -4, 5, 7, 9, 11
len1 dd 8
lst2 dd 2, -3, 4, -5, 6, -7, 10, 12, 14, 16 
len2 dd 10
section .bss 
sum1 resd 1
ave1 resd 1
sum2 resd 1
ave2 resd 1
;
extern callee0x0
;
section .text
global main
main:
; Call the function
; high level language: callee0x0(lst, len, &sum, &ave);
mov rdi, lst1
mov esi, dword[len1]
mov rdx, sum1
mov rcx, ave1
call callee0x0
;
mov rdi, lst2
mov esi, dword[len2]
mov rdx, sum2
mov rcx, ave2
call callee0x0
;
FINITO:
mov rax, SYS_exit
mov rdi, EXIT_SUCCESS
syscall    ;exit

