Seek it properly and offset
This commit is contained in:
parent
570e721e3e
commit
a2d8c592a7
|
@ -1,7 +1,7 @@
|
|||
local tape = peripheral.find("tape_drive")
|
||||
local mon = peripheral.find("monitor")
|
||||
|
||||
tape.seek(0)
|
||||
tape.seek(-tape.getSize())
|
||||
mon.setTextScale(1)
|
||||
|
||||
local w, h = string.byte(tape.read(2), 1, 2)
|
||||
|
@ -12,7 +12,7 @@ repeat
|
|||
local buf = string.byte(tape.read(w), 1, -1)
|
||||
local s, f, b = "", "", ""
|
||||
for x = 1, w do
|
||||
s = s .. string.char(bit32.band(0x7F, buf[x]))
|
||||
s = s .. string.char(0x80 + bit32.band(0x7F, buf[x]))
|
||||
local inv = bit32.band(0x80, buf[x])
|
||||
f = f .. (inv and "f" or "0")
|
||||
b = b .. (inv and "0" or "f")
|
||||
|
|
Loading…
Reference in New Issue