home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.pascal:5356 alt.msdos.programmer:2356
- Newsgroups: comp.lang.pascal,alt.msdos.programmer
- Path: sparky!uunet!gatech!taco!dspascha
- From: dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL)
- Subject: Re: 3 questions
- Message-ID: <1992Sep13.020938.898@ncsu.edu>
- Originator: dspascha@c00082-100lez.eos.ncsu.edu
- Lines: 28
- Sender: news@ncsu.edu (USENET News System)
- Reply-To: dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL)
- Organization: North Carolina State University, Project Eos
- References: <18ot9rINN67t@matt.ksu.ksu.edu> <1992Sep11.132246.12645@rhrk.uni-kl.de>
- Date: Sun, 13 Sep 1992 02:09:38 GMT
-
-
- In article <1992Sep11.132246.12645@rhrk.uni-kl.de>, bootz@efes.physik.uni-kl.de (Michael Bootz) writes:
- |> In article <18ot9rINN67t@matt.ksu.ksu.edu>, holland@matt.ksu.ksu.edu (Rich Holland) writes:
- |> > Question 1:
- |> > -----------
- |> > How do I determine if the user is at the command line? I've been thinking
- |> > about writing a TSR to intercept keypresses at the DOS command line and
- |> > expand TABs to full filenames (like tcsh does).
- |> >
- |> [Question 2..3 deleted]
- |> If the actual PSP = PSP of command.com ==> user is at command line.
- |> (PSP= program segment prefix)
- |> see Ralf's Interrupt list,
- |> Int $21, fct $51 to get PSP
- |> Int $21, fct $52 for format of MCB (memory control block)
- |> the MCB contains the name of a program, here command.com
- |> the MCB of an PSP is located 16 bytes before the PSP
-
- DOS versions prior to 4.0 do not put the name of the owner process in the MCB.
-
- One thing you could check is whether or not the parent PSP field in the current
- PSP is zero. For some reason COMMAND.COM (even child copies) like to zero out
- this field, making it nearly impossible to trace back to the original shell.
- Of course, other shells (like 4DOS) may not do this, so this may not be such
- a great solution.
-
- Tschuess,
- David Paschal
-