home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.pascal:5374 alt.msdos.programmer:2364
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ames!sun-barr!west.West.Sun.COM!cronkite.Central.Sun.COM!texsun!exucom.exu.ericsson.se!news
- From: exuptr@exu.ericsson.se (exuptr@exu.ericsson.se)
- Newsgroups: comp.lang.pascal,alt.msdos.programmer
- Subject: Re: 3 questions
- Message-ID: <exuptr.544.716424717@exu.ericsson.se>
- Date: 13 Sep 92 22:51:57 GMT
- References: <18ot9rINN67t@matt.ksu.ksu.edu> <1992Sep11.132246.12645@rhrk.uni-kl.de> <1992Sep13.020938.898@ncsu.edu>
- Sender: news@exu.ericsson.se
- Organization: Ericsson Network Systems, Inc.
- Lines: 43
- Nntp-Posting-Host: pc254167.exu.ericsson.se
-
- In article <1992Sep13.020938.898@ncsu.edu> dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL) writes:
- >From: dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL)
- >Subject: Re: 3 questions
- >Date: 13 Sep 92 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
-
- Also there is an interrupt vector that contains command.com's PSP. I believe
- it is 2eh?
- ----------------------------------------------------------------------------
- "This must be Thursday. I never could get the hang of Thursdays"
- - Douglas Adams
- - Patrick Taylor (Arthur Dent)
- Ericsson Network Systems
- exuptr@exu.ericsson.se "Don't let the .se fool you"
- or exuptr@ZGNews.Lonestar.Org, exu.exuptr@memo.ericsson.se
-