๐Ÿ“ฆ danielfspencer / b4c

Stand-alone compiler for Blizzard 4, a 16-bit computer.

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching โš–๏ธ GNU General Public License v3.0
๐Ÿ“ฅ Clone https://github.com/danielfspencer/b4c.git
HTTPS git clone https://github.com/danielfspencer/b4c.git
SSH git clone git@github.com:danielfspencer/b4c.git
CLI gh repo clone danielfspencer/b4c
Daniel Spencer Daniel Spencer Merge branch 'dev' ac76873 1 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ assembler
๐Ÿ“ compiler
๐Ÿ“ modules
๐Ÿ“„ .gitignore
๐Ÿ“„ b4c.js
๐Ÿ“„ LICENSE.md
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ README.md

b4c

Standalone compiler and assembler for Blizzard 4. The compiler and the assembler are taken directly from the corresponding version of the GUI toolchain app. Both projects use the same version numbers.

Usage: b4c [options] <file>

Options:
  -V, --version           output the version number
  -o --output <filename>  output filename
  -c --compile            compile the input file
  -a --assemble           assemble the input file
  -v --verbose            print debugging messages
  -d --dump               dump the compiler's AST to ast.json
  -q --quiet              only print error messages
  -h, --help              display help for command
  If neither -c nor -a is specified then the input
  file's extension determines the mode

  - Compile program.b4 into program.asm
  $ b4c program.b4

  - Compile then assemble program.b4 into program.bin
  $ b4c -ca program.b4

  - Assemble program.asm into program.bin
  $ b4c program.asm

Prebuilt Binaries

https://github.com/danielfspencer/b4c/releases/latest

Source Code

To get the source for the latest released version, type:

git clone https://github.com/danielfspencer/b4c

Install the libraries required with:

cd b4c
npm install

Run directly from source with:

node b4c.js

Or, build a binary for your OS. The generated executable is found in the ``dist/`` folder.

npm run dist

If you are running Linux, you can then install the binary for user-wide use with:

cp dist/b4c ~/.local/bin

You can then invoke the compiler by typing

b4c
anywhere.