| 
 | 
 
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册  
 
x
 
.code32 
# functest3.s - An example of using C style functions 
.section .data 
output: 
   .asciz "This area is %f\n" 
precision: 
   .byte 0x7f, 0x00 
.section .text 
.globl _start 
_start: 
   nop 
   finit 
pushl $10 
   call area 
   addl $4, %esp 
    pushl %eax 
    pushl $output 
    call printf 
    movl $120, %ebx 
movl $1, %eax 
   int $0x80 
 
.type area, @function 
area: 
   pushl %ebp 
   movl %esp, %ebp 
   subl $4, %esp 
   fldpi 
   filds 8(%ebp) 
   fmul %st(0), %st(0) 
   fmulp %st(0), %st(1) 
    fstps -4(%ebp) 
    movl -4(%ebp), %eax 
   movl %ebp, %esp 
   popl %ebp 
   ret 
 
求问这个为什么输出不对?目标是输出314.1597, 但是实际输出0.0000 
 |   
 
 
 
 |