Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!ukma!gatech!udel!mmdf From: iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley) Newsgroups: comp.sys.amiga Subject: Re: Bug in 1.3 ChangeTaskPri Message-ID: <5758@louie.udel.EDU> Date: 1 Dec 88 14:36:16 GMT Sender: mmdf@udel.EDU Lines: 39 [In "Re: Bug in 1.3 ChangeTaskPri", Bob Page said:] : : I hope somebody will revamp the DOS command parser and launcher for : 1.4, and document it. The user interface (such as it is at the CLI) : for commands is not predicatable, and the initial environment is : problematic because it's not documented other than argc, argv, : although assumptions are made. (It should not be so hard to write : shells for the Amiga, or REZ like utilities). : INITIAL ENVIRONMENT d0 - amount of global area currently in use d1-d4 - up to 4 parameters. Further parameters can be passed on the stack d5-d7 - unused a1 - base of the current BCPL stack frame a2 - pointer to the BCPL Global Vector a3 - return address of the caller a4 - entry address a5 - pointer to a "caller" service routine a6 - pointer to a "returner" service routine a7 - stack for temporaries This register environment is available to any application program. However if you're programming in C, the startup code supplied by your linker generally ignores the initial register contents and eventually they get overwritten. The parameters passed by the CLI to an application are: d0 - length of command line a0 - APTR to command line The command itself may be found in the CLI->cli_Command field. Two items are available on the stack: pointers to the top and the bottom of the stack that was allocated. --Bill Kinnersley iphwk@terra.oscs.montana.edu