36 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
## Welcome to BrainAssembly!
 | 
						|
 | 
						|
BrainAssembly is a language that compiles to Brainfuck. Similar to Assembly languages, it has simple syntax, and is designed to make Brainfuck easier to write code for. Heavily inspired by Ground. Enjoy!
 | 
						|
 | 
						|
## Features
 | 
						|
 | 
						|
- Simple syntax: The language is designed to be very simple, and a framework for larger projects. This also means that the syntax is quite easy to learn.
 | 
						|
 | 
						|
**NOTE:** Due to the current lack of optimisation in the compiled code, we recommend an optimising intepreter such as [this one](https://copy.sh/brainfuck).
 | 
						|
 | 
						|
To run:
 | 
						|
 | 
						|
- First clone this repository and install python.
 | 
						|
```
 | 
						|
git clone https://chookspace.com/DiamondNether90/BrainAssembly
 | 
						|
```
 | 
						|
 | 
						|
- Next, run the following command to compile a .basm file to Brainfuck:
 | 
						|
```bash
 | 
						|
python3 src/main.py path/to/file.basm path/to/file.bf
 | 
						|
```
 | 
						|
 | 
						|
(Replace path/to/file.basm with the actual path to your desired .basm file, and replace path/to/file.bf with where you want the compiled file to be created.)
 | 
						|
 | 
						|
This will create or replace the contents of path/to/file.bf with the compiled BrainAssembly code.
 | 
						|
 | 
						|
## Test the compiler with our in-built test programs!
 | 
						|
 | 
						|
You can access our test programs in the test folder.
 | 
						|
 | 
						|
Example:
 | 
						|
```bash
 | 
						|
python src/main.py tests/create.basm test.bf
 | 
						|
```
 | 
						|
 | 
						|
This will create a Brainfuck file named test.bf that contains the compiled code of the 'create' test program. |