home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / mouse03g.zip / MOUSE0G.DOC < prev    next >
Text File  |  1995-10-18  |  5KB  |  102 lines

  1.            Mouse Driver for Programs that use the Cursor Keys
  2.                          Answers this question:
  3.            "How can I use the mouse in my current programs?"
  4.  
  5. Purpose:
  6.          This TSR makes the mouse useful in programs that don't support
  7.          a mouse. Put mouse support into C program source that uses
  8.          cursor keys. Source applys to expanded keyboard buffers. It
  9.          features "lock-on" horizontal and vertical mouse moves.
  10.  
  11. Simtel20 Title: "Mouse TSR emulates cursor keys /w ASM, C"
  12.  
  13. Version: 15 OCT 1995 [prev: 15 Feb 1992, 1 Dec 1991]
  14. Authors: Grant B. Gustafson
  15.          113JWB Math.Dept. Univ of Utah SLC, UT 84112
  16. email:   gustafso@math.utah.edu (Internet address)
  17.  
  18. Copyright:
  19.          The source code is owned by the author. It may be used
  20.          for educational purposes without limitation. Modified versions
  21.          of the sources are considered private copies and should bear
  22.          the new authors names but not the present author's name.
  23. Credits:
  24.          If you use this source code in your own sources, then the new
  25.          source becomes yours. You are under no obligation to give
  26.          credit or cite copyrights. If you make a change to the sources
  27.          that everyone should know about, then email a change order and
  28.          request your name to be added to the author list.
  29. Cost:
  30.          There is no charge, license fee or obligation. If someone makes
  31.          you pay for this, then it violates the intent of the author.
  32.  
  33. Responsibility:
  34.  
  35.          This computer program is used at your own risk. If you use it,
  36.          then you assume responsibility for anything that happens as a
  37.          result of the program operation, including but not limited to
  38.          programming errors, faulty operation, file system destruction.
  39.          The authors are not responsible.
  40.  
  41. SOURCE mouse0g.asm:
  42. This program gives simple mouse support to DOS programs that use the
  43. cursor keys. Mouse moves result in stuffing the keyboard buffer with
  44. cursor keys. When compiled it results in a TSR program.
  45.  
  46.  
  47. SOURCE mouse1g.c:
  48. This program gives simple mouse support to DOS programs that use the
  49. cursor keys. Mouse moves result in stuffing the keyboard buffer with
  50. cursor keys. It is designed to be inserted into a C program source.
  51. While functionally equivalent to mouse0g.asm, it consists of C routines
  52. and special startup and exit routines to be called from C.
  53.  
  54.  
  55. SOURCE mouse2g.asm:
  56. Same as mouse0g.asm, except it removes itself from memory upon demand.
  57. To understand the program source, read the source for mouse0g.asm first.
  58.  
  59.  
  60. BUG FIXES: Oct 1995, removed sti and cli from mouse handlers.
  61.            Parsed button presses differently. Shrunk COM file
  62.            size by 16 bytes. Versions for 1995 have new identifier.
  63.  
  64. USAGE:
  65. First load the mouse driver supplied by the mouse manufacturer. Run the
  66. TSR program and then your cursor key application. A custom specially
  67. compiled C program using source mouse1g.c does not use the TSR and
  68. therefore runs standalone.
  69.  
  70. Assembly of ASM source:
  71. To assemble one of the ASM programs, use TASM or MASM to make the OBJ
  72. file, then use TLINK /t or DOS LINK and EXE2BIN to create the COM file.
  73.  
  74. Assembly of custom C source:
  75. To assemble the C source into your progam source, making a stand-alone
  76. program that uses the mouse, copy the source into your program module
  77. and then alter your source code as follows:
  78.  
  79.    Startup: Call mousereset(). Call mousehook(). Mouse setup done!
  80.    Menus: If you enter a menu, where mouse action should be slower,
  81.           then call menumouse(1). On menu exit call menumouse(0).
  82.           The latter sets the mouse speed to normal.
  83.    Exit:  Upon program exit call mousereset(). This resets the
  84.           mouse driver (either a device or tsr from mouse manufacturer)
  85.           interrupt service routine that was set by mousehook().
  86.  
  87. See moustest.c for a simple sample program that uses cursor keys and
  88. also the mouse interface.
  89.  
  90. As presently written, TURBO-C is required. However, it is easy to modify
  91. the source for assembly with MSC 6.0. Your source code must use cursor
  92. keys, return and ESC keys in order to test all functions of the mouse
  93. routine. In TURBO-C this means your source probably gets keyboard input
  94. from the function getch() and you are parsing for two-byte function keys
  95. UP==(0,H), RIGHT==(0,M), DOWN==(0,P), LEFT==(0,K). If no parsing is
  96. done, then likely your program can recognize from the mouse only the
  97. RETURN key and the ESC key (left and right mouse buttons).
  98.  
  99. Manual by:
  100. Grant B. Gustafson
  101. Last manual revision Oct 1995
  102.