Languages Assembler x86 Programming Sourcecode CPU  

CPU/FPU Feature Detection Library

download download  
important code information
author:
Unknown
minimum requirements:
CPU/FPU Feature Detection Library description

Recognizes 20+ CPUs and about 15 FPUs, checks for V86, determines CPU clock speed and determines 386dx chip stepping. ASM/PAS/C[++] sources included! Windows, OS/2 & DESQview-aware: works fine in DOS box, even returning correct MHz under Windows and DESQview! DPMI-compatible. Make batches provided. Absolutely free of charge!!!


Document no.: T-0018.94.95M01.04
*** A T T E N T I O N ***
Please read this document before you proceed with the rest of the library.

Throughout this document
"this code" and "the code" ð "TMi0SDGL(tm) Version 1.15 dated 27/02/95".
How to contact author if you found a bug or have any questions/suggestions
about TMi0SDGL.

I can be reached at
2:5028/52.6@fidonet aka 2:5028/51.10@fidonet (Vladimir Zakharychev)
or
xor@cnit.uniyar.ac.ru (internet, ask to forward message to me).

For phone and paper mail address see the CPUTYPE.DOC file.

New features that haven't been tested yet.

TMi0SDGL 1.15 has one new feature that haven't been tested on all systems yet:
AMD Am386 detection. It uses the fact that on Intel's 386s LOCK prefix
doesn't function as documented with some instructions (partially, NOP).
As the documentation says, LOCK NOP sequence should generate an "invalid
opcode" exception while it actually doesn't. AMD's CPUs function properly in
this case. This "bug" was reported by several people found it on several
Intel's 386s. BUT I cannot guarantee that ALL Intel's 386s function this
way. This must be proved by more extensive testing. Because I can't perform
it by myself, I leave it up to you.

DPMI compatibility issues.
This code is fully DPMI compatible. Although only Borland Pascal 7 users
can use this code in protected mode programs without any handwork. Because
of many differences in different C/C++ compilers' protected mode memory
model definitions I do not provide MAKE script for making protected mode
applications using TMi0SDGL with C/C++. You should build protected mode
library manually:

1. compile CPU_HL.ASM and CPUSPEED.ASM with __DPMI__ define and add .OBJes to library you will use with protected mode application (CPUTYPEX.LIB, for example);
2. compile SMM.ASM and P5INFO.ASM and add them to the same library;
3. compile CPUTYPE.C with corresponding memory model (DOSX, etc.) and add
.OBJ to the library.

Now you should be able to build protected mode applications using TMi0SDGL
with your C/C++ compiler.

For those having problems with the code in certain environments.

This code haven't been extensively tested on all CPUs it theoretically should
recognize. I performed extensive tests only on systems available to me which
include:

1. AMD Am386DX-40/Intel 80387DX
running MS-DOS 5.0, QEMM 7.04 + DESQview 2.63, Windows 3.11
2. Intel i486DX2-66
running MS-DOS 6.2, QEMM 7.04, Personal NW, Stacker 4.0,
Windows 3.10 Russian
3. GenuineIntel i486SX-40/None - new generation (supporting CPUID)
running MS-DOS 6.2, QEMM 7.01, Windows 3.10
4. Intel 80286-10/Sun SPARCStation 1+ emulating 80286
5. Intel 80386SX-25/Intel 80387SX
running MS-DOS 6.2/MemMaker, Windows 3.10 Russian
6. AMD Am386DX-40/Cyrix Cx87SLC
running Novell DOS 7, Personal NW, Windows 3.10
7. Intel i486DX-50
running MS-DOS 6.2, Windows for Workgroups 3.11
8. Intel Pentium-S/60
running MS-DOS 6.2, Windows for Workgroups 3.11
9. Cyrix Cx486DX-40
running MS-DOS 5.0, QEMM 7.5, Windows 3.11
or OS/2 V3
10. GenuineIntel i486DX-33 - new generation (supporting CPUID)
running MS-DOS 6.0/MemMaker, Windows 3.10

On all listed systems the code appeared to work fine giving correct results
under all listed environments except [1,6] when running Soft-ICE 2.62 -
incorrectly stated that CPU is 386SX - and [9] - FPU was identified as Cx3C87
while it is actually internal. I cannot guarantee that the code will run o.k.
on systems with other configurations/operating environments, though I hope it
will. Please don't bomb me with letters like "wow! this thingie crashes my PC
with such and such CPU/FPU under such and such env." - you got full sources,
and you should know how to use a debugger if you know how to program, so try
to find out the origin of your problem on YOUR system (and maybe a workaround)
before reporting it.

Thanx for yer attention. Now you can proceed with the rest of the library. See
HISTORY.DOC for modification history and CPUTYPE.DOC for license agreement and
contact info.



File List:
CPU.ASM1Kb
CPU.C1Kb
CPU.PAS1Kb
CPUSPEED.ASM6Kb
CPUTYPE.C4Kb
CPUTYPE.DOC15Kb
CPUTYPE.H2Kb
CPUTYPE.PAS7Kb
CPU_HL.ASM8Kb
CPU_TYPE.ASH20Kb
DOSINOUT.ASH1Kb
FILE_ID.DIZ1Kb
HEADER.ASH1Kb
HISTORY.DOC7Kb
LSTRING.ASH1Kb
MAKEA.BAT332b
MAKEC.BAT2Kb
MAKEFILE3Kb
MAKEP.BAT1Kb
MLIB.BAT1Kb
MODEL486.ASM3Kb
P5INFO.ASM2Kb
P5INFO.C3Kb
P5INFO.PAS3Kb
README.1ST4Kb
SMM.ASM2Kb
TEST486.PAS1Kb
UNIDEF.INC11Kb

User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Rate me
supported os
stats
downloads 134
version
size in Kb 46
popularity   1921/7913374
user rating 9/10
ad


New Code
Popular Code