hack emulator
A nand2tetris Hack computer running in the browser.
Interactive demo โ jsr
The Hack computer is a 16-bit machine designed for the nand2tetris course. It has a CPU, ROM, RAM, a memory-mapped 512ร256 monochrome screen, and a keyboard. Programs are written in Hack assembly and compiled to binary .hack files โ one 16-bit instruction per line. This emulator runs those binaries directly in the browser using a high-performance CPU simulation built with @r2/hack-emulator.
// programs
life.hackConway's Game of Life โ a cellular automaton where cells live, die, or reproduce based on their neighbours.
lol.hackFills the entire screen with a repeating pattern, demonstrating memory-mapped I/O.
pixel.hackDraws a single pixel to the screen โ the simplest possible graphical program.