Nvis 5586A
Nvis Technologies Pvt. Ltd.
158
021F
9B D9 F2
FTAN
CALCULATE TAN Z/2 AS
Y/X.
0222
9B D9 F0
FILD
ST (O)
DUPLICATE X ON TOP OF
STACK.
Step-4
0225
9B D8 C9
FMUL
ST, ST (1)
ST (O) =X * X
0228
9B D9 C2
FILD
ST (2)
ST (O) = Y.
022B
9B D8 CB
FMUL
ST (O), ST 3
ST (O) = Y * Y
022E
9B DE C1
FADDP
ST (1), ST
(O)
YXY IS POPPED OF
AND TOP OF STACK
ST (O) = X2 + Y2.
0231
9B DE F9
FDIVRP
ST (O) = X/X2 + Y2
0234
9B DE C9
FMULRP
ST (O) = XY/X2+Y2
0237
9B D9 C0
FLD ST (O)
DUPLICATE THE TOP OF
STACK
023A
9B DE C1
FADDP
ST (I), ST
(O)
ST (O) = 2XY/(X2+Y2)
=SING (Z).
Step-5
023D
C7 06 04 03
MOV
W ARG E
2710H
LOAD ARG3 WITH 10 27
10,000 VALUE
0243
9B DF 06 04 03
FILD
ARG 3
0248
9B DE C9
FMURP
ST (0) =10,000*SIN (Z)
024B
9B D9 FC
FRND
INT
ROUND THE INTEGER
024E
9B DF 36 06 03 FSTP
ARG4
STORE IT IN BCD FORM.
0253
9B
FWAIT
0254
A1 06 03
MOV
AX, ARG4
THE RESULT IS STORED
AT 0306 AND AX. GO TO
MONITOR.
0257
CC
CC
GO TO MONITOR.
In the addition to above, the stack operation on each instruction execution is shown. This will
help to understand the program in details. This way of writing will help user to gain
confidence in writing the program for 8087.
Steps required implementing the program:
1.
Enter the above program.
2.
Do not use any memory location from 0300 to 0308 as they are required for
implementing the program.
3.
Enter the value of angle in AL, say for calculating Sin 30, the AL should be 1EH.
Summary of Contents for 5586A
Page 2: ...Nvis 5586A Nvis Technologies Pvt Ltd 2...
Page 23: ...Nvis 5586A Nvis Technologies Pvt Ltd 23 Memory Read Timing in Maximum Mode...
Page 30: ...Nvis 5586A Nvis Technologies Pvt Ltd 30...
Page 48: ...Nvis 5586A Nvis Technologies Pvt Ltd 48 Diagram of module RESET power Instruction Set Note...