Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Coprocessor Emulation for 387DX and 387SX

software




FRANKE.387

Coprocessor Emulation for

387DX and 387SX

Version 2.4

(c) Copyright 1989, 1990 by

Ingenieurb o FRANKE,

All rights reserved.

Overview

FRANKE.387 is a software emulation of the arithmetic coprocessors 387DX

and 387SX from Intel. FRANKE.387 was devel 737s1813h oped for ATs using a 386DX or

386SX processor. MS-DOS or any compatible operation system is required.

The hole instruction set of the 387 coprocessor is available with

FRANKE.387. All 16 or 32 bit addressing modes are supported. No

application program can make out any difference to the real coprocessor.

Of course, FRANKE.387 is not able to increase the physical power of your

computer. FRANKE.387 is slower than a 387 coprocessor, but you can run

every application having no expensive coprocessor. Many application

programs will run up to 2.25 times faster even with FRANKE.387 if they

support a coprocessor.

Shareware

Starting with version 2.4, FRANKE.387 will also be distributed as

shareware. The shareware version does not have all features, the full

version has.

The not registered shareware version may freely be copied and distributed

for free. Everybody may test the not registered version free of charge

for up to 30 days.

All rights, not described above, like selling, changing, distribution of

a registered version or even the use of the not registered version

longer than 30 days are explicitly not permitted, if you do not have a

prior written permission from Ingenieurbo Franke.

Registration

Only registered users may use FRANKE.387 longer than 30 days. The

registered versions do not need any interactions during boot.

Version Fee

incl. costs

Shareware version, only one precision level DM 64.00

Full version, 3 precision levels, High Level Language

Interface, 387 Instruction Trace Modus DM 99.00

Upgrade from shareware version to full version DM 44.00

We need the following data for your registration:

1. name

2. complete address

3. requested version (shareware/full/upgrade)

Send your registration including the fee to:

Letter/Fax/Check: Payment:

Ingenieurb o FRANKE Ingenieurb o FRANKE

Rennweg 61 Konto 10039999

D-8500 N nberg 20, Germany Schmidt Bank, N nberg

Fax: 49 911 535421 BLZ 760 300 70

We will deliver your registered version after we received your payment.

Installation

The installation of FRANKE.387 is very easy:

1. Copy the files FRANKE.387 and 387.EXE to your hard disk or boot

floppy.

2. Create the CONFIG.SYS file, if it does not exist.

3. Insert the following line in CONFIG.SYS file:

DEVICE = FRANKE.387

If needed you can include a path description before FRANKE.387,

e.g. DEVICE = c:\tools\FRANKE.387

After the name FRANKE.387 you can use the swiches ON or OFF.

E.g. DEVICE = FRANKE.387 ON.

This swiches specify whether FRANKE.387 will be enable or disabled

during boot. If swiches are missing, FRANKE.387 will be automatically

enabled, if no coprocessor was found, and disabled otherwise.

4. Re-boot the computer.

The entry in the CONFIG.SYS file loads FRANKE.387 every time you

boot. FRANKE.387 comes up with a copyright message and its current

status.

The not registered shareware version uses an extended copyright

message and sounds two bell signals. To continue boot you must

press the key specified in the last line of the screen. - Only

uppercase letters are accepted!

How to use FRANKE.387

Normally FRANKE.387 needs no user interaction. All actions are started

from the application programs that utilize the coprocessor. So FRANKE.387

does its work automatically. The application programs cannot make out

any difference to the real coprocessor.

Of course, FRANKE.387 must be enabled to work. As described, FRANKE.387

can be enabled or disabled using the swiches ON or OFF at installation.

Normally FRANKE.387 is always enabled, if no coprocessor is installed.

To enable or disable FRANKE.387 after installation, you can use the program

387.EXE. This program may be copied to any directory of your hard disk

or to any floppy disk.

387.EXE allows the following calling options. Some of this options are

supported by the full version only.

Option Functions performed

FRANKE.387 will be set to default status.

I.e. FRANKE.387 will be enabled if no coprocessor is

installed. It will be disabled if a coprocessor was

found.

387 ON FRANKE.387 is enabled with full precision.

387 OFF FRANKE.387 is disabled. This may be necessary, if

you want to re-boot your system with Ctrl+Alt+Del.

The keyboard driver KEYBOARD.386 will do that auto-

matically.

The following opitons are supported by the full version only.

387 53 FRANKE.387 is enabled with 53 bit precision maximum.

This corresponds to the data types 'double', 'long

real' or 'double precision'. Most of the application

programs do not need more precision. FRANKE.387 will

run faster using this option.

387 24 FRANKE.387 is enabled with 24 bit precision maximum.

This corresponds to the data types 'float', 'real' or

'single precision'. In most cases, no higher pre-

cision is needed. FRANKE.387 will run much faster

using this option.

387 ON I Same as 387 ON, the High Level Language Interface

is enabled. (See also High Level Language Interface.)

387 53 I Same as 387 53, the High Level Language Interface

is enabled. This is the suggested standard option for

the full version. (See also High Level Language

Interface.)

387 24 I Same as 387 24, the High Level Language Interface

is enabled. FRANKE.387 run at maximum speed, if you

use this option. (See also High Level Language

Interface.)

Speed

Like any 387 coprocessor, FRANKE.387 supports the three precision levels

for 64, 53 and 24 bit precision. The full version allows the user to

specify the maximum precision to increase computing speed.

The following table shows the aprox. number of CPU cyles. The numbers

are for a 386DX processor and no wait states. In the case of a 386SX or

wait states all numbers should be increased a little bit.

The column EMUL87 shows the speed for the public domain 80287 emulation.

FRANKE.387

Instruct. Description 387DX 64 Bit 53 Bit 24 Bit EMUL87

FNOP no operation 25 410 410 410 1,075

FLD load TByte number 38 650 650 650 1,470

FSTP store TByte num. 55 745 745 745 1,495

FADD Addition 34 700 700 680 1,460

FSUB Subtraction 34 770 770 750 1,565

FMUL Multiplication 52 830 800 700 1,985

FDIV Division 96 840 840 710 2,340

FSQRT Square Root 126 1,295 1,060 805 3,135

FSIN Sinus 490 3,960 3,770 1,960 ---

FCOS Cosinus 547 4,100 3,910 2,070 ---

FPTAN Tangens 342 5,845 5,400 2,995 13,530

FPATAN Arcustangens 448 8,895 7,965 3,750 13,875

FYL2X Logarithmus 492 8,690 7,610 3,410 12,885

F2XM1 Power Function 317 4,385 3,975 2,140 11,640

High Level Language Interface

Only the full version contains the High Level Language Interface (HLLI).

The HLLI utilizes the special code for coprocessor instructions, that are

used by several compilers from Microsoft and Borland.

Using this HLLI, FRANKE.387 can execute every instruction much faster.

Normally no application is interfered by the HLLI. If there are any

problems you should disable the HLLI. We suggest that you enable

FRANKE.387 with HLLI and a maximum precision of 53 bits. Using this

option, you have high performance and nearly no risc.

The following tables shows the use of HLLI. The tested program executes

every instruction 100,000 times using random numbers. It was written in

C and compiled with Microsoft C (Microsoft) and Turbo C (Borland).

The CPU was a 386DX, 25MHz. The execution time is shown in seconds.

Test program comiled with Microsoft C:

C- Microsoft FRANKE.387 FRANKE.387+HLLI

Function 387DX Emulation 64 Bit 53 Bit 64 Bit 53 Bit

x := y 0.27 0.27 0.27 0.27 0.27 0.27

x < y 0.71 8.63 9.56 9.51 8.35 8.35

x + y 0.66 8.63 9.07 9.07 8.30 8.24

x * y 0.71 10.49 9.67 9.62 8.85 8.79

x / y 0.93 12.47 9.73 9.73 8.90 8.90

sqrt(x) 2.75 27.58 29.56 28.74 26.32 25.44

sin(x) 7.14 129.67 92.86 90.11 84.62 82.42

cos(x) 7.14 131.32 94.51 91.21 86.26 82.97

tan(x) 6.04 103.30 76.92 75.82 70.88 69.23

atan(x) 4.95 107.69 52.20 52.20 47.25 46.70

exp(x) 7.14 130.77 94.00 92.31 83.52 81.87

log(x) 4.95 103.30 70.33 65.38 65.38 60.99

pow(x,y) 9.89 217.58 143.41 137.36 131.32 125.27

Test program compiled with Borland's Turbo C: 

C- Borland FRANKE.387 FRANKE.387+HLLI

Function 387DX Emulation 64 Bit 53 Bit 64 Bit 53 Bit

x := y 0.57 4.47 5.74 5.74 5.13 5.13

x < y 0.68 6.89 8.21 8.21 7.32 7.32

x + y 0.79 8.59 9.31 9.31 8.48 8.48

x * y 0.90 10.74 9.91 9.80 9.08 8.98

x / y 1.01 11.95 9.91 9.91 9.14 9.09

sqrt(x) 1.67 19.25 17.05 16.18 15.62 14.69

sin(x) 3.21 38.92 29.58 28.48 28.48 27.93

cos(x) 3.76 38.92 30.64 29.03 29.03 28.48

tan(x) 3.76 68.04 39.47 37.82 37.82 35.63

atan(x) 4.86 44.97 47.16 46.62 26.83 26.29

exp(x) 8.70 68.64 102.66 101.56 36.17 34.53

log(x) 4.86 60.90 61.45 57.05 51.01 46.62

pow(x,y) 15.05 149.67 190.88 184.84 107.31 101.32

Benchmark Tests

FRANKE.387 was tested with some popular benchmark programs. The table

shows the results that were reported using a 386DX with 25MHz:

no FRANKE.387 FRANKE.387 + HLLI

Benchmark 387DX Copr. 64 B. 53 B. 24 B. 64 B. 53 B. 24 B.

ATPERF MHz 52.5 ---- 6.8 6.8 7.5 6.8 6.8 7.5

87TEST MHz 26.91 ---- 1.881 1.937 2.8 1.881 1.937 2.8

BENCH 5.0 s 0.33 ---- 3.66 3.45 2.94 2.44 2.30 1.78

TEST41V s 0.50 2.06 1.55 1.50 1.22 1.44 1.39 1.17

The benchmark programs used:

ATPERF: ATPERF -- PC Tech Journal AT Hardware Performance Test

Version 2.00, Copyright (c) 1986, 1987 Ziff Communications Co.

87TEST: 87TEST Version 2.01

Copyright (C) MicroWay, Inc. 1985-1989

BENCH 5.0: PC Magazine Labs Benchmark Series 5.0

TEST41V: SpeedTest Version 4.1, Copyright 1990 by Duane A. Allred

387 Instruction Trace Mode

Der 387 Instruction Trace Mode is available in the full version only. It

allows completely new methods to debug. The 387 Instruction Trace Mode

shows every executed coprocessor instruction at the screen using the

image:

CS:IP Code Instruc. Operand Address Contents

e.g.:

2AE1:4FD3 D9EC LDLG2

2AE1:4FD6 DEC9 MULP ST(1),ST

2AE1:4FD9 DF5E ISTP Word 30ED:03C4 = 0000

2AE1:4FE6 DB6E LD TByte 30ED:03BA = 3FFF8000000000000000

Once 387 Instruction Trace Mode is enabled, instructions are only

displayed if scroll lock is on. You can toggle output on or off if

you toggle scroll lock on and off.

To single step through coprocessor instructions, hold down the left

shift key and step with the Ctrl key. If the left shift key is pressed,

the 387 Instruction Trace Mode waits for the Ctrl key pressed, before

it resumes the running program.

The 387 Instruction Trace Mode gives you additional features to debug

an application that uses a coprocessor. The 387 Instruction Trace Mode

is completely transparent to the application.

To use the 387 Instruction Trace Mode you need the program 387TRACE.EXE,

that you will get together with the full version. This program becomes

resident at the first call, using about 2800 bytes. 387TRACE toggles

between 387 Instruction Trace Mode enabled and disabled at each call.

Compatibiliy

FRANKE.387 is a high quality software product. It has efficient

algorithms that uses the full 32 bit power of 386 processors.

FRANKE.387 does exactly the same as a 387 coprocessor. The few minor

differences to the 387 coprocessor are described here:

1. Precision

The 387 coprocessor has always an internal precision of 67 bits. For

less precision only the results are rounded. Instead of that,

FRANKE.387 calculates with a maximum precision of 64 bits. At 64 bit

precision some rounding errors may occur. This rounding errors normally

have no effects. With the 24 and 53 bit precision FRANKE.387 gives always

better results.

2. Rounding

The only rounding by FRANKE.387 is done with the instruction FRNDINT or

before storing a number from coprocessor stack. The 387 coprocessor

rounds after each calculation. This different rounding makes FRANKE.387

faster. No side effects by this rounding method were detected.

3. F2XM1, FYL2XP1

The 387 coprocessor restricts the arguments for the F2XM1 and FYL2XP1

instruction only. FRANKE.387 does not have this restrictions. Every

instruction may be called with any mathematically allowed argument.

4. F2X

FRANKE.387 has the additional instruction F2X (code D9 EF). This

instruction does the same as F2XM1, FLD1, FADDP but without any loss of

precision.

5. FPTAN

FRANKE.387 calculates for tan(2) the result "infinity", which is the

precise result.

6. Exceptions

FRANKE.387 is a software emulation. It cannot cause any hardware

interrupt. If any exception occurs, FRANKE.387 will directly execute an

INT 2 instruction. This Interrupt cannot be masked. This is exactly like

the specification of the 387 coprozessor. INT 2 is called for compati-

bility.


Document Info


Accesari: 1687
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )