Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- fmt: db "%lf", 0
- two: dq 2.0
- section .bss
- a: resq 1
- b: resq 1
- c: resq 1
- p: resq 1
- res: resq 1
- section .text
- extern _scanf
- extern _printf
- global _main
- _main:
- push a
- push fmt
- call _scanf
- push b
- push fmt
- call _scanf
- push c
- push fmt
- call _scanf
- add esp, 24
- fld qword [a]
- fadd qword [b]
- fadd qword [c]
- fdiv qword [two]
- fst qword [p]
- fst qword [res]
- fsub qword [a]
- fmul qword [p];протолкунуть до st 1 st2 st3 и псделат ьfmul st1 st2 st3
- fst qword [res]
- fld qword [p]
- fsub qword [b]
- fmul qword [res]
- fst qword [res]
- fld qword [p]
- fsub qword [c]
- fmul qword [res]
- fsqrt
- fst qword [res]
- ;fldpi ;sto = П
- ;fmul qword [two]
- ;fdivr qword [l] ;st0 теперь = r = l / 2П
- ;fldpi ;st0 = п, st1 = r
- ;fmul st1 ;st0 = Пr st1 = r
- ;fmul st1 ;st0 = пr^2, st1 = r
- ;fst qword [p] ;[l] = Pr^2, st0 = Pr^2, st1 = r
- push dword [res + 4]
- push dword [res]
- push fmt
- call _printf
- add esp, 12
- xor eax, eax
- xor ecx, ecx
- ret
Add Comment
Please, Sign In to add comment