tvdos: concurrency and VT

This commit is contained in:
minjaesong
2026-06-03 20:49:59 +09:00
parent dad345c027
commit a9d095e3cb
6 changed files with 743 additions and 22 deletions

View File

@@ -1471,9 +1471,17 @@ try {
serial.println("Warning: Could not load HSDPA driver: " + e.message)
}
// Boot script
serial.println(`TVDOS.SYS initialised on VM ${sys.getVmId()}, running boot script...`);
// Boot script. When vtmgr re-evaluates TVDOS.SYS inside a per-VT pane
// context, the pane already has a SKIP flag set so we don't recursively
// kick off AUTOEXEC.BAT (which would itself invoke command -fancy and
// nest a shell underneath vtmgr).
if (typeof _TVDOS_SKIP_AUTOEXEC === "undefined" || !_TVDOS_SKIP_AUTOEXEC) {
serial.println(`TVDOS.SYS initialised on VM ${sys.getVmId()}, running boot script...`);
let cmdfile = files.open("A:/tvdos/bin/command.js")
eval(`var _AUTOEXEC=function(exec_args){${cmdfile.sread()}\n};` +
`_AUTOEXEC`)(["", "-c", "\\AUTOEXEC.BAT"])
let cmdfile = files.open("A:/tvdos/bin/command.js")
eval(`var _AUTOEXEC=function(exec_args){${cmdfile.sread()}\n};` +
`_AUTOEXEC`)(["", "-c", "\\AUTOEXEC.BAT"])
}
else {
serial.println(`TVDOS.SYS re-initialised in VT pane on VM ${sys.getVmId()}`);
}