Masaw wrote on 2024-01-31, 09:48:
cross wrote on 2024-01-31, 09:31:
Masaw, if you still are following along. Can you confirm if your program checks if the CPU is a 286 or not? It loks like form J022´s update earlier that these CPUs does not report like that.
no it doesn't check for 286 specific cpu, but it should work fine on a V30 if the 286 instructions used by the C compiler are present .
And even if they'd check, I think it depends also upon how certain routines do check for an 80286.
There was no CPUID yet at the time (late 486 CPUs and up), so programs had to test certain things. Trial&error style, so to say.
An 80186 or V20/V30 might pass these tests and the program assumes its an 80286.
Simply because the 80186 was sort of an oddball.
Dedicated 80186 support in C compilers exists (Mix Power C has it; besides 80286 support), but it wasn't really meant for PC programs, I think.
The 80186 did exist in some PCs, but it was designed more like an microcontroller / early SoC (not fully IBM 5150/5160 compatible).
In the early days (early 80s), some PCs used the 80186 in its function as a CPU only and had used dedicated hardware to form a PC motherboard chipset for better PC compatibility.
Ok, technically, there's an "easy" way to detected an 80286 - try to enter protected mode and then reset.
Or check for Himem.sys and A20 gate. But I suppose that wouldn't be a safe way to do it in a professional field.
Such things could potentially hang PCs or crash the application, especially if they're running on OS/2 or another DOS compatible OS.
Edit: What I meant to say is that programs may not distinguish between 80186 and 80286 so much.
If 80186 instructions are being supported, many programs should be happy thinking it's an 80286.
Because, as far as real-mode instructions go the 80186, V20/V30 and 80286 are quite similar.
The Windows 3.0 VGA driver, for example, normally does require an 80286.
But it will also unofficially work with an an V20/V30.
(To be fair, that specific driver had been patched recently for 8088/8086 by a member of vcfed.org forums.)
"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel
//My video channel//