working on require needs to be done before EOW

This commit is contained in:
2025-11-10 09:50:32 -05:00
parent fdb67d9afb
commit b288bb3cae
124 changed files with 9828 additions and 1 deletions

17
src/disks/45h/bin_/debug Normal file
View File

@@ -0,0 +1,17 @@
local args={...}
local term=component.getFirst("screen")
local hpv=require("hypervisor")
local fs=require("filesystem")
if not (fs.exists("/bin/"..args[1]) and (not fs.isDir("/bin/"..args[1]))) then error("not a file") end
local handle = hpv.createProcessFromFile("/bin/"..args[1], args[1], table.unpack(args, 2))
local pid=handle.getID()
local debugger=hpv.attachDebugger(handle)
debugger.addEvent("threadReturn", function(...)
term.print("threadReturn", ...)
end)
debugger.addEvent("threadError", function(...)
term.print("threadError", ...)
end)
while hpv.isrunning(pid) do
sleep(0.5)
end