home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MKSCREN2.ZIP / SCRNCODE.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-08-17  |  2.5 KB  |  110 lines

  1.  
  2. {procedure that activates reverse video mode}
  3. procedure reverse_on;
  4. begin
  5.  textcolor(blue);
  6.  textbackground(lightgray);
  7. end;
  8.  
  9. {procedure that deactivates reverse video mode}
  10. procedure reverse_off;
  11. begin
  12.  textcolor(white);
  13.  textbackground(blue);
  14. end;
  15.  
  16. {procedure that activates bold character mode}
  17. procedure bold_on;
  18. begin
  19.  textcolor(yellow);
  20.  textbackground(blue);
  21. end;
  22.  
  23. {procedure that deavtivates bold character mode}
  24. procedure bold_off;
  25. begin
  26.  textcolor(white);
  27.  textbackground(blue);
  28. end;
  29.  
  30. {procedure that clears the CRT from current position to the
  31.  end of the screen (IBM). Version 1.0 by R.P.Helmle on 02 Sep 86}
  32. procedure clreos;
  33. TYPE
  34.  DosRegs = record
  35.             ax,bx,cx,dx,bp,si,di,ds,es,Flags : integer;
  36.            end;
  37. VAR {declaration of globally accessible variables}
  38.  result           : DosRegs;
  39.  current          : integer;
  40. begin
  41.  clreol;
  42.  current := WhereY + 1;
  43.  repeat
  44.    gotoxy(1,current);clreol;
  45.    current := succ(current);
  46.  until current = 26;
  47. end;
  48.  
  49. {procedure that clears from current cursor position to end of line}
  50. {procedure clreol;
  51. begin
  52.  clreol;
  53.  write(output,chr(27),'[K');
  54. end;}
  55.  
  56. {procedure that beeps the keyboard buzzer}
  57. procedure beep;
  58. begin
  59.  write(output,chr(7));
  60. end;
  61.  
  62. {procedure that flashes an error message on the screen
  63.  variable description:
  64.  msg : string variable containing error message to display
  65.  index : control vaiable in LOOP to control flashing
  66. }
  67. procedure error(noise,flash : integer;msg : str80);
  68. var pause : char;
  69. begin
  70. reverse_off;
  71. if (noise = 1) then beep;
  72.  textcolor(blue);
  73.  textbackground(red);
  74.  gotoxy(1,24);write(output,msg);
  75.  read(KBD,pause);
  76.  textbackground(blue);
  77.  gotoxy(1,24);clreol;
  78.  bold_off;
  79. end;
  80.  
  81. {procedure that turns off the cursor on CRT on an IBM compatible
  82.  unit.                    Version 1.0 by R.P.Helmle on 02 Sep 86}
  83. procedure cursor_off;
  84. TYPE
  85.  DosRegs = record
  86.             ax,bx,cx,dx,bp,si,di,ds,es,Flags : integer;
  87.            end;
  88. VAR {declaration of globally accessible variables}
  89.  result           : DosRegs;
  90. begin
  91.  result.ax := $0100;
  92.  result.cx := $0909;
  93.  Intr($10,result);
  94. end;
  95.  
  96. {procedure that turns on the cursor on CRT on an IBM compatible
  97.  unit.                    Version 1.0 by R.P.Helmle on 02 Sep 86}
  98. procedure cursor_on;
  99. TYPE
  100.  DosRegs = record
  101.             ax,bx,cx,dx,bp,si,di,ds,es,Flags : integer;
  102.            end;
  103. VAR {declaration of globally accessible variables}
  104.  result           : DosRegs;
  105. begin
  106.  result.ax := $0100;
  107.  result.cx := $0708;
  108.  Intr($10,result);
  109. end;
  110.