Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!marque!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: Re: argc and argv with gem Keywords: MWC, argc, argv, GEM, commands. Message-ID: <818@philmds.UUCP> Date: 24 Sep 88 07:31:58 GMT References: <358@island.uu.net> <626@mace.cc.purdue.edu> <3441@boulder.Colorado.EDU> <806@philmds.UUCP> <1173@atari.UUCP> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 44 In article <1173@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes: >In article <806@philmds.UUCP> leo@philmds.UUCP (Leo de Wit) writes: [ ]... >> 1) There is no means that I know of to supply parameters to a Gem >> program if it is started from the Desktop. > >This is what "Install application" does. This is how to use it to >install (for example) GFABASIC.PRG to run *.GFA: > > Select (click on) GFABASIC.PRG. > > Choose the menu item "Install Application" from the Options menu. > > Fill in the three blanks in the "Document Type" field with GFA. > >Now, whenever you double-click a file *.GFA, GFABASIC.PRG will be run >and its command-line argument will be the name of the file you clicked. [ ]... Of course, I forgot this one (see however STaccato, where I use it myself). However, this is only a very limited parameter passing mechanism: - it only allows for passing one string argument - this argument has to be a filename. - if you want to do different things to a file (e.g. edit/print) this allows for only one "Install Application". Summary: It is nice where you can use it, but rather restricted. B.T.W. Talking about command-line arguments, is there any chance we can have real large ones in the future? The current limit is rather low. Looking at Pexec this shouldn't be hard to implement, since a) for the environment this tactic is already followed, i.e. a separately space is allocated and a pointer to it put in the basepage. b) When starting a program, a basepage vector is already made to point to the command-line argument (basepage + 0x80). This vector now seems to be used as the DTA pointer. The new startup code can make a copy of this pointer. c) To keep existing programs happy, the new Pexec should still copy the first 128 bytes or so of the argument string to the old command line space (basepage + 0x80). Is there any chance this could get into a next ROM release, Allan? TOS 1.5 ? Leo.