Hello People,
I present a program to detect the installed CPU/FPU.
The program is written in NASM.
It determines the following CPUs:
- 8086/8088
- 80186
- 80286
- 80386, and so on, up to the newest processor available.
FPU supported:
- 8087
- 80287
- 80387
The Source Code contains the following routines:
IsInWindows - Determines the Operating System under which the program is running:
- True DOS
- Windows (even supports the detection of Windows NT)
- or OS/2 v2.0 or higher
IsInV86 - Determines whether running in Virtual 8086 Mode
GetCPUType - Determines the CPU Type, returns the CPU Family ID, eq. 4 for 80486, and so on. Supports the Family ID Extraction via CPUID (if supported by the CPU)
HasFPU - Checks whether a FPU is installed or not (Returns 0 if not, 1 if exists)
HasCPUID - Checks whether the CPUID routine is supported by the CPU
GetFPUType - Returns the type of FPU installed
The source code is fully commented.
Example Output: 80486, 80387 or newer, CPUID present, in Real Mode, running under True DOS.
It was successful tested on a IBM PS/2 Model 30/286, an older 80486 (without the CPUID Insn) and a newer 80486 (which supports CPUID).
Would someone please test it on a system not listed here ?
Knowns someone a method to check for a 80487 ?
Files:
-----
Source Code
Executable (.com)
With best regards,
Martin
I present a program to detect the installed CPU/FPU.
The program is written in NASM.
It determines the following CPUs:
- 8086/8088
- 80186
- 80286
- 80386, and so on, up to the newest processor available.
FPU supported:
- 8087
- 80287
- 80387
The Source Code contains the following routines:
IsInWindows - Determines the Operating System under which the program is running:
- True DOS
- Windows (even supports the detection of Windows NT)
- or OS/2 v2.0 or higher
IsInV86 - Determines whether running in Virtual 8086 Mode
GetCPUType - Determines the CPU Type, returns the CPU Family ID, eq. 4 for 80486, and so on. Supports the Family ID Extraction via CPUID (if supported by the CPU)
HasFPU - Checks whether a FPU is installed or not (Returns 0 if not, 1 if exists)
HasCPUID - Checks whether the CPUID routine is supported by the CPU
GetFPUType - Returns the type of FPU installed
The source code is fully commented.
Example Output: 80486, 80387 or newer, CPUID present, in Real Mode, running under True DOS.
It was successful tested on a IBM PS/2 Model 30/286, an older 80486 (without the CPUID Insn) and a newer 80486 (which supports CPUID).
Would someone please test it on a system not listed here ?
Knowns someone a method to check for a 80487 ?
Files:
-----
Source Code
Executable (.com)
With best regards,
Martin