Mail Archives: djgpp-workers/1999/08/05/08:26:04
Morten Welinder wrote:
> Just, FYI, this algorithm (setting AC flag, then ...) will not work in
> all environments. In particular, you have no guarantee that the AC
> flag will be turned on if the underlying DPMI does not feel like it.
> The manual page ought to say this. I don't think a bulletproof
> algorithm exists outside ring 0/real mode.
No. This algorithm does not depend on particular state of flag - it
is based on fact that 386 is unable change AC flag at hardware level.
It does not set nor clear the flag, it tries to toggle it instead.
And software environment cannot do anything about CPU's inability to
change the state of flag.
> Also, your switch statement is incomplete -- add a default case and
> call it "ix86" or something like that.
It currently handles all cases - first CPU's with CPUID instruction
are 486 and Pentiums. And currently there is no CPU which reports
bigger value in "instruction family" field than 0x6 (for i686).
Laurynas Biveinis
- Raw text -