Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DS and ES matching (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 18.10.2025, 12:48

> Since we have the normal non-MT source code, I was just
> wondering how definite it is that DS and ES match. ie will
> they always be set the same, or are there some special
> conditions? Is there a deliberate attempt to make them
> the same (seems a bit odd actually, but that's ok).

https://hg.pushbx.org/ecm/msdos4/file/51ad27d225a8/src/DOS/EXEC.ASM#l796

They're always pointing to the PSP upon application entry. I believe this is documented, as well.

However, for an extension I would suggest adding a new entrypoint at an offset within the executable's image, perhaps with a new signature. This would allow to load old executables in a compatible way with ds = es => PSP and new executables with the new entrypoint.

---
l

 

Complete thread:

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