-
Notifications
You must be signed in to change notification settings - Fork 0
Create an OS
C#&Lua edited this page Oct 21, 2018
·
2 revisions
Creating an OS is simple
First create your OSMain.bsh file, it will be executed on startup
Then create your void Main() method, This will be ran when the OS boots
Your code should now look like this:
void Main() {
}
After that is done you might want it to actually do something
Lets add another method defined as void LineEntered(String str)
Now your code should look like this:
void Main() {
}
void LineEntered(String str) {
}
Now all we have to do is do some optional parsing and respond with TermWrite
In this case, I will choose to split the string
void Main() {
}
void LineEntered(String str) {
String[] spl = str.split(" ");
if (spl[0].equals("echo")) {
TermWrite(spl[1]);
return;
}
TermWrite("Oops! I dont understand that!");
}
For now that is the most you can do.