B Simple(reads like "Be Simple") is B-inspired programming language(it isn't C or B, or dialect of one of them, it's B-like language and compiler). It's general purpose typeless(everything is machine words) compiled language.
Language tries be not verbose and minimalistic but it should work fine for system software and many kinds of games.
Main target was make simple language with simple compiler that will produce code for eZ80(I think it can be retargeted to another CPUs without any issues).
Current code generator outputs assembly listing that can be built with agon-ez80-assembler which available both for PC(windows, linux and mac) and native Agon.
Currently, project have no proper documentation but we have Learn B Simple in Y minutes page that tries cover almost all language.
- Grab latest version from RELEASES page
- Extract archive to root of SD card
- Libraries will be in
/BSimple/lib
directory, examples in/BSimple/examples
- For building single source file call
bsc <filename>
it will produce file with same name but.s
extension - Build binary using ez80asm
For example:
cd /BSimple/examples
bsc console
ez80asm console.s
console
You can also create some kind of build.txt
files that will automate compilation and assembly steps.
- Clone repository
- Build entire project using root Makefile
It should install binary in your ~/bin
(or correct compiler/Makefile
file with your output path)
Compiler can be built with almost any standard C compiler(for native Agon version I'm using agondev).
- No priority in calculations
- Parenthesis not supported in expressions
- Need make optimiser(peephole?!)
- Stack allocated vars limited for 40 words(120 bytes) per function call(cause index register usage)
You can buy me coffee using Ko-Fi Page.
Project licensed with GNU GPLv3.