Nvis 5586A
Nvis Technologies Pvt. Ltd.
154
Use of 8087 Processor:
The following programs illustrate the use of 8087 processor.
Program 38:
Write a program to calculate N3= ÖN12 + N22 32 bit integer value stored at 300 H
and 304H respectively. The result should be store at 308H.
Steps Required:
1.
Load N1 and calculate its N12 value
2.
Load N2 and calculate its N22 value
3.
Add the two.
4.
Take the square root and store it in 308H location.
Address
Opcode
Mnemonic
Comment
Step-1
0200
9B BB 00 03
MOV BX,0300H
BX POINTS TO N1
0204
DB 07
FLD (BX)
LOAD N1
0206
9B DA 0F
FMUL (DX)
GIVE WAIT CALCULATE
N12
Step-2
0209
9B DD D9
FSTP ST (1)
LOAD N2 IN ST (1)
020C
9B BB 04 03
MOV BX, 0304
H LOAD BX TO
POINT N2
0210
DB 07
FLD (Bx)
LOAD N2
0212
9B DA 0F
FMUL (Bx)
GET N22
Step-3
0215
9B D8 C1
FADD ST (1)
ADD THE N12 +
N22 THE RESULT IS
ON TOP OF STACK.
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...