Niblick

Niblick compiles a C-like language to the 12-bit instruction set of the Hackaday Supercon.6 2022 (Voja4) badge. The compiler emits assembly and a .hex image, and includes a headless emulator for tests.

The target has 4-bit data, 4096 12-bit code words, 256 nibbles of data RAM, 10 general registers, a five-entry hardware call stack, an 8x16 LED matrix, and a 9600 8N1 UART. See Voja4 Instruction Set Reference for the machine model.

Documentation

Section

Contents

Installation

Install the compiler, compile a program, and run it in the emulator

Language

Syntax, types, expressions, statements, functions, structs, imports, and limitations

Standard library

Intrinsics, formatting, and the public modules under lib/

Emulator

Emulator, diagnostics, debugger, VS Code extension, and web editor

Compiler internals

Compiler pipeline, runtime ABI, instruction set, memory map, and numeric helpers

Repository layout

Repository layout, contributing, tests, release process, and documentation style