Date: Mon, 06 Aug 2001 21:19:22 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Sterten AT aol DOT com Message-Id: <7458-Mon06Aug2001211921+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp AT delorie DOT com In-reply-to: <95.e77c4c9.28a021e2@aol.com> (Sterten@aol.com) Subject: Re: command tail References: <95 DOT e77c4c9 DOT 28a021e2 AT aol DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > 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.