Assembler







, . ,
.

,


.
 
IBM .
,
.
.
. IBM PC
MASM.
 
, ,
, .
""
.
, ,
.
, ,
.
 
. 6.4
FIDIVR 8087.
-
. .7, ,
FIDIVR, .
- . ,

. , ADD
, ,
,
.
FIDIVR
.
 
FIDIVR ,
.
, FIDIVR
.
: TYPE.
TYPE,

Microsoft (R) Macro Assembler Version 5.00 4/2/89 16:06:42
. 6.4 Page 1-1
 
PAGE ,132
TITLE . 6.4
 
FIDIVR MACRO SOURCE
IFE 2 - TYPE SOURCE
DB 09BH ;; FWAIT
ESC 037H,SOURCE ;; FIDIVR
ENDIF
IFE 4 - TYPE SOURCE
DB 09BH ;; FWAIT
ESC 017H,SOURCE ;; FIDIVR
ENDIF
ENDM
 
0000 CODE SEGMENT
ASSUME CS:CODE,DS:CODE
 
0000 ???? TWO_BYTE DW ?
0002 ???????? FOUR_BYTE DD ?
0006 ?? ONE_BYTE DB ?
 
FIDIVR TWO_BYTE
0007 9B 1 DB 09BH ;
0008 DE 3E 0000 R 1 ESC 037H,TWO_BYTE ;
FIDIVR FOUR_BYTE
000C 9B 1 DB 09BH ;
000D DA 3E 0002 R 1 ESC 017H,FOUR_BYTE ;
FIDIVR ONE_BYTE
 
0011 CODE ENDS
END
 
. 6.4.
, . FIDIVR ,
- .
 

 
IFE 2-TYPE SOURCE
 
FIDIVR SOURCE.
2=TYPE SOURCE, 0,
SOURCE ,
. IFE
(, ) ,
,
0. , IFE
, SOURCE .
,
IFE , ENDIF.
,
,
 
DB 09BH
ESC 37H,SOURCE
 
 
. 6.4
. ,
ESC 37H.
 
FIDIVR ,
, ,
IFE.
, ESC 17H.
. 6.4 .
 
, . 6.4
.
IFE
"", .
.
 
IFE
. . 6.5.
IF :
 
IF
...
ELSE
...
ENDIF
 
"",
, IF.
ELSE ENDIF.
ELSE . ,

IF. ENDIF
.
 
IF- :
---------------------------------------------------------------
IF 0
IFE 0
IFDEF
IFNDEF
IFB <>
IFNB <>
IFIDN <1>,<2> 1 2
IFDIF <1>,<2> 1 2
IF1
IF2
---------------------------------------------------------------
. 6.5 IF
 
,
.
. 6.6 - IFB,
.
FLD - 8087.

, :
 
FLD
FLD 1
FLD _
FLD _
FLD _
 
FLD ,
, ,
.
. (
.7.)
IFB .
,
, IFB
"". ,

 
DB 09BH,0D9H,0C 1H
 
EXITM,
IF, . ,
,
, ENDM.
.

"Open conditionals:1" ("
: 1"). , Mincho"'> Microsoft (R) Macro Assembler Version 5.00 4/2/89 16:06:47
. 6.6 Page 1-1
 
PAGE ,132
TITLE . 6.6
 
FLD MACRO SOURCE
IFB <SOURCE>
DB 09BH,0D9H,0C1H ;; FLD ST(1)
EXITM
ELSE
IFE TYPE SOURCE
DB 09BH,0D9H,0C0H+SOURCE
;; FLD ST(i)
ENDIF
IFE 4 - TYPE SOURCE
DB 09BH
ESC 8,SOURCE ;; FLD
ENDIF
IFE 8 - TYPE SOURCE
DB 09BH
ESC 40,SOURCE ;; FLD
ENDIF
IFE 4 - TYPE SOURCE
DB 09BH
ESC 01DH,SOURCE ;; FLD
ENDIF
ENDIF
ENDM
 
0000 CODE SEGMENT
ASSUME CS:CODE,DS:CODE
 
0000 ???????? FOUR_BYTE DD ?
0004 ???????????????? EIGHT_BYTE DQ ?
000C ??????????????????? TEN_BYTE DT ?
?
FLD
0016 9B D9 C1 1 DB 09BH,0D9H,0C1H ;
FLD 1
0019 9B D9 C1 1 DB 09BH,0D9H,0C0H+1
FLD FOUR_BYTE
001C 9B 1 DB 09BH
001D D9 06 0000 R 1 ESC 8,FOUR_BYTE ;
0021 9B 1 DB 09BH
0022 DB 2E 0000 R 1 ESC 01DH,FOUR_BYTE ;
FLD EIGHT_BYTE
0026 9B 1 DB 09BH
0027 DD 06 0004 R 1 ESC 40,EIGHT_BYTE ;
FLD TEN_BYTE
 
002B CODE ENDS
END
 
. 6.6
ENDIF, .
.
,
. EXITM ,
.
EXITM ,
,
. , SOURCE ,
ELSE FLD.
, ,
 
IFE TYPE SOURCE
 
. SOURCE ,
.
,
. ,
EXITM "
". , .
 
, FLD ELSE

. IF-,
TYPE, ,
.
, TYPE 0,
, .

, .