First post, by RayeR
- Rank
- Oldbie
Hi,
I was noticed that DOSBox supports CPUID instruction and returns CPUID as 486 processor. But when I try to run my CPUID info program it tells me no CPUID is supported. I use a test if CPUID is supported when checking if bit 21 of eflags is writable (i found this method in various code on internet, see below). Would be possible to patch DOSBox code to respect this behavior and make bit 21 of eflags writtable?
pushfd ; save EFLAGSpop eax ; store EFLAGS in EAXmov ebx, eax ; save in EBX for later testingxor eax, 00200000h ; toggle bit 21push eax ; put to stackpopfd ; save changed EAX to EFLAGSpushfd ; push EFLAGS to TOSpop eax ; store EFLAGS in EAXcmp eax, ebx ; see if bit 21 has changedjz NO_CPUID ; if no change, no CPUID