%include "rw32-2022.inc"

segment .data

    arr1 dt 1.0, -4.1, 1.1, 5.0

segment .text
;float fn(const float *pArr, unsigned long N)
THU-10: doplnit
fn:
    enter 0,0
    mov esi,[ebp+8]
    mov ecx,[ebp+12]
    fldz
.cykl:
    fld tword [esi]
    faddp st1,st0
    add esi,10
    loop .cykl    
    leave
    fnop
    ret

CMAIN:
sub esp,4
    fstcw [esp]
    and dword [esp],0xFFFFFFF0
    fldcw [esp]
    add esp,4
    push 4
    push arr1
    call fn
    add esp,8

    


    
    ret