Computer Sciences Dept.

CS/ECE 252 Introduction to Computer Engineering

Fall 2011 Section 1
Instructor Guri Sohi
TAs Newsha Ardalani and Rebecca Lam

URL: http://www.cs.wisc.edu/~sohi/cs252/Fall2011/

Computing

Computing in this class can be done four ways:

  • Students can use the Computer Science Lab (CSL) XP workstations (e.g. rooms 1358, 1366, or 1368 CSS).
  • Students in the College of Engineering may use the computers at CAE. While this may be convenient, we cannot guarantee support.
  • Students may use their own Windows computers. While this may be convenient, we cannot guarantee support.
  • Students may use their own MacOS/Linix computers. While this may be convenient, we cannot guarantee support.

Logicly

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

LC-3 Information

PennSim

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.

File Types

You will encounter at least two filetypes when using PennSim:

  1. .OBJ
    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.
  2. .ASM
    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.

Creating .ASM 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 file extension. Many text editors default to .txt, which will not work with PennSim. 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:
  • crudely load programs (as in the script above for Chapter5's Example 1) or
  • assemble and load programs (which will make more sense after Chapter 7).
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).

Learn@UW Dropbox

To submit a file in Learn@UW, follow these instructions:

  1. Save your file a plain text document (.txt file extension).
  2. After selecting the course (compsci 252 - 001 or 002), click on the Dropbox tab at the top.
  3. Click on the folder that you want to submit your file in. For example, if you want to submit a file for question #7 of homework #6, click on hw6_7.
  4. Click on "Add a File". Browse through the folders in your computer and select the file to be added. The click on upload.
  5. Finally, click on the submit button.

Remember that exactly one student from each team has to submit all the files for your team.

Screenshot

Taking a screenshot in Windows XP is easy:

  1. Make sure your simulator window is in focus.
  2. Hit the ALT key and the PrintScreen key together at the same time.
  3. Start the program "Paint" (comes with Windows under Start -> All Programs -> Accessories). You can alternatively use "Word" if you prefer.
  4. Paste (i.e. hit the CTRL key and the V key together at the same time).
  5. Print (i.e. hit the CTRL key and the P key together at the same time).

 
Computer Sciences | UW Home