This project implements Conway's Game of Life on an 8x8 grid, written in RISC-V assembly. The simulation runs in a terminal emulator that supports VT100 escape codes, animating the evolution of the grid in real time.
- 8x8 grid with a glider pattern as the initial state
- True Conway's Game of Life rules (birth, survival, death)
- Uses VT100 escape codes to animate the grid in-place
- Adjustable delay for animation speed
- No dependencies beyond a RISC-V simulator (e.g., spike, QEMU)
conway.S— Main source file with the Game of Life logic and animation loopMakefile— Build and run targets for your RISC-V toolchain
- The program prints an intro and saves the cursor position.
- It repeatedly restores the cursor, prints the current grid, waits, computes the next generation, and repeats.
- The grid is updated in-place using a temporary buffer for the next generation.
- The animation continues indefinitely.
The Makefile expects you to tell it which assembly file to build via FILE=<source.s>.
- Build (example uses the main program):
make FILE=conway.S
- Run with spike:
make run FILE=conway.S
- View a disassembly in
less:make dump FILE=conway.S
- Clean generated artifacts for that file:
make clean FILE=conway.S
Swap conway.S for any other .s/.S file you want to assemble (e.g., grid.s, invert.s). Override the toolchain prefix if needed, e.g. make RISCV_PREFIX=riscv64-linux-gnu FILE=conway.S.
- Initial Pattern: Edit the
gridin the.datasection ofconway.S. - Animation Speed: Change the
DELAY_CYCLESconstant inconway.S.
- RISC-V toolchain (assembler, linker, and simulator)
- Terminal emulator with VT100 support (for cursor movement)
MIT License. See LICENSE file if present.
Inspired by classic cellular automata and low-level programming fun!