home *** CD-ROM | disk | FTP | other *** search
-
- ~ HELP.MSE, Lee R. Bradley, 02/05/88
-
- 1 Q :
- (Q. ^ ~ While interested ...
- X. 's > X. 's < + ~ If this is the second run, don't ask the following.
- ['s X : ~ Set variable so any re-run will not ask this stuff.
- ~ (Variables in Mouse remain at the values they had on exit.)
- "!Running this on an ADM-3a compatible terminal, for example, a Kaypro? "
- ?' K : K. 'y - K. 'Y - * 0 = [
- "!!I will clear your screen between each block of text.
- Would you rather I scroll the text up instead ? " ?' S :
- S. 'y - S. 'Y - * 0 = [ 'N K : ]]]
- #Z; ~ Clear (or scroll) the screen
- "
- 0. <blank> No action.
-
- 1. "36 !'" [Program terminator] Exit. Also used to define Macros.
-
- 2. <number> Push the value of <number> onto Stack.
-
- 3. 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.
-
- 4. 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;
- "
- 4. 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.
-
- 5. 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. NOTE: LOCAL variables are supported.
- Lower case (a..z) variables are LOCAL.
- Upper case (A..Z) variables are GLOBAL.
- "?' #Z;
- "
- 6. 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.
-
- 7. 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.
-
- 8. 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;
- "
- 9. 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.
-
- 10. 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;
- "
- 11. 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;
- "
- 12. Tracing is controlled by { and }.
-
- { Switch on tracing.
- } Switch off tracing.
-
- 13. Load new Mouse file with &-delimited filename.
-
- &filename& will load filename.MSE and run it. With this
- feature you may link several Mouse programs together.
-
- " 7 !'"Again? (Y/N) "
- ?' R : R. 'Y - R. 'y - * 0 = Q :
- Q. 0 =
- [
- #Z;
- "Invoke FILES.MSE? (Y/N) "
- ?' R : R. 'Y - R. 'y - * 0 =
- [
- #Z;
- &FILES&
- ]
- ]
- )
- ~ Macros follow
- $Z ~ Universal clear screen. Kaypros get true clear screen, if they want it.
- K. 'Y - K. 'y - * 0 = [ 'Z '@ - !' @ ] ~ Send true clear screen to Kaypro
- 24 w : ~ Send 24 line feeds to non-Kaypro, or if scroll desired.
- ( w. ^ 'J '@ - !' w. 1 - w : )
- @