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 tkchia Homepage, 22.01.2026, 16:54

Hello ecm,

> If this is so, does the extender swap around the PSP field around exec
> calls? If DOS is given a zero in the exec block for the environment source,
> it'll retrieve the environment from the current PSP. But DOS expects a
> segment in that field.

In the case of Devore's CauseWay DOS extender, the extender does not simply pass the parameter block (at es:[bx] or es:[ebx]) verbatim to real/V86 mode DOS.

Instead, it interprets the block as containing protected mode selectors, and rewrites it into a different parameter block suitable for real mode. So the DOS extender has a chance to specially handle a zero selector value.

In fact, CauseWay will actually allocate a conventional memory area for a new copy of the environment (!), and copy out the environment variables from protected mode memory to it.

Thank you!

---
https://codeberg.org/tkchia · https://disroot.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"

 

Complete thread:

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