Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

comment on flushing predecode queue (pre-Pentium) (DOSX)

posted by Ninho E-mail, 25.04.2008, 08:11

Hi ! By all means do try it on your 386 if you can, but be aware no amount of testing will validate this buggy code.
Unless you collected all revisions of all versions of x86 by all manufacturers,
(and yes, I successfully tried the offending code on my i486DX2-66 revision 5.)


1- programmer realises there is a problem (presumably he's been bitten...)
2- progammer makes up a story about needing an (unspecified) "delay" (between mode switch & segment reload).
3- programmer shuffles instructions, program seems to work. But the fix is wrong! Inserting only one mode-independent instruction between the move to CR0 and the move to DS (or whatever segment) isn't enough to ensure it will work on *all* IA32 processors and clone. The right and only fix is to make a jump, as I - and others, it seems - have explained.

It's amusing Japheth told me he desn't care about "theories", yet the programmer made up a bogus theory about 386/486 needing a delay as said in point 2 above; the truth is, not a delay is needed, but any predecoded instruction which depends on processor mode must be purged. An example, not involving segment load, would be executing an instruction invalid in real mode, such as LTR, just after setting Protect enable.

I hope this modest but crucial piece is corrected before it make its way to FreeDOS or other open-source projects. The fix is simple and proven.

Nuff said... I'm using Linux anyway ;=)

---
Ninho

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 441 users online (0 registered, 441 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum