ECE 411

COMPUTER ORGANIZATION AND DESIGN

Spring 2018

Basic Usage Information for LC3b Tools

For a full list of documentation and tools, please visit this website.

Using the assembler (LC3bAssembler)

  1. Download LC3bAssembler Archive.
  2. Unarchive the .gz file into a directory of your choice: gunzip LC3bAssembler.gz
  3. Change the permissions of the executable file: chmod +x LC3bAssembler
  4. To assemble your programs, use the following syntax: LC3bAssembler example.asm -v where example.asm contains your LC3b Assembly code.
  5. The command above will create a file named example.vhd that contains vhdl vectors.

Using graphical simulator (LC3bIDE)

  1. Download LC3bIDE Archive.
  2. Unarchive the .zip file into a directory of your choice: unzip LC3bIDE.zip
  3. Change the permissions of the executable file: chmod +x LC3bIDE
  4. Run the executable file: ./LC3bIDE
  5. Select Project, then Open File and navigate to the .asm file you wish to simulate.
  6. In the AshIDE - AshOS_LC3b window, make sure your .asm file is selected under LC3b Source Files.
  7. In the Project Settings box, uncheck "Use Ash Operating System", "Support Old LC3 Syntax"
  8. In the File Settings box, select Language as "LC3b", Source Type as "LC3b Source", then click Assemble. Most assembly warnings may be ignored, such as "Program origin not specified".
  9. In the window that opened which is named after your .asm file, select Go One Instruction from the Simulate menu (or press F6). This will advance your program through the first instruction and open a Simulator window.
  10. In the Simulator window, select Registers from the View menu. This will allow you to view the register values as you step through your LC3b program. You may also choose to view things such as your Memory.

Note: LC3bIDE has R6 initialized to E000 when you begin your program. Don't use R6 unless you initialize it to a proper value. This probably can be fixed by some setting of AshIDE but I haven't track that down yet.