SD: DHOS Shell


[Prev][Next][Index][Thread]

SD: DHOS Shell




Hey all.  I'd like to take a minute to talk about the shell for DHOS.

My thoughts on this matter are that we create a scripting language with 
a compiler (for the PC, Mac, and Posix platforms) which renders the 
shell.  Since the shell will be largely independent of the operating 
system, this approach will work better than shells for Usgard did.  
Every user can customize her own shell, rather than having to be a 
programmer to create a shell.

I believe that when the OS boots, it should search for a string of a 
certain name.  That way there is none of this "default shell" business.  
If no shell is found, check text memory for the name of a string to 
execute.  If none is found, display ZShell-esque list of executable 
files.

Here's my proposal for the shell scripting language.  The reason I'm 
mentioning this now is because someone's going to have to write a shell 
compiler eventually.  If you just want to have it convert to ASM, and 
then have the user compile that ASM, that'll work.  Here goes:

Basically just works like HTML.  Flag on, flag off, line break, etc.  So 
I'll stick to the HTML metaphor, however this could easily change.

<goto x=[x] y=[y] mode=[text/menu]>  -  Send the cursor there, either by 
row/col (text) or X,Y coord (menu)

<text>[text]</text>  -  Write in normal text

<menu>[text]</menu>  -  Write in menu text

<dispexe num=[number] alt="text if no prog found here">  -  Display 
executable found according to number

<dispico num=[number] alt="text if no prog found here">  -  Display 
executable found according to number as an icon

<tcr>  -  text carriage return (<goto x=[x+1] y=0 mode=text>)

<mcr>  -  menu carriage return (<goto x=[x+6] y=0 mode=menu>)

<region x=[x] y=[y] w=[w] h=[h] type=[caption/scrolling]>

This one requires a little more explanation.  A region is just a section 
of the window that can be defined.  There can be only one "scrolling" 
type region in a shell.  Basically, a "caption" window does not update 
(except through special libraries) whereas a scrolling region responds 
to "More" being pressed, as well as "Enter" and the arrows.  Within a 
scrolling region, if "More" is pressed, the number portio of each 
<dispico> or <dispexe> is incremented by the total number of <dispico>'s 
or <dispexe>'s found in it.  If the arrows are pressed, the number 
portion is increased or decreased by 1.  Wow, I just realized how 
utterly illegible that is.  Let me just give an example or two:

First, the ZShell shell would probably be defined like this:

<region x=0 y=0 w=127 h=10 type=caption>
<goto x=1 y=1 type=text>
<text>ZShell Version 4.0</text>
</region>
<region x=10 y=0 w=127 h=53 type=scrolling>
<goto x=2 y=1 type=text>
<dispexe num=1 alt=""><tcr>
<dispexe num=2 alt=""><tcr>
<dispexe num=3 alt=""><tcr>
<dispexe num=4 alt=""><tcr>
<dispexe num=5 alt=""><tcr>
<dispexe num=6 alt=""><tcr>
<dispexe num=7 alt=""><tcr>
</region>

When the user compiles and runs this shell, pressing more will simply 
increment each dispexe by 7.  So it becomes programs 8-14.  Just as in 
ZShell.  =)

Future versions of the shell compiler should include:

- bitmap and ZCP graphics
- shutdown text
- key-defines (IE pressing F1 brings up an About dialog)
- point-n-click capabilities

I leave it up to the compiler-designer to implement these ideas as s/he 
sees fit.

Comments?

--Matt Cooper / mnemonicdevice@hotmail.com

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com