Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

32-bit MSDOS (Announce)

posted by mceric, Germany, 01.07.2021, 01:52

If you plan to offer an alternative to Windows, you cannot say "but apps are not allowed to use segments" and you cannot say "but networking has to be done with another OS", obviously.

I do not understand why you believe that setting segment registers at all would be too privileged. In protected mode, those registers contain selectors and the selectors refer to descriptor tables which define where in your physical or virtual RAM the actual data is.

Editing those tables is something which usually is privileged, which is why it is managed through API provided by the OS or similar, for example DPMI, unless you want to give your apps full control over everything, which is uncommon in protected mode OS.

Yes, you can trigger a GPF by trying to set CS, SS, ES, DS, FS or GS to a value which is beyond your privileges or which simply does not exist in the tables. But you are totally free to use multiple segments in apps as long as you have permissions for all used segment selector values.

You can also trigger GPF by setting the offset of any RAM access outside the allowed range of the applicable segment, but you cannot interpret that as "using pointers is a privileged operation and must be avoided to keep apps simple".

So segments are a lot less evil than you think. And as others have said here before, if your OS does not support any apps without having to recompile them, then the market for this OS will be very small.

Given that you like the idea of "just offering a protected mode int 21", I think that accepting the style deviation of supporting DOS32A (and DOS4GW) style protected mode int 21 and accepting that some apps need DPMI would be an acceptable cost (the price would be that you might encounter segments) compared to suddenly having significantly more apps running on your OS without recompiling.

---
FreeDOS / DOSEMU2 / ...

 

Complete thread:

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