Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qiu233/minduscript
A compiler of a designed language for mindustry's processors.
https://github.com/qiu233/minduscript
compiler mindustry processor script
Last synced: 23 days ago
JSON representation
A compiler of a designed language for mindustry's processors.
- Host: GitHub
- URL: https://github.com/qiu233/minduscript
- Owner: Qiu233
- Created: 2021-05-27T14:51:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-13T01:49:22.000Z (over 2 years ago)
- Last Synced: 2023-08-28T09:58:46.112Z (over 1 year ago)
- Topics: compiler, mindustry, processor, script
- Language: C#
- Homepage:
- Size: 170 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Minduscript
Minduscript is a structured programming language, which can be compiled into Mindustry processor assembly code.# How to compile Minduscript
For example, to compile file test.ms, run bat command:
```bat
Minduscript.exe -i test.ms -o test.asm
```
Then the test.ms file will be compiled into test.asm, after which you can copy the content of test.asm into a mindustry processor.
Run Minduscript.exe without arguments to show the help.# Overview
As you will see, Minduscript code looks like js.
But the main difference is that Minduscript's function does not support recursive calling.
Here's an example of minduscript:```js
assembly test; ? declare the assembly namefunction main() ? the entry function
{
using bank1,display1; ? using outer component from game
var n=50; ? local variable
bank1[1]=1; ? accessing memory component
bank1[2]=1;
for(var i=3;i<=n;i=i+1) ? for loop
{
bank1[i]=bank1[i-1]+bank1[i-2];
}
# print bank1[n] # ? inline asm code
# printflush display1 #
}
```