# FISTTP
# Store Integer with Truncation
Opcode | Mnemonic | Description |
---|---|---|
DF /1 | FISTTP m16int | Store ST as a signed integer (truncate) in m16int and pop ST. |
DB /1 | FISTTP m32int | Store ST as a signed integer (truncate) in m32int and pop ST. |
DD /1 | FISTTP m64int | Store ST as a signed integer (truncate) in m64int and pop ST. |
Description | ST(0) | Destination |
---|---|---|
FISTTP converts the value in ST into a signed integer using truncation (chop) as rounding mode, transfers the result to the destination, and pop ST. FISTTP accepts word, short integer, and long integer destinations. The following table shows the results obtained when storing various classes of numbers in integer format.
FISTTP Results ST(0)Destination -inf or Value Too Large for DestinationFormat * F = -1-I
- 1 < F < +10 F = +1+I +inf or Value Too Large for Destination Format* NaN*
F Means finite floating-point value. I Means integer.
- Indicates floating-point invalid-operation (#IA) exception.
|-inf or Value Too Large for Destination|Format |F = -1|-I|- 1 < F < +1|0|F = +1|+I|+inf or Value Too Large for Destination Format||NaN||F Means finite floating-point value.|I Means integer.| Indicates floating-point invalid-operation (#IA) exception.| | |-inf or Value Too Large for Destination|Format | |F = -1|-I| |- 1 < F < +1|0| |F = +1|+I| |+inf or Value Too Large for Destination Format|| |NaN|| |F Means finite floating-point value.| |I Means integer.| | Indicates floating-point invalid-operation (#IA) exception.|
# Operation
Destination = ST;
ST = Pop();
2
3
# Flags affected
C1 is cleared; C0, C2, C3 undefined.
# Numeric Exceptions
Invalid, Stack Invalid (stack underflow), Precision.