it’s value is then loaded onto the top of FPU register stack (the st0 register)
and is automatically converted into the double extended precision format.
fld dword [bx] ; load single prevision value from memory
fld st2 ; push value of st2 onto register stack
fld1, fldz, fldl2t, fldl2e, fldpi, fldlg2 and fldln2 load the commonly
used contants onto the FPU register stack. The loaded constants are
+1.0, +0.0, log2 10, log2 e, pi, log10 2 and ln 2 respectively. These instructions
have no operands.
fild convert the singed integer source operand into double extended precision
floating-point format and pushes the result onto the FPU register stack.
The source operand can be a 16–bit, 32–bit or 64–bit memory location.
fild qword [bx] ; load 64-bit integer from memory
fst copies the value of st0 register to the destination operand, which can
be 32–bit or 64–bit memory location or another FPU register. fstp performs
the same operation as fst and then pops the register stack, getting rid of
st0. fstp accepts the same operands as the fst instruction and can also
store value in the 80–bit memory.
fst st3 ; copy value of st0 into st3 register
fstp tword [bx] ; store value in memory and pop stack
fist converts the value in st0 to a signed integer and stores the result
in the destination operand. The operand can be 16–bit or 32–bit memory
location. fistp performs the same operation and then pops the register
stack, it accepts the same operands as the fist instruction and can also store
integer value in the 64–bit memory, so it has the same rules for operands as
fild instruction.
fbld converts the packed BCD integer into double extended precision
floating–point format and pushes this value onto the FPU stack. fbstp
converts the value in st0 to an 18–digit packed BCD integer, stores the
result in the destination operand, and pops the register stack. The operand
should be an 80–bit memory location.
fadd adds the destination and source operand and stores the sum in the
destination location. The destination operand is always an FPU register,
if the source is a memory location, the destination is st0 register and only
source operand should be specified. If both operands are FPU registers, at
least one of them should be st0 register. An operand in memory can be a
32–bit or 64–bit value.
fadd qword [bx] ; add double precision value to st0
fadd st2,st0 ; add st0 to st2
faddp adds the destination and source operand, stores the sum in the destination
location and then pops the register stack. The destination operand
must be an FPU register and the source operand must be the st0. When no
operands are specified, st1 is used as a destination operand.
38 CHAPTER 2. INSTRUCTION SET
faddp ; add st0 to st1 and pop the stack
faddp st2,st0 ; add st0 to st2 and pop the stack
fiadd instruction converts an integer source operand into double extended
precision floating–point value and adds it to the destination operand.
The operand should be a 16–bit or 32–bit memory location.
fiadd word [bx] ; add word integer to st0
fsub, fsubr, fmul, fdiv, fdivr instruction are similar to fadd, have
the same rules for operands and differ only in the perfomed computation.
fsub substracts the source operand from the destination operand, fsubr
substract the destination operand from the source operand, fmul multiplies
the destination and source operands, fdiv divides the destination operand by
the source operand and fdivr divides the source operand by the destination
operand. fsubp, fsubrp, fmulp, fdivp, fdivrp perform the same operations
and pop the register stack, the rules for operand are the same as for the faddp
instruction. fisub, fisubr, fimul, fidiv, fidivr perform these operations
推荐阅读
- 虎牙直播录像咋删除掉,虎牙直播录像怎么删掉
- c语言库函数消息,c语言画图的库函数
- 老电视机三色不重合怎么调,老电视机三色不重合怎么调节
- excel筛选姓怎么筛选,excel筛选姓名怎么筛选
- php页面传递数据 php如何传值
- 狐狸养成记游戏无广告,狐狸娘养成记
- 抖音语音直播文案怎么弄,抖音直播间台词
- 哔咔公众号怎么注册不了,哔咔没法注册账号
- 如何应对网络时代新媒体,如何应对新媒体带来的挑战