Q38124: Turning Off Cursor in Text Mode
Article: Q38124
Product(s): See article
Version(s): 5.10
Operating System(s): MS-DOS
Keyword(s): ENDUSER | s_c | mspl13_c
Last Modified: 17-NOV-1988
Question:
How do I turn off the cursor in text mode? I can do it in graphics
mode but that doesn't work in text mode.
Response:
There is no function in the run-time library to do that; however, you
can do it with a bios function call.
Use INT 10 FUNCTION 1. Set the CH register to 20h and call the
interrupt to turn off the cursor. The following is a sample program:
#include <dos.h>
void main(void)
{
union REGS regs;
regs.h.ah = 1;
regs.h.ch = 20;
int86 ( 0x10, ®s, ®s );
}
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.