How to Change the MS-DOS Cursor (80301)



The information in this article applies to:
    Microsoft MS-DOS operating system 2.11
    Microsoft MS-DOS operating system 3.1
    Microsoft MS-DOS operating system 3.2
    Microsoft MS-DOS operating system 3.21
    Microsoft MS-DOS operating system 3.3
    Microsoft MS-DOS operating system 3.3a
    Microsoft MS-DOS operating system 4.0
    Microsoft MS-DOS operating system 4.01
    Microsoft MS-DOS operating system 5.0

This article was previously published under Q80301

SUMMARY

There is no way to change the appearance of the command line cursor in MS-DOS with any MS-DOS command. The cursor is a function of the BIOS and can only be modified through a ROM BIOS call. There are third party applications that facilitate this, such as Norton Utilities and PC Tools. You can also access the BIOS and modify the cursor by using the MS-DOS Debug utility.

MORE INFORMATION

You can write a short program to modify the MS-DOS cursor. One way to do this is by creating and executing a short Debug script. The changes made are temporary in memory. Therefore, if the goal is to have the cursor altered at all times, it will be necessary to insert a line in the AUTOEXEC.BAT file to call the cursor program on boot.

To change the appearance of the MS-DOS cursor, enter the following at the command prompt:
Command Prompt          Enter This
--------------          ----------

C:\>                    debug <press ENTER>
-                       a100 <press ENTER>
287E:0100               mov ah,01 <press ENTER>
287E:0102               mov cx,010n <press ENTER>  (n range=1-4)
287E:0105               int 10 <press ENTER>
287E:0107               int 20 <press ENTER>
287E:0109               <press ENTER>
-                       n C:\cursor.com <press ENTER>
-                       rcx <press ENTER>
CX 0000
:                       9 <press ENTER>
-                       w <press ENTER>
Writing 00009 bytes
-                       q <press ENTER>

C:\>
Changing the value of n (1-4) will result in different appearances for the cursor, where n=4 is a large cursor.

Insert the following line in the AUTOEXEC.BAT file to have the cursor loaded upon booting the machine:

c:\cursor.com

Note: This procedure relies on standard IBM ROM BIOS services and therefore cannot be guaranteed to work on all systems. This information is only provided as a possible solution.

The products included here are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability

Reference(s):

"The NEW Peter Norton Programmer's Guide to the IBM PC & PS/2," Microsoft Press, 1988

Modification Type: Major Last Reviewed: 11/25/2003
Keywords: KB80301