LC-3 Simulator
Simulator Helpful Hints
Click here for some helpful hints regarding the LC3
linux simulator.
General Documentation
- LC-2 Programmer's Reference and
User's Guide
We have not yet found the same User's Guide for LC-3. In the mean time use this - things will almost be the same for LC-3 as for LC-2 that they talk about in the User's Guide.
Most of this manual is the assembly language
manual which also appears in your textbook
(
Appendix A
).
It also includes
instructions on how to run the simulator as well as the
assemble and convert programs. The manual was
originally written for the software running on the Unix platform, but
it also applies (for the most part) to the Windows version. You
should not need to print this document.
Linux Platform
From any department Linux machine, you can assemble and run any LC3
program. You can use your favorite editor (pico, vi, emacs) to write
your assembly code. Then you can run the following commands from a
terminal window:
- /p/bin/lc3asm filename.asm - assembles filename.asm and creates
filename.obj, in addition to a couple of other files.
- /p/bin/lc3db - Loads a text version of the LC3 simulator that
allows you to load and run (or step through) LC3 assembled files (.obj
files).
- /p/bin/lc3db --ddd - Loads a graphical LC3 simulator that allows
you to load and run (or step through) LC3 assembled files (.obj
files).
Please note that there are currenty some issues with the graphical
interface, so please use the text version of lc3db instead.
The following documentation is available:
Taylor Riche's (Modified by Jennifer Sartor and updated by Vinod
Valsalam for LC3) local guide to running the
LC-3 Simulator
Windows Platform
The LC-3 Simulator is now available on the Microlab PCs in Painter
3.22. You should be able to log into the PCs using your unix username
and password. On the lab computers, you will find under the "Program
Files" menu under "Programming" the applications that allow you to
write, assemble and run LC3 programs.
- LC3Edit - allows you to write an LC3 program and assemble it by
clicking "Assemble" under the "Translate" tab.
- LC3Simulator - allows you to load and run (or step through) LC3 assembled files (.obj files).
The following documentation is available:
Running the Simulator from Home
Finally, if you would like to run the simulator at home on your own PC
or Linux machine, you can download and unpack it. While you can get
the original LC3 simualtor code from the web site, we instead
recommend that you download the source code for lc3db and compile it
yourself. lc3db has a more fully featured runtime system and the
architecture supports interrupts, which will be necessary for this
class.
However, we cannot help you install or maintain the software on
your home machine. You are on your own. You should also make sure
that your programs run on the CS Linux machines before you submit
them. Nonetheless, we recommend that you use the version installed on
the CS linux machines.
Last modified: 01/09/08
Don Fussell, fussell@cs.utexas.edu