Calico LC3

From IPRE Wiki
Revision as of 16:15, 8 December 2013 by Doug Blank (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Calico LC3 is based on the Little Computer by Patt and Patel.

Overview

Calico LC3 is an implementation of Patt and Patel's LC3. It is written in Calico Python, but appears as a full language in Calico.

In Calico, you need to first enable the LC3 language:

  1. start Calico
  2. under menu -> Calico -> Languages
  3. check LC3

Special features:

  • Tracing, breakpoints, integrated IDE
  • syntax color highlighting
  • Right-click on errors takes you to line of code
  • Assembler and interpreter
  • Counts instructions executed
  • Counts machine cycles executed
  • Error checking and useful error messages
  • menu -> View -> Tabs -> Locals - shows registers

Source Materials:

Special Interactive Directives

Enter these commands in the Calico Shell entry area:

Use: 
 .help                           - shows this info
 .raw [start [stop]]             - list meory in hex
 .list                           - list program from memory
 .dump [start [stop]]            - dump memory as program
 .regs                           - show registers
 .set pc HEXVALUE                - set PC
 .set memory HEXLOCATION HEXVALUE- set memory
 .set reg VALUE HEXVALUE         - set register
 .get pc                         - get PC
 .get memory HEXLOCATION         - get memory
 .get reg VALUE                  - get register

Examples

Here is a basic Hello World assemble program.

;; helloworld.asm
.ORIG x3000
    LEA R0, HELLO
    PUTS
    HALT
HELLO .STRINGZ "Hello, World!\n"
.END