Updated for ISA changes
This commit is contained in:
parent
a483b1ecf0
commit
41e1c3ef74
17
sasm.lua
17
sasm.lua
@ -18,6 +18,23 @@ insc.sub = 4090
|
||||
insc.jmp = 4089
|
||||
insc.sez = 4088
|
||||
|
||||
local f=io.open("ins.def","rb")
|
||||
local c = "";
|
||||
if f then
|
||||
c=f:read("*a")
|
||||
f:close()
|
||||
insd,insc = {}, {}
|
||||
for l in c:gmatch("(.+)\n") do
|
||||
lt = {}
|
||||
for w in l:gmatch("%S+") do table.insert(lt,w) end
|
||||
insc[lt[2]] = tonumber(lt[1])
|
||||
insd[tonumber(lt[1])] = lt[2]
|
||||
end
|
||||
end
|
||||
|
||||
if not tArgs[2] then
|
||||
error("requires a file argument and a compile/decompile flag")
|
||||
end
|
||||
f = io.open(tArgs[2],"rb")
|
||||
if not f then error("file inaccessable") end
|
||||
c = f:read("*a")
|
||||
|
Loading…
Reference in New Issue
Block a user