; mmain0.asm
section .data
LF equ 10               ; \n
NULL equ 0              ; end of string
TRUE equ 1
FALSE equ 0
EXIT_SUCCESS equ 0
SYS_exit equ 60
arr1 dd 1, -2, 3, -4, 5, 7, 9, 11
arr1len dd 8
arr2 dd 2, -3, 4, -5, 6, -7, 10, 12, 14, 16
arr2len dd 10
section .bss
sum1 resd 1
ave1 resd 1
sum2 resd 1
ave2 resd 1
extern ccallee0
section .text
global main
main:
mov rdi, arr1            ; rdi 1st argument ADDRESS
mov esi, dword[arr1len]  ;low rsi 2nd arg., VALUE
mov rdx, sum1            ;3rd argu. ADDRESS
mov rcx, ave1            ;4th argu. ADDRESS
call ccallee0
mov rdi, arr2            
mov esi, dword[arr2len]  
mov rdx, sum2
mov rcx, ave2
call ccallee0
Exit_Label:
mov rax, SYS_exit
mov rdi, EXIT_SUCCESS
syscall


