Intel 80286 Computer Accessories User Manual


 
PROGRAMMING NUMERIC APPLICATIONS
iAPX286
MACRO
ASSEMBLER
EXAMPLE~ASM286]ROGRAM
XREF SYMBOL
TABLE
LISTING
NAME
TYPE
VALUE
ATTR
IBUTES,
XREFS
CODE
SEGMENT
SIZE=OQ46H
ER
PUBLIC
19#
69
CONTROL_287 V
WORD
OOOOH
DATA
7#
33
DATA. SEGMENT
SIZE=OlAOH
RW
PUBLIC
6#
13
20
22
INIT287
L FAR
QOOOH
E:XTRN
3# 32
N_OFJ.
V
WORD
Q002H
DATA
8#
42
56
POP_RESULTS
L NEAR
0039H
CODE
60#
STACK
STACK
SIZE=0190H
Rt;
PUBLIC
16#
20
24 26
START
L NEAR
OOOOH
CODE
21#
70
SUM_INDEXES
V
DWORD
0198H
DATA
11#
62
SUM_NEXT. L NEAR
0024H
CODE
48#
57
SUM_SQUARES V
DWORD
0194H
DATA
10#
61
SUMJ
V
DWORD
019CH
DATA
12#
63
X_ARRAY V
DWORD
0004H
(
100)
DATA
9#
49
50
END
OF
SYMBOL
TABLE
LISTING
ASSEMELY COMPLETE,
NO
ERRORS
Figure 2-7. Sample ASM286 Program (Cont'd.)
ST(O)
ST(l)
ST(2)
ST(O)
ST(l)
ST(2)
ST(3)
ST(O)
ST(l)
ST(2)
ST(3)
ST(4)
ST(O)
ST(l)
ST(2)
ST(3)
FLOZ,
FLOZ,
FLOZ
0.0
0.0
0.0
FAOO
5TO)
5T
2.5
0.0
0.0
2.5
FMUL
5T 5T
6.25
2.5
0.0
0.0
2.5
F I
MU
L N
OF
X
50.0
6.25
0.0
2.5
SU
M_SQUARES
UM_INDEXES
5
SU
X_A
SUM
-
-
RRAY
(19)
_SQUARES
SUM
_INDEXES
SUM
-
-
----
-
X_ARRAY(19)2
X_ARRAY(19)
SUM_SQUARES
SUM_INDEXES
SUM_X
........
........
X_A
RRAY(19)'20
_SQUARES
_INDEXES
SUM
SUM
SUM
FLO
X
ARRAy[5Il
5
5
T(O)
T(l)
ST(2)
ST(3)
-
-
ST
(0)
ST
(1)
ST
(2)
ST
(3)
ST
(4)
-
-
ST(O)
ST(l)
ST(2)
ST(3)
....
2.5
0.0
0.0
FLO 5T
2.5
2.5
0.0
0.0
2.5
FAOOP
5T(2)
5T
2.5
6.25
0.0
2.5
X_ARRAY
(19)
SUM_SQUARES
SUM_INDEXES
SUM_X
X_ARRAY
(19)
X_ARRAY
(19)
SUM_SQUARES
SUM_INDEXES
X_ARRAY(19)
SUM_SQUARES
SUM_INDEXES
ST(O)
6.25 SUM_SQUARES
-ffiFAOOP
5T(2),5T
ST(l)
50.0
SUM_INDEXES
ST(2) 2.5
SUM_X
Figure 2-8. Instructions and Register Stack
2-47
G3010a