Unix Introduction
Tom Kelliher, CS 220
Sept. 10, 1997
Distribute Unix account info.
E-mail to me by noon tomorrow a list of Unix topics you'd like to discuss
Friday.
- Configuring Exchange --- open the Inbox.
- Mail server is post.
- Adding a printer --- open Internet Explorer and try to run something.
- Running telnet and configuring for vt100 emulation.
- Telnet to phoenix (can leave off the .goucher.edu).
- When prompted, provide your username and password --- Be very
careful, Unix is case sensitive. Use
^u
to erase a line.
- Changing your password: passwd.
- Security in Unix: passwords on accounts, modes on files.
- Default file security provided by umask setting in .cshrc .
- Change file security with chmod. File, directory permissions.
- Where am I? Look at your prompt.
- Using cd to navigate.
- Seeing what's there with ls. Switches:
- -l.
- -a.
- Deleting files with rm. They're gone for good (or bad).
- mkdir and rmdir for directories.
- Creating and editing files with emacs, pico, vi.
- Printing files with lpr. Where do they come out? Just ASCII
for now.
Create a file, using the following SAL program for its contents:
.data
i: .word
output: .word
input: .word
prompt1: .asciiz "Enter a number: "
prompt2: .asciiz "\nOutput: "
nl: .asciiz "\n"
.text
__start: move i, 2
puts prompt1
get input
move output, input
while: blez i, endwhile
puts prompt1
get input
add output, output, input
sub i, i, 1
b while
endwhile: puts prompt2
put output
puts nl
done
- How is this SAL program similar to a HLL program? Different?
- Can you determine what the program does, just by examining it? (
blez is the instruction branch if less than or equal to zero.)
- Type it in, save it, print it, and run it.
- Modify it so that it reads five numbers.
Thomas P. Kelliher
Wed Sep 10 08:17:02 EDT 1997
Tom Kelliher