PSP environment word as a selector - How is exec handled? (DOSX)
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:
- PSP environment word as a selector - How is exec handled? - ecm, 22.01.2026, 12:24 (DOSX)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- PSP environment word as a selector - How is exec handled? - tkchia, 22.01.2026, 16:54
- PSP environment word as a selector - How is exec handled? - tkchia, 22.01.2026, 17:24
- PSP environment word as a selector - How is exec handled? - Japheth, 25.01.2026, 18:02
- PSP environment word as a selector - How is exec handled? - ecm, 25.01.2026, 19:15
- PSP environment word as a selector - How is exec handled? - ecm, 25.01.2026, 19:21
- PSP environment word as a selector - How is exec handled? - ecm, 25.01.2026, 19:15
Mix view