Intel 80286, 80287 manual Lei

Models: 80287 80286

1 515
Download 515 pages 45.04 Kb
Page 469
Image 469

NUMERIC PROGRAMMING EXAMPLES

IAPX2B6 _AD _,",LEA

 

12: 11: os· 09/25183 PAQE

SEAlES-III IAPX2S6 "",CRD ASSEKILEA XlOS ASSEKILY OF I10IIULE OET.,pOWER_10

aaJECT I'IDDULEPLACED IN : F3: PDW10. a...

ASSEJ1BLER INVOKED IV: A8M286.86: F3: PDWIO. AP~

LOC . DI~

0000 OOOOOOOOooOOFO

3F

0008 00000000000024

40

0010 00000000000059

40

001B ooOOOoooo0408F

40

0020 0OOOOO0OOO8BC3

40

0028 000000000061\F8

40

0030 0000000080842E

41

0038 00000000001263

41

0040 0000000084D797

41

0048 aOOOOO0065CDCD

41

0050 00OO0020~M02

4.

0058 000000E87648374. OObO OOQOOOA2941A6D4.

0068 000040E59C3DA2

4.

0070 0000901EC4oC06

••

0078 00003426F5680C

43

0080 0080E03779C341

43

0088 001'100885573476

43

0090 OOCB4E676DC1AD

43

0098

0098 301200

0098 770F

0090 53

009E 8108

OOAO C1E303 O0A3 2EDD870000 OOAS 51

DDA'09F4

OOAB C3

OOAC

GOAC D9E9

OOAE C8040000

0012 a946FE

0085 OE4EFE

ooae 9BD97EFC

OOIC a.46FC

008F 25FFF3

OOC2 Ol)C)O()i

oacs .746FC

DOCS OCIE8

LINE

SOURCE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1+1

.UU.C-C.lcuhh th v.lua a,1 lo*••• ·~

 

 

 

 

 

 

 

 

 

 

 

2

 

 

Thh lub1'DUUnW will c . leul. t . the v.lue of 10••••.

 

 

3

 

 

 

 

4

 

 

Fa," ..,alu••

of 0 c- a. < I',

the

" •• ult 111111

... ct.

 

 

 

5

 

 

All 80286 ".ght."••". 'II,..n.,• .,..nt .nd th. v.lu. is .,..tu"n,d on

6

.J

th. TDB ••

two nu_b.r •••• pon.nt

 

in STet) .nd '".cUon in STeO).

7

 

I

Th ••«.on.nt v.lu. c.n II. 1.,

 

than th. l.", •• t ... ,on.nt 0'

.n

a

 

 

•• t.nd.d

" •• 1 fo" •• t: nu.....".

Th" •••t.cll

.nt,,:i'••". u•• d.

 

9

 

 

 

 

 

g.t:-polII'T' _10

 

 

 

 

 

 

 

 

 

 

 

 

10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

II

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I.

 

 

 

 

pu" lic .,t-P0IlltT'_10. palll."_tab It

 

 

 

 

 

 

 

13

 

.t.cll

 

 

.t.c .... B

 

 

 

 

 

 

 

 

 

 

 

 

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IS

 

 

 

 

.'I••nt ." pubUc

 

 

 

 

 

 

 

 

 

 

 

 

16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

17

 

 

Us •••• ct valu,. f"alll 1.0 to leiS.

 

 

 

 

 

 

 

 

la

 

 

 

 

 

 

 

 

 

 

19

 

 

 

 

 

 

 

 

 

 

 

Optill111

16 bit ac:c ...

20

 

 

 

 

 

 

 

 

 

 

J

.1

 

 

 

 

 

1. O. 1.1. 1.2. h3

 

 

 

 

 

 

 

 

 

 

 

••

 

 

 

 

d,

h4. 1.5. h6. h7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d.

1116. h17. hiS

 

 

 

 

 

 

 

 

 

 

 

26

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.7

 

 

,m,

•••

1B

 

I

T.I'st

 

 

0

 

a.

 

19

 

.8

 

 

 

'OT'

<-

<

 

9

 

 

 

 

out_a,_".nl'

 

 

 

 

 

 

 

 

30

 

 

J.

 

 

 

 

 

 

 

 

 

 

 

 

3.

 

 

pu.h

...

 

 

,

O.t lIIa"Ung ind ••

".gut."

 

32

 

 

 

 

 

33

 

 

mov

b .. , ••

 

, Fa,.. t.blt ind ••

 

 

 

34

 

 

• hl

.... ,3

 

 

 

 

 

 

 

 

 

 

 

 

35

 

 

,lei

pa..tT'_tabht .... l

 

,

O.t ••• ct v.lu.

 

 

 

36

 

 

pop

b.

 

 

, R•• to"...... ish... vah.

 

37

 

 

ht".ct

 

 

 

 

S.p....... pOIll.....nd .".ctian

 

as

 

 

•••

 

 

 

 

aM to haY. f.tr.ct "'unninl

 

39

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

40C.lcul.h th. v.lu. u.ing th ••• pon.nU.h inst...uction.

41Th. followinl .... I.Uon. at'. u•• d:

4.

 

 

10". -

2.*e la.2C 10)*.)

 

 

 

 

43

 

 

2"( I+F)

- 2**1 • .!2'*F

 

 

 

 

44

 

 

If . ut) • 1 .nd .UO) -

 

.!2.ttF then hc.le p... aduc •• .!2"(I+F)

45

I .

.

 

 

 

 

 

 

46

aut_of_r.ng.:

 

 

 

 

 

 

47

 

...

tbp-.!21. a •

I S.v. po".,. 0' 10 v.lu.

 

SO

 

 

4S

 

'IdI2'

 

 

 

TOS - LOOaUOI

 

49

 

nt." 4.0

 

 

Fa".. t . t . c.

 

51

 

U ul

ward Ittr CIIp-2]

I

TOS. X - LO02C 10ltP • LD02110"P)

52

 

f tclil

wo"d ptr tbp-4]

I

G.t cu....,..nt cont.,.ol wa.,.d

 

53

 

...

••• 1II0rd

ptr Cbp-41

I

G.t

cont.,.ol lIfo.,.d. no w.it

n.c .....,.u

54

 

.nd

••• not OCOOH

I

.... 11

off cu.,.,..nt. ".oundinl

'Ulel

55

 

..

a •• 040DH

I

S.t nund to n'latlv. 1nfinitu

56

 

Ichg

••• wo... d

pt... tbp-41

 

Put: nil. cont"al wo,.d in ••ao1'U

57

 

 

 

 

 

old cant"ul wo,.d is in a ..

 

sa

 

flell

 

 

"

S.t

ros • -1.0

 

Figure 4-6. Floating-Point to ASCII Conversion Routine (Cont'd.)

4-13

Page 469
Image 469
Intel 80286, 80287 manual Lei