home *** CD-ROM | disk | FTP | other *** search
-
- This documentation was prepared by
-
- Lee Bradley
- 24 East Cedar Street
- Newington, Connecticut 06111
-
- (203) 666-3139
- (203) 665-1100 (RCP/M 24 hr 300-2400 baud)
-
- All the software discussed was developed and runs under CP/M 2.2 (CP/M is a
- trademark of Digital Research).
-
- PLEASE NOTE: All example Mouse programs have been placed in the library
- MOUSE-EX.LBR. All documentation files have been placed in the librrary
- MOUSE-DO.LBR. Source and the executable of the Z80 interpreter are in
- MOUSE-ZS.LBR. Source and the executable of the Pascal interpreter are in
- MOUSE-PS.LBR. Z3INTP24.COM is in MOUSE-DO.LBR because I couldn't think of a
- better place for it ...
-
- ASCII.MSE
-
- This program generates an ASCII table.
-
- MOUSE ASCII.MSE <ret>
-
- Here's a description of the way ASCII.MSE works:
-
- Prompt the user for the number of columns desired and assign the response
- to the variable n. Skip a few lines and load a work variable w with n's
- value. Loop, decrementing w, and while w is positive, print a bunch of
- blanks. Then print the heading, properly centered. Next print an
- appropriate number of '-' 's, an appropriate number of subheading groups
- and, again, an underline row.
-
- Initialize c with 32 (Ascii blank) and while c, which gets incremented, is
- under 128 (Ascii DEL), print c in decimal, hex and in graphic form. Use
- TAB's. Skip to a new line every time c-32 modulo n is 0.
-
- To compute the hex form, use a macro (subroutine). Pass the value to
- convert and assign it to the local work variable w. Determine the high
- order digit by determining if it's in the A..F range or 0..9 range. Do the
- same for the low order digit.
-
- HANOI.MSE
-
- This recursive program solves the "Tower of Hanoi" problem. You tell it
- how many disks are on one of three posts and it goes thru the gyrations of
- telling you how to transfer them to one of the other posts. The rule is
- you can never put a larger disk on a smaller disk. Run it by typing
-
- MOUSE HANOI.MSE <ret>
-
- HC.MSE
-
- This program uses ADM-3A terminal escape sequences and prints out Hilbert
- Curves. I got this from a Pascal program in Niklaus Wirth's "Algorithms +
- Data Structures = Programs" text. Without this text, understanding how
- this deeply recursive code works is impossible, at least for me. Just type
-
- MOUSE HC.MSE <ret>
-
- and watch recursion take place on the screen !
-
- INFIX.MSE
-
- This program evaluates expressions by a method called recursive descent.
- Factors, terms and expressions are defined in a grammar. Most grammars are
- recursive; for example, this one defines a factor as a number or a
- parenthesized expression, an expression as a term or the sum or difference
- between two terms and a term as a factor or the product or quotient of two
- factors. Eventually, things are reduced to numbers which are printed. Try
-
- ((1-2)*(3+4))/(7-8)
-
- which evaluates to 7. The program is called INFIX.MSE because it uses the
- infix (not postfix or prefix) operators + - * and / .
-
- HELP.MSE
-
- This will give you help on the individual instructions of the Mouse
- language. It leaves a lot to be desired in the User Friendly Department I'm
- afraid, but it does give you most of the details. You might want to print
- this file out and then walk thru some of the example Mouse programs,
- especially NUMBERS.INF, which is both an INFormation file on Mouse and a
- Mouse program in its own right. It is the only Mouse program which does not
- use .MSE for the file extension. It's mostly comments, but if you type
-
- MOUSE NUMBERS.INF <ret>
-
- it'll run! Try it. And then read the comments in it. It's an attempt to
- explain the Mouse language in one program.
-
- MOUSE.INF
-
- is an introductory information file on the Mouse language, giving you the
- details on who wrote the interpreter, the syntax and semantics of the
- language etc.
-
- MOUSE.Z80, MOUSE-Z.COM (See MOUSE-ZS.LBR)
-
- This is the source code and the executable for the Mouse interpreter
- written in Z80 macro assembly language. It will assemble with ZMAC (and
- probably M80 and SLR). Peter Grogono wrote this program and published it
- in his book "MOUSE: A language for microcomputers", 1983, Petrocelli Press.
- I translated it into Zilog mnemonics. It was originally written using Intel
- mnemonics which are not as easy to follow as Zilog's.
-
- The interpreter is a fairly ambitious effort. It shows just how much can be
- packed into 2k bytes, the size of the assembled code. The program buffer
- size is defined to be 16k. This could be changed of course. The interpreter
- strips out all control codes and comments.
-
- MOUSE.PAS, MOUSE-P.COM (See MOUSE-PS.LBR)
-
- This is the source code (main program) and the executable for the Mouse
- interpreter written in Pascal. Several include files are used. Of
- particular interest is the include file NZ-TOOL.BOX, which gives the
- interpreter Z-System capabilities.
-
- NUMBERS.INF
-
- This was written to document NUMBERS.MSE. It's mostly comments and should
- be printed out and read. It can be executed by typing
-
- MOUSE NUMBERS.INF <ret>
-
- It's a good starting program and illustrates all the basic constructs of
- Mouse -- I/O, loops, the if construct, arithmetic and subroutines.
-
- NUMBERS.MSE prints out the numbers from 0 to 99. It contains a loop, an
- assignment, a read etc. and is a good starter program.
-
- OLDMACDO.MSE
-
- Peter Grogono wrote this little gem. Difficult to follow, but fun to run,
- try
-
- MOUSE OLDMACDO.MSE <ret>
-
- when you want to entertain yourself, or a child. The recursive structure
- of a famous nursery rhyme is captured by this fun program.
-
- QSORT.MSE
-
- The quick sort works by partitioning a list of numbers into two halves,
- putting everthing that is less than the number in the middle in the left
- half, everything that is greater in the right, and then doing the same
- thing to the two lists just created, etc. Pointers to the partitions and
- recursion are used in this extremely fast sort.
-
- TEST.MSE
-
- This exercises the interpreter itself and is another good program to study
- when you're learning the language. It prints out lines like
-
- 1000=1000=1000=1000 etc.
-
- Each 1000 is computed by a different method.
-
- SOLVE.MSE
-
- This program is my most ambitious effort in Mouse to date. It solves a
- system of 3 equations in 3 unknowns. The user is provided with a data entry
- form. This form uses a macro to position the cursor at a specified row and
- column and is therfore terminal hardware specific. ADM-3A escape sequences
- are used here. This macro is the work horse in Z80.MSE and HC.MSE as well
- (which see). The 12 numbers entered (9 coefficients, 3 right-hand-side
- values) are manipulated to give the exact and unique answer to the system,
- if it exists. Try writing a program which solves the system below:
-
- 38x -21y +16z = -8
- 3x +10y -1z = 4
- -8x -4y +11z = 18
-
- (exact, formatted, mixed number answers, please!) and see if you can do it
- in 4k ! The hardest part of this program was the line which printed the
- answer. For the system above, it gives
-
- x = -2682/5641
- y = 3932/5641
- z = 1 3069/5641
-
- Type
-
- MOUSE SOLVE.MSE <ret>
-
- to run the program.
-
- Z80.MSE
-
- This program draws a Mouse on the screen. Try typing
-
- MOUSE Z80.MSE <ret>
-
- It consists mostly of a bunch of row and column coordinates which tell the
- cursor where to position itself before plotting. The letter Z and the
- numbers 8 and 0 are each drawn with a corresponding macro as is the mouse
- itself. Horizontal and vertical line drawing macros were written to draw
- the straight line segments in the figure. A macro which does nothing but
- pause a specified number of seconds was written to give the viewer time to
- see the figure, once drawn.
-
- COCONUT.MSE
-
- This is a rather ambitious program which solves the famous coconuts and
- missionaries problem.
-
- SELFGEN.MSE
-
- This crytic little program generates its own source code when run. See
- SELFGEN.ART for the details.
-
- CALC.MSE
-
- A minimal calculator program.
-
- Z3INTP24.COM
-
- This program will reformat and install Z-System terminal capability data
- into the "interface page" of Turbo Pascal programs. You must be running
- under Z-System for this to work.
-
- ZFEST.PAS, ZFEST.COM, ZFEST.DAT (See ZFEST.LBR)
-
- This is the source code of a program which displays a little "slide show"
- of cows. It uses a data file, ZFEST.DAT. The executable is ZFEST.COM.
- Compare this to COW.MSE.
-
- MOUSE-1.ART, MOUSE-2.ART
-
- Two articles on the Mouse language.
-
- FILES.DOC
-
- This file.
-
- Revised 2/23/93
-