- Notifications
You must be signed in to change notification settings - Fork1
Simple compiled language similar to B. With target to eZ80(Agon Light 2)
License
nihirash/bsimple-ez80-compiler
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 withagon-ez80-assembler which available both for PC(windows, linux and mac) and native Agon.
Currently, we haveLearn B Simple in Y minutes page that tries cover almost all language andsimple reference manual.
- Grab latest version fromRELEASES 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 usingez80asm
For example:
cd /BSimple/examplesbsc consoleez80asm console.sconsole
For building source file callbs <filename>
- it will build concatenated sources into single file, callbsc
compiler andez80asm
assembler - so you'll can get single binary just in one call
For example:
bs consoleconsole
- Clone repository
- Build entire project using root Makefile
It should install binary in your~/bin
(or correctMakefile.cross-config
file with your output path)
Compiler can be built with almost any standard C compiler(for native Agon version I'm usingagondev).
- 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 usingKo-Fi Page.
Project licensed with GNU GPLv3.
About
Simple compiled language similar to B. With target to eZ80(Agon Light 2)