Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> execute execute a child process pp 193</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 EXECUTE                   Execute a Child Process                    pp 193

 Syntax:  Execute (FileVar) ;

 Type:    File

 Form:    Procedure

 Purpose: Load and execute any Turbo Pascal .COM file only.

 Notes:   Only the code segment is loaded and executed.  The run time code
          is unchanged from the parent program.  Data can be passed from
          parent to child via shared global variables or absolute address
          variables.
 ----------------------------------------------------------------------------


 Usage:
       TYPE
          FileType = String [80]             ;   { Define record size  }
       VAR
          FileVar  : File of FileType        ;   { 80 byte record type }
       CONST
          FileName : String [8] = 'Name.Ext' ;   { Constant file name  }

       BEGIN
           Assign (FileVar,FileName)         ;   { Assign file name    }
           Execute (FileVar)                 ;   { Run the new code    }
       END.

See Also: Chain Overlay

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson