This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
zguystudios's profile picture

Z-Boot (A bootloader for multiple OSes) Now with 99% More Bug Fixes

Started by zguystudios, 27 November 2015 - 01:54 AM
zguystudios #1
Posted 27 November 2015 - 02:54 AM
Zed Software Industries presents:
Z-Boot 1.01.000
This software is revolutionary in design, and includes the ability to allow you to install multiple OSes. The technology behind it is simple, and it will be easy for future developers to implement ZedLoader capability into their project.
If you wish to acquire Z-Boot, execute the following:


pastebin get iXXH4NfG startup


Changes:
Updated ZedLoader to 1.03.0005
Fixes:
OSes Loading incorrectly (program not found errors)
Incorrect use of global variables (Thanks for the tip, H4X0RZ!)

As with all software, there will be bugs. If you encounter one, please let me know via a PM.


Known Bugs:

Spoilerprogram crashes if you select a number higher than the os count (Confirmed Nov 26,2015)

To-Do:
SpoilerSquash Known Bugs (still not done)
Implement OS Loading support from disks

For Developers:
SpoilerThe api to get the ZedLoader to recognize your OS is easy. Your OS must be in a folder, and your OS must contain a file named zedinit. The format of the 'zedinit' file is:
Line 1: OS Name
Line 2: /path/to/operatingsystem/
Line 3: startup file name
Example:

TestOS
/OSTest/
startup
Other than that, program it normally (unless, that includes overriding the startup file in the very root directory.) A startup file is mandatory too, as Zedloader will invoke it.

Distribution and modification Policy:
You may do whatever with the code as long as you provide attribution to me, and link them to my original code.
If you have comments or suggestions, leave them below.
Edited on 30 November 2015 - 01:42 AM
Creator #2
Posted 27 November 2015 - 07:58 AM
Can't you have the path to the file of the OS in the second line? That would make more sense.
H4X0RZ #3
Posted 27 November 2015 - 05:08 PM
Interesting!

Although I have some improvements for you:
  1. Please use local variables. This way you won't mess with the global environment and the program will run faster
  2. you should reorganize it. especially the loados() function. It will try to use "x" which isn't even defined. It only works because undefined variables default to global lookups and later x is set to something (in the global env).
Lyqyd #4
Posted 27 November 2015 - 07:15 PM
Moved to Programs.
zguystudios #5
Posted 28 November 2015 - 12:32 AM
Interesting!

Although I have some improvements for you:
  1. Please use local variables. This way you won't mess with the global environment and the program will run faster
  2. you should reorganize it. especially the loados() function. It will try to use "x" which isn't even defined. It only works because undefined variables default to global lookups and later x is set to something (in the global env).
I'll make note of this. Thanks!

Can't you have the path to the file of the OS in the second line? That would make more sense.
Why, that's a brilliant idea. I'll change the code shortly.
Edited on 27 November 2015 - 11:54 PM