Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1.chuqui 4/7/84; site voder.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!nsc!voder!gino
From: gino@voder.UUCP (Gino Bloch)
Newsgroups: net.micro.pc
Subject: Re: command line tails in Turbo Pascal
Message-ID: <377@voder.UUCP>
Date: Fri, 21-Sep-84 17:09:38 EDT
Article-I.D.: voder.377
Posted: Fri Sep 21 17:09:38 1984
Date-Received: Wed, 26-Sep-84 02:49:18 EDT
Organization: National Semiconductor, Santa Clara
Lines: 37

References: <3242@ecsvax.UUCP>, <373@voder.UUCP>, <374@voder.UUCP>

[food for thought]

My office mate, George Smith, has given me this copy of an
article in TUG Lines.  I have run it and it works either in
memory or standalone (it even has a blank Writeln - see #373
referenced above).

BTW, `TUG Lines' is the newsletter of the Turbo Users Group.
If you're interested, mail me & I'll extort their address out of
George.

-------------------- cut here ------------------------------
program params;

(*
** Submitted to TUG Lines by Paul Klarreich, Brooklyn, NY
**
** This program illustrates a method of finding the parameters
** to an MS-DOS command file.  In any MS-DOS program, the parameters
** are found at offset $80 in the program segment prefix -- the first
** $100 bytes of the program segment.  The byte at $80 gives the
** length of the string and the next "length" bytes are the actual
** characters.
*)

var
    CmdTail: string[80] absolute cseg:$0080;

begin
    writeln;
    writeln('The command tail for this program is:');
    writeln('-->', CmdTail, '<--');
end.
-- 
Gene E. Bloch (...!nsc!voder!gino)