Mail Archives: djgpp/2001/08/06/15:12:58
> From: Sterten AT aol DOT com
> Date: Mon, 6 Aug 2001 12:37:54 EDT
> >
> > char doscmd[128];
> > movedata(_stubinfo->psp_selector, 128, _my_ds(), (int)doscmd, 128);
>
> yes, thanks. It works.You're always there with an answer :-)
> Although it will probably not compile with other compilers :-(
This is system-dependent stuff; making it compile with other compilers
is not easy, perhaps impossible. You should be able to call function
62h of Int 21h to get the address of the PSP. The command tail is
there at offset 80h (i.e. 128 decimal), but the way to copy it is not
portable: the PSP is in conventional memory, so you cannot access it
from a DJGPP program without going through dosmemget or movedata.
The code I posted is much faster because it doesn't call a real-mode
interrupt. It just moves the command tail from the PSP using a
selector created by the DPMI host when the DJGPP program enters
protected mode.
- Raw text -