SLOS-DOS: Difference between revisions

From Moonlight Design
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:


==Download==
==Download==
'''[https://www.moonlightdesign.org/steve/programs/slosdist1.exe Download SLOS-DOS and SLOS-Win]'''
*'''[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]]
'''[https://www.moonlightdesign.org/steve/programs/sloswin.zip Download SLOS-Win's Source Code]''', a [[SLOS-Win|Windows version of SLOS]]
*{{CatSetupFiles}}


==Commands==
==Commands==

Revision as of 22:52, 14 October 2007

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

Commands

Screen shot of what SLOS looks like on its first use, which runs a small installer to finalize the setup
Screen shot of the DIR directory listing command

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.
Example:
P!Hello! How are you today?
I$nquestion Asks a question. n=number of answers, question=text to display
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.
Example:
L#3002 Locates (30,2) or (30,02) on the screen
S#line Skips to a line in the program.
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.
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.
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.
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.
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.

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