mrc@apollo.HP.COM (Mark Campbell) (11/28/90)
If you know how to set the color of the mouse pointer or
If you are familure with interupt 33 then read this.
A friend wants to do just that. Set the color of the
mouse pointer. All the books he has and I have say to use
interrupt 33 (HEX) with service 09 (HEX). The problem is none
of the books explain how to do this.
We know 09 goes in ax and you call int 33, please don't
say to do that, but we can not figure out exactly were you
set the color.
Any and all help with this will be greatly appreciated.
Please make all/any examples in "C" or assembler.
Thanks in advance,
Mark.
----------------------------------------------------------------------
< Mark Campbell # # \ \ ##### / / >
> ## ## # # <
< HP/Apollo Systems Division # # # # # >
> # # # ###### # <
< mrc # # # # # >
> # # # # # <
< mrc@apollo.HP.COM # # # # ##### >
----------------------------------------------------------------------
david.deitch@gisatl.FIDONET.ORG (David Deitch) (11/29/90)
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