fix braces after labels, add readme
This commit is contained in:
parent
0a9aa7a7d7
commit
7ec5152d72
@ -315,7 +315,8 @@ local function prefixCode(code, fn) -- fix strings, add line numbers
|
||||
elseif c=="\t" or c==" " then if (not lastnl) then out(" ") end
|
||||
elseif c=="\"" then state = "string" lastnl = false
|
||||
elseif c=="\\" then skipnl = true; out("\\");
|
||||
elseif c:find("^[a-zA-Z0-9_%.:%$%(%)%*,%[%]%+%-%*%/]$") then out(c); lastnl = false
|
||||
elseif c==":" then out(c); if skipnl then out("\\") else out("\n") end; lastnl = true;
|
||||
elseif c:find("^[a-zA-Z0-9_%.%$%(%)%*,%[%]%+%-%*%/]$") then out(c); lastnl = false
|
||||
elseif c=="{" then
|
||||
table.insert(bracestack, bracelabel())
|
||||
if not lastnl then out(bracestack[#bracestack].."MID") end
|
||||
|
12
readme.txt
Normal file
12
readme.txt
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
8608
|
||||
|
||||
How to use the assembler:
|
||||
1. Install bllua3 from https://notabug.org/redo/bllua3
|
||||
2. Clone this repo into the Blockland folder
|
||||
3. In BL console,
|
||||
luaexec("your_path/assembler-8608.lua");
|
||||
4. To assemble a program, place a 1x1f ghost brick on the top-left corner of the ROM, face forward, and in BL console do
|
||||
AssembleFile("other_path/filename.asm", "RomX RomY RomZ"); where RomX is the width of the ROM, RomY is the depth front to back, and RomZ is the height in bits.
|
||||
You can also run the assembler from the command line to get a memory dump and disassembly in stdout, if you have lua installed:
|
||||
luajit "your_path/assembler-8608.lua" "other_path/filename.asm"
|
Loading…
x
Reference in New Issue
Block a user