From CS252 Course Wiki: Spring 2014 Sections 1 and 2

Main: Tools


Here is a flash-based gate simulator perfect for playing with and visualizing simple logic gates: Logicly

LC-3 Information


The PennSim LC-3 Simulator can be run on any computer with Java 1.5 installed. Please see the PennSim Guide below for more information.

  1. Running PennSim
    • In Windows platform, you just double click on PennSim.jar
    • In Linux, you have to type java -jar PennSim.jar in the command prompt
  2. PennSim Guide
  3. PennSim Software
  4. PennSim Manual
  5. PennSim's lc3 OS

File Types

You will encounter at least two filetypes when using PennSim:

These files are the "machine" code that can be loaded and executed by PennSim. It contains sequences of 16-bit binary values that correspond to LC-3 instructions. These files are unreadable in a text editor and will be created for you by PennSim's assembler function.
These files contain LC-3 assembly code. Each line contains a single assembly instruction. For example, ADD R0, R0, #1 is a single assembly instruction. In order to convert a .asm file into a .obj file, it must be run through an assembler. This should be done through PennSim and is discussed in the PennSim Guide. In the latest version of PennSim, you can write LC-3 assembly code in a .txt file also.

Creating .ASM (or .TXT) Files

You may use any basic file editor that you would like to create .asm files. Be sure to save the file with a .asm or .txt file extension. Here are some text editors that may work well:

   1. Windows: Notepad, Notepad++, LC-3 Edit (see below)
   2. Mac: TextEdit, TextWrangler
   3. Linux: gedit
   4. Any: vi, emacs

LC-3 Edit OPTION for Dealing with Binary/Hex Code

PennSim allows you to:

In the interim, the Windows-only LC-3 Edit utility lets you to write binary/hexadecimal LC-3 code and convert it directly into an object file readable by PennSim. It is a self contained executable and does not require any installation. Use of L3-edit is OPTIONAL. It requires some learning and then can save some time (if you use Windows).

Retrieved from
Page last modified on April 02, 2014, at 01:38 PM