shell for the portable wip

This commit is contained in:
minjaesong
2021-04-05 20:49:32 +09:00
parent 38b4566489
commit c020b60fc2
3 changed files with 24 additions and 2 deletions

View File

@@ -4,4 +4,4 @@ rem put set-xxx commands here:
set PATH=\tvdos\tuidev;$PATH
rem this line specifies which shell to be presented after the boot precess:
command
command /fancy

View File

@@ -12,7 +12,8 @@ let errorlevel = 0;
const termWidth = con.getmaxyx()[1];
const termHeight = con.getmaxyx()[0];
const welcome_text = "TSVM Disk Operating System, version " + _TVDOS.VERSION;
const welcome_text = (termWidth > 40) ? "TSVM Disk Operating System, version " + _TVDOS.VERSION
: "TSVM Disk Operating System " + _TVDOS.VERSION;
const greetLeftPad = (termWidth - welcome_text.length - 6) >> 1;
const greetRightPad = termWidth - greetLeftPad - welcome_text.length - 6;

View File

@@ -0,0 +1,21 @@
// Loose reconstruction of the home screen of the Kyotronic 85/TRS-80 Model 100/etc.
let menu = [
{label:"BASIC",pwd:"\\",exec:"basic",args:""},
{label:"DOS",pwd:"\\",exec:"command",args:""},
{label:"TEXT",pwd:"\\home",exec:"undefined",args:""},
{label:"TELCOM",pwd:"\\home",exec:"undefined",args:""}
];
const MENU_COLS = 4;
function redraw() {
con.clear();
for (let i = 0; i < MENU_COLS*6; i++) {
let m = menu[i];
con.move(2+((i/MENU_COLS)|0),2+((i%MENU_COLS)*10));
print(m ? m.label : "-.-");
}
}
redraw();