FBSTP—Store BCD Integer and PopDescriptionConverts the value in the ST(0) register to an 18-digit packed BCD integer, stores the result in the destination operand, and pops the register stack. If the source value is a non-integral value, it is rounded to an integer value, according to rounding mode specified by the RC field of the FPU control word. To pop the register stack, the processor marks the ST(0) register as empty and increments the stack pointer (TOP) by 1.The destination operand specifies the address where the first byte destination value is to be stored. The BCD value (including its sign bit) requires 10 bytes of space in memory. The following table shows the results obtained when storing various classes of numbers in packed BCD format.If the converted value is too large for the destination format, or if the source operand is an ∞, SNaN, QNAN, or is in an unsupported format, an invalid-arithmetic-operand condition is signaled. If the invalid-operation exception is not masked, an invalid-arithmetic-operand exception (#IA) is generated and no value is stored in the destination operand. If the invalid-operation exception is masked, the packed BCD indefinite value is stored in memory.This instruction’s operation is the same in non-64-bit modes and 64-bit mode.OperationDEST := BCD(ST(0));PopRegisterStack;FPU Flags AffectedC1Set to 0 if stack underflow occurred.Set if result was rounded up; cleared otherwise.C0, C2, C3 Undefined.OpcodeInstruction64-Bit ModeCompat/Leg ModeDescriptionDF /6FBSTP m80bcdValidValidStore ST(0) in m80bcd and pop ST(0).Table 3-19. FBSTP ResultsST(0)DEST−∞or Value Too Large for DEST Format*F≤−1−D−1< F<-0**− 0− 0+ 0+ 0+ 0<F<+1**F≥+1+ D+ ∞or Value Too Large for DEST Format*NaN*NOTES:FMeans finite floating-point value.DMeans packed-BCD number.*Indicates floating-point invalid-operation (#IA) exception.**±0 or ±1, depending on the rounding mode.
This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.