
                     //--------------------------------//
                     //  Programmer's Reference        //
                     //--------------------------------//

                                   ( Index )

                   1. Introduction
                   2. Supported Screen Modes
                   3. The Mouse cursor
                   4. Mouse Function Calls

----------------------------------------------------------------------------

1. Introduction

   Mitsumi Mouse Driver is a software program designed to provide the Operating
   System with data input through the mouse. In this version of the mouse
   driver, 49 functions are provided.
   The purpose of this document is to provide the application developer 
   information about the mouse driver. The information included is about
   video mode, mouse driver function calls, and mouse function call
   interfaces.

   * The functions supported by this version of Mitsumi Mouse Driver are
     compatible with Microsoft mouse driver.

2. Supported Video Mode

   The Mitsumi Mouse Driver will support the following Video adapters.

        Video Adapter                               |    Mode(HEX)
   -------------------------------------------------+-------------------
   MDA    (Monochrome Display Adapter)              | 7,F
   CGA    (Color Graphics Adapter)                  | 0-7
   EGA    (Enhanced Graphics Adapter)               | 0-7,D-10
   MCGA   (Multi-Color Graphics Array)              | 0-7,11,13
   VGA    (Video Graphics Array)                    | 0-7,D-13

   The Mitsumi Mouse Driver will support the following Screen Modes.

      Mode  |Color|  Text/Graphics        | Virtual Screen | Cell Size
   ---------+-----+-----------------------+----------------+-----------
        0   |   2 |  40x25       Text     |     640x200    |   16x8
   ---------+-----+-----------------------+----------------+-----------
        1   |  16 |  40x25       Text     |     640x200    |   16x8
   ---------+-----+-----------------------+----------------+-----------
        2   |   2 |  80x25       Text     |     640x200    |    8x8
   ---------+-----+-----------------------+----------------+-----------
        3   |  16 |  80x25       Text     |     640x200    |    8x8
   ---------+-----+-----------------------+----------------+-----------
        4   |   4 |  320x200     Graphic  |     640x200    |    2x1
   ---------+-----+-----------------------+----------------+-----------
        5   |  4G |  320x200     Graphic  |     640x200    |    2x1
   ---------+-----+-----------------------+----------------+-----------
        6   |   2 |  640x200     Graphic  |     640x200    |    1x1
   ---------+-----+-----------------------+----------------+-----------
        7   |   2 |  80x25       Text     |     640x200    |    8x8
   ---------+-----+-----------------------+----------------+-----------
        D   |  16 |  320x200     Graphic  |     640x200    |    2x1
   ---------+-----+-----------------------+----------------+-----------
        E   |  16 |  640x350     Graphic  |     640x200    |    1x1
   ---------+-----+-----------------------+----------------+-----------
        F   |   2 |  640x350     Graphic  |     640x350    |    1x1
   ---------+-----+-----------------------+----------------+-----------
       10   |  16 |  640x350     Graphic  |     640x350    |    1x1
   ---------+-----+-----------------------+----------------+-----------
       11   |   2 |  640x480     Graphic  |     640x480    |    1x1
   ---------+-----+-----------------------+----------------+-----------
       12   |  16 |  640x480     Graphic  |     640x480    |    1x1
   ---------+-----+-----------------------+----------------+-----------
       13   | 256 |  320x200     Graphic  |     640x200    |    2x1
   ---------+-----+-----------------------+----------------+-----------

3. The Mouse Cursor

   3 types of cursors can be used by the Mitsumi Mouse Driver.

        * A Graphic cursor
        * A Software text cursor
        * A Hardware text cursor

   a) The Graphic cursor

      This cursor is used in the graphic mode. Normally it is formed with 16x16
      pixels. There are two 16x16 pixels structures used to define the mouse
      cursor, these are the Screen mask and the Cursor mask. The Screen mask is
      data that is ANDed with the background.  When this pixel is 0, the color 
      will be black.  The Cursor mask represents the shape of the cursor. After
      ANDing with the Screen mask, an XOR operation is done using Cursor mask.

      The effects on the screen are shown in the following table.

        Screen Mask  |  Cursor Mask  |  Effect on the Screen
      ---------------+---------------+------------------------
             0       |       0       |           0
             0       |       1       |           1
             1       |       0       |       No Effect
             1       |       1       |        Reverse
      ---------------+---------------+------------------------

   b) The Software Text Cursor

      This cursor is used in the text mode for the video adapter and is 
      displayed using a text letter. This cursor is formed by the Screen
      mask and the Cursor mask, each with 16 bits of data.
      Like the Graphic cursor, the Screen mask and Cursor mask's function is
      similar. The only difference is that AND and XOR operations are done
      on the Letter that is covered by the cursor. The effects on the screen
      are shown in the following table.

         Bit   |  Meanings
      ---------+----------------------------------------------------------
        15     |  Blink(1:Blink, 0:Don't Blink)
        14-12  |  Background Color
        11     |  Bright(1:High, 0:Mid)
        8-10   |  Foreground Color
        0-7    |  ASCII Character Code

   c) The Hardware Text Cursor

      This function allows the Mouse cursor to be displayed by the hardware 
      of the machine.  Although the actual hardware supporting this function
      is not contained within the mouse itself, the Mitsumi Mouse driver is 
      fully capable of supporting this function.

      Usually the hardware cursor is a structure of data of 8x14 pixel. The
      horizontal line of the pixel is called scan line. The scan line is
      displayed as bar when it is turned on. The shape of the mouse is
      represented by defining the visible range of the cursor.

4. Mouse Function Calls

   a) How to use function calls.

      To use any of the Mouse function calls, all you need is to set the
      proper values at a specific register and call INT 33H for execution.

      For example, to use the function call #4 to move the cursor's position
      to (200, 80), create the following assembly language routine:

             MOV        ax, 4
             MOV        cx, 200
             MOV        dx, 80
             INT        33H

   b) The list of supported functions

      Function|
      --------+-----------------------------------------------------
         0    |  Reset Mouse and retrieve status
         1    |  Show cursor
         2    |  Erase cursor
         3    |  Retrieve status of button and cursor position
         4    |  Set cursor position
         5    |  Retrieve button down state
         6    |  Retrieve button up state
         7    |  Set horizontal position range of cursor
         8    |  Set vertical position range of cursor
         9    |  Set graphic cursor
        10    |  Set text cursor
        11    |  Retrieve distance which mouse had moved
        12    |  Set interrupt subroutine mask and address
        13    |  Start light pen emulation mode
        14    |  End light pen emulation mode
        15    |  Set mickey value per pixel
        16    |  Conditional Off
        19    |  Set double speed threshold
        20    |  Exchange interrupt subroutine
        21    |  Retrieve status valuable memory size
        22    |  Save mouse driver condition
        23    |  Restore mouse driver condition
        24    |  Set alternate user interrupt mask and address
        25    |  Retrieve  alternate user interrupt address
        26    |  Set mouse sensitivity
        27    |  Retrieve sensitivity
        29    |  Set current cursor's displaying page number
        30    |  Retrieve current cursor's displaying page number
        31    |  Disable mouse driver
        32    |  Enable mouse driver
        33    |  Reset mouse software
        34    |  Set message language
        35    |  Retrieve message language
        36    |  Retrieve mouse version number
        37    |  Retrieve mouse information(1)
        38    |  Retrieve mouse information(2)
        39    |  Retrieve mouse information(3)
        40    |  Set screen mode
        41    |  Searching screen mode
        42    |  Retrieve mouse information(4)
        43    |  Set acceleration curve data
        44    |  Retrieve acceleration curve data
        45    |  Set/retrieve acceleration curve data
        47    |  Mouse hardware reset
        48    |  Set/retrieve ball-point mouse information
        49    |  Retrieve virtual minimum/maximum coordinate
        50    |  Retrieve supported extended function
        51    |  Retrieve switch setting
        52    |  Retrieve MOUSE.INI

   c) Mouse function calls interface definitions

      >> Function 0  <<

      Reset the Mouse and retrieve status

      > Return the current Mouse's hardware and software status.
      > Reset the mouse driver parameters. This does not reset the alternate
        user's interrupt mask

        -Cursor position                      : Middle of screen
        -Internal Cursor Flag                 : -1(don't show)
        -Graphic Cursor                       : arrow
        -Text Cursor                          : inverse
        -Interrupt mask                       : all clear
        -Light pen emulation mode             : ON
        -Horizontal mickey/pixel value        : 8 (mickey/8pixel)
        -Vertical mickey/pixel value          : 16(mickey/8pixel)
        -Double speed threshold               : 64(mickey/second)
        -Minimum horizontal position          : 0
        -Maximum horizontal position          : Maximum value at current
                                                display mode
        -Minimum vertical position            : 0
        -Maximum vertical position            : Maximum value at current
                                                display mode
        -CRT page number                      : 0

      Entry
                AX = 0

      Return
                AX = Mouse Status               -1      Mouse is installed
                                                0       Other
                BX = number of Mouse buttons (When mouse is installed)

      >> Function 1 <<

      Show Cursor

      > This function increments the internal cursor flag by 1(see fCursor:
        function 42). When the value of the flag is 0, the cursor is
        displayed.
      > When the internal cursor flag is already 0, this function will do
        nothing.

      Entry
                AX = 1

      Return
                none

      >> Function 2 <<

      Erase Cursor

      > This function erases the mouse cursor and decrements the internal
        cursor flag by 1. Even when the cursor is not displayed, the mouse
        driver continues to trace the mouse cursor position.

      Entry
                AX = 2

      Return
                none


      >> Function 3 <<

      Retrieve the status of button and cursor position

      > This function returns the current mouse cursor's horizontal and
        vertical position and the status of the left and right button.
      > Bit 0 represents the status of left button and Bit 1 represents the
        right button. When the bit is 0, it means that button is not
        pressed. When the bit is 1, it means that button is pressed. The
        position of the cursor will always be based on the maximum and
        minimum value of the virtual screen.

      Entry
                AX = 3

      Return
                BX = button status
                CX = cursor's horizontal position
                DX = cursor's vertical position

      >> Function 4 <<

      Set cursor position

      > This function sets the horizontal and vertical cursor position on
        the virtual screen.
      > The parameter values must be within the range of the virtual screen.
      > When Function 7 and Function 8 are used to set the range of the
        mouse cursor position, the cursor position will be adjusted to fit
        the range.

      Entry
                AX = 4
                CX = new horizontal cursor position
                DX = new vertical cursor position

      Return
                none

      >> Function 5 <<

      Retrieve the button down state

      > This function returns the current status, the number of times the
        indicated button was pressed since the last call of function 5, and
        the horizontal and vertical position of the indicated button.
      > Set the button number of the button to check at the register BX
        (0: Left button, 1: Right button)
      > The state of the button is the same as function 3. Bit 0 is the left
        button; Bit 1 is the right button; 0 indicates the button is not pressed;
        1 indicates the button is pressed.
      > The number of button presses will be indicated as value from 0 to
        65,535. After this function is called, the value will be reset.
      > The position of the cursor will be the position of the cursor when
        the button is last pressed.

      Entry
                AX = 5
                BX = button number

      Return
                AX = condition of button
                BX = the number of times the button has been pressed since
                     the last call
                CX = the horizontal position of cursor when button is last
                     pressed
                DX = the vertical position of cursor when button is last
                     pressed

      >> Function 6 <<

      Retrieve the button up state

      > This function returns the number of times the button had been released.
        This is in contrast to function 5.
      > All entry parameters are same as function 5.
      > Return parameters are also similar to function 5 except that BX will
        be the number of times the button has been released and CX, DX will be
        the position of last time that the button has been released.

      Entry
                AX = 6
                BX = button number

      Return
                AX = condition of button
                BX = the number button had been released since last call
                CX = the horizontal position of cursor when button is last
                     released
                DX = the vertical position of cursor when button is last
                     released

      >> Function 7 <<

      Set the horizontal position range of cursor

      > This function sets the range for the horizontal position of the
        mouse cursor. The minimum and maximum values must be within range
        of the current virtual screen.
      > When the maximum value is smaller than minimum value, both values
        are exchanged.

      Entry
                AX = 7
                CX = minimum position
                DX = maximum position

      Return
                none


      >> Function 8 <<

      Set the vertical position range of cursor

      > This function sets the range of the vertical position for the mouse
        cursor. The minimum and maximum values must be within range of
        the current virtual screen.
      > When the maximum value is smaller than minimum value, both values
        are exchanged.

      Entry
                AX = 8
                CX = minimum position
                DX = maximum position

      Return
                none

      >> Function 9 <<

      Set the graphic cursor

      > This function sets the shape, color, and hot spot for the graphic
        cursor.
      > The size of the graphic cursor is 16x16 bits. Data is stored
        following the order of screen cursor, cursor mask with 16 words
        each.
      > The value of the hot spot is set to the upper left pixel of the
        16x16 bit data of cursor block.

      Entry
                AX = 9
                BX = the horizontal position of hot spot
                CX = the vertical position of hot spot
                DX = pointer to screen mask and cursor mask ( offset )
                ES = pointer to screen mask and cursor mask ( segment )

      Return
                none

      >> Function 10 <<

      Set the text cursor

      > This function selects the software or hardware cursor and then sets
        the scan line position of the cursor.
      > BX register determine the software or hardware cursor.
        (0 indicates software, 1 indicates hardware)
      > When software cursor is selected, CX, DX will indicate the screen mask
        value and cursor mask value.
      > When hardware cursor is selected, CX, DX will indicate the first and
        last scan line number.

      Entry
                AX = 10
                BX = selection of cursor
                CX = screen mask value or scan line start position
                DX = cursor mask value or scan line end position

      Return
                none

      >> Function 11 <<

      Retrieve distance which mouse has moved

      > This function returns the mickey count since last called.
        The Mickey count is the value representing the distance
        moved by mouse (mouse with 400ppi will be 1/400 inch).
      > Return values will be in the range from -32768 to 32767. On the
        horizontal position, a positive value indicates movement to the 
        right, a negative indicates movement to the left. On the vertical
        position, a positive value indicates movement in the down direction
        and negative indicates movement in the up direction.
      > This function will ignore overflow of the calculation. The Mickey
        value will be reset to 0 every time called.

      Entry
                AX = 11

      Return
                CX = horizontal Mickey count
                DX = vertical Mickey count

      >> Function 12 <<

      Set interrupt subroutine mask and address

      > This function sets the mouse hardware interrupt subroutine mask and
        subroutine address.
      > When the mouse hardware interrupt occurs, the executing program will
        be stopped and the mouse interrupt subroutine will be called. The
        program will resume execution when the mouse interrupt routine is
        finished.
      > Each of the Call mask vales represents the following

                Bit 0:  Cursor position change
                Bit 1:  Left button pressed
                Bit 2:  Left button released
                Bit 3:  Right button pressed
                Bit 4:  Right button released

      >  The following values must be stored in the following registers
         when the subroutine is called.

                AX:     Condition mask
                BX:     Button Status
                CX:     Horizontal Cursor position
                DX:     Vertical Cursor position
                SI:     Horizontal distance (mickey)
                DI:     Vertical distance

      Entry
                AX = 12
                CX = call mask
                DX = subroutine address (offset)
                ES = subroutine address (segment)

      Return
                none

      >> Function 13 <<

      Start light pen emulation mode

      > This function enables the light pen emulation mode.
      > Pen down, Pen off the screen is simulated by the mouse button.

      Entry
                AX = 13

      Return
                none

      >> Function 14 <<

      End light pen emulation mode

      > This function will disable light pen emulation mode and return to
        the normal mouse operation.

      Entry
                AX = 14

      Return
                none

      >> Function 15 <<

      Set mickey value per pixel

      > This function sets the mickey value for horizontal and vertical
        mouse move.
      > The value used here is the mickey value per 8 pixel on the virtual
        screen. Possible values are from 1 to 32,767.
      > The default value is 8 mickey/8 pixel for horizontal, 16 mickey/8
        pixel for vertical.

      Entry
                AX = 15
                CX = horizontal mickey/pixel
                DX = vertical mickey/pixel

      Return
                none

      >> Function 16 <<

      Conditional Off

      > This function sets the area of the screen to hide the mouse display.
        Mouse cursor will not displayed within this area.
      > It is useful when the refreshing the screen while displaying mouse
        cursor.
      > After using this function, it is necessary to call function 1 to
        display the mouse cursor.

      Entry
                AX = 16
                CX = X coordinate of the left limit of the area
                DX = Y coordinate of the upper limit of the area
                SI = X coordinate of the right limit of the area
                DI = Y coordinate of the lower limit of the area

      Return
                none

      >> Function 19 <<

      Set double speed threshold


      > This function sets the value of threshold to speed up mouse.
      > The default value is 64 mickey/sec. When function 0 or function 33
        are called, the value will be reset to the default value.

      Entry
                AX = 19
                DX = the value of threshold (mickey/sec)

      Return
                none

      >> Function 20 <<

      Exchange interrupt subroutine

      > This function exchanges the current interrupt subroutine with
        a new subroutine address and call mask. The previous call
        subroutine and call mask will be returned by the function.
      > See function 12 about call mask.

      Entry
                AX = 20
                CX = new call mask
                DX = new subroutine address (offset)
                ES = new subroutine address (segment)

      Return
                CX = previous call mask
                DX = previous subroutine address (offset)
                ES = previous subroutine address (segment)

      >> Function 21 <<

      Return current memory buffer size

      > This function returns the size of the buffer memory used by the
        mouse driver.

      Entry
                AX = 21

      Return
                BX = Size of the buffer memory used by the mouse driver

      >> Function 22 <<

      Save the current mouse driver state

      > This function will save the current mouse driver status to the
        appointed memory buffer.
      > The size of the buffer should be at least as large as the value
        returned by function 21.

      Entry
                AX = 22
                DX = pointer to the buffer memory (offset)
                ES = pointer to the buffer memory (segment)

      Return
                none

      >> Function 23 <<

      Restore the mouse driver state

      > This function will restore the state preserved by the function
        22.
      > The restore data must be in the appointed buffer memory.

      Entry
                AX = 23
                DX = pointer to the buffer memory (offset)
                ES = pointer to the buffer memory (segment)

      Return
                none

      >> Function 24 <<

      Set alternate user interrupt mask and address

      > This function can set up to 3 alternate user subroutine address and
        masks.
      > Call masks are as follows:

                Bit 0:  Change of mouse cursor position
                Bit 1:  Pressing left button
                Bit 2:  Releasing left button
                Bit 3:  Pressing right button
                Bit 4:  Releasing right button
                Bit 5:  Pressing Shift key
                Bit 6:  Pressing Ctrl key
                Bit 7:  Pressing Alt key

        It is necessary to combine Bits 5, 6, 7 with Bits 0, 1, 2, 3, 4.

      > To disable the function set with this function, it is necessary to
        set the mask Bit to 0 and call this function again.

        * The mask set with function 24 cannot be reset with function 0 or
          function 33.

          Use function 24 to reset.

      > When calling the subroutine, the following data should be stored in
        registers as shown below:

                AX:     condition mask
                BX:     button status
                CX:     horizontal cursor coordinate
                DX:     vertical cursor coordinate
                SI:     horizontal moved distance (unit in mickey)
                DI:     vertically moved distance

      Entry
                AX = 24
                CX = user interrupt call mask
                DX = user defined subroutine address (offset)
                ES = user defined subroutine address (segment)

      Return
                AX = error condition (-1 when error)

      >> Function 25 <<

      Retrieve alternate user interrupt address

      > This function returns the address of alternate user subroutine
        corresponding to the given call mask.
      > See function 24 about call mask.

      Entry
                AX = 25
                CX = user defined interrupt call mask

      Return
                AX = error status -1     without vector/mask.
                                         BX, CX, and DX will return 0
                BX = user subroutine address (segment)
                CX = user interrupt call mask
                DX = user subroutine address (offset)

      >> Function 26 <<

      Set mouse sensitivity

      > This function operates similar to function 15 and function 19
        together except that function 26 will not use mickey/pixel value
        as function 15 but use the scale factor of mickey.

      Entry
                AX = 26
                BX = horizontal mickey sensitive number
                CX = vertical mickey sensitive number
                DX = the value of double speed threshold

      Return
                none

      >> Function 27 <<

      Retrieve mouse sensitivity

      > This function will return the mouse sensitivity scale factor set by
        function 26.
      > The value for the sensitivity scale factor will be in the range of 1
        to 100, with 50 as default. The smaller the value, the slower the
        cursor will be. The larger the value, the faster the cursor will
        move.

      Entry
                AX = 27

      Return
                BX = horizontal mickey sensitive number
                CX = vertical mickey sensitive number
                DX = the value of double speed threshold

      >> Function 29 <<

      Set the current display page number for the cursor

      > This function will set the CRT display page number for the
        mouse.

      Entry
                AX = 29
                BX = CRT display page number for the mouse cursor

      Return
                none

      >> Function 30 <<

      Retrieve current cursor display page number

      > This function returns the CRT page number where the mouse cursor is
        displayed.

      Entry
                AX = 30

      Return
                BX = The current CRT display page number for the mouse cursor

      >> Function 31 <<

      Disable the mouse driver

      > This function will stop the operation of the mouse driver and remove
        the mouse driver vector.

      Entry
                AX = 31

      Return
                AX = error status (-1 when error)
                BX = previous interrupt 33H vector (offset)
                ES = previous interrupt 33H vector (segment)

      >> Function 32 <<

      Enable the mouse driver

      > This function sets the mouse interrupt at interrupt vector 33H and
        enables mouse driver.

      Entry
                AX = 32

      Return
                AX = mouse status              -1  (mouse is installed)
                                                0  (other)
                BX = number of mouse button (when mouse is installed)

      >> Function 33 <<

      Reset mouse software

      > This function will only reset the software of the mouse but not the
        hardware.
      > See function 0 for the reset parameter values.

      Entry
                AX = 33

      Return
                AX =    -1      (When mouse is installed)
                        33      (other)
                BX =    2       (When AX = -1)

      >> Function 34 <<

      Set message language

      > This function sets the language used for message display.
      > The following languages can be used:

        0: English       6: Spanish
        1: French        8: Italian
        3: German       10: Japanese

      Entry
                AX = 34
                BX = Language number

      Return
                none

      >> Function 35 <<

      Retrieve message language

      > This function returns the current message language number.
      > See function 34 for the language number.

      Entry
                AX = 35

      Return
                BX = The current message language

      >> Function 36 <<

      Retrieve mouse version number

      > This function returns the mouse driver's version number, mouse type
        and mouse interrupt number.
      > The following mouse types are returned:

                2: Serial mouse
                4: PS/2 mouse

      Entry
                AX  =  36

      Return
                BH = major mouse driver version number
                BL = minor mouse driver version number
                CH = mouse type
                CL = IRQ number

      >> Function 37 <<

      Retrieve mouse information(1)

      > This function returns general information about the mouse driver.
      > The return value in BX/CX/DX are used for OS/2.
      > Each bit in AX denotes the following information.

        Bit 15: 0 - Loaded as a .COM file
                1 - Loaded by CONFIG.SYS
        Bit 14: 0 for the early mouse driver of external type,
                1 for the new internal type. The new driver can be called
                  MDD.
        Bit 12/13: 00 for software text cursor. Bit 13 is 0, 12 is 1 for
                   hardware text cursor. Bit 13 is 0, 12 is 0 or 1 for
                   graphic cursor.
        Bit 8-11: denotes the interrupt rate to scan the mouse status
                  (InPort mouse only).
        Bit 0-7: Used only for the internal type mouse driver.
                 This 1 byte digit is the count of MDD that is currently
                 working.

      For unused flags, a predefined reserved value is returned.

      Entry
                AX = 37

      Return
                AX = General Information
                BX = fCursorLock
                CX = fInMouseCode
                DX = fMouseBusy

      >> Function 38 <<

      Retrieve mouse information (2)

      > This function returns the flag indicating if the mouse driver is
        enabled or disabled and the maximum coordinate of the current video
        mode.
      > When function 31 is called and the mouse driver is disabled, BX will
        be any value other than 0. When the mouse driver is enabled, BX then
        will be 0.
      > The default value of the video mode will be stored in CX, DX
        register.

      Entry
                AX = 38

      Return
                BX = disable mouse flag: fMseDisable
                CX = maximum horizontal coordinate
                DX = maximum vertical coordinate

      >> Function 39 <<

      Retrieve mouse information (3)

      > This function returns the cursor information and not yet processed
        mickey count data.
      > When software mouse is enabled, screen mask and cursor mask will be
        in AX and BX register. When hardware cursor is enabled, the start
        and end position of scan line will be in each of the AX, BX
        register.
      > The unprocessed data since last mouse movement will be accumulated
        in CX and DX register.

      Entry
                AX = 39

      Return
                AX = screen mask/scan start position
                BX = cursor mask/scan end position
                CX = horizontal mickey count
                DX = vertical mickey count

      >> Function 40 <<

      Set screen mode

      > This function sets the video mode of the mouse driver.
      > This function ignores those modes that are not supported by the
        computer video hardware.
      > Only suitable video modes take effect and CX is cleared by 0.
      > When the specified video mode is not suitable, the video mode number
        set in CX is returned.
      > In those modes that support font size control, the high byte of DX
        specifies the Y font size, and the low byte specifies the X font size.
      > Setting the font size parameter to 0 sets the default font size
        as defined by the inner setting of the specified video mode.

      Entry
                AX = 40
                CX = video mode
                DX = font size

      Return
                CX = completion flag

      >> Function 41 <<

      Searching screen mode

      > This function returns the list of all video modes that the currently
        installed mouse driver supports.
      > The video mode number returned in CX is the same as that of function
        40 to set the video mode.
      > To get the first video mode, CX is set to 0. To get the next video
        mode in the list, CX is set to any nonzero value.
      > The end of the list is signified by the returned video number set to
        0.
      > Setting the font size parameter to 0 sets to the default font size
        which is defined by the inner setting of the specified video mode.
      > If the explanation string about the listed video mode is available,
        the segment and offset to the head of the string is returned.
      > If there is no explanation string to the currently installed mouse
        driver, the pointer is NULL.
      > The string terminates a $ sign(decimal 36 of ASCII) and a 0 byte
        following to the '$'.

      Entry
                AX = 41
                CX = read head or next video mode

      Return
                ES = segment of string
                CX = video mode number
                DX = offset of string

      >> Function 42 <<

      Retrieve mouse information (4)

      > This function returns the hot spot of the cursor, mouse type, and
        internal counter for displaying cursor.
      > fCursor is the counter used by function 1 and function 2 for
        displaying.
      > Hot spot's coordinate is based on the upper left corner of the
        cursor block. The usual value should be with in from 0 to 15 which
        is the range of pixel although the possible range of value is from
        -128 to 127.
      > See function 36 for possible mouse type.

      Entry
                AX = 42

      Return
                AX = fCursor
                BX = cursor hot spot horizontal coordinate
                CX = cursor hot spot vertical coordinate
                DX = mouse type


      >> Function 43 <<

      Set acceleration curve data

      > This function loads the mouse driver with acceleration curve data
        and resets to the default curve as an option.
      > To reset to the default curve, the curve number is set to -1. To use
        other curves, it is set to a value from 1 to 4.
      > The ES:SI registers should be set to the address of the byte
        array that defines a curve.
      > The byte array has 324 bytes, and consists of 4 continuous tables
        that thoroughly define an acceleration curve.

      Entry
                AX = 43
                BX = curve number
                ES = segment of curve data buffer
                SI = offset of curve data buffer

      Return
                AX = completion flag

      >> Function 44 <<

      Retrieve acceleration curve data

      > This function gets the acceleration curve data of the mouse driver.
      > When this function completes normally, 0 is returned to the value of
        the completion flag.
      > The currently used acceleration curve number is returned in BX.
      > ES:SI registers return the address of 324-bytes array that defines
        4 kinds of acceleration curve.

      Entry
                AX = 44

      Return
                AX = completion flag
                BX = curve number
                ES = segment of curve data buffer
                SI = offset of curve data buffer

      >> Function 45 <<

      Set/retrieve acceleration curve data

      > This function sets one of 4 acceleration curves.
      > It returns the number of the currently used curve.
      > To get the number of the currently used curve, BX is set to -1. To
        set the curve number to use, BX is set to a number of 1 through 4.

      Entry
                AX = 45
                BX = get/set acceleration curve number
                   = -1: get current curve number
                   = 1-4: set curve number to 1-4

      Return
                AX = completion flag
                BX = curve number
                ES = segment of curve data buffer
                SI = offset of curve data buffer

      >> Function 47 <<

      Mouse hardware reset

      > This function works the same as Function 0 except that it does not
        reset the value of software.
      > When this function completes normally, -1 is returned to the value
        of the completion flag. When hardware reset fails, 0 is returned.

      Entry
                AX = 47

      Return
                AX = completion flag

      >> Function 48 <<

      Set/retrieve ball-point mouse information

      > This function sets/gets the direction of the ball-point mouse or the
        information of button mask.
      > To get the status of the ball-point mouse, 0 is set to the value of
        command. To set the angle of rotation and the mask, a nonzero value
        is set.
      > The rotation angle has a range from -32768 up to 32767 to the standard
        mouse direction.
      > The high byte of command denotes the mask of the primary button and
        the low byte denotes that of the secondary button.
      > When a ball-point mouse is supported the status is 0. Otherwise the
        state of the buttons is returned.
      > The angle of rotation is returned of range from 0 to 360 degree.
      > The high byte of button mask parameter denotes the primary button
        mask, the low byte is the secondary's.

      Entry
                AX = 48
                BX = rotation angle
                CX = command

      Return
                AX = completion flag
                CX = button mask
                DX = rotation angle

      >> Function 49 <<

      Retrieve virtual minimum/maximum coordinate

      > This function returns the maximum and minimum value of the virtual
        coordinate in horizontal and vertical direction of the current video
        mode.
      > The values of X and Y are the same set by Function 7 and 8.

      Entry
                AX = 49

      Return
                AX = minimum X axis of the virtual coordinate
                BX = minimum Y axis of the virtual coordinate
                CX = maximum X axis of the virtual coordinate
                DX = maximum Y axis of the virtual coordinate

      >> Function 50 <<

      Retrieve supported extended function

      > This function returns a 16 bit flag indicating the supported
        functions beyond function 37.
      > The highest bit represents function 37, and the lowest bit
        represents function 52.
      > A bit value of 1, indicates that the corresponding function is 
        supported.  A bit value of 0, indicates that the corresponding
        function is not supported.

      Entry
                AX = 50

      Return
                AX = Supported function flag

      >> Function 51

      Retrieve switch setting

      > This function returns the current setting of the command line switch
        that can be passed to the mouse driver.
      > This information is returned in a buffer.
      > CX denotes the length of the buffer.
      > ES:DX is the pointer to the buffer.

      Entry
                AX = 51
                CX = buffer length
                ES:DX = pointer to the buffer

      Return
                AX = 0
                CX = byte count returned to the buffer
                ES:DX = pointer to the buffer

      >> Function 52 <<

      Retrieve MOUSE.INI

      > This function returns the pointer to the buffer that designates the
        initialization file of mouse driver MOUSE.INI with a full path
        string.

      Entry
                AX = 52

      Return
                AX = 0
                ES = segment of buffer
                DX = offset of buffer


