Skip to content
Boris Resnick edited this page Jul 20, 2024 · 7 revisions

SEMU - Slow Emulator

A toy 32-bit von Neumann machine emulator for experimental and educational uses.

Quick Start

Python 3 (tested with 3.12) is required. The project uses rye to manage dependencies. Run rye sync to prepare a virtual environment.

To compile the basic example memory image from the assembly run (assuming the project's root directory):

.\examples\twothreads\Make.ps1

Start emulation with:

python .\src\semu\runtime\emulator.py .\roms\twothreads.bin

This example starts with a micro-kernel and two user threads. One thread prints 'First' to a serial peripheral device, and another one prints 'Second'.

python src/semu.py roms/twothreads.bin

Start emulated serial device monitor in a separate shell. NB: The device emulator sends data to the monitor using UDP.

python .\src\semu\tools\semuser.py

You should see the "First"/"Second" string output in a monitor shell. Also note the 'SystemTimer' messages in the main shell, which designates system timer ticks.

Clone this wiki locally