home *** CD-ROM | disk | FTP | other *** search
- Shaping Your Cursor in DOS
-
- John Herzfeld
- Pacific Northwest PC Users Group
-
- The default cursor shape of DOS is
- two lines thick. I find a thicker
- cursor gives greater visibility. For
- example, if you do a "Find" in a word
- processing program, the cursor may
- end up anywhere on the screen, and
- you have to search for it. In BASIC,
- you can change the shape easily with
- LOCATE; and the programs I describe
- here do the same work in DOS. You can
- change their names, but leave the
- "COM" extension.
-
- These programs can be used under DOS
- 1.1 or 2.0, with both the monochrome
- and graphics displays. For the
- graphics display, you need to use
- different cursor shape (scan lines)
- parameters from those I used. The
- values are the same in DOS and in
- BASIC but study the LOCATE statement
- in the BASIC manual for details about
- how the cursor shape is created.
- Experiment with the values to find a
- shape you like, especially if you
- have a graphics display. I like a
- cursor four lines thick (10 start, 13
- end), and used these values in the
- programs. This article tells you how
- you can substitute your own.
-
- The first is a short program,
- CRS.COM, and it creates only one
- shape. To use it, type CRS<enter> in
- DOS. To get a different shape, change
- the bytes indicated in the BASIC
- listing. If you like one shape for
- all work, this is the program to use.
- With a little knowledge of assembly
- language, you can even imbed it in
- the WordStar user patch area, so that
- it goes to work whenever you call
- WordStar.
-
- The second program (CRL.COM) is
- longer. If you call it without
- parameters, it will produce the shape
- you prefer, but you can create any
- other shape by typing the start and
- end values on the command line before
- pressing <enter>. The annotated
- assembly listing of this program may
- be useful to you if you are learning
- assembly language. I believe I have
- made this program crash proof, but at
- the cost of some extra bytes.
-
- I have found no conflicts with other
- programs. However, some programs
- (including the Norton Utilities and
- Supercalc2) set their own cursors,
- and when you exit to DOS you will
- find that the thin default cursor
- reappears. ProKey saves the cursor
- shape values when it starts and
- restores them when it is finished.
- That is a virtue of ProKey, but if
- you use it to assign a cursor shaping
- program to a key, the key will change
- the cursor and ProKey will
- immediately change it back.
-
- Both of the following programs exist
- on this diskette in compacted BASIC
- form for offloading. The programs are
- called CRS.BAS and CRL.BAS.
-
- Another way to create the programs is
- to type DEBUG d:filespec<enter>,
- ignore the "File Not Found" warning,
- and use the E(dit) or the F(ill)
- command to enter the 10 or 102 bytes,
- respectively, from the DATA
- statements in the end of the CRL.COM
- program. Be sure to start your
- entries at offset 0100H. Since the
- DATA statements show the HEX values,
- you can enter them without
- conversion, but omit the &H. You can
- check your entries with D
- 0100<enter>. Then use the R(egister)
- command to set BX to 0000 and CX to
- 000A for CRS.COM or to 0066 for
- CRL.COM (to give DEBUG the program
- size). Then write the program to disk
- with the W(rite) command.