Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %include "io.inc"
- extern _printf
- section .bss
- a resd 1
- section .data
- b dd -2.0
- c dd 14.0
- fmt db `%f\0`
- section .text
- global _main
- _main:
- mov ebp, esp; for correct debugging
- sub esp, 8
- GET_DEC 4, a
- push dword[a]
- call _f2
- mov dword[esp], fmt
- fstp dword[a]
- mov eax, dword[a]
- mov dword[esp + 4], eax
- call _printf
- add esp, 12
- xor eax, eax
- ret
- _f2:
- push ebp
- mov ebp, esp
- finit
- fld dword[ebp + 8]
- fmul dword[b]
- fadd dword[c]
- leave
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement