🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #8504

Re: Argv[0] in TURBO PASCAL

#8504
From: Gene Lee
Date: Fri, 24 Oct 1986 12:39
19 lines
1506 bytes
>
>The problem with arg(0) is an MSDOS problem. None of the language processors
>for MSDOS can supply you with tthe name your program was invokked with. This 
>is a limimitation in the way the PSP is constructed. This information, of
>course, is based on MSDOS 2.1.

   DON'T say none, Lattice C on the PC gives argv[0] as the program name
 and complete path it was executed under.  This is what inspired me to
ask the question about a TP inplemention in the first place.

  Since then I have found that the the program's name can be found at
$0:143d on my PC running DOS 3.?  but on other machines its at a slightly
different address.  I assume this data is part of a table but I don't know
were or how to find the starting address of this table.  If anyone has a
handle on what I'm talking about, I would greatly appreciate your help.

-- 
Gene Lee           UUCP: ...ihnp4!{meccts,dayton,rosevax}!ems!A60!lee
Sperry Corporation     ATT:  (612) 635-6334
Technical Details
Message-ID: <631@A60.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!dayton!ems!A60!lee
References: <623@A60.UUCP> <2444@gitpyr.gatech.EDU> <1637@ihuxy.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!dayton!ems!A60!lee
From: lee@A60.UUCP (Gene Lee)
Newsgroups: net.micro.pc
Subject: Re: Argv[0] in TURBO PASCAL
Message-ID: <631@A60.UUCP>
Date: Fri, 24-Oct-86 08:39:41 EDT
Article-I.D.: A60.631
Posted: Fri Oct 24 08:39:41 1986
Date-Received: Sat, 25-Oct-86 07:07:34 EDT
References: <623@A60.UUCP> <2444@gitpyr.gatech.EDU> <1637@ihuxy.UUCP>
Reply-To: lee@A60.UUCP (Gene Lee)
Organization: Sperry Corp. - Roseville, MN
Lines: 19