🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #8186

Re: You can get argv[0] in DOS 3.x

#8186
From: John R. Levine
Date: Tue, 07 Oct 1986 15:01
13 lines
1287 bytes
In article <468@zen.BERKELEY.EDU> 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].
>...

You can indeed get the name under which the program was invoked, but you could
have saved yourself a lot of effort by reading the DOS 3.x technical reference,
in the section on the EXEC call, in which the feature is documented.
-- 
John R. Levine, Javelin Software Corp., Cambridge MA +1 617 494 1400
{ ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.EDU
The opinions expressed herein are solely those of a 12-year-old hacker
who has broken into my account and not those of any person or organization.
Technical Details
Message-ID: <239@ima.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!caip!pyrnj!mirror!ima!johnl
References: <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!rutgers!caip!pyrnj!mirror!ima!johnl
From: johnl@ima.UUCP (John R. Levine)
Newsgroups: net.micro.pc
Subject: Re: You can get argv[0] in DOS 3.x
Message-ID: <239@ima.UUCP>
Date: Tue, 7-Oct-86 11:01:29 EDT
Article-I.D.: ima.239
Posted: Tue Oct  7 11:01:29 1986
Date-Received: Wed, 8-Oct-86 06:32:30 EDT
References: <468@zen.BERKELEY.EDU>
Reply-To: johnl@ima.UUCP (John R. Levine)
Organization: Javelin Software Corporation
Lines: 13
Summary: RTFM