SHOW:
|
|
- or go back to the newest paste.
1 | pushl %ebp | |
2 | movl %esp,%ebp | |
3 | ||
4 | #i've to do ((X/2)*K1) | |
5 | ||
6 | movl %ebx,-12(%ebp) #X to stack | |
7 | movl $2,-8(%ebp) #2 to stack | |
8 | movl K1,%eax | |
9 | movl %eax,-4(%ebp) #K1 to stack | |
10 | ||
11 | fildl -12(%ebp) | |
12 | fildl -8(%ebp) | |
13 | fildl -4(%ebp) | |
14 | fdivp %st(0),%st(1) #X/2 | |
15 | fmulp %st(0),%st(1) #(X/2)*K1 | |
16 | ||
17 | fist -4(%ebp) | |
18 | - | movl -4(%ebp),%eax |
18 | + | movl -4(%ebp),%eax #result to eax casted as int |
19 | popl %ebp | |
20 | ||
21 | ret |