home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / TNH_PC.ZIP / HERZFELD.NL < prev    next >
Encoding:
Text File  |  1987-01-14  |  3.3 KB  |  102 lines

  1. Shaping Your Cursor in DOS
  2.  
  3.              John Herzfeld
  4.    Pacific Northwest PC Users Group
  5.  
  6. The default cursor shape of DOS is
  7. two lines thick. I find a thicker
  8. cursor gives greater visibility. For
  9. example, if you do a "Find" in a word
  10. processing program, the cursor may
  11. end up anywhere on the screen, and
  12. you have to search for it. In BASIC,
  13. you can change the shape easily with
  14. LOCATE; and the programs I describe
  15. here do the same work in DOS. You can
  16. change their names, but leave the
  17. "COM" extension.
  18.  
  19. These programs can be used under DOS
  20. 1.1 or 2.0, with both the monochrome
  21. and graphics displays. For the
  22. graphics display, you need to use
  23. different cursor shape (scan lines)
  24. parameters from those I used. The
  25. values are the same in DOS and in
  26. BASIC but study the LOCATE statement
  27. in the BASIC manual for details about
  28. how the cursor shape is created.
  29. Experiment with the values to find a
  30. shape you like, especially if you
  31. have a graphics display. I like a
  32. cursor four lines thick (10 start, 13
  33. end), and used these values in the
  34. programs. This article tells you how
  35. you can substitute your own.
  36.  
  37. The first is a short program,
  38. CRS.COM, and it creates only one
  39. shape. To use it, type CRS<enter> in
  40. DOS. To get a different shape, change
  41. the bytes indicated in the BASIC
  42. listing. If you like one shape for
  43. all work, this is the program to use.
  44. With a little knowledge of assembly
  45. language, you can even imbed it in
  46. the WordStar user patch area, so that
  47. it goes to work whenever you call
  48. WordStar.
  49.  
  50. The second program (CRL.COM) is
  51. longer. If you call it without
  52. parameters, it will produce the shape
  53. you prefer, but you can create any
  54. other shape by typing the start and
  55. end values on the command line before
  56. pressing <enter>. The annotated
  57. assembly listing of this program may
  58. be useful to you if you are learning
  59. assembly language. I believe I have
  60. made this program crash proof, but at
  61. the cost of some extra bytes.
  62.  
  63. I have found no conflicts with other
  64. programs. However, some programs
  65. (including the Norton Utilities and
  66. Supercalc2) set their own cursors,
  67. and when you exit to DOS you will
  68. find that the thin default cursor
  69. reappears.  ProKey saves the cursor
  70. shape values when it starts and
  71. restores them when it is finished.
  72. That is a virtue of ProKey, but if
  73. you use it to assign a cursor shaping
  74. program to a key, the key will change
  75. the cursor and ProKey will
  76. immediately change it back.
  77.  
  78. Both of the following programs exist
  79. on this diskette in compacted BASIC
  80. form for offloading. The programs are
  81. called CRS.BAS and CRL.BAS.
  82.  
  83. Another way to create the programs is
  84. to type DEBUG d:filespec<enter>,
  85. ignore the "File Not Found" warning,
  86. and use the E(dit) or the F(ill)
  87. command to enter the 10 or 102 bytes,
  88. respectively, from the DATA
  89. statements in the end of the CRL.COM
  90. program.  Be sure to start your
  91. entries at offset 0100H. Since the
  92. DATA statements show the HEX values,
  93. you can enter them without
  94. conversion, but omit the &H. You can
  95. check your entries with D
  96. 0100<enter>. Then use the R(egister)
  97. command to set BX to 0000 and CX to
  98. 000A for CRS.COM or to 0066 for
  99. CRL.COM (to give DEBUG the program
  100. size). Then write the program to disk
  101. with the W(rite) command.
  102.