Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,15 @@
vmz.dism = function(self)
local mnem, imax = { [0]="NOP", "LDA", "STA", "ADD", "SUB", "BRZ", "JMP", "STP" }
for pc = 31,0,-1 do imax=pc if self.mem[pc]~=0 then break end end
local result, pretty = "", " %3s %2d\n"
for i = 0, imax do
local oper, addr = self.b2oa(self.mem[i])
result = result .. pretty:format(mnem[oper], addr)
end
return result
end
vmz:boot():load({[0]=44,106,76,43,141,75,168,192,44,224,8,7,0,1})
print("Disassembly of 7 x 8 (PRE-RUN):")
print(vmz:dism())
print("Disassembly of 7 x 8 (POST-RUN):")
print(vmz:exec():dism())