Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

PSP environment word as a selector - How is exec handled? (DOSX)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 25.01.2026, 19:21

> > > I've heard that for some DOS extenders, the word
> [PSP:2Ch]
> > may
> > > be replaced by a selector that points to the environment, rather than
> a
> > > segment address.
> >
> > It's not just what "some DOS extenders" do, but specified in DPMI:
> > https://www.delorie.com/djgpp/doc/dpmi/ch4.1.html
>
> Ah yes, indeed. However:
>
> > If the client wishes to free the memory occupied by the environment, it
> should do so before entering protected mode and zero the word at PSP:2CH
> (segment address of the environment>.
>
> I believe this (PSP environment field = 0) leads to a crash on MSW 98SE
> when running in a DOS window of the GUI, upon trying to enter Protected
> Mode.

https://github.com/jeffpar/pcjs/issues/75#issuecomment-2132212965

> My DPMI test program was in error, it frees and zeroes
> the environment segment at word [PSP:2Ch] but MSWindows
> expects this field to be nonzero upon entering
> DPMI Protected Mode. With this part commented out
> the DPMI mini program runs fine on its own.

---
l

 

Complete thread:

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