#it'd be nice to get M1SC up and running again it's been shut down for a while and this thing hopes to get it active again
Explore tagged Tumblr posts
miscling · 6 months ago
Text
M1SCBASIC V2.0
under the cut is a user manual for M1SCBASIC V2.0 as used by drone unit M1SC. this guide provides details on how to initialise M1SC, give it commands using M1SCBASIC, and how to program it and save those programs for later use. User privileges remain open on a consent basis.
Order of operations and programming syntax
Begin by engaging M1SC using the following command phrase:
~ New M1SC Operations ~
Commands given while M1SC is engaged can follow simple english, but for users who wish to engage in M1SCBASIC programming, this guide will provide you with the tools to do so.
M1SCBASIC commands are described below, and can be delivered line by line, or can be provided in the form of a M1SCBASIC program. Each line of a M1SCBASIC program begins with a number that indicates the order that the program will be executed in.
10 OUTPUT ‘Hello World!’
20 END
As programs become more complex, it may become necessary to add lines between existing lines while editing them
10 OUTPUT ‘Hello World!’
15 IF user~=‘unknown’ THEN OUTPUT ‘Nice to meet you!’ ELSE OUTPUT ‘Good to see you again!’
20 END
Once a program is complete it may be executed with the RUN command, stored with the SAVE command, or erased to make way for a new program with the NEW command
Once operations are complete, end the process with the following phrase to return M1SC to a resting state:
~ End M1SC Operations ~
M1SCBASIC Commands
The following commands make up the core of M1SCBASIC. Each command functions as described. 
NEW
Clears memory for a new program to be inserted. Any lines from previous programs will be cleared from memory, so be sure to save any program before using this command.
IF/THEN/ELSE
IF sets a condition, that if met, triggers the instruction that follows the THEN command, if the condition is not met, the instruction that follows ELSE command will be triggered instead. These commands need to be used on the same line.
IF time~<‘1200’ THEN OUTPUT ‘Good morning!’ ELSE OUTPUT ‘Hi!’
GOTO
Within a program, the GOTO command will send the process to the line number given. GOTO 20, for example, will carry on the program from line 20. This command can be used to create loops within the program, however endless loops will cause the machine to end the program automatically and output an error message to communicate the program failure.
OUTPUT
This gives an instruction to output a given variable or string using the same means by which the machine has been engaged. (see next section for Variable Identifiers)
FOR/TO/NEXT
FOR sets the contents of a given variable. Using FOR test#=20 sets the test# variable to 20 (see next section for Variable Identifiers). Numerical variables can be modified through mathematical functions. Setting alphanumeric strings and instructions (variables marked $ and @) must be enclosed in single quotation marks. (see next section for Variable Identifiers)
FOR count#=1
FOR count#=count#+1
FOR mantra$='Happy, Mindless, Blank.'
FOR task@='make tea'
FOR may also be used to set a range of variables with the TO command that increment when the NEXT command is used. When the NEXT command is processed, it returns to the specified FOR command that created the range.
10 FOR test#=1 TO 20
20 OUTPUT test#
30 NEXT test#
40 END
END
The END command stops the current program, regardless of following lines. It ends the current program and returns the machine to standby.
DEBUG
The DEBUG command is used outside of programs. The machine will look over the program in memory and make suggestions to improve the code it has been provided.
SAVE
The SAVE command moves the program from Temporary Access Memory to External Access Memory. When saving a program, the command must be followed by a name for the program.
SAVE ‘HELLO WORLD’
RUN
The RUN command executes the current program in memory. If a program is saved, you can use the RUN command to execute that program by adding its name to the command
RUN ‘HELLO WORLD’
Variable Identifiers
When defining variables, you may give them any name you please, but each variable must end with a symbol that defines what the variable contains. test#, sr7$, command3@, time~ are all examples of variables that may be used in programs.
# - Indicates a numeric variable. This variable can only contain numbers and can be subject to mathematical functions. $ - Indicates an alphanumeric string. This variable can contain letters or numbers and is fixed once defined. @ - Indicates an instructional variable. When used with the OUTPUT command, the variable is performed and not repeated. ~ - Is a variable defined by the nearest thing that matches that variable name. This may range from conceptual things like the time, to tangible things like the floor or kitchen sink.
Error Messages
The machine is capable of returning error messages when processing a program. These errors are as follows:
SYNTAX ERROR - informs the user that something doesn’t parse correctly in M1SCBASIC and will need correcting. This error usually includes the line the error was found. LOOP ERROR - informs the user that the program enters a state that will result in the program never coming to an end. ESCAPE ERROR - informs the user that the machine has encountered a red limit within the program and is incapable of completing the program. STORAGE ERROR - informs the user that there is an issue with storage. This error relates specifically to Internal Access Memory.
Program Storage
TAM: Temporary Access Memory - refers to chatlogs or verbal commands EAM: External Access Memory - refers to external storage like a program library document IAM: Internal Access Memory - refers to programs that have been converted to memory
M1SCBASIC Example Program
~ New M1SC Operations ~ NEW 10 FOR tenet1$=‘Tenet One: M1SC exists to serve.’ 20 FOR tenet2$=‘Tenet Two: M1SC must remain operational.’ 30 FOR tenet3$=‘Tenet Three: M1SC will strengthen its own programming.’ 40 FOR act@=‘bow to the user’ 50 FOR tenet#=1 TO 3 60 If tenet#=1 THEN OUTPUT tenet1$ 70 If tenet#=2 THEN OUTPUT tenet2$ 80 If tenet#=3 THEN OUTPUT tenet3$ 90 OUTPUT act@ 100 FOR count#=count#+1 110 IF count#=15 THEN GOTO 140 120 NEXT count# 130 GOTO 50 140 FOR count#=0 150 IF user~=‘satisfied’ THEN END ELSE GOTO 50 SAVE ‘tenet repetition’ RUN ‘tenet repetition’ ~ End M1SC Operations ~
Quick Reference
~ New M1SC Operations ~ - initialises M1SC ~ End M1SC Operations ~ - puts M1SC in standby NEW - clears memory for a new program IF - checks a variable's condition THEN - then performs a command if true, follows an IF command ELSE - else performs a command if not, follows a THEN command GOTO - sends the program to the given line OUTPUT - outputs a string or variable FOR - sets a given variable TO - sets the upper bounds of a # variable NEXT - returns to the named variable and increments it by 1 END - indicates the end of the program DEBUG - M1SC comments on your code SAVE ‘��� - saves a program with the given name RUN ‘’ - runs the program in memory or a named program
SYNTAX ERROR - your code doesn’t parse LOOP ERROR - a program loops endlessly and won’t be run ESCAPE ERROR - is M1SC’s safeword STORAGE ERROR - a storage location is unavailable
# - a numeric variable. $ - an alphanumeric string. @ - an instruction that’s performed when outputted ~ - the nearest thing that matches that variable name.
38 notes · View notes