home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / MISCTI10.ZIP / TI516.ASC < prev   
Encoding:
Text File  |  1989-12-08  |  2.2 KB  |  66 lines

  1.  
  2. PRODUCT  :  TURBO PASCAL                           NUMBER  :  516
  3. VERSION  :  4.0xx+
  4.      OS  :  MS-DOS
  5.    DATE  :  December 7, 1989                         PAGE  :  1/2
  6.  
  7.   TITLE  :  TURNING THE CURSOR ON AND OFF
  8.  
  9.  
  10.  
  11.  
  12. The following example routines are  public  domain  programs that
  13. have been uploaded to  our  Forum on CompuServe. As a courtesy to
  14. our  users  that  do  not  have immediate access  to  CompuServe,
  15. Technical Support distributes these routines free of charge.
  16.  
  17. However, because these routines are public  domain  programs, not
  18. developed by  Borland International, we are unable to provide any
  19. technical support or assistance using these routines. If you need
  20. assistance   using   these   routines,   or    are   experiencing
  21. difficulties, we  recommend  that  you  log  onto  CompuServe and
  22. request assistance from the Forum  members  that  developed these
  23. routines.
  24.  
  25. To  turn  the  cursor on and off you must use BIOS interrupt $10.
  26. For more information on  this  interrupt,  please  refer to a DOS
  27. programmer's guide.   Of course, manipulating the cursor can only
  28. be done in text mode and not graphics mode.
  29.  
  30. The  following procedure turns the cursor on  and  off  in  Turbo
  31. Pascal:
  32.  
  33. procedure SetCursor(On: Boolean);
  34. var
  35. reg : Registers;
  36. begin
  37. if On then          { Turn cursor on }
  38.  if Mem[$0040:$0049] = 7 then
  39.   reg.cx := $B0C  { If monochrome monitor }
  40.  else
  41.    reg.cx := $607  { If color monitor }
  42. else            { Turn cursor off }
  43. reg.cx := $2020;
  44. reg.bx := 0;
  45. reg.ax := $0100;    { Set the interrupt function }
  46. Intr($10,reg);      { Call the interrupt }
  47. end;  { procedure SetCursor }
  48.  
  49. This procedure was  revised  from the question and answer section
  50. in the Turbo Pascal Tutor  and Turbo Pascal version 3.0 reference
  51. guide.
  52.  
  53. PRODUCT  :  TURBO PASCAL                           NUMBER  :  516
  54. VERSION  :  4.0xx+
  55.      OS  :  MS-DOS
  56.    DATE  :  December 7, 1989                         PAGE  :  2/2
  57.  
  58.   TITLE  :  TURNING THE CURSOR ON AND OFF
  59.  
  60.  
  61.  
  62.  
  63. In the procedure you do not need to declare  the  type  Registers
  64. because it is predefined for you in the DOS unit.   Therefore, to
  65. use this procedure, your program must also use the DOS unit.
  66.