LC3 Tools at Colorado State University


These tools are based on the excellent linux tools written by Steven S. Lumetta (available here). Without that code, these tools would not have been written. The code was used intact where ever possible consistent with the needs of the CS270 course at Colorado State University.

Thanks also to Dr Michelle Strout, Dr Sanjay Rajopadhye, and Dr Chris Wilcox for their many suggestions and hours of discussions.


The CS270 course at CSU combines C programming, hardware (gates and circuits) and LC3 assembly language. It is taught using the book A Introduction To Computing Systems by Patt and Patel. The course is taken at the sophmore level and students have two semesters experience with Java programming. Students are expected to be able to write programs with declarations, loops, conditionals, methods, etc. that are implemented in multiple files. Therefore, the C programs are designed to emphasize features they have not likely seen in Java.

Writing an LC3 simulator and/or assembler is a "larger" scale project that is appropriate for CS270. In the case of the simulator, the sophisticated Tcl GUI and gdb-like command line UI were preserved so that the student's simulator would include those features. Many assignments for CS270, including LC3 assembler and simulator, may be found here.

Getting the tools

This is a binary distribution. It includes substantial source code (for reference) but not any source that is part of actual assignments. Several required files are provided in binary form in the .a files contained in the distribution. The distribution was created for the use of students so that they could install the tools on their personal computers. A single compilation is required to complete the install. For a complete set of source code, please contact me.
  1. Download the file appropriate for your OS
  2. Unpack lc3CSU.XXX.tar file. This will unpack into a directory named lc3CSU.
        tar -xvpf lc3CSU.XXX.tar
  3. cd to the directory lc3CSU
  4. Review the Makefile and make sure the variable GCC is appropriate for your C compiler. Also, verify that sed in in your $PATH
  5. make to build lc3sim. It will also assemble the file lc3os.asm.
The install is complete and the tools are ready for use. You may find it convenient to add the install directory to your $PATH.

External Changes in Tools

The "external" ways these tools differ from those provided in original linux versions include:

The New LC3 Simulator

The files that make up the new LC3 simulator are listed below. Underlined files are completed by the students. All others are "read only".

The New LC3 Assembler

The original LC3 assembler uses flex for parsing and was deemed too advanced for this level. The new assembler was patterned after an assignment by Milo Martin from uPenn and found here. Used with permisson.

The files that make up the new LC3 assembler are listed below. Underlined files are completed by the students. All others are "read only".

(c) Fritz Sieker 2012-2016 (fsieker AT