Device programs stay in this browser. Download a copy, or connect your student account to move between computers.
Device programs 0/25
Shared computers share this library. Use cloud saving for your own programs.
Your saved programs will appear here.
TAKE YOUR IDEAS WITH YOU
My cloud programs
Use your student Save Code and PIN to open your programs on another computer.
Cloud saves contain your assembly code and program name. PINs are not saved on this device. Teacher accounts can use device saves and downloads.
Select any memory cell in the workspace, then inspect it here. These tools preserve the same CPU and memory state.
SELECTED 00 · unlabelled901
Assembly → machine code
00 · 901 INP
01 · 306 STA first
02 · 901 INP
03 · 106 ADD first
04 · 902 OUT
05 · 000 HLT
06 · 000FIRST DAT 0
Execution history · 0 reversible transfers
Assemble loads the editor into memory. Run executes automatically. Step advances exactly one micro-operation. The yellow stage shows the operation just performed. Reset restores assembled memory. Back restores one transfer. When Run waits for input, Continue resumes it automatically. Step remains manual. Long source files scroll inside the editor; execution follows the current line.
02 · Two become one · Storage and arithmetic
Enter two numbers, together or one at a time. Their sum must fit -999 to 999.
Sample input: 8, 5
Inputs are 8 and 5. What will OUT print?
Instruction reference
INP901Read the next input into the accumulator.
OUT902Copy the accumulator to the output.
LDA5xxLoad memory xx into the accumulator.
STA3xxStore the accumulator in memory xx (STO also works).
ADD1xxAdd memory xx to the accumulator.
SUB2xxSubtract memory xx from the accumulator.
BRA6xxAlways branch to address xx.
BRZ7xxBranch if the accumulator is zero.
BRP8xxBranch if the accumulator is zero or positive.
DATdataReserve one memory cell; its default value is zero.
Five registers, buses and the LMC model
PC is the next instruction address. MAR selects memory. MDR carries words to/from memory. CIR holds the current instruction. ACC holds working values. Address, data and control buses are labelled; purple paths represent internal CPU transfers.
CoreLab uses 100 cells, case-insensitive labels and signed data −999…999. BRP includes zero. Overflow stops with an error. OTC and .LOC are not supported. Run pauses after 10,000 instructions; output is limited to 1,000 values and undo history to 500 changes.
address busidle
data busidle
control busidle
CPU internalidle
ReadyFollow the next instructionMotion is off. Active routes, values and before → after changes are still shown.