Article View: comp.sys.ibm.pc
Article #13528Interrupt 33 / Mouse pointer
From: David Deitch
Date: Wed, 28 Nov 1990 21:42
Date: Wed, 28 Nov 1990 21:42
74 lines
3419 bytes
3419 bytes
Disclaimer - this is out of a book - I have never tried it and may be
misinterpreting it.
There are two functions relating to setting the cursor. The first is
for the graphics cursor.
AX: 09H
BX: horizontal hot spot (-16 - 16)
CX: vertial hot spot (-16 - 16)
DX: offset of pointer to screen/cursor masks.
the cursor is a 32bit by 32bit box, and the hotspot determines the
point within the box used for clicking. For example, a cursor in the
shape of a + would have the hotspot directly in the middle (0,0). But
a cursor in the shape of an arrow pointing up would have the hotspot
at the arrow tip (0,-16).
The screen/cursor mask is defined as 32 64 bit words where every bit
pair is a combination of screen and cursor masks. Each word
represents 32 points on the cursor line. The screen/cursor mask
combinations have the following effects:
SCREEN CURSOR RESULT
0 0 0 (bit turned off)
0 1 1 (bit turned on)
1 0 unchanged (bit remains the same)
1 1 inverted (original bit is inverted)
To my knowledge, there is no way to set color on the graphics cursor.
The second function is for the text cursor.
AX: 0AH
BX: cursor type (0 = software 1 = hardware)
CX: screen mask/start scanline
DX: cursor mask/end scanline
The software cursor acts independently of the text cursor so that both
may be on the screen at once. The hardware cursor replaces the text
cursor and text cursor functions replect the mouse cursor position.
If using the software cursor type, then the screen and cursor masks
reflect the cursor characteristics. If the screen mask is 77FFH, the
cursor is a see-through block. If the screen mask is 0000H, the
cursor is a specially defined character.
The cursor mask places the attributes in the upper byte, and the
character in the lower byte as follows:
BIT CHARACTERISTIC
15 blink control (1 is blinking, 0 is not)
12-14 3 bit background color (0-7)
11 Intensity control (1 is high intensity, 0 is normal)
8-10 3 bit foreground color (0-7)
0-7 8 bit character ascii code
If using the hardware cursor type, the starting and ending scanlines
are used (just like the normal cursor). Normally, the start scanline
would be 0 and the top scanline would be 12 for mono and 7 for color.
I would recommend looking at the manual that came with your mouse, or
looking for a detailed book on programming mice, windows, menus, ect.
David Deitch (GIS)
deitch@gisatl.fidonet.org
1:133/411@fidonet
18:716/411@keshernet
--
-----------------------------------------------------------------------------
David Deitch - via FidoNet node 1:133/411
UUCP: galbp!gisatl!david.deitch
INTERNET: david.deitch@gisatl.FIDONET.ORG
Technical Details
Message-ID:
<775.27552C4F@gisatl.FIDONET.ORG>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!galbp!gisatl!david.deitchShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!galbp!gisatl!david.deitch From: david.deitch@gisatl.FIDONET.ORG (David Deitch) Newsgroups: comp.sys.ibm.pc Subject: Interrupt 33 / Mouse pointer Message-ID: <775.27552C4F@gisatl.FIDONET.ORG> Date: 28 Nov 90 21:42:25 GMT Organization: Galaxy Information System (GIS) 1:133/411 Atlanta, Ga Lines: 74