Assembler






"" 8087
. 8087

Microsoft (R) Macro Assembler Version 5.00 4/2/89 16:07:21
. 7.16 8087 Page 1-1
 
PAGE ,132
TITLE . 7.16 8087
 
0000 CODE SEGMENT
ASSUME CS:CODE,DS:CODE
 
0000 WORD_INTEGER LABEL WORD
0000 SHORT_INTEGER LABEL DWORD
0000 SHORT_REAL LABEL DWORD
0000 LONG_REAL LABEL QWORD
 
0000 9B D8 C1 FADD st(0),ST(1)
0003 9B D8 C2 FADD st(0),ST(2)
0006 9B D8 C2 FADD ST(0),ST(2)
0009 9B DC C2 FADD ST(2),ST(0)
000C 9B DE 06 0000 R FIADD WORD_INTEGER
0011 9B DA 06 0000 R FIADD SHORT_INTEGER
0016 9B D8 06 0000 R FADD SHORT_REAL
001B 9B DC 06 0000 R FADD LONG_REAL
0020 9B DE C2 FADDP ST(2),ST(0)
0023 9B D8 E2 FSUB st(0),ST(2)
0026 9B DE 26 0000 R FISUB WORD_INTEGER
002B 9B DE EA FSUBP ST(2),ST(0)
002E 9B DC E2 FSUBR ST(2),ST(0)
0031 9B DA 2E 0000 R FISUBR SHORT_INTEGER
0036 9B DE E2 FSUBRP ST(2),ST(0)
0039 9B D8 0E 0000 R FMUL SHORT_REAL
003E 9B DE 0E 0000 R FIMUL WORD_INTEGER
0043 9B DE CA FMULP ST(2),ST(0)
0046 9B D8 F2 FDIV ST(0),ST(2)
0049 9B DA 36 0000 R FIDIV SHORT_INTEGER
004E 9B DE FA FDIVP ST(2),ST(0)
0051 9B D8 FA FDIVR st(0),ST(2)
0054 9B DE 3E 0000 R FIDIVR WORD_INTEGER
0059 9B DE F2 FDIVRP ST(2),ST(0)
 
005C CODE ENDS
END
 
. 7.16 8087
, -
, , ,
.
 
. 7.16 ,
.
FADD,
. ,
. . 7.17,
.
. 7.17
. 1
.
ST1, . ,
. 7.17
.
.
2 ,
8087.
. - ,
, .
= ,
, .
 
FADD
-----------------------------------------------------------------
1. Fop FADD ST0<-ST0+ST1
2. Fop STi FADD ST2 ST0<-ST0+STi
Fop ST0,STi FADD ST0,ST2 ST0<-ST0+STi
Fop STi,ST0 FADD ST2,ST0 ST2<-ST0+ST2
3. FopP STi,ST0 FADDP ST2,ST0 ST2<-ST0+ST2,
4. Fop .. FADD ST0<-ST0+
5. Flop FIADD ST0<-ST0+
(a)
 

----------------------------------------------------------
ADD <- +
SUB <- -
SUBR <- -
MUL <- *
DIV <- /
DIVR <- /
----------------------------------------------------------
(b)
 
. 7.17 (a)
(b) NDP 8087
 
3 .
,
.
,
. - ST1,
.
,
,
.
.
 
.
4 - .
5 - .
 
. 7.16 , FADD
. -
, - .

,
,
.
 
. 7.17 .
8087
.
,
;
. , ,
- ,
=;
.