An assembly language simulator written in Javascript with VueJS
AC, a 16-bit accumulator
IR, a 16-bit register that holds an instruction immediately preceding its execution.
MBR, a 16-bit register that holds the data after its retrieval from or before its placement into memory.
PC, a 12-bit register that holds the address of the next program instruction to be executed.
MAR, a 12-bit register that holds the memory address of an instruction or the operand of an instruction.
InREG, an 8-bit register that holds data read from an input device.
OutREG, an 8-bit register that holds data that is ready for the output device
MBR ← PC
MAR ← X
M[MAR] ← MBR
AC ← 1
AC ← AC + MBR
PC ← AC
MAR ← X
MBR ← M[MAR]
AC ← MBR
MAR ← X
MBR ← AC
M[MBR] ← MBR
MAR ← X
MBR ← M[MBR]
AC ← AC + MBR
MAR ← X
MBR ← M[MBR]
AC ← AC - MBR
AC ← InREG
OutREG ← AC
if IR[11-10] == 00 do
if AC < 0 do
PC ← PC+1
else if IR[11-10] == 01 do
if AC < 0 do
PC ← PC+1
else if IR[11-10] == 10 do
if AC > 0 do
PC ← PC+1
PC ← IR[11-0]
AC ← 0
MAR ← X
MBR ← M[MAR]
MAR ← MBR
MBR ← M[MAR]
AC ← AC + MBR
MAR ← X
MBR ← M[MAR]
PC ← MBR
MAR ← X
MBR ← M[MAR]
MAR ← MBR
MBR ← M[MAR]
AC ← MBR
MAR ← X
MBR ← M[MAR]
MAR ← MBR
MBR ← AC
M[MAR] ← MBR
Thank you to Marco Schweighauser for his blog post
Essentials of Computer Organization and Architecture, Second Edition by Linda Null and Julia Lobur for the creation of the Marie Simulator