; main02.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, 24, 30, 41, 42, 42, 44, 48
arr1len dd 16
section .bss
sum1 resd 1
ave1 resd 1
lowermed resd 1
uppermed resd 1
mini resd 1
maxi resd 1
;
extern callee00
;
section .text
global main
main:
push rbp
mov rbp, rsp
push sum1
push ave1
push lowermed
push uppermed
push mini
push maxi
mov rdi, arr1            ; rdi 1st argument ADDRESS
mov esi, dword[arr1len]  ;low rsi 2nd arg., VALUE
mov rbx, sum1
mov r12, ave1
mov rcx, lowermed
mov r8, uppermed
mov rdx, mini           
mov r9, maxi            
call callee00
pop r9
pop rdx
pop r8
pop rcx
pop r12
pop rbx
pop rbp
Exit_Label:
mov rax, SYS_exit
mov rdi, EXIT_SUCCESS
syscall


