home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / sampler / 04 / diverse / backward.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-10-18  |  1.4 KB  |  52 lines

  1. {$R-,I+,N-}
  2. PROGRAM Backward;
  3.   Uses Crt, Dos, BackUnit;
  4. VAR
  5.   dummy : char;
  6.  
  7.   PROCEDURE Write_Explanation;
  8.   BEGIN
  9.     WriteLn('    BACKWARD WRITING DEMO');
  10.     WriteLn('    =====================');
  11.     WriteLn(' This program demonstrates a Text');
  12.     WriteLn(' File Device Driver that replaces the');
  13.     WriteLn(' standard driver for the OUTPUT ');
  14.     WriteLn(' device in Turbo Pascal 4.0.  When the');
  15.     WriteLn(' replacement TFDD is activated, ');
  16.     WriteLn(' all "Write" and "WriteLn" statements ');
  17.     WriteLn(' will appear on the screen backward.');
  18.     WriteLn;
  19.   END;
  20.  
  21. BEGIN
  22.   TextColor(LightGray); TextBackground(black);
  23.   ClrScr;
  24.   Write_Explanation;
  25.   WriteLn('--PRESS a key to activate BACKWARD');
  26.   dummy := ReadKey;
  27.   Backward_On;
  28.   TextColor(White);
  29.   GotoXY(80,1);
  30.   Write_Explanation;
  31.   WriteLn('--PRESS a key to DEactivate BACKWARD');
  32.   dummy := ReadKey;
  33.   Backward_Off;
  34.   GotoXY(1,14);
  35.   Write('  The TextColor and TextBackground ');
  36.   WriteLn('procedures work just as they normally');
  37.   Write('  would, and text scrolls when it ');
  38.   WriteLn('reaches the bottom of the screen.  Press');
  39.   Write('  a key to demonstrate this, and ');
  40.   WriteLn('press a key again to stop.');
  41.   Dummy := ReadKey;
  42.   Backward_On;
  43.   WriteLn;
  44.   REPEAT
  45.     TextColor(random(16));
  46.     TextBackground(random(8));
  47.     Write('Press any key to STOP....');
  48.   UNTIL KeyPressed;
  49.   dummy := ReadKey;
  50.   Backward_Off;
  51. END.
  52.