home *** CD-ROM | disk | FTP | other *** search
-
- ~ HELP.MSE, Lee Bradley, 17 March 1990
- ~ Updated on 6 July 1990 - Removed main loop; program now reloads via &
- ~ feature. Also, added information on &-delimited filename.
-
- 'D K : ~ Use 24 line feed clear screen, for starters
-
- #Z; ~ "Clear" the screen
-
- ~ Display screen configuration panel and get user input
-
- "!!
- HELP.MSE "
-
- "!
- To clear the screen, I need to know what terminal you are using.
-
- Press R for Royal, K for Kaypro,
- X for Xerox, or anything else for a 24 line feed default.
-
- !!!!!!" ~ throw in a few blank lines here, for looks
-
- " (R,K,X) ? " ?' K :
-
- ~ Present four or so panels, ask if wanted again at end. Quit when
- ~ user presses N at final question
-
- #Z; ~ Clear (or scroll) the screen
-
- "
- <blank> No action.
-
- "'$!'" [Program terminator] Exit. Also used to define Macros.
-
- <number> Push the value of <number> onto Stack.
-
- Arithmetic operators +, -, *, /, \ .
-
- + [Add] Pop two operands from Stack and push their sum.
- - [Subtract] Pop two operands from Stack and push their difference.
- * [Multiply] Pop two operands from Stack and push their product.
- / [Divide] Pop two operands from Stack and push their quotient.
- \ [Remainder] Pop two operands from Stack and push the remainder
- obtained when the first is divided by the second.
-
- I/O commands.
-
- ? [Input number] Read a number from the keyboard and push its value
- onto Stack.
- ?' [Input character] Read a character from the keyboard and push
- the value of its Ascii code onto Stack.
- "
-
- ?' #Z;
-
- "
- I/O commands (continued).
-
- "'!!'" [Output number] Pop an operand from Stack and display its
- value.
- "'!!'''!'" [Output character] Pop an operand from Stack and display the
- corresponding Ascii character.
- "''!'"<char> [Character literal] Push the Ascii code for the graphic
- character <char> onto Stack.
- "34!'" [Output string] Display each character between the double quote
- and the next double quote. Translate exclamation points to
- <new-line>s.
-
- Variables.
-
- <letter> [Variable] Convert the letter to an integer in the range
- 0..25 (A = a = 0, B = b = 1, ..., Z = z = 25). Add this
- value, which is an address in Data, to OffSet and push the
- result onto Stack.
- "
- ?' #Z;
-
- "
- Assigning data to variables with the colon.
-
- : [Assignment] Pop two operands from Stack and store the value
- of the second at the address in Data specified by the value
- of the first.
-
- Extracting values of variables with the period.
-
- . [Dereference] Pop an operand from Stack and push the
- value in Data of which it is the address.
-
- Making code conditional with <, =, and >.
-
- < [Comparison] Pop two operands from Stack. If the first is
- less than the second, push 1, else push 0 onto Stack.
- = [Comparison] Pop two operands from Stack. If they are
- equal, push 1, else push 0 onto Stack.
- > [Comparison] Pop two operands from Stack. If the first is
- greater than the second, push 1, else push 0 onto Stack.
- "
- ?' #Z;
-
- "
- Blocking off conditional code with [ and ].
-
- [ [Conditional] Pop a value from Stack. If it is zero or neg-
- ative, skip over characters until a matching ] is encountered.
- ] No action.
-
- Loops use (, ), and ^ .
-
- ( [Start loop] Push CharPos onto EnvStack.
- ) [Go back to top of loop] Set CharPos from the top frame
- of EnvStack without popping EnvStack.
- ^ [Exit loop] Pop an operand from Stack. If it is zero or
- negative, pop EnvStack, thereby resetting CharPos, and
- skip to the matching ).
- "
- ?' #Z;
-
- "
- Macros use #<letter>, @, %, comma and ;.
-
- #<letter> [Macro call] Push tag = macro, CharPos, and OffSet onto
- EnvStack; set OffSet := NxtFree and NxtFree := NxtFree + 26;
- and set CharPos to the first character following $<letter>.
- @ [Exit from macro] Pop EnvStack, thereby resetting CharPos
- and OffSet to their values before the macro call; skip to
- the ; that matches the # of the call; and set NxtFree :=
- NxtFree-26.
- % [Replace formal parameter by actual] Push tag=parameter,
- CharPos, and OffSet onto EnvStack; locate the calling
- environment for the macro in EnvStack and set CharPos and
- OffSet from it; pop a value from Stack and use it to count
- parameters in the calling environment (parameter n follows
- the nth comma).
- , [End of actual parameter] Pop EnvStack, thereby resetting
- CharPos and OffSet.
- ; [End of actual parameter] Pop EnvStack, thereby resetting
- CharPos and OffSet.
- "
- ?' #Z;
-
- "
- Tracing is controlled by { and }.
-
- { Switch on tracing
- } Switch off tracing
-
- Invoking Mouse programs with &-delimited filename.
-
- &filename& will cause filename.MSE to load and run. With this feature, you
- may link several Mouse programs together.
-
- "
- ?' #Z;
-
- "!!!
- Again? (Y/N) " ?' R : R. 'Y - R. 'y - * 0 = [&HELP&]
-
- ~ Macros follow
-
- $Z ~ Clear screen
-
- K. 'K - K. 'k - * 0 = [ 'Z '@ - !' @ ] ~ Kaypro
- K. 'R - K. 'r - * 0 = [ '7 '1 'T '[ '@ - !' !' !' !' @ ] ~ Royal
- K. 'X - K. 'x - * 0 = [ '* '[ '@ - !' !' @ ] ~ Xerox
- 24 w : ( w. ^ 'J '@ - !' w. 1 - w : ) @ ~ 24 line feed default
-