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 kerravon E-mail, Ligao, Free World North, 30.06.2021, 22:57

> > > Afaik Windows and Linux use %fs for TLS.
> >
> > I know every byte that goes into the Win32
> > executables that I produce (that run under
> > normal Windows, HX and PDOS/386).
>
> > There is no
> > requirement for %fs to be set. I don't even
> > know what TLS is.
>
> I'm sure you know your subset, but since TLS also plays a role in SEH, in
> practice it is quite important for non trivial windows binaries, e.g. ones
> that interface COM, or use native Windows C++ and thus system libraries for
> exceptions (rather than SJLJ emulation)

I don't know any of those terms, but GCCWIN is
a 3 MB executable and hardly "trivial". It's
400,000 lines of C code.

> Of course since TLS is related to threading it might be less relevant on a
> single threaded OS like dos. But the subset of Windows binaries (even
> commandline) that will run decreases because of it.

My focus is on getting C90-compliant programs
to work. The onus is on applications to be
written in such a way that in an environment
that doesn't support threading, the code base
produces a sensible executable.

> Which is sad, since from what I have read, Win32 seems to be the only way
> of running existing binaries on your OS.

It is the way that is officially supported.

It also runs (after defining!) 32-bit MSDOS
executables that look quite similar to
DOS32A, but don't make demands on segment
registers (but do make the same/similar
demand on INT 21H).

> Apropos, nearly all dos extenders use DPMI services for their memory
> operations (e.g. allocate blocks >1MB), access to segments and hooking
> interrupts. Emulating those should make it easier to retarget existing
> compilers.

It seems harmless enough to redirect an INT 31H
that requests >1MB memory to the appropriate
INT 21H function (which was necessarily an
extension in PDOS/386).

But access to what segments? I only have one
usable selector and the segment registers are
already set correctly. If any DPMI application
intends to inspect or modify those, it isn't
going to work. ie DOS32A won't work when it
starts looking at ES expecting a parameter
there.

There is an existing MSDOS call to hook interrupts
though. That is OK. I can redirect INT 31H to the
standard INT 21H call to hook interrupts.

So with 2 out of the 3 above things being doable,
does that enable anything existing to run?

Thanks. Paul.

 

Complete thread:

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