Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hornc/brainm68k
Utilities for working with the original Amiga 1993 bfc release. In bf.
https://github.com/hornc/brainm68k
amiga bf m68k
Last synced: about 2 months ago
JSON representation
Utilities for working with the original Amiga 1993 bfc release. In bf.
- Host: GitHub
- URL: https://github.com/hornc/brainm68k
- Owner: hornc
- Created: 2023-02-19T03:48:52.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-03T09:18:07.000Z (about 1 year ago)
- Last Synced: 2024-04-14T12:46:03.034Z (9 months ago)
- Topics: amiga, bf, m68k
- Language: Brainfuck
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# brainm68k
[![bf tests](https://github.com/hornc/brainm68k/actions/workflows/bf_tests.yml/badge.svg)](https://github.com/hornc/brainm68k/actions/workflows/bf_tests.yml)
In 1993 Urban Müller invented a Turing tarpit programming language for which he created a tiny 240 byte compiler for the Amiga.
This repo collects some basic utilities, written in bf, for working with the original `bfc` compiler and its compiled output.
* [m68kd.bf](m68kd.bf) decompiler: Takes an AmigaOS 2.0 executable generated by Urban Müller's original 240 byte bf compiler `bfc` and decompiles it back into bf source.
* [gengen.bf](gengen.bf) generator: Takes a text (NULL terminated binary) or AmigaOS 2.0 executable file as input and outputs bf code to reproduce those bytes as output.
* [gen_bfc.bf](gen_bfc.bf) `bfc` generator: Generated by `gengen.bf`. Outputs the `bfc` compiler AmigaOS executable. It compiles to 41,120 bytes using `bfc`, which is greater than its 32K `CODSIZE` limit and therefore overlaps the memory tape. The `gengen.bf` algorithm aligns it so the single utilised memory cell falls on an already NULL byte, which doesn't cause the program to crash despite the instruction pointer having to cross the tape and adjacent cells to read the full program.Assumes 8-bit wrapping cells. Tested using Urban Müller's 240 byte bf compiler `bfc` running under [vamos](https://github.com/cnvogelg/amitools/blob/master/docs/vamos.md) (virtual AmigaOS runtime) on Linux.
### Testing
Another feature of this repo is its AmiNet and bf CI [github workflow](.github/workflows/bf_tests.yml).To test functionality, the workflow downloads `bfc` from ***AmiNet*** (it's still there!), and uses that in conjunction with the [vamos](https://github.com/cnvogelg/amitools/blob/master/docs/vamos.md) Amiga emulator to compile and run bf code and check the results are as expected.
### External resources
* [Original AmiNet bf distribution.](https://aminet.net/package/dev/lang/brainfuck-2)
* [AmiTools](https://github.com/cnvogelg/amitools), Python based tools for running AmigaOS executables on other platforms.