📄 mousetut.faq
字号:
pointer motion will double. The default is 64
mickeys/second; doubling can be disabled by setting DX to a
large value.
See also Functions 0Fh, 1Ah, 1Bh
==============================
Function 14h: Swap user-defined mouse event handlers
Call with AX = 0014h
CX = event mask
bit 0 mouse movement
bit 1 left button pressed
bit 2 left button released
bit 3 right button pressed
bit 4 right button released
bit 5 center button pressed
bit 6 center button released
ES:DX = segment:offset of event handler
Return CX = previous event mask
ES:DX = segment:offset of previous event handler
Notes On entrance to the handler:
AX = mouse event flags (see Notes)
BX = button states
bit 0 left button down (if set)
bit 1 right button down (if set)
bit 2 center button down (if set)
CX = x coordinate of pointer
DX = y coordinate of pointer
DI = raw horizontal mickey count
SI = raw vertical mickey count
DS = mouse driver data segment
The handler may be deactivated by calling function 00h or
this function with an event mask of zero.
See also Functions 0Ch, 18h
==============================
Function 15h: Get save state buffer size
Call with AX = 0015h
Return BX = buffer size in bytes
Notes Before running any external programs, applications should
save the mouse driver state; doing so will ensure that any
event handlers, sensitivity settings, or other settings will
remain intact. Of course, the driver state should be
restored when the external program is complete.
See also Functions 16h, 17h
==============================
Function 16h: Save driver state
Call with AX = 0016h
ES:DX = segment:offset of buffer
Return Nothing
Note Before running any external programs, applications should
save the mouse driver state; doing so will ensure that any
event handlers, sensitivity settings, or other settings will
remain intact. Of course, the driver state should be
restored when the external program is complete.
See also Functions 15h, 17h
==============================
Function 17h: Restore driver state
Call with AX = 0017h
ES:DX = segment:offset of buffer
Return Nothing
Note Before running any external programs, applications should
save the mouse driver state; doing so will ensure that any
event handlers, sensitivity settings, or other settings will
remain intact. Of course, the driver state should be
restored when the external program is complete.
See also Functions 15h, 16h
==============================
Function 18h: Set alternate mouse event handler
Call with AX = 0018h
CX = event mask
bit 0 mouse movement
bit 1 left button pressed
bit 2 left button released
bit 3 right button pressed
bit 4 right button released
bit 5 center button pressed
bit 6 center button released
ES:DX = segment:offset of event handler
Return If successful
AX = 0018h
If unsuccessful
AX = FFFFh
Notes On entrance to the handler:
AX = mouse event flags (see Notes)
BX = button states
bit 0 left button down (if set)
bit 1 right button down (if set)
bit 2 center button down (if set)
CX = x coordinate of pointer
DX = y coordinate of pointer
DI = raw horizontal mickey count
SI = raw vertical mickey count
DS = mouse driver data segment
The handler may be deactivated by calling function 00h.
As many as three alternate event handlers, with unique event
masks, may be installed.
See also Functions 0Ch, 14h
==============================
Function 19h: Get address of alternate mouse event handler
Call with AX = 0019h
CX = event mask
Return If successful
CX = event mask
ES:DX = segment:offset of alternate event handler
If unsuccessful
CX = 0000h
Notes None.
See also Function 18h
==============================
Function 1Ah: Set sensitivity
Call with AX = 001Ah
BX = horizontal mickeys (default=8)
CX = vertical mickeys (default=16)
DX = double speed threshold (default=64)
Return Nothing
Notes This function will set the number of mickeys necessary for 8
pixels of motion to occur, as well as the double speed
threshold.
See also Functions 0Fh, 13h, 1Bh
==============================
Function 1Bh: Get mouse sensitivity
Call with AX = 001Bh
Return BX = horizontal mickeys
CX = vertical mickeys
DX = double speed threshold
Notes None.
See also Functions 0Fh, 13h, 1Ah
==============================
Function 1Ch: Set mouse interrupt rate
Call with AX = 001Ch
BX = interrupt rate flags
bit 0 no interrupts (if set)
bit 1 30 interrupts/second (if set)
bit 2 50 interrupts/second (if set)
bit 3 100 interrupts/second (if set)
bit 4 200 interrupts/second (if set)
Return Nothing
Notes This function will only affect InPort mice.
See also Function 24h
==============================
Function 1Dh: Set pointer page
Call with AX = 001Dh
BX = page
Return Nothing
Notes Valid page numbers depend on the active display mode.
See also Function 1Eh
==============================
Function 1Eh: Get pointer page
Call with AX = 001Eh
Return BX = page
Notes None.
See also Function 1Dh
==============================
Function 1Fh: Disable mouse driver
Call with AX = 001Fh
Return If successful
AX = 001Fh
ES:BX = segment:offset of previous INT 33h handler
If unsuccessful
AX = FFFFh
Notes This function causes the mouse driver to release all
interrupts other than INT 33h. The driver may then be
effectively removed by restoring the previous contents of
the INT 33h vector.
See also Function 20h
==============================
Function 20h: Enable mouse driver
Call with AX = 0020h
Return Nothing
Notes Calling this function will re-enable the mouse driver and
the servicing of mouse interrupts.
See also Function 1Fh
==============================
Function 21h: Reset mouse driver
Call with AX = 0021h
Return If mouse support available
AX = FFFFh
BX = number of buttons
If mouse support unavailable
AX = 0021h
Notes The difference between this function and function 00h is
that this function performs no initialization of the mouse
hardware.
See also Function 00h
==============================
Function 22h: Set language for driver messages
Call with AX = 0022h
BX = language code
0 = English
1 = French
2 = Dutch
3 = German
4 = Swedish
5 = Finnish
6 = Spanish
7 = Portuguese
8 = Italian
Return Nothing
Notes This function is available only with international versions
of the mouse driver.
See also Function 23h
==============================
Function 23h: Get language
Call with AX = 0023h
Return BX = language code
Notes This function is available only with international versions
of the mouse driver.
See also Function 22h
==============================
Function 24h: Get mouse information
Call with AX = 0024h
Return BH = major version number of driver
BL = minor version number of driver
CH = mouse type
1 = bus mouse
2 = serial mouse
3 = InPort mouse
4 = PS/2 mouse
5 = HP mouse
CL = IRQ number
0 = PS/2
2, 3, 4, 5, or 7 = IRQ number
Notes None.
See also None.
**** FREQUENTLY ASKED QUESTIONS ****
Q: When I write something to the screen, it overwrites the mouse pointer.
Then, when I move the mouse, the pointer comes back, along with a
rectangle of outdated screen information. What do I do?
A: The mouse driver keeps track of what was behind the pointer so that it
may be restored when the mouse is moved. To avoid this problem, hide
the pointer before writing to the screen, then show it when you're
done.
Q: When I'm in 320x200x256 mode or text mode, the driver returns
incorrect coordinate values. What's wrong?
A: For whatever reason, the mouse driver returns values in this way when
in these modes. In 320x200x256 mode, the driver uses horizontal
values which are actually twice the real value; shift the real value
left one bit when passing a coordinate to the driver, and shift the
returned value right one bit before using a value returned by the
driver. Note that this shifting is only necessary for the horizontal
coordinate. As for text mode, it's something of a similar absurd
nature, such as twice the real value in one direction and thrice in
the other, but I'm not sure.
Q: What the hell's a mickey, anyway?
A: The mickey is the smallest amount of motion the mouse can detect. One
mickey is 1/200" on a 200 DPI mouse, 1/400" on a 400 DPI mouse, etc..
Q: How do I get those nifty-looking 256-colour mouse pointers?
A: You write a mouse event handler which will be called whenever the
mouse moves. You may also wish to trap INT 33h for calls such as hide
pointer and show pointer.
End of document
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -