home *** CD-ROM | disk | FTP | other *** search
- {$R-,I+,N-}
- PROGRAM Backward;
- Uses Crt, Dos, BackUnit;
- VAR
- dummy : char;
-
- PROCEDURE Write_Explanation;
- BEGIN
- WriteLn(' BACKWARD WRITING DEMO');
- WriteLn(' =====================');
- WriteLn(' This program demonstrates a Text');
- WriteLn(' File Device Driver that replaces the');
- WriteLn(' standard driver for the OUTPUT ');
- WriteLn(' device in Turbo Pascal 4.0. When the');
- WriteLn(' replacement TFDD is activated, ');
- WriteLn(' all "Write" and "WriteLn" statements ');
- WriteLn(' will appear on the screen backward.');
- WriteLn;
- END;
-
- BEGIN
- TextColor(LightGray); TextBackground(black);
- ClrScr;
- Write_Explanation;
- WriteLn('--PRESS a key to activate BACKWARD');
- dummy := ReadKey;
- Backward_On;
- TextColor(White);
- GotoXY(80,1);
- Write_Explanation;
- WriteLn('--PRESS a key to DEactivate BACKWARD');
- dummy := ReadKey;
- Backward_Off;
- GotoXY(1,14);
- Write(' The TextColor and TextBackground ');
- WriteLn('procedures work just as they normally');
- Write(' would, and text scrolls when it ');
- WriteLn('reaches the bottom of the screen. Press');
- Write(' a key to demonstrate this, and ');
- WriteLn('press a key again to stop.');
- Dummy := ReadKey;
- Backward_On;
- WriteLn;
- REPEAT
- TextColor(random(16));
- TextBackground(random(8));
- Write('Press any key to STOP....');
- UNTIL KeyPressed;
- dummy := ReadKey;
- Backward_Off;
- END.