


      SSSSttttaaaarrrrttttCCCCoooommmmmmmmaaaannnndddd((((3333BBBB))))             ((((RRRRiiiiddddggggeeee))))             SSSSttttaaaarrrrttttCCCCoooommmmmmmmaaaannnndddd((((3333BBBB))))



      NNNNAAAAMMMMEEEE
           StartCommand - start a command process executing

      SSSSYYYYNNNNTTTTAAAAXXXX
           FUNCTION StartCommand (pID : ProcessID;
                                  args : PArgPage;
                                  wait : Boolean;
                                  debugFlag: Boolean) : Error;

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _S_t_a_r_t_C_o_m_m_a_n_d is used to start execution of a command
           process. The command process ppppIIIIDDDD must have been created by
           the LoadCommand or LoadCodeAndData routine; StartCommand
           activates ppppIIIIDDDD, supplying its command arguments.

           The command arguments are passed in a 4096-byte page to the
           User Monitor, which transmits them to the command process
           when it calls GetArgs. The parameter aaaarrrrggggssss points to a page
           which contains the arguments in the following format:

           PArgPage = ^ ArgPage;
           ArgPage  = Record
                        argc : Integer;
                        strings : Array [0..0] of StringBody;
                      end;

           The argument page contains an argument count and zero or
           more strings packed sequentially. The strings consist of a
           length field followed by the sequence of characters, with
           the length fields aligned on word (4-byte) boundaries. By
           convention, the argument count is at least one, with the
           first string being the command name the process was invoked
           with.

           If wwwwaaaaiiiitttt is True, then the invoking process is suspended
           until the command process terminates. In this case, the exit
           code of the command process is returned as the value of the
           StartCommand routine. If wwwwaaaaiiiitttt is False, then the invoking
           process is not suspended and no indication is given when the
           command process terminates.

           If ddddeeeebbbbuuuuggggFFFFllllaaaagggg is true, then the command process is not
           activated, and the Debug process is notified that ppppIIIIDDDD is a
           suspended process.  The command process can be activated by
           Debug, usually after breakpoints have been set. if ddddeeeebbbbuuuuggggFFFFllllaaaagggg
           is false, the command process is activated immediately.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           AbortCommand (3B), GetArgs (3B), LoadCodeAndData (3B),
           LoadCommand (3B), SysExit (3B)

      NNNNOOOOTTTTEEEESSSS



      PPPPaaaaggggeeee 1111                                                   ((((9999000011110000----EEEE))))






      SSSSttttaaaarrrrttttCCCCoooommmmmmmmaaaannnndddd((((3333BBBB))))             ((((RRRRiiiiddddggggeeee))))             SSSSttttaaaarrrrttttCCCCoooommmmmmmmaaaannnndddd((((3333BBBB))))



           ErBadPID is returned if ppppIIIIDDDD is not a valid command process
           ID.

           ErCantStart is returned if the command process cannot be
           properly activated.


















































      Page 2                                                   (9010-E)



