SLOS-DOS: Difference between revisions
(New page: Steven Lawrance's Operating System (SLOS), also known briefly as Steven Lawrance's Operating Program (SL-OP), was a small interpreted toy operating environment written in {{Tech:BASIC}} fo...) |
(SV! is really SV#) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Steven Lawrance's Operating System (SLOS), also known briefly as Steven Lawrance's Operating Program (SL-OP), was a small interpreted toy operating environment written in {{Tech:BASIC}} for {{Tech:DOS}}. The primary motivation for writing this was to have an environment that supported long file names. | Steven Lawrance's Operating System (SLOS), also known briefly as Steven Lawrance's Operating Program (SL-OP), was a small interpreted toy operating environment written in {{Tech:BASIC}} for {{Tech:DOS}}. The primary motivation for writing this was to have an environment that supported [http://en.wikipedia.org/wiki/Long_filename long file names]. This was written in 1993 -- two years before [http://en.wikipedia.org/wiki/Microsoft Microsoft] released native long file name support in a consumer operating system with [http://en.wikipedia.org/wiki/Windows_95 Windows 95]. | ||
SLOS was primarily distributed on the [http://www.flightsim.com/arcanum/fs.htm Contrails] [http://en.wikipedia.org/wiki/Bulletin_board_system BBS] in [http://en.wikipedia.org/wiki/Euless%2C_Texas Euless, Texas]. It is now distributed from this web site. | |||
==Download== | |||
*'''[https://www.moonlightdesign.org/steve/programs/slosdist1.exe Download SLOS-DOS and SLOS-Win]''' | |||
*'''[https://www.moonlightdesign.org/steve/programs/sloswin.zip Download SLOS-Win's Source Code]''', a [[SLOS-Win|Windows version of SLOS]] | |||
*{{CatSetupFiles}} | |||
==Commands== | |||
[[Image:Slos-installed.png|right|thumb|450px|Screen shot of what SLOS looks like on its first use, which runs a small installer to finalize the setup]] | |||
[[Image:Slos-dir.png|right|thumb|450px|Screen shot of the DIR directory listing command]] SLOS's command prompt permits the user to run any of the following commands from its [http://en.wikipedia.org/wiki/Smiley smile emoticon] :-) prompt: | |||
{|border="1" | |||
|- | |||
|SLTOOLS||Steven Lawrance's Tools | |||
|- | |||
|HELP||Help System | |||
|- | |||
|DIR||File Listing | |||
|- | |||
|CLS||Clears Screen | |||
|- | |||
|RUN program||Runs a Program | |||
|- | |||
|LOAD program||Loads a Program | |||
|- | |||
|EDIT||Creates a New DOS File | |||
|- | |||
|EDIT filename||Edits an SL-File | |||
|- | |||
|NEW filename||Creates a New SL File | |||
|- | |||
|FAT||Updates FAT | |||
|- | |||
|EXIT||Exits SL-OS | |||
|- | |||
|QUIT||Exits SL-OS | |||
|- | |||
|DEL filename||Deletes an SL-File | |||
|- | |||
|UNDEL||Undeletes an SL-File with a DOS name | |||
|- | |||
|UNDEL filename||Undeletes an SL-File with a DOS name | |||
|- | |||
|PURGE||Purges a Deleted SL-File | |||
|} | |||
==Scripting Language== | ==Scripting Language== | ||
SLOS executes script files having a "exc" file extension in an interpreted manner. Because this interpreter is running within the BASIC interpreter, execution speed is noticeably slow. | SLOS executes script files having a "exc" file extension in an interpreted manner. Because this interpreter is running within the BASIC interpreter, execution speed is noticeably slow. The scripting language is difficult to read due to its overuse of abbreviations. [[CatSetup]], by contrast, has a scripting language that is easier to write and read. | ||
===Syntax=== | |||
The following commands are possible in a SLOS program. Each command appears by itself on its own line with no surrounding whitespace. | |||
{|border="1" | |||
|- | |||
|P!text | |||
|Prints text on the screen. | |||
{|border="1" | |||
|Example: | |||
|- | |||
|P!Hello!||How are you today? | |||
|} | |||
|- | |||
|I$nquestion | |||
|Asks a question. n=number of answers, question=text to display | |||
{|border="1" | |||
|Example: | |||
|- | |||
|I$2Do you? [Y] [N]||Ask "Do you? [Y] [N]" with 2 (Y,N) options | |||
|- | |||
|Y||User pressed Y | |||
|- | |||
|S#7||What to do when the user pressed Y | |||
|- | |||
|N||User pressed N | |||
|- | |||
|P!Why not?!||What to do when the user pressed N | |||
|- | |||
|ND||End application | |||
|- | |||
|P!Good!||Display "Good!" on the screen | |||
|- | |||
|ND||End application | |||
|} | |||
|- | |||
|I#nquestion||Just like I$nquestion, except it operates with numbers (not letters such as Y and N). | |||
|- | |||
|L#xxyy | |||
|Locates a position (xx,yy) on the screen. | |||
{|border="1" | |||
|Example: | |||
|- | |||
|L#3002||Locates (30,2) or (30,02) on the screen | |||
|} | |||
|- | |||
|S#line | |||
|Skips to a line in the program. | |||
{|border="1" | |||
|Example: | |||
|- | |||
|S#2||Skips to line number 2 | |||
|- | |||
|P!Hi!||Prints "Hi!" at line number 2 | |||
|} | |||
|- | |||
|D$command (II function) | |||
|Runs DOS program. Use II to set parameters. II isn't required. | |||
{|border="1" | |||
|Example: | |||
|- | |||
|P!Enter Parameters | |||
|- | |||
|II||Asks user to supply parameters | |||
|- | |||
|D$EDIT||Executes command "EDIT" Note: D$ can work by itself assuming II has a value | |||
|} | |||
|- | |||
|F$file | |||
|Loads a value into the file variable. | |||
{|border="1" | |||
|Example: | |||
|- | |||
|F$Configuration File||Sets "Configuration File" as the file var. | |||
|} | |||
|- | |||
|L!||Loads the string and number variable from file. Don't worry about it until you understand it. | |||
|- | |||
|SV$string||Sets the string variable. | |||
|- | |||
|SV#number | |||
|Sets the number variable. | |||
{|border="1" | |||
|Example: | |||
|- | |||
|SV$Hello there!||Sets string variable to "Hello there!" | |||
|- | |||
|SV#9||Sets number variable to 9 | |||
|- | |||
|F$Hello!||Sets file variable to "Hello!" | |||
|- | |||
|S!||Saves string and number variables to "Hello!" | |||
|} | |||
|- | |||
|$givenvalue | |||
|If string variable equals givenvalue, execute next instruction. Else, execute instruction after next. | |||
{|border="1" | |||
|Example: | |||
|- | |||
|P!Enter a string value:||Types text on screen | |||
|- | |||
|V$||Asks user for the string variable | |||
|- | |||
|$Hello||If string variable = "Hello", | |||
|- | |||
|S#7||Go to line number 7. | |||
|- | |||
|P!You didn't type in "Hello"!||Else, print text. | |||
|- | |||
|ND||Exit | |||
|- | |||
|P!You typed in "Hello"!||Print text | |||
|- | |||
|ND||Exit | |||
|} | |||
|- | |||
|#givennumber||If number variable equals givennumber, execute next instruction. Else, execute instruction after next. Note: This is just like $givenvalue, except a number should be in the givennumber. | |||
|} | |||
===Example=== | |||
The following example is a very trivial animation program named "Animation Master" in SLOS. It requires the user to hold down a key to switch between two screens to make the user think that the person is talking. | |||
<pre> | |||
C! | |||
P!Animation Master v2.1 | |||
P!Version for SL-OS | |||
P! | |||
I$4Ready for some fun? [Y] [N] | |||
Y | |||
S#15 | |||
y | |||
S#15 | |||
N | |||
S#13 | |||
n | |||
P!You don't know what you are missing! | |||
ND | |||
C! | |||
P! . . | |||
P! . - , I talking! | |||
P! --- | |||
L#0120 | |||
I$2Press [1] for next frame, hold [1] for animation, or [0] to exit. | |||
1 | |||
S#25 | |||
0 | |||
ND | |||
C! | |||
P! . . | |||
P! . - Hello, am ! | |||
P! \___/ | |||
L#0120 | |||
I$2Press [1] for next frame, hold [1] for animation, or [0] to exit. | |||
1 | |||
S#15 | |||
0 | |||
ND | |||
</pre> | |||
==Limitations== | ==Limitations== | ||
SLOS's scripting environment contains a large list of limitations, and some are expressed in the following list: | SLOS's scripting environment contains a large list of limitations, and some are expressed in the following list: | ||
*The scripting language is not [http://en.wikipedia.org/wiki/Turing_completeness Turing-complete] | |||
*The screen always has a light-blue background with a white foreground | *The screen always has a light-blue background with a white foreground | ||
*Conditional expressions are only allowed in a few operations | *Conditional expressions are only allowed in a few operations |
Latest revision as of 20:22, 23 January 2010
Steven Lawrance's Operating System (SLOS), also known briefly as Steven Lawrance's Operating Program (SL-OP), was a small interpreted toy operating environment written in QBASIC for DOS. The primary motivation for writing this was to have an environment that supported long file names. This was written in 1993 -- two years before Microsoft released native long file name support in a consumer operating system with Windows 95.
SLOS was primarily distributed on the Contrails BBS in Euless, Texas. It is now distributed from this web site.
Download
- Download SLOS-DOS and SLOS-Win
- Download SLOS-Win's Source Code, a Windows version of SLOS
- Download CatSetup's required DLL files, if needed. Older versions of CatSetup required bwcc.dll, and the latest version requires ctl3dv2.dll. These go into the windows\system folder, not windows\system32. Windows computers typically already have ctl3dv2.dll installed, which is a Microsoft library, and Wine has a built-in implementation
Commands
SLOS's command prompt permits the user to run any of the following commands from its smile emoticon :-) prompt:
SLTOOLS | Steven Lawrance's Tools |
HELP | Help System |
DIR | File Listing |
CLS | Clears Screen |
RUN program | Runs a Program |
LOAD program | Loads a Program |
EDIT | Creates a New DOS File |
EDIT filename | Edits an SL-File |
NEW filename | Creates a New SL File |
FAT | Updates FAT |
EXIT | Exits SL-OS |
QUIT | Exits SL-OS |
DEL filename | Deletes an SL-File |
UNDEL | Undeletes an SL-File with a DOS name |
UNDEL filename | Undeletes an SL-File with a DOS name |
PURGE | Purges a Deleted SL-File |
Scripting Language
SLOS executes script files having a "exc" file extension in an interpreted manner. Because this interpreter is running within the BASIC interpreter, execution speed is noticeably slow. The scripting language is difficult to read due to its overuse of abbreviations. CatSetup, by contrast, has a scripting language that is easier to write and read.
Syntax
The following commands are possible in a SLOS program. Each command appears by itself on its own line with no surrounding whitespace.
P!text | Prints text on the screen.
| |||||||||||||||||
I$nquestion | Asks a question. n=number of answers, question=text to display
| |||||||||||||||||
I#nquestion | Just like I$nquestion, except it operates with numbers (not letters such as Y and N). | |||||||||||||||||
L#xxyy | Locates a position (xx,yy) on the screen.
| |||||||||||||||||
S#line | Skips to a line in the program.
| |||||||||||||||||
D$command (II function) | Runs DOS program. Use II to set parameters. II isn't required.
| |||||||||||||||||
F$file | Loads a value into the file variable.
| |||||||||||||||||
L! | Loads the string and number variable from file. Don't worry about it until you understand it. | |||||||||||||||||
SV$string | Sets the string variable. | |||||||||||||||||
SV#number | Sets the number variable.
| |||||||||||||||||
$givenvalue | If string variable equals givenvalue, execute next instruction. Else, execute instruction after next.
| |||||||||||||||||
#givennumber | If number variable equals givennumber, execute next instruction. Else, execute instruction after next. Note: This is just like $givenvalue, except a number should be in the givennumber. |
Example
The following example is a very trivial animation program named "Animation Master" in SLOS. It requires the user to hold down a key to switch between two screens to make the user think that the person is talking.
C! P!Animation Master v2.1 P!Version for SL-OS P! I$4Ready for some fun? [Y] [N] Y S#15 y S#15 N S#13 n P!You don't know what you are missing! ND C! P! . . P! . - , I talking! P! --- L#0120 I$2Press [1] for next frame, hold [1] for animation, or [0] to exit. 1 S#25 0 ND C! P! . . P! . - Hello, am ! P! \___/ L#0120 I$2Press [1] for next frame, hold [1] for animation, or [0] to exit. 1 S#15 0 ND
Limitations
SLOS's scripting environment contains a large list of limitations, and some are expressed in the following list:
- The scripting language is not Turing-complete
- The screen always has a light-blue background with a white foreground
- Conditional expressions are only allowed in a few operations
- Programs get only one number variable and one string variable, which is a huge limitation for all but trivial programs
- Loading and saving data files within a program is limited to saving the program's two variables
- Looping can only be done with the only number variable that you have