


      LLLLooooaaaaddddCCCCooooddddeeeeAAAAnnnnddddDDDDaaaattttaaaa((((3333BBBB))))          ((((RRRRiiiiddddggggeeee))))          LLLLooooaaaaddddCCCCooooddddeeeeAAAAnnnnddddDDDDaaaattttaaaa((((3333BBBB))))



      NNNNAAAAMMMMEEEE
           LoadCodeAndData - create a command process with existing
           data segment

      SSSSYYYYNNNNTTTTAAAAXXXX
           FUNCTION LoadCodeAndData (codeName : String;
                                     dataName : String;
                                     var pID : ProcessID) : Error;

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _L_o_a_d_C_o_d_e_A_n_d_D_a_t_a creates a command process, using the
           datafile ccccooooddddeeeeNNNNaaaammmmeeee as the executable code segment. The code
           file is found using the standard search order.  If the name
           starts with ////, then that exact pathname is used.  Otherwise,
           a pathname is constructed by appending ccccooooddddeeeeNNNNaaaammmmeeee first to the
           current working directory, then the directory ////bbbbiiiinnnn, and
           finally to the directory ////uuuussssrrrr////bbbbiiiinnnn. The code file must have
           execute permission.

           The existing file ddddaaaattttaaaaNNNNaaaammmmeeee is used as the data segment for
           the command process.  If the name starts with ////, then that
           exact pathname is used.  Otherwise, the file is looked for
           in the current directory. The data file must have both read
           and write permission. The same file can be used for both the
           code and the data segment.

           If both files are found, a queue segment is allocated, and
           an inactive process is created. A process ID is returned in
           ppppIIIIDDDD, which is used for further management of the command
           process.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           AbortCommand (3B), LoadCommand (3B), StartCommand (3B)

      NNNNOOOOTTTTEEEESSSS
           ErBadFIleName is returned if a name is too long, or contains
           invalid characters.

           ErFileNotFound is returned if a file cannot be found, while
           ErBadFileType is returned if it is not a regular file.















      Page 1                                                   (9010-E)



