I'm writing a program as a beginner in assembly my program is about summing up all integers in array and then getting their average . I'm stuck with the average is that i need to divide the sum of numbers by my array size and i don't know according to assembly's syntax how to get to this any help please :) thank you

mov     esi,ak
        mov     ecx,0
        mov     cx,[qak]
        mov     eax,0;sum
        add     ax,word [esi]
        add     esi,2
        loop    msum

        mov     edx,0
        mov     ebx,0
        mov     bx,[qak]
        div     ebx
;EAX contains average now