8bit breadboard computer simulator

This is an assembler + simulator/emulator of Ben Eater’s 8bit breadboard computer.

For a version with its RAM upgraded to 256 bytes following the instructions by /u/MironV, see, see the ext_memory branch of this repo.

Screenshot of the simulator in action


Either clone the respository, or download the code. On windows, you’ll also need the windows-curses package to display the user interface (on other platforms, curses is included in the standard lib).


Write your test program in assembler and run it through the simulator.

python simulator.py test.asm

If you want a closer look at the assembler output:

python assembler.py test.asm

Programming the computer using assembly language

Supported assembler instructions:

nop     No operation
lda #   Load memory contents at # into register A
add #   Add memory contents at # to register A
sub #   Subtract memory contents at # from register A
sta #   Store contents of register A at memory location #
ldi #   Load the value # into register A
jmp #   Jump to memory location #
jc #    Jump to memory location # if the carry flag is set
jz #    Jump to memory location # if the zero flag is set
out     Output contents of register A
hlt     Halt the CPU, end of program

The assembler also supports writing raw values with db and labels:

; Test program that adds two numbers
	lda a
	add b

	db 28
	db 14


View Github