LC-3 Simulator
Initializing the LC-3. Please wait…

Memory

Whoops! That memory address is invalid. Hexadecimal addresses must begin with the letter x. All other addresses must be decimal. If you're entering a label, make sure your capitalization is correct.
Whoops! The memory address you've entered is out of bounds. Memory addresses must be within x0000 and xFFFF, inclusive.
0x Label Hex Instruction

lab 评测

说明:本程序基于 Github 项目 lc3web 修改而来,旨在满足修读 2021 USTC CS1002A 计算系统概论的同学们的可能的需要。

fork 后仓库: lc3web

请先在本模拟器中载入汇编代码或者机器码(在左侧的 Assemble 和 Raw 选项中载入),机器码需要 0011 0000 0000 0000 开头。

选择预设后点击评测即可(可自己设立评测标准。lc3web 的内存数组是 lc3.memory[])

特性:评测开始时条件码总为 Z,这与助教标准(开始时为 000)略有不同

选择测试题目

限制单次指令数:
样例数组(逗号分割): 评测及初始化内存,寄存器函数: 读取答案函数:

Status

Registers

Privilege mode exception! An RTI instruction was executed while in user mode. The machine has been halted.
Illegal opcode exception! The reserved instruction was executed. The machine has been halted.

Manage labels

The following labels, including system labels, are currently set:

Label nameAddressDelete
  • Name cannot be empty
  • Label name already exists
  • Label name invalid
  • Invalid address
  • Address already has label

Upload files

Upload object files (.obj) and symbol files (.sym) by dragging them onto the box below. You can upload multiple files at once.

You must convert any ASCII binary (.bin) or hexadecimal (.hex) files, and assemble any assembly language (.asm) programs, before uploading.

Drop files here
Hold on! The following couldn't be recognized and won't be processed:
The following ready to be processed:

Assemble

Paste your assembly code below, or drop a file on the textbox. Click the Assemble button to assemble your code.

Drop file to load contents
Oh no! You've got in your assembly code:
Awesome! Your code was assembled successfully. You can load your program directly into the simulator, or download the output object file and symbol table.

Write raw hex or binary

Paste your hex or binary code below, or drop a file on the textbox. Click the Process button to process your instructions so that you can download an OBJ file or load them directly into the interpreter.

Drop file to load contents
Oh no!
Awesome! Your code was processed successfully. You can load your program directly into the simulator, or download the output object file.