berman@isi-vaxa.ARPA (Richard Berman) (08/28/85)
Thanks for your response, but I think you missed the point. I want the program and its data files to be renamable. Then the .COM file will find the data files by looking for the extensions (which remain constant) with the same name as the .COM file. And at 080H there is definitely no file name, just the command tail. If you know where the command name/FCB/File-name-as-typed-in is stored, or how to find it, please drop me a note. thanks, RB
berman@isi-vaxa.ARPA (Richard Berman) (08/29/85)
Thanks for your reply. The only possibility I've gotten so far is (in a vanilla CCP) to get contents of 0006H and subtrace 7FEH from it. This is supposed to be some kind of command line or FCB thing in CCP. Do you know anything about this? Thanks, RB
RCONN@SIMTEL20.ARPA (Rick Conn) (08/29/85)
The address your are referring to (the address of the BDOS-7FEH, where the BDOS entry point is obtained from locations 6 and 7) is an internal command line buffer used by the CP/M 2.2 CCP. Some commercial programs and some older CP/M 2.2 PD programs used to stuff command lines they wanted to execute here and then enter the CCP in the proper fashion to have it execute them. This buffer does contain a command line verb, but there is also an internal pointer that was set before the command line was interpreted to tell the CCP where to begin processing. The command line does not have to begin at the first byte of this buffer. I think you are coming close, tho. Rick -------
RCONN@SIMTEL20.ARPA (Rick Conn) (08/29/85)
I am not aware of a way to resolve the problem of identifying the command line verb for a program under standard CP/M. This is one of the first features I put into ZCPR3 ... ZCPR3 supports an External FCB which is at a memory location you can find via the Environment Descriptor, and it contains the name of the last command executed. A program can look at this and determine its name. Rick -------
pete@stc.UUCP (Peter Kendell) (08/30/85)
Summary: Expires: Sender: Followup-To: Distribution: Keywords: Xpath: stc stc-b stc-a In article <1065@brl-tgr.ARPA> berman@isi-vaxa.ARPA (Richard Berman) writes: > >If you know where the command name/FCB/File-name-as-typed-in is stored, or how >to find it, please drop me a note. > I guess all the C compiler writers who can't provide argv[0] for applications on CP/M-80 would like to know too! -- Peter Kendell <pete@stc.UUCP> ...mcvax!ukc!stc!pete 'Not everything that is not forbidden is permitted'
cem@intelca.UUCP (Chuck McManis) (09/04/85)
> Thanks for your response, but I think you missed the point. I want > the > program and its data files to be renamable. Then the .COM file will find the > data files by looking for the extensions (which remain constant) with the > same > name as the .COM file. And at 080H there is definitely no file name, > just the > command tail. > > If you know where the command name/FCB/File-name-as-typed-in is stored > , or how > to find it, please drop me a note. > One of the nice things about ZCPR3 is that it leaves the command name in the EXTFCB address. I suspect the information in a vanilla system is stored somewhere in the CCP. (Try looking at the first page) most of the buffers are up there. --Chuck -- - - - D I S C L A I M E R - - - {ihnp4,fortune}!dual\ All opinions expressed herein are my {qantel,idi}-> !intelca!cem own and not those of my employer, my {ucbvax,hao}!hplabs/ friends, or my avocado plant. :-}