Microsoft KB Archive/68877

= Selecting an ASCII Character for Software Text Cursor =

Article ID: 68877

Article Last Modified on 9/24/2003

-

APPLIES TO


 * Microsoft Mouse Driver 9.0 Standard Edition
 * Microsoft Mouse Driver 9.1 Standard Edition
 * Microsoft Mouse Driver 7.04 Standard Edition
 * Microsoft Mouse Driver 8.2 Standard Edition

-



This article was previously published under Q68877



SUMMARY
The &quot;Microsoft Mouse Programmer's Reference&quot; states that the software text cursor defined in mouse function 10 is one of the 256 characters in the ASCII character set. It makes no mention of how the character is selected.



MORE INFORMATION
The software text cursor is created by ANDing (bitwise) the screen mask with the displayed character scan line. The result of this operation is then XORed with the cursor mask to create the cursor.

The low-order bits (0 through 7) in the cursor and screen mask are used to specify the ASCII character to be used for the mouse cursor.

The following program displays a white diamond (ASCII 4) on a black background on a standard text screen:
 * 1) include 
 * 2) include 
 * 3) include 

union REGS iregs, oregs;

main {    _setvideomode(_DEFAULTMODE); /* select std text mode */

iregs.x.ax = 0; int86(0x33, &iregs, &oregs); /* initialize mouse */

iregs.x.ax = 10; /* choose mouse function 10 */ iregs.x.bx = 0; /* select software text cursor */ iregs.x.cx = 0x0000; /* The screen mask 0x0000, when ANDed with the displayes word, produced a                        blank background to be XORed with. */     iregs.x.dx = 0x0704; /* The cursor mask 0x0704, when XORed with the result from above will set a black background with a white foreground (07). The low-order bits will select the diamond character.

*NOTE: the low-order bits for the cx and dx registers must be the same. */     int86(0x33, &iregs, &oregs);  /* call the function */

iregs.x.ax = 1; int86(0x33, &iregs, &oregs); /* show mouse cursor */

getch; /* pause here while waiting for a keystroke */

}

Additional query words: 7.00 7.03 7.04 7.05 8.00 8.10 8.20 9.00 1.00 2.00

Keywords: KB68877

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.