Код:
local w = 0.125
local lf = 10
local cr = 13
function k(ch, w) emu.keypost(ch) emu.wait(w) end
-- read memory
k('/', w)
k('^', w)
-- write memory
k(utf8.char(lf), w)
k('1', w)
k('7', w)
k('7', w)
k('7', w)
k('7', w)
k('7', w)
k(utf8.char(cr), w+w)
-- verify memory
k('/', w)
-- read registers
k('R', w)
k('0', w)
k('/', w)
k(utf8.char(lf), w)
k(utf8.char(lf), w)
k(utf8.char(lf), w)
k(utf8.char(lf), w)
k(utf8.char(lf), w)
k(utf8.char(lf), w)
k(utf8.char(lf), w)
k('R', w)
k('S', w)
k('/', w)
k(utf8.char(cr), w+w)
-- check halt reason
k('M', w+w)
manager:machine().screens[":rs232:terminal:terminal_screen"]:snapshot("regtest/ms1201/t1.png")
print ("")
emu.exit()