mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
21 lines
488 B
JavaScript
21 lines
488 B
JavaScript
const fullFilePath = _G.shell.resolvePathInput(exec_args[1])
|
|
|
|
let seqread = undefined
|
|
let fullFilePathStr = fullFilePath.full
|
|
let mode = ""
|
|
|
|
// Select seqread driver to use
|
|
if (fullFilePathStr.startsWith('$:/TAPE') || fullFilePathStr.startsWith('$:\\TAPE')) {
|
|
seqread = require("seqreadtape")
|
|
seqread.prepare(fullFilePathStr)
|
|
seqread.seek(0)
|
|
mode = "tape"
|
|
} else {
|
|
seqread = undefined
|
|
}
|
|
|
|
|
|
if ("tape" == mode) {
|
|
const prg = seqread.readString(65536)
|
|
eval(prg)
|
|
} |