Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Simple compiled language similar to B. With target to eZ80(Agon Light 2)

License

NotificationsYou must be signed in to change notification settings

nihirash/bsimple-ez80-compiler

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.

Documentation

Currently, we haveLearn B Simple in Y minutes page that tries cover almost all language andsimple reference manual.

Usage

For Agon computer

  • Grab latest version fromRELEASES page
  • Extract archive to root of SD card
  • Libraries will be in/BSimple/lib directory, examples in/BSimple/examples

Manual building process:

  • For building single source file callbsc <filename> it will produce file with same name but.s extension
  • Build binary usingez80asm

For example:

cd /BSimple/examplesbsc consoleez80asm console.sconsole

Using preprocessor/build tool

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

For Linux/macOS

  • Clone repository
  • Build entire project using root Makefile

It should install binary in your~/bin(or correctMakefile.cross-config file with your output path)

Development

Compiler can be built with almost any standard C compiler(for native Agon version I'm usingagondev).

Known issues

  • 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)

Support development

You can buy me coffee usingKo-Fi Page.

License

Project licensed with GNU GPLv3.


[8]ページ先頭

©2009-2025 Movatter.jp