--Alle Rechte an SimSoft 3 sind "SimlorLP" (oder in Minecraft auch nur "Simlor") vorbehalten.
os.pullEvent = os.pullEventRaw

if peripheral.getType("front") == "monitor" then
 bildausgabeSystem = "front"

elseif peripheral.getType("left") == "monitor" then
 bildausgabeSystem = "left"

elseif peripheral.getType("right") == "monitor" then
 bildausgabeSystem = "right"

elseif peripheral.getType("top") == "monitor" then
 bildausgabeSystem = "top"

elseif peripheral.getType("bottom") == "monitor" then
 bildausgabeSystem = "bottom"
 
elseif peripheral.getType("back") == "monitor" then
 bildausgabeSystem = "back"

else
 bildausgabeSystem = "normal"
 
end

if bildausgabeSystem == "normal" then
else
 term.setTextColor(1)
 term.setBackgroundColor(32768)
 term.clear()
 term.setCursorPos(1,1)
 print("Boot SimSoft on monitor ("..bildausgabeSystem..")?")
 print(" yes [y] - no [n]")
 print("")
 
 write("y/n > ")
 st = read()
 
 if st == "y" or st == "yes" then
 elseif st == "n" or st == "no" then
  bildausgabeSystem = "normal"
 else
  os.reboot()
 end
end

function SystemS()
 if bildausgabeSystem == "normal" then
  shell.run("SimSoft/System/SystemStart")
 else
  shell.run("monitor "..bildausgabeSystem.." SimSoft/System/SystemStart")
 end
 os.reboot()
end


--LiveSystem
function LiveSystem()
 shell.run("SimSoft/System/LiveSystem")
end
--LiveSystem end


--System Start
parallel.waitForAll(SystemS, LiveSystem)