Mail Archives: djgpp-workers/2001/05/24/03:51:28
On Wed, 23 May 2001, Charles Sandmann wrote:
> > (I originally considered to use the PSP selector, since the transfer
> > buffer follows the PSP, but that selector seems to have a 100h-byte
> > limit, or at least could be like that according to the DPMI spec.)
>
> You could use the 128 bytes of the command line area, overwriting it
> with the message string, since you are getting ready to exit. This
> should be guaranteed to be enough for a message, and fit in the limit.
>
> > Question: is it safe to overwrite the program's environment by using
> > the environment block as the transfer buffer? Note that I don't want
> > to modify the selector itself -- this is verboten by the DPMI rules --
> > only to write over the environment strings accessing them via the
> > selector stuffed by the DPMI host at offset 2Ch in the PSP.
>
> This would probably work also, since I don't think the environment will
> be needed anymore. But what if the environment is very short? Probably
> unlikely (especially if you are in an environment which runs out of
> selectors), but the possibility of dos memory block corruption.
Thanks for all the ideas, everybody. I think I have enough to solve this
in some reasonable way.
- Raw text -