SLOS-DOS: Difference between revisions
No edit summary |
(SV! is really SV#) |
||
Line 127: | Line 127: | ||
|SV$string||Sets the string variable. | |SV$string||Sets the string variable. | ||
|- | |- | ||
|SV | |SV#number | ||
|Sets the number variable. | |Sets the number variable. | ||
{|border="1" | {|border="1" |
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