News  
  Publications  
Help  
Training  
Labs  
Contacts  
Connecting  
About  
Purchases  
Policies  
TTU Home  
DWMCC Home  

Compiling, Linking and Executing a Program


    $ FORTRAN filename              Compile a FORTRAN program.
    $ CC filename                   Compile a C program.
    $ PASCAL filename               Compile a Pascal program.
                                    Other compilers that are available are
                                    ADA, BASIC, COBOL, and Macro.
    
    $ LINK filename                 Convert an object module into an
                                    executable image file.
    
    $ RUN filename                  Run an executable file.
    
    $ FORTRAN/LIST filename.ext     When the program compiles or attempts 
                                    to compile, the LIST option creates a 
                                    file with the specified filename and 
                                    extension LIS.  The LIS file contains a 
                                    listing of the program and any syntax 
                                    error messages at the line where the 
                                    error occurs.
    
    $ PRINT filename.LIS            PRINT listing on the printer.
    
    $ TYPE filename.LIS             Display listing at the terminal.

Compiling and Linking a Large Program

(FORTRAN is used for an example. Other compilers could be used.) Write the program using subroutines. Put subroutines in separate files, maybe file1.FOR, file2.FOR, etc.

     
    $ FORT file1                 Compile part of the program.
    $ FORT file2                 Compile another part of the program.
    $ LINK file1,file2           Link all the parts of the program.
    $ RUN filename               Run the file which contains the main 
                                 program.

Note: Use this procedure when you need to work on only a small part of a program. You need to compile only a part of the program, and you can get listings of that small file without having to list an entire program.

Interrupting and Resuming Program Execution

     
    [CTRL/C]                        Interrupts the current process, 
                                    displays a dollar sign on the screen, 
                                    and waits for another command.
    
    $ CONTINUE                      Resume the execution that was 
                                    interrupted.
    
    $ SHOW STATUS                   Display execution status.


This page maintained by: Jim Johnson
For additional information, contact Jim Johnson, JJohnson@tntech.edu
Last updated: December 14, 1998