home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / misc / mouse.lbr / HELP.MZE / HELP.MSE
Encoding:
Text File  |  1988-07-12  |  5.4 KB  |  149 lines

  1.  
  2. ~ HELP.MSE,  Lee R. Bradley,  02/05/88
  3.  
  4. 1 Q : 
  5. (Q. ^  ~ While interested ... 
  6. X. 's > X. 's < +  ~ If this is the second run, don't ask the following.
  7. ['s X :            ~ Set variable so any re-run will not ask this stuff. 
  8.                    ~ (Variables in Mouse remain at the values they had on exit.)
  9. "!Running this on an ADM-3a compatible terminal, for example, a Kaypro? "
  10. ?' K : K. 'y - K. 'Y - *  0 = [
  11. "!!I will clear your screen between each block of text.
  12. Would you rather I scroll the text up instead ? " ?' S :
  13. S. 'y - S. 'Y - * 0 = [ 'N K : ]]]
  14. #Z;   ~ Clear (or scroll) the screen
  15. "
  16. 0. <blank>   No action.
  17.  
  18. 1. "36 !'"    [Program terminator] Exit.  Also used to define Macros.
  19.  
  20. 2. <number>  Push the value of <number> onto Stack.
  21.  
  22. 3. Arithmetic operators +, -, *, /, \ .
  23.  
  24. +    [Add] Pop two operands from Stack and push their sum.
  25. -    [Subtract] Pop two operands from Stack and push their difference.
  26. *    [Multiply] Pop two operands from Stack and push their product.
  27. /    [Divide] Pop two operands from Stack and push their quotient.
  28. \    [Remainder] Pop two operands from Stack and push the remainder
  29.           obtained when the first is divided by the second.
  30.  
  31. 4. I/O  commands
  32.  
  33. ?    [Input number] Read a number from the keyboard and push its value
  34.         onto Stack.
  35. ?'   [Input character] Read a character from the keyboard and push
  36.         the value of its Ascii code onto Stack.
  37. "?' #Z;
  38. "
  39. 4. I/O  commands (continued)
  40.  
  41. "'!!'"    [Output number] Pop an operand from Stack and display its
  42.            value.
  43. "'!!'''!'"   [Output character] Pop an operand from Stack and display the
  44.            corresponding Ascii character.
  45. "''!'"<char>   [Character literal] Push the Ascii code for the graphic
  46.              character <char> onto Stack.
  47. "34!'"    [Output string] Display each character between the double quote
  48.            and the next double quote.  Translate exclamation points to 
  49.            <new-line>s.
  50.  
  51. 5. Variables
  52.  
  53. <letter> [Variable] 
  54.             Convert the letter to an integer in the range 
  55.             0..25 (A = a = 0, B = b = 1, ..., Z = z = 25).  Add this 
  56.             value, which is an address in Data, to OffSet and push the 
  57.             result onto Stack.  NOTE:  LOCAL variables are supported. 
  58.             Lower case (a..z) variables are LOCAL. 
  59.             Upper case (A..Z) variables are GLOBAL.
  60. "?' #Z;
  61. "
  62. 6. Assigning data to variables with the colon.
  63.  
  64. :    [Assignment] Pop two operands from Stack and store the value
  65.        of the second at the address in Data specified by the value
  66.        of the first.
  67.  
  68. 7. Extracting values of variables with the period.
  69.  
  70. .    [Dereference] Pop an operand from Stack and push the 
  71.        value in Data of which it is the address.
  72.  
  73. 8. Making code conditional with  <, =,  and >.
  74.  
  75. <   [Comparison] Pop two operands from Stack.  If the first is
  76.        less than the second, push 1, else push 0 onto Stack.
  77. =   [Comparison] Pop two operands from Stack.  If they are
  78.        equal, push 1, else push 0 onto Stack.
  79. >   [Comparison] Pop two operands from Stack.  If the first is
  80.        greater than the second, push 1, else push 0 onto Stack.
  81. " ?' #Z;
  82. "
  83. 9. Blocking off conditional code with [ and ].
  84.  
  85. [   [Conditional] Pop a value from Stack.  If it is zero or neg-
  86.        ative, skip over characters until a matching ] is encountered.
  87. ]   No action.
  88.  
  89. 10. Loops use (, ), and ^ .
  90.  
  91. (   [Start loop]  Push CharPos onto EnvStack.
  92. )   [Go back to top of loop] Set CharPos from the top frame
  93.        of EnvStack without popping EnvStack.
  94. ^   [Exit loop] Pop an operand from Stack.  If it is zero or
  95.        negative, pop EnvStack, thereby resetting CharPos, and
  96.        skip to the matching ).
  97. " ?' #Z;
  98. "
  99. 11. Macros use #<letter>, @, %, comma and ;.
  100.  
  101. #<letter> [Macro call] Push tag = macro, CharPos, and OffSet onto
  102.        EnvStack; set OffSet := NxtFree and NxtFree := NxtFree + 26;
  103.        and set CharPos to the first character following $<letter>.
  104. @   [Exit from macro]  Pop EnvStack, thereby resetting CharPos
  105.        and OffSet to their values before the macro call;  skip to
  106.        the ; that matches the # of the call;  and set NxtFree :=
  107.        NxtFree-26.
  108. %   [Replace formal parameter by actual] Push tag=parameter,
  109.        CharPos, and OffSet onto EnvStack;  locate the calling
  110.        environment for the macro in EnvStack and set CharPos and
  111.        OffSet from it; pop a value from Stack and use it to count
  112.        parameters in the calling environment (parameter n follows
  113.        the nth comma).
  114. ,   [End of actual parameter] Pop EnvStack, thereby resetting
  115.         CharPos and OffSet.
  116. ;   [End of actual parameter] Pop EnvStack, thereby resetting
  117.         CharPos and OffSet.
  118. " ?' #Z;
  119. "
  120. 12. Tracing is controlled by { and }.
  121.  
  122. {   Switch on tracing.
  123. }   Switch off tracing.
  124.  
  125. 13. Load new Mouse file with &-delimited filename.
  126.  
  127. &filename& will load filename.MSE and run it.  With this 
  128.     feature you may link several Mouse programs together.
  129.  
  130. " 7 !'"Again? (Y/N) "
  131. ?' R : R. 'Y - R. 'y - * 0 = Q :
  132. Q. 0 =
  133. [
  134. #Z;
  135. "Invoke FILES.MSE? (Y/N) "
  136. ?' R : R. 'Y - R. 'y - * 0 = 
  137. [
  138. #Z;
  139. &FILES&
  140. ]
  141. ]
  142. ~ Macros follow
  143. $Z ~ Universal clear screen.  Kaypros get true clear screen, if they want it. 
  144. K. 'Y - K. 'y - * 0 = [ 'Z '@ - !' @ ]  ~ Send true clear screen to Kaypro  
  145. 24 w :  ~  Send 24 line feeds to non-Kaypro, or if scroll desired.
  146. ( w. ^  'J '@ - !'  w. 1 - w : )
  147. @
  148.