Spring 1998, Section 2
This lab is meant to get you started and comfortable with the Unix computers that we will be using throughout the semester. You will also use the 68HC11 simulator for the first time.
The computers we will be using are standard PCs, running a version of Unix called Linux (usually pronouncing the 'li' like 'listen' and the 'nu' like 'nothing').
Let's start Netscape. You do this by pointing to the terminal window, and entering
netscape&
and hitting <enter>. The ampersand tells the shell not to wait for this command to finish, but to continue to accept other commands right away.
Now that you have Netscape running, you can go to a Webpage with other parts of this lab.
http://www.cs.nmsu.edu/~jcook
Netscape is a browser for the World Wide Web. It lets you look at Web pages -- which are documents that have text and pictures on them. Documents have a name, called a URL, or Universal Resource Locator. This is what is in the Location field, so for the CS171 page, for example , the URL is
http://www.cs.nmsu.edu/~jcook/Classes/CS171
Documents can link to one another -- wherever you see underlined text, that text is a pointer to another document. You can go to the other document simply by clicking on the text (the mouse arrow shape changes to a little hand with a finger pointer). There are buttons near the top of Netscape that say back and forward -- these let you go back to your previous documents, or forward as well.
Now it's time to learn more about Unix. We will do this by browsing Web pages and doing some exercises. In the location box, click to bring up the prompt and change the URL to be
http://www.cs.nmsu.edu/~jcook
Near the bottom is a list of pages that are topics explaining Unix. For this lab, you must go through them one by one, in order, answering the questionsalong the way. You need to hand in your answers to these questions. You also need to hand in the answers to the questions in the section below.
The assembler and 68HC11 simulator are in the following directory:
/home/faculty10/tano2/CS273/Public
The assembler is file as11 and the simulator is file Sim6811.
You can either create an alias for each one, or add the above directory to your path.
To create aliases, add the following to your .cshrc file:
alias as11 /home/faculty10/tano2/CS273/Public/as11
alias Sim6811 /home/faculty10/tano2/CS273/Public/Sim6811
To add the directory to your path, add the following to your .cshrc file:
set path = (. \ /home/faculty10/tano2/CS273/Public \ $path)
as11 and Sim6811 are object files, compiled for the PCs running Linux (so they won't work on another kind of computer)
Your source assembly language program must end with a .asm file extension. Suppose it is called `myprog.asm'
To assemble the file, and store the listing in a file, say `myprog.listing', do the following:
as11 myprog.asm -l > myprog.listing
The object code is now stored in file `myprog.s19'. To simulate your program, enter:
Sim6811 myprog.s19
Notice there is a help command. To exit the simulator, type control d.
Enter th eprogram below into a file, assemble it, run it, and answer thequestions below. Please give your answers to the TA.
Here is the program to enter.
org $0
param1 fcb 5
param2 fcb 7
result rmb 2
org $f800
start ldaa #5
ldab param2
aba
ldab param1
aba
staa result
end jmp end
org $fffe
fdb start
Questions: