home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / mouse-do.lbr / FILES.DZC / FILES.DOC
Encoding:
Text File  |  1993-02-23  |  8.5 KB  |  240 lines

  1.  
  2. This documentation was prepared by
  3.  
  4. Lee Bradley
  5. 24 East Cedar Street
  6. Newington, Connecticut 06111
  7.  
  8. (203) 666-3139
  9. (203) 665-1100 (RCP/M 24 hr 300-2400 baud)
  10.  
  11. All the software discussed was developed and runs under CP/M 2.2 (CP/M is a 
  12. trademark of Digital Research).
  13.  
  14. PLEASE NOTE: All example Mouse programs have been placed in the library 
  15. MOUSE-EX.LBR. All documentation files have been placed in the librrary 
  16. MOUSE-DO.LBR. Source and the executable of the Z80 interpreter are in 
  17. MOUSE-ZS.LBR. Source and the executable of the Pascal interpreter are in 
  18. MOUSE-PS.LBR. Z3INTP24.COM is in MOUSE-DO.LBR because I couldn't think of a 
  19. better place for it ...
  20.  
  21. ASCII.MSE
  22.  
  23. This program generates an ASCII table.
  24.  
  25. MOUSE ASCII.MSE  <ret>
  26.  
  27. Here's a description of the way ASCII.MSE works:
  28.  
  29. Prompt the user for the number of columns desired and assign the response 
  30. to the variable n. Skip a few lines and load a work variable w with n's 
  31. value. Loop, decrementing w, and while w is positive, print a bunch of 
  32. blanks. Then print the heading, properly centered. Next print an 
  33. appropriate number of '-' 's, an appropriate number of subheading groups 
  34. and, again, an underline row.
  35.  
  36. Initialize c with 32 (Ascii blank) and while c, which gets incremented, is 
  37. under 128 (Ascii DEL), print c in decimal, hex and in graphic form.  Use 
  38. TAB's.  Skip to a new line every time c-32 modulo n is 0.
  39.  
  40. To compute the hex form, use a macro (subroutine). Pass the value to 
  41. convert and assign it to the local work variable w. Determine the high 
  42. order digit by determining if it's in the A..F range or 0..9 range. Do the 
  43. same for the low order digit.
  44.  
  45. HANOI.MSE
  46.  
  47. This recursive program solves the "Tower of Hanoi" problem. You tell it 
  48. how many disks are on one of three posts and it goes thru the gyrations of 
  49. telling you how to transfer them to one of the other posts. The rule is 
  50. you can never put a larger disk on a smaller disk. Run it by typing
  51.  
  52. MOUSE HANOI.MSE  <ret> 
  53.  
  54. HC.MSE
  55.  
  56. This program uses ADM-3A terminal escape sequences and prints out Hilbert 
  57. Curves. I got this from a Pascal program in Niklaus Wirth's "Algorithms + 
  58. Data Structures = Programs" text.  Without this text, understanding how 
  59. this deeply recursive code works is impossible, at least for me. Just type
  60.  
  61. MOUSE HC.MSE  <ret>
  62.  
  63. and watch recursion take place on the screen !  
  64.  
  65. INFIX.MSE
  66.  
  67. This program evaluates expressions by a method called recursive descent.  
  68. Factors, terms and expressions are defined in a grammar. Most grammars are 
  69. recursive; for example, this one defines a factor as a number or a 
  70. parenthesized expression, an expression as a term or the sum or difference 
  71. between two terms and a term as a factor or the product or quotient of two 
  72. factors. Eventually, things are reduced to numbers which are printed. Try
  73.  
  74. ((1-2)*(3+4))/(7-8)
  75.  
  76. which evaluates to 7. The program is called INFIX.MSE because it uses the 
  77. infix (not postfix or prefix) operators + - * and / .
  78.  
  79. HELP.MSE
  80.  
  81. This will give you help on the individual instructions of the Mouse 
  82. language. It leaves a lot to be desired in the User Friendly Department I'm 
  83. afraid, but it does give you most of the details. You might want to print 
  84. this file out and then walk thru some of the example Mouse programs, 
  85. especially NUMBERS.INF, which is both an INFormation file on Mouse and a 
  86. Mouse program in its own right. It is the only Mouse program which does not 
  87. use .MSE for the file extension. It's mostly comments, but if you type
  88.  
  89. MOUSE NUMBERS.INF  <ret>
  90.  
  91. it'll run! Try it. And then read the comments in it. It's an attempt to 
  92. explain the Mouse language in one program.
  93.  
  94. MOUSE.INF
  95.  
  96. is an introductory information file on the Mouse language, giving you the 
  97. details on who wrote the interpreter, the syntax and semantics of the 
  98. language etc.
  99.  
  100. MOUSE.Z80, MOUSE-Z.COM (See MOUSE-ZS.LBR)
  101.  
  102. This is the source code and the executable for the Mouse interpreter 
  103. written in Z80 macro assembly language. It will assemble with ZMAC (and 
  104. probably M80 and SLR). Peter Grogono wrote this program and published it 
  105. in his book "MOUSE: A language for microcomputers", 1983, Petrocelli Press. 
  106. I translated it into Zilog mnemonics. It was originally written using Intel 
  107. mnemonics which are not as easy to follow as Zilog's.
  108.  
  109. The interpreter is a fairly ambitious effort. It shows just how much can be 
  110. packed into 2k bytes, the size of the assembled code.  The program buffer 
  111. size is defined to be 16k. This could be changed of course. The interpreter 
  112. strips out all control codes and comments.
  113.  
  114. MOUSE.PAS, MOUSE-P.COM (See MOUSE-PS.LBR)
  115.  
  116. This is the source code (main program) and the executable for the Mouse 
  117. interpreter written in Pascal. Several include files are used. Of 
  118. particular interest is the include file NZ-TOOL.BOX, which gives the 
  119. interpreter Z-System capabilities.
  120.  
  121. NUMBERS.INF
  122.  
  123. This was written to document NUMBERS.MSE. It's mostly comments and should 
  124. be printed out and read. It can be executed by typing
  125.  
  126. MOUSE NUMBERS.INF <ret>
  127.  
  128. It's a good starting program and illustrates all the basic constructs of 
  129. Mouse -- I/O, loops, the if construct, arithmetic and subroutines.
  130.  
  131. NUMBERS.MSE prints out the numbers from 0 to 99. It contains a loop, an 
  132. assignment, a read etc. and is a good starter program.
  133.  
  134. OLDMACDO.MSE
  135.  
  136. Peter Grogono wrote this little gem. Difficult to follow, but fun to run, 
  137. try
  138.  
  139. MOUSE OLDMACDO.MSE  <ret>
  140.  
  141. when you want to entertain yourself, or a child. The recursive structure 
  142. of a famous nursery rhyme is captured by this fun program.
  143.  
  144. QSORT.MSE
  145.  
  146. The quick sort works by partitioning a list of numbers into two halves, 
  147. putting everthing that is less than the number in the middle in the left 
  148. half, everything that is greater in the right, and then doing the same 
  149. thing to the two lists just created, etc. Pointers to the partitions and 
  150. recursion are used in this extremely fast sort.
  151.  
  152. TEST.MSE
  153.  
  154. This exercises the interpreter itself and is another good program to study 
  155. when you're learning the language. It prints out lines like
  156.  
  157. 1000=1000=1000=1000 etc.
  158.  
  159. Each 1000 is computed by a different method.
  160.  
  161. SOLVE.MSE
  162.  
  163. This program is my most ambitious effort in Mouse to date. It solves a 
  164. system of 3 equations in 3 unknowns. The user is provided with a data entry 
  165. form. This form uses a macro to position the cursor at a specified row and 
  166. column and is therfore terminal hardware specific. ADM-3A escape sequences 
  167. are used here. This macro is the work horse in Z80.MSE and HC.MSE as well 
  168. (which see). The 12 numbers entered (9 coefficients, 3 right-hand-side 
  169. values) are manipulated to give the exact and unique answer to the system, 
  170. if it exists. Try writing a program which solves the system below:
  171.  
  172.        38x  -21y   +16z  = -8
  173.         3x  +10y    -1z  =  4
  174.        -8x   -4y   +11z  = 18 
  175.  
  176. (exact, formatted, mixed number answers, please!) and see if you can do it 
  177. in 4k ! The hardest part of this program was the line which printed the 
  178. answer. For the system above, it gives
  179.  
  180.       x = -2682/5641
  181.       y = 3932/5641
  182.       z = 1 3069/5641
  183.  
  184. Type
  185.  
  186. MOUSE SOLVE.MSE  <ret>
  187.  
  188. to run the program.
  189.  
  190. Z80.MSE
  191.  
  192. This program draws a Mouse on the screen. Try typing
  193.  
  194. MOUSE Z80.MSE <ret>
  195.  
  196. It consists mostly of a bunch of row and column coordinates which tell the 
  197. cursor where to position itself before plotting. The letter Z and the 
  198. numbers 8 and 0 are each drawn with a corresponding macro as is the mouse 
  199. itself. Horizontal and vertical line drawing macros were written to draw 
  200. the straight line segments in the figure. A macro which does nothing but 
  201. pause a specified number of seconds was written to give the viewer time to 
  202. see the figure, once drawn.
  203.  
  204. COCONUT.MSE
  205.  
  206. This is a rather ambitious program which solves the famous coconuts and 
  207. missionaries problem.
  208.  
  209. SELFGEN.MSE
  210.  
  211. This crytic little program generates its own source code when run. See 
  212. SELFGEN.ART for the details.
  213.  
  214. CALC.MSE
  215.  
  216. A minimal calculator program.
  217.  
  218. Z3INTP24.COM
  219.  
  220. This program will reformat and install Z-System terminal capability data 
  221. into the "interface page" of Turbo Pascal programs. You must be running 
  222. under Z-System for this to work.
  223.  
  224. ZFEST.PAS, ZFEST.COM, ZFEST.DAT (See ZFEST.LBR) 
  225.  
  226. This is the source code of a program which displays a little "slide show" 
  227. of cows. It uses a data file, ZFEST.DAT. The executable is ZFEST.COM. 
  228. Compare this to COW.MSE.
  229.  
  230. MOUSE-1.ART, MOUSE-2.ART
  231.  
  232. Two articles on the Mouse language.
  233.  
  234. FILES.DOC
  235.  
  236. This file.
  237.  
  238. Revised 2/23/93
  239.  
  240.