Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksBuild a CPUToolsOpen the lab →

Pep/9 alternative: from Warford's virtual machine to a CPU you build

Pep/9 is the virtual computer, assembler and simulator that accompany Computer Systems by J. Stanley Warford (fifth edition). Its README describes a 16-bit complex instruction set computer (CISC) designed to teach computer architecture and assembly language: instructions are one byte (unary) or three bytes, with an expanding opcode, eight addressing modes and eight dot commands meant to map cleanly from C and C++. The assembler has an integrated editor, puts error messages in red right in the source, and shows the object code in hexadecimal; the simulator runs a small operating system from simulated ROM with a loader and trap handlers, and its debugger offers breakpoints, single stepping and CPU and memory tracing. Pep/9 teaches the machine level of Warford's book; digiwleea goes one level lower and has you build a CPU from gates.

What Pep/9 is good at

Learning how high-level code maps to assembly and machine code on a carefully designed teaching machine: addressing modes, the stack, traps and a real (small) operating system, all traceable instruction by instruction. If your course uses Warford's Computer Systems, it is the matching tool. (digiwleea is an independent project, not affiliated with Pep/9 or its author.)

How digiwleea is different

digiwleea does not run Pep/9 programs. It covers the hardware level below: in the browser you build NOT and NAND from CMOS transistors, then adders, an ALU, registers, RAM, a program counter and a control unit, through a 40+ level course where every part is checked against its truth table, with an AI tutor (Wleea). The CPU you finish with is a far simpler 8-bit accumulator machine whose capstone runs a stored LOAD, ADD, STORE, HALT program. What you gain is the circuit view of what Pep/9's registers, ALU and instruction decoding are made of.

Pep/9digiwleea
FocusAssembly, machine code and a small OS on Pep/9Digital logic from transistors to a simple CPU
The CPUGiven: a 16-bit CISC with 8 addressing modesBuilt by you: an 8-bit accumulator machine
DebuggingBreakpoints, single step, CPU and memory tracingProbe any wire, step the clock, truth-table checks
Made forWarford's Computer Systems (5th edition)A self-paced browser course
PriceSource code on GitHubFree lab and Act I; Premium for the full course

No sign-up is needed to start: open the lab and place your first transistor, or read the free theory course. The account (and the AI tutor) are optional.

More comparisons: CPU and assembly simulators

See for yourself: build a logic gate from transistors in the simulator, then follow the path from sand to an 8-bit CPU.

Open the digiwleea lab →

Frequently asked

What is Pep/9?

Pep/9 is a 16-bit CISC teaching computer with an assembler and simulator, written for J. Stanley Warford's textbook Computer Systems (fifth edition). It has eight addressing modes, one- and three-byte instructions and a small operating system in simulated ROM.

What can the Pep/9 debugger do?

Set breakpoints, single-step, and trace the CPU and memory, for an application, the loader or the operating system, and recover from endless loops.

Can I build a CPU like Pep/9 myself?

Not that CPU, but digiwleea's browser course has you build a smaller 8-bit CPU from transistors up: gates, adders, ALU, registers, RAM, a program counter and a control unit.