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 EFLAGS
pop eax ; store EFLAGS in EAX
mov ebx, eax ; save in EBX for later testing
xor eax, 00200000h ; toggle bit 21
push eax ; put to stack
popfd ; save changed EAX to EFLAGS
pushfd ; push EFLAGS to TOS
pop eax ; store EFLAGS in EAX
cmp eax, ebx ; see if bit 21 has changed
jz NO_CPUID ; if no change, no CPUID