mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 15:04:03 +09:00
making bootloader to load the dos kernel to run a shell
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
// Boot script
|
||||
// define TVDOS
|
||||
var _TVDOS = {};
|
||||
_TVDOS.VERSION = "1.0";
|
||||
_TVDOS.DRIVES = {}; // Object where key-value pair is <drive-letter> : [serial-port, drive-number]
|
||||
// actually figure out the drive letter association
|
||||
// Drive A is always the device we're currently on
|
||||
_TVDOS.DRIVES["A"] = _BIOS.FIRST_BOOTABLE_PORT;
|
||||
|
||||
//TODO
|
||||
|
||||
|
||||
Object.freeze(_TVDOS);
|
||||
@@ -53,4 +53,16 @@ filesystem.readAll = function(driveLetter) {
|
||||
}
|
||||
return com.pullMessage(port[0]);
|
||||
};
|
||||
Object.freeze(filesystem);
|
||||
Object.freeze(filesystem);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// install other stuffs
|
||||
filesystem.open("A", "tvdos/gl.js", "R");
|
||||
var GL = eval(filesystem.readAll("A"));
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Boot script
|
||||
filesystem.open("A", "tvdos/command.js", "R");
|
||||
eval(filesystem.readAll("A"));
|
||||
|
||||
@@ -7,11 +7,11 @@ const welcome_text = "TSVM Disk Operating System, version " + _TVDOS.VERSION;
|
||||
function print_prompt_text() {
|
||||
// oh-my-zsh-like prompt
|
||||
con.color_pair(239,161);
|
||||
print(" "+CURRENT_DRIVE);
|
||||
print(" "+CURRENT_DRIVE+":");
|
||||
con.color_pair(161,253);
|
||||
con.addch(16);
|
||||
con.color_pair(0,253);
|
||||
print("\\"+shell_pwd.join("\\"));
|
||||
print(" \\"+shell_pwd.join("\\")+" ");
|
||||
con.color_pair(253,255);
|
||||
con.addch(16);
|
||||
con.addch(32);
|
||||
|
||||
@@ -101,4 +101,4 @@ GL.drawSpriteOver = function(sheet, xi, yi, x, y) {
|
||||
}
|
||||
};
|
||||
|
||||
Object.freeze(GL);
|
||||
Object.freeze(GL); // this returns frozen 'GL'
|
||||
|
||||
Reference in New Issue
Block a user