I am trying to learn how computers work with assembly language. Is there some software, preferably on Linux, that can simulate a CPU with RAM as described in von Neumann's computer architecture, for learning purposes? If it is paid software, the price should be within 100$ budget.

Here is the feature I would like:

  1. See the registers and memory.
  2. Pause and execute instructions like a read-eval-print-loop.
  3. Demonstrate features like instruction pipelining.

The main purpose to just write some scratch program and see how it works under-the-hood.

Here are two similar questions I found:

Assembly Debugger

Simulate a basic computer


Is there a software that can simulate a CPU with RAM?

CPU Sim would appear to fit the bill.

CPU Sim is a Java application that allows users to design simple computer CPUs at the microcode level and to run machine-language or assembly-language programs on those CPUs through simulation. It can be used to simulate a variety of architectures, including accumulator-based, RISC-like, or stack-based (such as the JVM) architectures. It is a useful tool for instructors who want their students to get hands-on exposure to a variety of architectures and to get a chance to design and implement their own architectures and write programs in machine language and assembly language for their architectures.

The CPU Sim application is a fully-integrated development environment that includes the following features.

Tools for designing a CPU at the register-transfer level:
    Dialogs for specifying the number and width of registers, register arrays, and RAMs.
    Dialogs for specifying the microinstructions (e.g., bit transfers between registers) 
      that are used to implement the machine instructions
    A dialog for specifying the machine instructions, including:
        the number of bits in each instruction
        the opcode value and the number of bits the opcode occupies
        the number of the operands and the properties of each operand
        the semantics of each instruction 
          (as specified by a sequence of microinstructions)
A text editor with syntax highlighting for writing assembly language programs
An assembler for converting assembly programs into machine code for the user's CPU.
A debugger for stepping forward and backward through the execution of such programs, 
  inspecting and optionally changing the machine state after each step.

enter image description here

It's written in Java and requires a JRE so presumably it will run on Linux, and it is freeware.


MARS developed at Missouri State University is pretty good. I found it while watching UCB's CS61C lectures from 2014.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.