1) 20.65/3.97=5.201511335
2) 5*3.97=19.85
3) 20.65-19.85=0.8
.section .data
value1:
.float 20.65
value2:
.float 3.97
.section .bss
.lcomm result, 4
.section .text
.global _start
_start:
nop
finit
flds value2
flds value1
loop:
fprem1
fstsw %ax
testb $4, %ah
jnz loop
fsts result
movl $1, %eax
movl $0, %ebx
int $0x80
(gdb) x/f &result
0x80490a8 <result>: 0.799999475
fstat 0x3000 12288
fstat 0x3300 13056
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |