~cs270/lc3tools
. There are three tools
you will use:
~cs270/logisim
. The tool is named
logisim
~cs270/lc3tools/lc3as
Similarly, to run the logisim simulator you would enter:
~cs270/logisim/logisim
java
or gcc
the shell
you are running must find the actual executable to run. It does this by using
the $PATH
variable defined by your shell. The $PATH
variable is list of directories to search for commands. The directories are
searched in the order they occur in the $PATH
variable.
By adding the paths to the CS270 tools to the $PATH
variable,
you will only need to enter the name of the command, not the full path.
Where the $PATH
variable is defined is a function of the shell
you are using.
WARNING: do not add ~cs270/bin
to your path. Since
each course has its own copy of checkin
, adding the course
bin
directory to $PATH
may cause you to check
an assignment in to the wrong place.
finger yourLoginName
One of the fields printed will be the shell you use. Adding to the
$PATH
differs slightly for different shells. Below are
instructions for tcsh (the current CS default shell) and bash.
$PATH
for tcsh~/.cshrc
. You will find
a line like:
set path = (/usr/ucb /bin /usr/bin /usr/local/bin /usr/local/gcc/bin)
Individual paths are separated by a space. You may add the tools paths to this line. However, you may find it convenient to define a new variable like this:
set CS270 = (. ~cs270/lc3tools ~cs270/logisim)
and then append it to the original $PATH
variable by adding a line
after the original definition like:
set path = ($path $CS270)
By adding .
as part of $PATH
, the shell will look
in the curent directory. This is handy so that when you compile a C program,
you may execute it by simply typing its name. Otherwise, you will need to
prefice its name with ./
$PATH
for bash~/.bashrc
. You will find
a line like:
set PATH="/usr/ucb:/bin:/usr/bin:/usr/local/bin:/usr/local/gcc/bin:/usr/bin/X11:/usr/X/bin"
Individual paths are separated by a colon. You may add the tools paths to this line. However, you may find it convenient to define a new variable like this:
CS270=".:~cs270/lc3tools:~cs270/logisim"
and then append it to the original $PATH
variable by adding a line
after the original definition like:
PATH="$PATH:$CS270"
By adding .
as part of $PATH
, the shell will look
in the current directory. This is handy so that when you compile a C program,
you may execute it by simply typing its name. Otherwise, you will need to
preface its name with ./
echo $PATH
and you should see the CS270 directories listed at then end. Now you can access the tools by simply using their name.
Fritz Sieker - Jan 2012