Assembler







8087
.
8087.
,
.
.
8087.
. 7.10
.
8087 :
 
IF1
INCLUDE 87MAC.LIB
ENDIF
 

8087
, .
,
.
ENDIF.
, -
. 8087
"F". ,
8087, FLD (Floating LoaD,
). 8088,
MOV ,
Microsoft (R) Macro Assembler Version 5.00 1/1/80 01:21:45
. 7.10 8087 Page 1-1
 
PAGE ,132
TITLE . 7.10 8087
0000 CODE SEGMENT
ASSUME CS:CODE,DS:CODE
 
0000 WORD_INTEGER LABEL WORD
0000 SHORT_INTEGER LABEL DWORD
0000 LONG_INTEGER LABEL QWORD
0000 BCD_INTEGER LABEL TBYTE
0000 SHORT_REAL LABEL DWORD
0000 LONG_REAL LABEL QWORD
0000 TEMPORARY_REAL LABEL TBYTE
 
0000 9B DF 06 0000 R FILD WORD_INTEGER
0005 9B DB 06 0000 R FILD SHORT_INTEGER
000A 9B DF 2E 0000 R FILD LONG_INTEGER
000F 9B DF 26 0000 R FBLD BCD_INTEGER
0014 9B D9 06 0000 R FLD SHORT_REAL
0019 9B DD 06 0000 R FLD LONG_REAL
001E 9B DB 2E 0000 R FLD TEMPORARY_REAL
 
0023 9B D9 C2 FLD ST(2)
 
0026 9B DF 16 0000 R FIST WORD_INTEGER
002B 9B DB 16 0000 R FIST SHORT_INTEGER
0030 9B D9 16 0000 R FST SHORT_REAL
0035 9B DD 16 0000 R FST LONG_REAL
 
003A 9B DD D2 FST ST(2)
 
003D 9B DF 1E 0000 R FISTP WORD_INTEGER
0042 9B DB 1E 0000 R FISTP SHORT_INTEGER
0047 9B DF 3E 0000 R FISTP LONG_INTEGER
004C 9B DF 36 0000 R FBSTP BCD_INTEGER
0051 9B D9 1E 0000 R FSTP SHORT_REAL
0056 9B DD 1E 0000 R FSTP LONG_REAL
005B 9B DB 3E 0000 R FSTP TEMPORARY_REAL
 
0060 9B DD DA FSTP ST(2)
0063 9B D9 CA FXCH ST(2)
 
0066 9B D9 EE FLDZ
0069 9B D9 E8 FLD1
006C 9B D9 EB FLDPI
006F 9B D9 E9 FLDL2T
0072 9B D9 EA FLDL2E
0075 9B D9 EC FLDLG2
0078 9B D9 ED FLDLN2
 
007B CODE ENDS
END
. 7.10 8087
. ,

, ,
.
 
, - , FILD.
, FILD (16 ), (32 )
(64 ).
(80 ), FBLD. B
. , FLD
. ,
.
 
8087,
, ,
F I, -
B, .
, ,
, .
 
. 7.10,
8087 .
, 8087

. ,
.
, , 8087
- .
,
,
"". ,
. ,
8087 ,
.
 

. ,
 
FLD ST0
 
.
.
 
FLD ST3
 
. ,
, ST3, ST4.
 
,
.
8087 ,
, . =,
09BH. - WAIT.
, 8087
8088. 8088
8087 ,
8087 , 8087
. 8087
WAIT . (
8087 - ,
.
FN, N
).
 
,
8087 ESC. ,
ESC . ,
ESC, . ESC
, ,
, mod=r/m.
WAIT
8087 .
 
.

. , 8087

. FST
FIST. (,
).
.
 
, FST
. "
" - , ,
.
, 8087 ,
= .
 
, ,
. FSTP (
FISTP FBSTP)
8087 , .
.
8087 = ,
FLD FSTP
.
" " . ,
,
FLD FSTP.
 
FXCH -
. FXCH
.
.

.
= . 8088,
8087
, .

--------------------------
FLDZ 0
FLD1 1
FLDPI PI
FLDL2T LOG2(10)
FLDL2E LOG2(e)
FLDG2 LOG10(2)
FLDLN2 LOGe(2)
-------------------------- . 7.11 8087
 

. .
,
,
.
.
. 7.11 ,
ST0 .
, .
 

Microsoft (R) Macro Assembler Version 5.00 1/1/80 04:04:07
. 7.12 8087 Page 1-1
 
PAGE ,132
TITLE . 7.12 8087
0000 CODE SEGMENT
ASSUME CS:CODE
 
0000 STATUS_WORD LABEL WORD
0000 CONTROL_WORD LABEL WORD
0000 ENVIRONMENT LABEL BYTE ; 14
0000 STATE LABEL BYTE ; 94
 
0000 9B DB E3 FINIT
0003 9B DB E0 FENI
0006 9B DB E1 FDISI
0009 9B 2E: D9 2E 0000 R FLDCW CONTROL_WORD
000F 9B 2E: D9 3E 0000 R FSTCW CONTROL_WORD
0015 9B DB E2 FCLEX
0018 9B 2E: D9 36 0000 R FSTENV ENVIRONMENT
001E 9B 2E: D9 26 0000 R FLDENV ENVIRONMENT
0024 9B 2E: DD 36 0000 R FSAVE STATE
002A 9B 2E: DD 26 0000 R FRSTOR STATE
0030 9B D9 F7 FINCSTP
0033 9B D9 F6 FDECSTP
0036 9B DD C2 FFREE ST(2)
0039 9B D9 D0 FNOP
003C 9B FWAIT
003D CODE ENDS
END
 
. 7.12 8087