Main »

Tools

Main.Tools History

Hide minor edits - Show changes to output

April 02, 2014 by pradip16 - Specifying that .txt can also be used instead of .asm
Changed lines 31-36 from:
-> 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:
to:
-> 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:
Changed line 51 from:
* [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/includes/lc3editguide.html|Guide for using LC-3 Edit and PennSim]]
to:
* [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2013/includes/lc3editguide.html|Guide for using LC-3 Edit and PennSim]]
March 30, 2014 by pradip16 - Changing pennsim links to 2013
Changed lines 19-22 from:
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/includes/pennsim-guide.html|PennSim Guide]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/handouts/pennsim/PennSim.jar|PennSim Software]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/includes/pennsim-manual.html|PennSim Manual]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/handouts/pennsim/lc3os.asm|PennSim's lc3 OS]]
to:
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2013/includes/pennsim-guide.html|PennSim Guide]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2013/handouts/pennsim/PennSim.jar|PennSim Software]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2013/includes/pennsim-manual.html|PennSim Manual]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2013/handouts/pennsim/lc3os.txt|PennSim's lc3 OS]]
January 22, 2012 by karu -
Changed lines 7-11 from:
Coming soon
to:
* LC-3 Instruction Set on One Page (with ASCII character table on page 2): [[http://pages.cs.wisc.edu/~karu/courses/cs252/spring2012/handouts/misc/lc3-1page.pdf|PDF]] or [[http://pages.cs.wisc.edu/~karu/courses/cs252/spring2012/handouts/misc/lc3-1page.doc|Word]]
* Example code:
** LC-3 Chapter 5 Example 1 [[http://pages.cs.wisc.edu/~karu/courses/cs252/spring2012/handouts/misc/chapter5example1.txt|as a script (in txt)]] or alternatively [[http://pages.cs.wisc.edu/~karu/courses/cs252/spring2012/handouts/misc/ex1_inst.asm|instruction (in assembly)]] and [[http://pages.cs.wisc.edu/~karu/courses/cs252/spring2012/handouts/misc/ex1_data.hex|data (in hex) files.]]
** LC-3 Chapter 5 Example 2 [[http://pages.cs.wisc.edu/~karu/courses/cs252/spring2012/handouts/misc/ex2_inst.bin|instruction (in binary)]] and [[http://pages.cs.wisc.edu/~karu/courses/cs252/spring2012/handouts/misc/ex2_data.hex|data (in hex) files.]]

January 22, 2012 by karu -
Changed lines 36-50 from:
   4. Any: vi, emacs
to:
   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).

* [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/includes/lc3editguide.html|Guide for using LC-3 Edit and PennSim]]
* [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/handouts/pennsim/lc3edit_301.zip|LC-3 Edit Software]]

January 22, 2012 by karu -
Changed line 24 from:
# .OBJ
to:
* .OBJ
Changed line 26 from:
# .ASM
to:
* .ASM
January 22, 2012 by karu -
Changed lines 26-27 from:

#.ASM
to:
# .ASM
January 22, 2012 by karu -
Changed lines 12-14 from:
# In Windows platform, you just double click on PennSim.jar
# In Linux, you have to type java -jar PennSim.jar in the command prompt
to:
# 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
January 22, 2012 by karu -
Changed lines 16-17 from:
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/handouts/pennsim/PennSim.jar|
PennSim Software]]
to:
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/handouts/pennsim/PennSim.jar|PennSim Software]]
January 22, 2012 by karu -
Added lines 1-38:
(:title Tools :)

!!!Logicly
Here is a flash-based gate simulator perfect for playing with and visualizing simple logic gates: [[http://logic.ly/|Logicly]]

!!!LC-3 Information
Coming soon

!!!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.

# In Windows platform, you just double click on PennSim.jar
# In Linux, you have to type java -jar PennSim.jar in the command prompt

# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/includes/pennsim-guide.html|PennSim Guide]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/handouts/pennsim/PennSim.jar|
PennSim Software]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/includes/pennsim-manual.html|PennSim Manual]]
# [[http://pages.cs.wisc.edu/~markhill/cs252/Fall2009/handouts/pennsim/lc3os.asm|PennSim's lc3 OS]]

!!!File Types

You will encounter at least two filetypes when using PennSim:

# .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.

#.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

Page last modified on April 02, 2014, visited times

Edit - History - Print - Recent Changes (All) - Search