BIPLAN CR.1 (Bytecoded Interpreted Programming Language) is an experimental interpreted language designed for microcontrollers and real-time operating systems. Both the interpreter and the compiler fit in less than 48KB of program memory and are implemented in less than 2000 lines of code; it is significantly more compact than Wasm3, MicroPython, or Lua. By explicitly outlawing dynamic memory allocation, garbage collection, threads and speculative optimizations, BIPLAN is immune to runtime volatility, avoids a lot of architectural complexity and guarantees deterministic execution during both the compilation and interpretation phases.
| Programming language | Compiler | Interpreter | Minimum requirements |
|---|---|---|---|
| TinyBasicPlus | ❌ (interprets source) | ✅ | 11KB ROM, 1KB RAM |
| BIPLAN | âś… | âś… | 48KB ROM, 5KB RAM |
| Wasm3 | ❌ (interprets bytecode) | ✅ | 64kB ROM, 10kB RAM |
| MicroPython | âś… | âś… | 256KB ROM, 16KB RAM |
| Lua | âś… | âś… | 256KB ROM, 64kB RAM |
BIPLAN is one of the few modern programming languages that provide a compiler and an interpreter in 48KB.
BIPLAN implements the "fictional" BIP CR.1 computer architecture that operates with the BIP ASCII bytecode. It includes a serial interface, input-output ports, analog-to-digital and digital-to-analog converters, mono sound, text mode graphics, file handling and inter-process communication pipes.
In 2017 I built a couple of standalone programmable computers with a screen and a keyboard using Arduino boards to run software I could understand. I was forced to use TinyBasicPlus because it was the only interpreted language that could fit into such tight memory constraints. The result was a machine with features comparable to an IBM 5150 booted into BASIC. Looking at it I asked myself: "How can BASIC, the first attempt to popularize programming and the source of billions of lines of spaghetti code, now 57 years old, still be the only viable option?" I just needed a simple interpreted programming language implemented in C, with very few dependencies and layers of abstraction. After some experiments I decided to design and implement that myself. A programming language that is simple, portable, modern, efficient, but at the same time small enough to run even on limited micro-controllers.
The development of BIPLAN started in 2017. I wrote both the compiler and the interpreter from scratch avoiding external libraries, frameworks and the influence of compiler and interpreter design studies, learning by doing and evaluating results. In 9 years of experiments I wrote BCC, a pre-processor and a multi-pass compiler capable of syntax and lexical analysis (701 lines of code), and BIPLAN, a register-based virtual machine implemented with a recursive descent parser (874 lines of code).
Fibonacci sequence computation in 149 bytes of BIPLAN code:
print fibonacci(40)
stop
function fibonacci($a, locals: $b, $c)
$b = 1
for #r = 0 to $a
$a = $b
$b = $c
$c = $a + $b
next
return $c
doneWith the command biplan fib.biplan the program is compiled in 45 bytes of BIP bytecode:
p~$40)xf$}j}k}l)}k1@$0,}j}j}k}k}l}l}j+}k;r}ld
And then interpreted:
102334155
On my linux computer biplan interprets the program in around 34 microseconds.
The table below contains the results of the benchmarks developed to compare 20 different programs implemented in BIPLAN and Python:
| Language | Bytecode size | Compilation | Interpretation | Startup |
|---|---|---|---|---|
| BIPLAN | 1.12KB | 431.58ms | 2366.70ms | 7ms |
| Python | 8.17KB | 1631.59ms | 3172.99ms | 48ms |
BIPLAN is more efficient than Python and it is well suited for applications that require fast startup time, minimal bytecode size and low power consumption.
- Bytecode
- Configuration
- Performance
- Comments
// - Conditions
ifelseend - Constants
truefalseHIGHLOWINPUTOUTPUT - Cycles
forwhilenextbreakcontinue - Functions
functionlocalsreturn - Macros
macro - Numeric variables
$$[] - Operators
+-*/%==!=>>=<<=&&||&|^>><<++--~not - Strings
::[] - System functions
adc readargscharcursordelayfile closefile openfile readfile writeincludeindexinputio openio readio writememmillisnumbernumericprintrandomrestartserial openserial readserial writesizestopstring - Unary operators
++--
To build BIPLAN you only need g++, the standard library requires also curl and jq:
sudo apt-get install jq
sudo apt-get install curl
sudo apt-get install g++
Once done see:
Considering that the entire interpreter and compiler source code is very compact, LLMs can generally store the entire toolchain in their context window, for this reason AI models perform exceptionally well when generating, debugging, porting or optimizing BIPLAN's source code. The AGENTS.md file contains my personal configuration for this workflow.
Feel free to send a pull request sharing something you have made that could help, if you want to support this project you can also try to solve an issue. AI-generated slop will not be reviewed: contributions to this project are evaluated only if well detailed, throughly designed, minimalistic and efficient. Thanks to support, expertise, kindness and talent of the following contributors, BIPLAN has been strongly tested, enhanced and verified:
The license grants permission to use, copy, modify, merge, publish and distribute BIPLAN, only to individuals, for experimental purposes. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. You are solely responsible for using, copying, modifying, merging, publishing or redistributing BIPLAN and assume any risks associated with your exercise of permissions under this License:
Definitions.
"You" (or "Your") shall mean an individual, human, exercising
permissions granted by this License.
"Software" shall mean the source code, associated documentation
and configuration files included in the BIPLAN directory.
"License" shall mean the conditions for use, copy, modify, merge, publish or
distribute the Software as defined by Section 1 through 3 of this document.
BIPLAN Experimenter's License
Copyright 2026 Giovanni Blu Mitolo
Permission is hereby granted to You, free of charge, the rights to use, copy,
modify, merge, publish or distribute copies of the Software, subject to the
following conditions:
1. Use, copy, modify, merge, publish or distribute the Software only for
non-commercial, experimental or educational purposes.
2. Companies, institutions, organizations and corporations don't have the right
to use, copy, modify, merge, publish or distribute the Software.
3. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
YOU ARE SOLELY RESPONSIBLE FOR USING, COPYING, MODIFYING, MERGING, PUBLISHING
OR REDISTRIBUTING THE SOFTWARE AND ASSUME ANY RISKS ASSOCIATED WITH YOUR
EXERCISE OF PERMISSIONS UNDER THIS LICENSE.
Commercial Licensing Notice
Companies, corporations, and institutions interested in obtaining a commercial or
institutional license may submit an official inquiry directly to the author
via email at [email protected]
The version name CR.1 was chosen to honour the italian FIAT CR.1 biplane fighter aircraft. It was designed by Celestino Rosatelli, from whom it gained the 'CR' designation. The CR.1 was a Sesquiplane of Wood-and-fabric construction.