Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

review (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 24.05.2011, 15:20
(edited by cm on 24.05.2011, 15:50)

> I admit, concede and agree that relocating the entire process to the top of
> 'conventional' memory as a first step will be the simplest, safest, if a
> little... boring? ;-) way to get the job done.

Touché.

Though I guess optimal placement is still an improvement over boring traditional TSRs (21.31, shudder) which don't relocate anything and fragment and waste memory.


> But if we walked the MCB chain and fixed them MCBs by hand without
> calling DOS, under CLI it would be completely correct, right ?

Assuming you kept track of what data to leave unmodified. But in that case you would have to replace all of DOS's 21.48 code (including UMB handling) and would have to free the MCB yourself instead of using 21.49 as well.

As usual with critical sections requiring IF zero, it would also fail to ensure your data's integrity if running the program in a debugger.

> Alternatively, what about temporary cheating the INDOS flag "up" (instead
> of CLI) ?

I don't think that would really be of any use. It might prevent interference by some TSRs which check for InDOS before issuing 21.48/.49/.4A but it's not a good solution. (In fact, I think protecting critical sections by the InDOS flag is generally not a good idea and should only be done if really necessary.)

All in all, design it so that there are no critical sections during which it leaves data in free memory. Then you won't have to think up kludges to protect such critical sections either.

---
l

 

Complete thread:

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