Article View: net.micro.pc
Article #8175Re: You can get argv[0] in DOS 3.x
From: Scott Hazen Mueller
Date: Mon, 06 Oct 1986 18:22
Date: Mon, 06 Oct 1986 18:22
26 lines
1669 bytes
1669 bytes
In article <> morearty@cory.Berkeley.EDU (Mike Morearty) writes:
<I just discovered an undocumented feature of the more recent
<versions of DOS: it is at last possible to obtain argv[0].
<...environment...complete path and filename of the program
<
< NAME=value#0 ;one or more null-terminated strings
< #0 ;the terminating null byte
< #1 ;followed by a byte with value one
I'm not absolutely certain, but I believe that this can have values other than
one. I think that it is actually argc.
< #0 ;followed by another null byte
< C:\PAS\ENV.COM#0 ;argv[0], null-terminated
The entire command line _might_ be copied here. Again, I don't remember
exactly.
< -- Mike Morearty
\scott
--
Scott Hazen Mueller lll-crg.arpa!csustan!smdev
City of Turlock work: (209) 668-5590 -or- 5628
901 South Walnut Avenue home: (209) 527-1203
Turlock, CA 95380 <Insert pithy saying here...>
Technical Details
Message-ID:
<221@csustan.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!csustan!smdevReferences:
<468@zen.BERKELEY.EDU>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!csustan!smdev From: smdev@csustan.UUCP (Scott Hazen Mueller) Newsgroups: net.micro.pc Subject: Re: You can get argv[0] in DOS 3.x Message-ID: <221@csustan.UUCP> Date: Mon, 6-Oct-86 14:22:18 EDT Article-I.D.: csustan.221 Posted: Mon Oct 6 14:22:18 1986 Date-Received: Wed, 8-Oct-86 00:01:12 EDT References: <468@zen.BERKELEY.EDU> Reply-To: smdev@csustan.UUCP (Scott Hazen Mueller) Organization: City of Turlock Lines: 26