Updated for ISA changes

This commit is contained in:
Izaya 2017-02-11 19:41:22 +00:00
parent a483b1ecf0
commit 41e1c3ef74
1 changed files with 17 additions and 0 deletions

View File

@ -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")