home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / pascal / EDSCREEN.ZIP / CURSOR.PAS next >
Encoding:
Pascal/Delphi Source File  |  1979-12-31  |  1.2 KB  |  29 lines

  1. PROCEDURE cursor(on:BOOLEAN);{---------------This sets the cursor on/off}
  2.  
  3. {procedure cursor will set the cursor on or off depending if the argument sent
  4.  is true or false.  If the argument is false the cursor will be turned off,
  5.  if the argument is true the cursor is the cursor is turned on.}
  6.  
  7. CONST
  8.   video_io=$10;                             {this is the interrupt number}
  9. VAR
  10.   regs:RECORD CASE INTEGER OF               {this sets up the registers}
  11.                 1: (AX,BX,CX,DX,BP,DI,SI,DS,ES,Flags: INTEGER);
  12.                 2: (AL,AH,BL,BH,CL,CH,DL,DH: Byte);
  13.               END;
  14. BEGIN
  15.   IF on THEN                                {if the user wants a cursor then}
  16.   BEGIN
  17.     regs.ch:=$06;                           {set the registers up for display}
  18.     regs.cl:=$07;                           {ch = start line, cl = end line}
  19.   END
  20.   ELSE                                      {else, the cursor is not displayed}
  21.   BEGIN
  22.     regs.ch:=$20;                           {set the register up for non-}
  23.     regs.cl:=$00;                           {display, ch=$20 doesn't display}
  24.   END;
  25.   regs.ah:=$01;
  26.   regs.al:=$00;
  27.   Intr(video_io,regs);
  28. END;
  29.