"README.TXT" File Notes for Microsoft Mouse Programmer's Reference Companion Disks (c)1988, 1989 Microsoft Press This file consists of four parts: 1 Introduction 2 Contents of the Companion Disks 3 Instructions for Using the Companion Disks 4 Recent Changes to Libraries and the Mouse Driver ===< Part 1: Introduction >========================================== - REMINDER - It's a good idea to make backup copies of these disks before you proceed. See the instructions in Part 3. These disks contain a variety of files to enhance your understanding and use of the information presented in the Microsoft Mouse Programmer's Reference. Sample programs demonstrate mouse programming using interpreted BASIC, QuickBASIC, C and QuickC, Macro Assembler, FORTRAN, and Pascal. Many of the mouse driver functions are demonstrated, using a variety of techniques. Many of these programs are "extras," not mentioned in the book. Read the comments in each program listing for more information. A collection of mouse menu programs provides menus for use with several popular applications software products. These menu listings also provide a solid foundation for developing your own mouse menus for use with other applications. These disks also contain current releases of the software tools described in the book--the latest MOUSE.LIB and EGA.LIB librariesfor software development and the MAKEMENU.EXE and MENU.COM files for creating and loading mouse menu programs. The example programs on these disks were provided by a number of different programmers and represent a wide cross-section of programming styles and techniques. Study the source code to understand what the program will do before you run the programs. All programs on the disks are tested and assumed to be error-free. If you encounter a problem, please contact: Microsoft Press 16011 NE 36th Way Box 97017 Redmond, WA 98073-9717 Attn: Mouse Programmer's Reference Editor (No phone calls, please.) ===< Part 2: Contents of the Companion Disks >====================== Directory structure of each disk: (Disk 1 root)----+ | +-ASM +-BAS +-C&QC +-EGA---------+-FCN12-------+-DISPLAY | | +-INCVAR | +-MIXLANG-------FORTRAN | +-PAGE | +-PALETTE-----+-COLOR | +-MOVE +-FOR +-HGC---------+-C | +-PASCAL +-PASCAL +-QB (Disk 2 root)----+ | +-MENUS +-UTILS List of files in each directory: Disk 1 Disk 2 ------------- ------------- \(root) \MENUS ega.lib color.def mouse.lib color.mnu readme.exe drop.def readme.txt drop.mnu execute1.def \ASM execute2.def asmexamp.asm kbd.def atest.asm kbd.mnu tst1.asm makemenu.exe tst12&20.asm menu.com tst24.asm mpibm.def mpms.def \BAS sym.def batest.bas vc.def piano.bas ws.def tst1.bas \UTILS \C&QC asm.inc cmouse.c befunc.bas ctest.c bmfunc.bas lpen.c cefunc.h m20sub.asm cefuncc.lib mouh_int.c cefuncl.lib mouh_lib.c cefuncm.lib mous_int.c cefuncs.lib mous_lib.c cmfunc.h pencil.c cmfuncc.lib mscexamp.c cmfuncl.lib cmfuncm.lib \EGA\FCN12\DISPLAY cmfuncs.lib mouse12.c ega.com mouse12.mak ega.sys msfcn12.asm egatest.c egatest.h \EGA\FCN12\INCVAR egatestc.mak demo12.c egatestl.mak fcn12.mak egatestm.mak sub12.asm egatests.mak funcsubs.asm \EGA\MIXLANG\FORTRAN kb.asm mtest.for menu.c mtestasm.asm mousetst.c mousetst.h \EGA\PAGE mouststc.mak dance.c mouststl.mak mouststm.mak \EGA\PALETTE\COLOR mouststs.mak egalib.c mousutil.c readme.txt \EGA\PALETTE\MOVE flow.c snow.c \FOR fdemo.for for1.for ftest.for subs.asm \HGC\C init.asm mousehgc.c mousehgc.mak \HGC\PASCAL initpas.asm mousehgc.mak mousehgc.pas \PASCAL initpas.asm moushgcp.pas pasexamp.pas pdemo.pas subs.asm \QB absolute.bas intrrupt.bas mouse.bas mousedem.bas pencil.bas qb12&20.bas qb24.bas qbinc.bas qbint.bas qbmou.bas qbtest.bas readme.txt ===< Part 3: Instructions for Using the Companion Disks >=========== Making backup copies: If you have not already done so, immediately use the DISKCOPY command to make backup copies of these disks. Store the originals in a safe place and use only the copies. Using the programs: Refer to your language product's documentation for specific instruc- tions on compiling and linking these programs. A good way to stay organized is to copy the files from these disks into a temporary, or working, directory on your hard disk. This helps prevent accidental alterations of the original files and makes it safer to experiment with them. Many of the program listings have important instructions in the first few comment lines. For example, most of the C listings provide the specific DOS command that will compile and link the program. These programs also list the files to be added to the .MAK file for compiling and linking under QuickC. Always check these specific instructions before running a program. They'll also help you anticipate the program's behavior. Look for two other README.TXT files on these disks. README.TXT in the \QB directory on this disk explains the steps you must take to build a Quick Library to be loaded with QuickBASIC. For proper operation, most of the QuickBASIC programs on these disks require this Quick Library to be loaded into the QuickBASIC environment. The README.TXT file in the \UTILS directory on the second disk provides background information about the programs in that directory. ===< Part 4: Recent Changes >======================================== **** Changes to the mouse library: 1. The small and large model mouse call names have been changed. This affects all high level languages except C. Small model Large model Old name: mouse mouses New name: mouses mousel 2. The following interpreted BASIC (BASICA, GW-BASIC) changes (library code resides in the actual mouse driver) are effective in version 6.25 and later of the mouse driver: Functions 9, 12, and 20 now have an extra level of indirection for M4%. This fixes a bug in Function 20 and keeps the interface scheme consistent for all libraries. The following is an example for version 6.25 and later: 100 M4%=VARPTR(USERSUB%(0)) ' Pass pointer to user interrupt handler 120 CALL MOUSE(M1%, M2%, M3%, M4%) ' Call mouse library interface The following is a workaround for mouse drivers before version 6.25: 100 MOUSETMP%=USERSUB%(0) ' Save old value 120 CALL MOUSE(M1%, M2%, M3%, USERSUB%(0)) ' Call mouse library interface 130 M4%=USERSUB%(0) ' Returned this way because of bug 140 USERSUB%(0)=MOUSETMP% ' Restore original value Remember: M2%=0 to use BASIC's data segment by default 3. A "library," BMFUNC.BAS, has been created for Interpreted BASIC (BASICA, GW-BASIC). This code is designed to be merged at the end of an Interpreted BASIC program to provide subroutines for accessing the mouse. BMFUNC.BAS is located in the \UTILS directory on Disk 2. **** Changes to the EGA Shadow Register Interface library: 1. The EGA Shadow Register Interface library now has 4 parameters instead of 5. ES is returned in E4% for function 0FAH. E2% is destroyed for functions 0F1H, 0F3H, and 0F7H. 2. The EGA Shadow Register Interface library now correctly sets the hardware latch to address mode when Attribute Controller Registers are to be modified. (The EGA Shadow Register Interface library requires Address mode on entry.) 3. A library for simple operations and documentation, BEFUNC.BAS, has been created for interpreted BASIC (BASICA, GW-BASIC). It's not a good idea to do extensive EGA hardware register manipulations from Interpreted BASIC. BEFUNC.BAS is located in the \UTILS directory on Disk 2.