Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .intel_syntax noprefix
- .text
- .global main
- main:
- mov ecx, 5000
- mov eax, [esp+8]
- mov eax, [eax+4]
- finit
- push eax
- call atof
- add esp, 4
- fstp QWORD PTR x
- fld qword ptr x
- fst qword ptr y
- sinus:
- fld qword ptr c
- fld1
- fld1
- faddp
- faddp
- fstp qword ptr c #incrementacja c
- fld qword ptr y
- fld qword ptr x
- fld qword ptr x
- fmulp
- fmulp
- fchs
- fst qword ptr y #licznik na stos
- fld qword ptr c
- fld qword ptr c
- fld1
- fsubp
- fmulp
- fld qword ptr lastsilnia
- fmulp
- fst qword ptr lastsilnia #silnia na stos
- fdivp #x^3n/3n!
- #
- fst qword ptr temp
- fld qword ptr temp
- #
- fabs
- fld qword ptr eps
- fcompp
- fstsw ax
- sahf
- jnb sdsds
- faddp
- jmp sinus
- #dec ecx
- #cmp ecx, 0
- #jg sinus
- sdsds:
- faddp
- fstp qword ptr y
- wypisz:
- fld qword ptr y
- sub esp, 8
- fstp qword ptr [esp]
- mov eax, offset messg
- push eax
- call printf
- add esp, 12
- mov eax, 0
- ret
- .data
- x: .double 1.0
- y: .double 1.0
- c: .double 1.0
- temp: .double 1.0
- lastsilnia: .double 1.0
- eps: .double 0.000000000000000001
- messg: .asciz "Wynik=%f\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement