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 kerravon E-mail, Ligao, Free World North, 18.10.2025, 11:29

I would like my MSDOS executables to be able to accept an
override of callback functions to use instead of executing
an INT 21H.

So I need a way of detecting that I am in a non-MSDOS
environment that provides a callback facility on the stack
(or possibly in a pair of registers - I'm open to opinions).

One way I could do that is by making ES different from DS,
instead of having both of them pointing to the PSP.

I could make ES equal to FFFF, which is an indicator that
this is a PDOS-generic environment, so look on the stack etc.

I believe MSDOS 4 multitasking already changes either DS
or ES or both on entry, perhaps to support DLLs or something.
So that's why I would have the further ES setting, to distinguish
from that.

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).

Thanks. Paul.

 

Complete thread:

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