Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pushl %ebp
- movl %esp,%ebp
- #i've to do ((X/2)*K1)
- movl %ebx,-12(%ebp) #X to stack
- movl $2,-8(%ebp) #2 to stack
- movl K1,%eax
- movl %eax,-4(%ebp) #K1 to stack
- fildl -12(%ebp)
- fildl -8(%ebp)
- fildl -4(%ebp)
- fdivp %st(0),%st(1) #X/2
- fmulp %st(0),%st(1) #(X/2)*K1
- fist -4(%ebp)
- movl -4(%ebp),%eax #result to eax casted as int
- popl %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement