CIS-332 -- Principles of Operating Systems

Professor: Franz J. Kurfess

Home page:http://hertz.njit.edu/~kurfess   E-mail:franz@cis.njit.edu 

Setting up your hertz account for Verdix Ada

  1. You should already have a hertz account. If not, then get one.

  2. Use any editor to edit the .login file in your home directory. Change your path variable to include:
    /usr/local/ada/bin.
    For example, using vi:

  3. First type your user and password at the login prompt.
        %vi .login <Return>
    
  4. You will see something like the following:
    set path=(/usr/ucb /usr/bin /bin /usr/etc /usr/local/bin/X11 /usr/local/bin /usr/games /usr/bin/X11 /usr/lib/X11 ~/bin ~ .)
    Note that everything should be in a single line (no "New Line", "Line Feed", or "Return" characters in between, and that the single items must be separated by
    "Space" characters. This is important; you might get strange error messages 
    if you do not follow the syntax requirements.
    
    
  5. Use vi's insert mode to change the line to read:
    set path=(/usr/local/ada/bin /usr/ucb /usr/bin /bin /usr/etc /usr/local/bin/X11
    /usr/local/bin /usr/games /usr/bin/X11 /usr/lib/X11 ~/bin ~ .)
    
  6. You should be familiar enough with vi to make the above change.

  7. Important : Do not break the above line (e.g : by pressing <Return>) even if the line exceeds 80 columns in length.

  8. Save the .login file, and exit vi.
  9. Type:
     source .login <Return>
    so that the new path is effective.

  10. Create a directory for you ada programs. Type:
     mkdir my-ada <Return>
    
  11. Change directories to your ada directory. Type:
     cd my-ada <Return>
    
  12. You must now create the ada libraries. Type:
     a.mklib <Return>
    
    To see a directory of the files you have just made, type:

    ls -l <Return>

    You will see

    total 32
    

    -rw------- 1 txd3060 0 Sep 8 10:23 GVAS_table -rw------- 1 txd3060 71 Sep 8 10:23 ada.lib -rw------- 1 txd3060 19 Sep 8 19:21 gnrx.lib

    -- Note because ada stores every compiled object in these libraries you may eventually get a lot of junk you don't want. Type:
     a.cleanlib <Return>
    
    This will clear out all of your work from the library, and you can start fresh, by re-compiling only the objects you want.

  13. To compile an ada program now all you need to do is, type:
         ada -M <procname> <progname.a> <Return>
    
    where progname.a : the name of your ada program, and

    procname : the name of the procedure used.

    The -M option tells the compiler to produce an executable file named 'a.out'. You can run your program by typing:

    a.out <Return>

    -- Verdix insists that everything it compiles be a filename ending with the text '.a'.

    If you want more information on any of these commands, you can read the necessary man pages.

  14. To test things out, use any editor to type in the following program, and store it in the file hello.a.
    
        with TEXT_IO;
        use  TEXT_IO;
    
        procedure test is
            begin
                put_line(" Hello world, my ada works fine");
            end test;
    
    
    To compile, give the command :
     ada -M test hello.a <Return>
    
    and to execute, give the command :
     a.out <Return>
    
    
    If you have trouble following these directions, or experience problems using the Verdix compiler, you can e-mail a description of the problem to

    sxc3916@hertz.njit.edu =

    Remember, the better you are at documenting your problems, the more likely you are to get help. =

CIS 332 Principles of Operating Systems Fall 1995; Copyright © 1995 Franz Kurfess.