Getting Started

Part of the CS:2630 on-line collection, Fall 2023
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

If you do not currently have a College of Liberal Arts and Sciences Linux Account, you will need to set one up. This is done on-line, as described here:
-- https://clas.uiowa.edu/linux/services/accounts/
This can be done from any web browser, but some off-campus networks are restricted.

All your coursework will be done using Fastx to access the CLAS linux servers:
-- https://fastx.divms.uiowa.edu/

Once you're on the Linux server, explore it a bit. The CLAS Linux Services page covers a fair amount of useful material, including a small quick-start guide:
-- https://clas.uiowa.edu/linux/services

All our programming on the Linux system will be done from the shell. You can get to the shell directly from Fastx by opening a remote xterm session. If you open a MATE session from Fastx, you will get a full remote desktop. In that case, you can open an xterm window to let you run the shell by clicking on the xterm icon — hover the mouse over it, and a popup will appear saying "MATE terminal / Use the command line."

You can upload or download text from personal computers, but we cannot devote time to helping with that. All submissions of programming assignments for this course must be done from the CLAS Linux server. Learn how to use it!

When you create a Linux account, your default shell will be set to bash (the Bourne Again SHell — really). If you want to know what shell you are running, type this shell command echo $SHELL. If your shell is not /bin/bash, consider setting it to that with the chsh shell command. It will prompt you for the rest.

This course requires some linux software that is not available by default in your CLAS linux account. Specificaly, you need to install the smal, hawklink and hawk commands. To do this, type the following text, verbatim, as a shell command:

       ~dwjones/2630install

Verbatim means with no changes! Do not change ~dwjones! This command will detect if you have already done it and tell you that you have done so. (you can use the ~dwjones/2630deinstall command to undo this.)

Once you restart the shell (exit your terminal window and open a new one), you will be ready to use the system with these shell commands:

smal myfile.a
assembles a file called myfile.a to produce an object file called myfile.o and a listing file called myfile.l

hawklink myfile.o
hawklink myfile.o to produce an executable called link.o

hawk link.o
run the executable link.o on a simulated Hawk computer

You can use any Linux text editor to create or edit source files, or to inspect listing files. So, use vi myfile.a to create and edit a file, and after you've done so, assemble it, use vi myfile.l to examine the listing. If you haven'd read far ahead, you'll get a listing file filled with error messages, but that's still a good test that the software is properly installed. While you're at it, try creating myfile.c and see how the C compiler reacts to it with cc myfile.c.