LazerAio

.bios.lua

Mar 1st, 2022 (edited)
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. function BIOS_BOOT()
  2. textutils.slowPrint("Please wait...")
  3. term.setBackgroundColor( colors.blue )
  4. term.clear()
  5. term.setCursorPos(1,1)
  6. ERR = false
  7. print("AiOs BIOS")
  8. if fs.exists("disk/") then
  9. if fs.exists("disk/init") then
  10. print("Disk found with format")
  11. else
  12. print("CAUTION: NON SYSTEM DISK FOUND!")
  13. ERR = true
  14. end
  15. end
  16. print("Press enter to start boot sequance")
  17. function BIOS_STARTUP()
  18. print("Please wait..")
  19. term.setBackgroundColor( colors.gray )
  20. term.clear()
  21. term.setCursorPos(1,1)
  22. print("OK")
  23. print("Starting")
  24. sleep(1)
  25. if fs.exists(".os") then
  26. shell.run(".os")
  27. elseif fs.exists(".os.lua") then
  28. shell.run(".os.lua")
  29. elseif fs.exists("init.lua") then
  30. print("LEGACY INIT FOUND")
  31. print("Waiting 5 seconds then running")
  32. sleep(5)
  33. shell.run("init.lua")
  34. else
  35. textutils.slowPrint("No OS found!")
  36. print("Reboot? [Y/N]")
  37. if read() == "Y" then
  38. os.reboot()
  39. end
  40. end
  41. end
  42. print("Enter = Boot | AnyOtherInput = Escape")
  43. if ERR == true then
  44. if read() == "" or read() == " " then
  45. xpcall(BIOS_STARTUP())
  46. else
  47. print("Rebooting")
  48. os.reboot()
  49. end
  50. else
  51. xpcall(BIOS_STARTUP())
  52. end
  53. end
  54. term.setBackgroundColor( colors.blue )
  55. term.setCursorPos(1,1)
  56. term.clear()
  57. print("If you see this an error ocurred")
  58. print("----DO NOT PANIC---")
  59. print("Count to 3 then reboot")
  60. sleep(1)
  61. xpcall(BIOS_BOOT())
  62.  
Add Comment
Please, Sign In to add comment