home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MADTRB11.ZIP / VIDDEMO.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1985-07-13  |  1.8 KB  |  82 lines

  1. PROGRAM VideoDemo;
  2.  
  3. {
  4. Demonstration of IBM Monochrome Display control under Turbo Pascal
  5. version 2.0.
  6.  
  7. Source: "Special Effects With A Monochrome Board", TUG Lines Volume I Issue 5
  8. Author: Don Taylor
  9. Date:   1/14/85
  10. Last revised: 1/14/85  20:45
  11. Application: IBM PC and true compatibles
  12. }
  13.  
  14. VAR
  15.  Attribute : BYTE ABSOLUTE DSEG:$0155;  {For Turbo version 2.0}
  16.  
  17. {--------------------}
  18.  
  19. PROCEDURE Reverse;
  20.  
  21. BEGIN
  22.  Attribute := Attribute AND $F8;
  23.  Attribute := Attribute OR  $70
  24. END; {Reverse}
  25.  
  26. {--------------------}
  27.  
  28. PROCEDURE Blink;
  29.  
  30. BEGIN
  31.  Attribute := Attribute OR $80
  32. END; {Blink}
  33. {--------------------}
  34.  
  35. PROCEDURE UnBlink;
  36.  
  37. BEGIN
  38.  Attribute := Attribute AND $7F
  39. END; {UnBlink}
  40.  
  41. {--------------------}
  42.  
  43. PROCEDURE UnderLine;
  44.  
  45. BEGIN
  46.  Attribute := Attribute AND $80;
  47.  Attribute := Attribute OR  $09
  48. END; {UnderLine}
  49.  
  50. {--------------------}
  51.  
  52. PROCEDURE HiInt;
  53.  
  54. BEGIN
  55.  Attribute := Attribute OR $08
  56. END; {HiInt}
  57.  
  58. {--------------------}
  59.  
  60. PROCEDURE LoInt;
  61.  
  62. BEGIN
  63.  Attribute := Attribute AND $F7
  64. END; {LoInt}
  65.  
  66. {====================}
  67.  
  68. BEGIN {VideoDemo}
  69.  WRITELN('                 IBM Monochrome Display Demonstration');
  70.  WRITELN;   WRITELN;
  71.  HiInt;     WRITELN('This is high-intensity, normal video.');
  72.  Reverse;   WRITELN('This is high-intensity, reverse video.');
  73.  LoInt;     WRITELN('This is low-intensity, reverse video.');
  74.  Blink;     WRITELN('This is low-intensity, reverse blinking video.');
  75.  UnBlink;   WRITELN('This is low-intensity, reverse non-blinking video.');
  76.  NormVideo; WRITELN('This is normal, high-intensity video.');
  77.  Blink;     WRITELN('This is high-intensity, blinking video.');
  78.  LoInt;     WRITELN('This is low-intensity, blinking video.');
  79.  UnBlink;
  80.  UnderLine; WRITELN('This is high-intensity, underlined video.');
  81.  LoInt;     WRITELN('This is low-intensity, underlined video.')
  82. END. {VideoDemo}