Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function load(filename)
- local File = io.open(filename,"r")
- local data = File:read(("*all"))
- File:close()
- content = {}
- for i=1,#data do
- table.insert(content, string.byte(data[i]))
- end
- return content
- end
- ROMFN = "/path/to/file.bin"
- ROM = load(ROMFN)
- local data = ""
- for i=1,#ROM do
- data = data..ROM[i].." "
- end
- data = data.."\n"
- for i=1,#ROM do
- data = data..string.char(ROM[i]).." "
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement