Try it!
- Compiler: https://yangfl.github.io/minasm/
- image2logic: https://yangfl.github.io/minasm/image2logic.html
Assembly-like language that compiled to Mindustry Logic Language, inspired by https://pypi.org/project/MindustryCompiler/.
- superset of Mindustry Logic Language, any Logic code is valid here!
- line-based macro language
- control flow
- comments
- easy-to-understand compiler
You write.. | It translates... |
---|---|
a = 1 |
set a 1 |
a += 1 |
op add a a 1 |
a = b * c |
op mul a b c |
a = b.c |
sensor a b c |
a = %c |
getlink a c |
a = cell1[0] |
read a cell1 0 |
cell1[0] = a |
write a cell1 0 |
ucontrol boost 1 |
ucontrol boost 1 0 0 0 0 |
jump 0 |
jump 0 always x false |
end 1 < 1 |
jump 0 lessThan 1 1 |
.if a == 1 |
0: jump 3 notEqual a 1 # .if a == 1 |
.label start |
0: ... |
.while a == 1 |
0: jump 6 notEqual a 1 # .while a == 1 |
.do |
0: ... |
.do |
0: ... |