Getting Started

Part of the CS:2630 on-line collection, Summer 2018
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."

No support will be provided to students who wish to upload or download text from their personal computers. You are on your own if you opt to do 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 your 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 the shell command echo $SHELL and it will tell you. 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 at all! Do not change ~dwjones to your Hawkid! This command will detect if you have already done it and tell you that you have already done this.

You are now ready to use the system for this course! You have installed use these shell commands:

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

link myfile.o
link 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 C or assembly language source files, or to inspect assembly 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.