home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / htscreen / htdemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1991-01-13  |  19.5 KB  |  521 lines

  1. PROGRAM HtDemo;
  2.  
  3. USES HtScreen;
  4.  
  5. VAR Screen : ARRAY[1..50,1..80] OF WORD;
  6.     MidRow,
  7.     MidCol : BYTE;
  8.  
  9.  
  10. PROCEDURE QuitProgram;
  11. BEGIN
  12.   HtFill(1,1,25,80,White+BlackBG,' ');
  13.   GoToRC(1,1);
  14.   SetCursor(CursorInitial);
  15.   Halt(1);
  16. END;
  17.  
  18.  
  19. PROCEDURE PressAnyKey(Row : BYTE);
  20. VAR C : CHAR;
  21. BEGIN
  22.   SetCursor(CursorOff);
  23.   HtWriteC(Row,MidCol,Yellow+Blink+RedBG,' Press any key... ');
  24.   C := HtReadKey(Fk);
  25.   IF C=#27 THEN QuitProgram;
  26. END;
  27.  
  28.  
  29. PROCEDURE PageOne;
  30. VAR I : WORD;
  31. BEGIN
  32.   Explode(2,2,23,78,White+BlueBG,SingleBorder);
  33.   HtWriteC(MidRow-1,MidCol,Yellow+BlueBG,'Screen Utilities');
  34.   HtWriteC(MidRow+1,MidCol,SameAttr,'for Turbo Pascal 5.5');
  35.   PressAnyKey(CRTRows);
  36.   FOR I := 1 TO 1000 DO
  37.     HtFill(2+Random(10),2+Random(CRTCols-30),1+Random(CRTRows-11),1+Random(29),Random($7F),Chr(30+Random(50)));
  38.   Explode(MidRow-3,20,8,40,White+RedBG,DTopSSide);
  39.   HtWrite(MidRow-2,32,Yellow+RedBG,'Screen Utilities');
  40.   HtWrite(MidRow-1,30,Yellow+RedBG,'for Turbo Pascal 5.5');
  41.   HtWrite(MidRow+1,22,White+RedBG,'The program just showed you a 1000(!)');
  42.   HtWrite(MidRow+2,22,White+RedBG,'randomly attributed rectangular boxes');
  43.   HtWrite(MidRow+3,22,White+RedBG,'filled with random characters.');
  44.   HtStoreToMem(1,1,CrtRows,CrtCols,Screen);
  45.   PressAnyKey(CrtRows);
  46.   FOR I := 1 TO 5000 DO
  47.     HtWrite(1+Random(CRTRows),1+Random(CRTCols),$00,' ');
  48. END;
  49.  
  50.  
  51. PROCEDURE PageTwo;
  52. BEGIN
  53.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  54.   HtWriteC(5,MidCol,White+BlueBG,'Screen Utilities');
  55.   HtWriteC(6,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  56.   HtWrite(8,8,White+BlueBG,'The Screen Utilities contains some 25 functions and procedures to');
  57.   HtWrite(9,8,White+BlueBG,'simplify the use of text screens in Turbo Pascal 5.5.');
  58.   HtWrite(11,8,White+BlueBG,'There are procedures to');
  59.   HtWrite(12,8,White+BlueBG,'  - control the cursor size and position');
  60.   HtWrite(13,8,White+BlueBG,'  - read the character and attributes at a specified location');
  61.   HtWrite(14,8,White+BlueBG,'  - write a string at specified position with specified attributes');
  62.   HtWrite(15,8,White+BlueBG,'  - change the attributes of an area of the screen');
  63.   HtWrite(16,8,White+BlueBG,'  - fill an area of the screen with a specifies character');
  64.   HtWrite(17,8,White+BlueBG,'  - scroll an area of the screen up or down');
  65.   HtWrite(18,8,White+BlueBG,'  - store to memory an area of the screen');
  66.   HtWrite(19,8,White+BlueBG,'  - add shadow to a box');
  67.   HtWrite(20,8,White+BlueBG,'  - get and set the video mode');
  68.   HtWrite(21,8,White+BlueBG,'  - get and set the number of rows (25 or 43/50)');
  69.   PressAnyKey(CRTRows);
  70. END;
  71.  
  72.  
  73. PROCEDURE PageThree;
  74. VAR I : WORD;
  75.     S : STRING;
  76. BEGIN
  77.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  78.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  79.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  80.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Write Procedures');
  81.   HtWrite(8,8,Yellow+BlueBG,'HtWrite ');
  82.   HtWriteEos(White+BlueBG,'   - will write a string to any location with any attributes');
  83.   HtDelay(1000);
  84.   HtWrite(13,33,Yellow+BlueBG,'Here''s 1000...');
  85.   HtDelay(1000);
  86.   FOR I := 1 TO 1000 DO
  87.     HtWrite(10+Random(15),10+Random(60),Random($7F),'Testing');
  88.   PressAnyKey(9);
  89.   HtFill(10,2,15,76,White+BlueBG,' ');
  90.   HtWrite(9,8,Yellow+BlueBG,'HtWriteC ');
  91.   HtWriteEos(White+BlueBG,'  - will center a string about a column');
  92.   HtDelay(1000);
  93.   FOR I := 1 TO 7 DO
  94.   HtWrite(10+I,40,SameAttr,'│');
  95.   HtWriteC(12,40,SameAttr,'1');
  96.   HtWriteC(13,40,SameAttr,'22');
  97.   HtWriteC(14,40,SameAttr,'333');
  98.   HtWriteC(15,40,SameAttr,'This is a test');
  99.   HtWriteC(16,40,SameAttr,'Centering a string about a column');
  100.   PressAnyKey(18);
  101.   HtFill(10,2,15,76,White+BlueBG,' ');
  102.   HtWrite(10,8,Yellow+BlueBG,'HtWriteEos ');
  103.   HtWriteEos(White+BlueBG,'- is similar to TP''s WRITE, but uses the internal variable');
  104.   HtWrite(11,21,White+BlueBG,'EosOfs to keep track of an End-Of-String cursor which is');
  105.   HtWrite(12,21,White+BlueBG,'updated with every HtWrite, HtWriteC, HtWriteEos');
  106.   S := '"Here is a test string to show the HtWriteEos procedure"';
  107.   HtDelay(2000);
  108.   HtWrite(14,10,White+BlueBG,'Here''s an example :');
  109.   HtWrite(15,10,White+BlueBG,'The string below will be written in different attributes');
  110.   HtWrite(16,10,LightGray+BlueBG,S);
  111.   HtDelay(1000);
  112.   HtWrite(18,10,White+BlueBG,'Slowly first :');
  113.   PressAnyKey(20);
  114.   HtWrite(20,10,White+BlueBG,S[1]);
  115.   FOR I := 2 TO Length(S) DO
  116.   BEGIN
  117.     HtWriteEos(Random($7F),S[I]);
  118.     HtDelay(30);
  119.   END;
  120.   PressAnyKey(23);
  121.   HtFill(18,10,7,60,White+BlueBG,' ');
  122.   HtWrite(18,10,White+BlueBG,'Then quickly :');
  123.   HtDelay(1000);
  124.   HtWrite(20,10,White+BlueBG,S[1]);
  125.   FOR I := 2 TO Length(S) DO
  126.     HtWriteEos(Random($7F),S[I]);
  127.   PressAnyKey(23);
  128.   HtFill(18,10,7,60,White+BlueBG,' ');
  129.   HtWrite(18,10,SameAttr,'By using the pre-defined attribute constant ');
  130.   HtWriteEos(Yellow+BlueBG,'SameAttr ');
  131.   HtWriteEos(SameAttr,'you can write');
  132.   HtWrite(19,10,SameAttr,'strings without changing the attributes on the screen.');
  133.   Box(22,15,1,3,Yellow+RedBG,NoBorder,' ');
  134.   Box(22,20,1,3,White+GreenBG,NoBorder,' ');
  135.   Box(22,25,1,3,LightCyan+BlueBG,NoBorder,' ');
  136.   Box(22,30,1,3,LightBlue+BrownBG,NoBorder,' ');
  137.   Box(22,35,1,3,LightCyan+MagentaBG,NoBorder,' ');
  138.   Box(22,40,1,3,White+LightGrayBG,NoBorder,' ');
  139.   Box(22,45,1,3,Red+BlueBG,NoBorder,' ');
  140.   Box(22,50,1,3,LightGreen+GreenBG,NoBorder,' ');
  141.   Box(22,55,1,3,Magenta+LightGrayBG,NoBorder,' ');
  142.   HtDelay(2000);
  143.   HtWrite(21,11,SameAttr,'This is a test of the attribute-constant SameAttr');
  144.   HtWrite(22,12,SameAttr,'This is a test of the attribute-constant SameAttr');
  145.   HtWrite(23,13,SameAttr,'This is a test of the attribute-constant SameAttr');
  146.   PressAnyKey(CRTRows);
  147. END;
  148.  
  149.  
  150. PROCEDURE PageFour;
  151. VAR I : BYTE;
  152. BEGIN
  153.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  154.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  155.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  156.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Cursor Control');
  157.   HtWrite(8,8,Yellow+BlueBG,'GoToRC ');
  158.   HtWriteEos(White+BlueBG,' - will move the cursor to any location on the screen');
  159.   SetCursor(CursorUnderline);
  160.   FOR I := 1 TO 50 DO
  161.   BEGIN
  162.     GoToRC(8+Random(8),20+Random(40));
  163.     HtDelay(20);
  164.   END;
  165.   SetCursor(CursorOff);
  166.   HtWrite(9,8,Yellow+BlueBG,'GoToEos ');
  167.   HtWriteEos(White+BlueBG,'- will move the cursor to the End-Of-String marker');
  168.   HtWrite(10,8,Yellow+BlueBG,'EosRow ');
  169.   HtWriteEos(White+BlueBG,' - will return the current End-Of-String row');
  170.   HtWrite(11,8,Yellow+BlueBG,'EosCol ');
  171.   HtWriteEos(White+BlueBG,' - will return the current End-Of-String column');
  172.   HtWrite(12,8,Yellow+BlueBG,'EosToRC ');
  173.   HtWriteEos(White+BlueBG,'- will move the End-Of-String marker to any position');
  174.   HtWrite(14,8,Yellow+BlueBG,'GetCursor ');
  175.   HtWriteEos(White+BlueBG,'- will return the current cursor size');
  176.   HtWrite(15,8,Yellow+BlueBG,'SetCursor ');
  177.   HtWriteEos(White+BlueBG,'- will set the cursor size');
  178.   PressAnyKey(17);
  179.   HtWrite(17,8,White+BlueBG,'There are 4 pre-defined cursor-sizes :                       ');
  180.   HtDelay(2000);
  181.   HtWrite(18,10,Yellow+BlueBG,'CursorUnderline');
  182.   GoToEos;
  183.   SetCursor(CursorUnderline);
  184.   HtDelay(1000);
  185.   HtWrite(19,10,Yellow+BlueBG,'CursorHalfBlock');
  186.   GoToEos;
  187.   SetCursor(CursorHalfBlock);
  188.   HtDelay(1000);
  189.   HtWrite(20,10,Yellow+BlueBG,'CursorBlock');
  190.   GoToEos;
  191.   SetCursor(CursorBlock);
  192.   HtDelay(1000);
  193.   HtWrite(21,10,Yellow+BlueBG,'CursorOff');
  194.   GoToEos;
  195.   SetCursor(CursorOff);
  196.   HtDelay(1000);
  197.   HtWrite(23,8,White+BlueBG,'The initial cursor size is saved in the variable ');
  198.   HtWriteEos(Yellow+BlueBG,'CursorInitial.');
  199.   PressAnyKey(CRTRows);
  200. END;
  201.  
  202.  
  203. PROCEDURE PageFive;
  204. VAR I,X,Y,DX,DY : INTEGER;
  205. BEGIN
  206.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  207.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  208.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  209.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Fill Procedures');
  210.   HtWrite(8,8,Yellow+BlueBG,'HtFill ');
  211.   HtWriteEos(White+BlueBG,'- will fill any rectangular area of the screen with the');
  212.   HtWrite(9,17,White+BlueBG,'specified character and attributes');
  213.   HtDelay(1000);
  214.   HtWrite(13,33,Yellow+BlueBG,'Here''s 1000...');
  215.   HtDelay(1000);
  216.   FOR I := 1 TO 1000 DO
  217.     HtFill(10+Random(5),10+Random(30),1+Random(10),Random(30),Random($7F),Chr(30+Random(30)));
  218.   PressAnyKey(15);
  219.   HtWrite(10,8,Yellow+BlueBG,'HtAttr ');
  220.   HtWriteEos(White+BlueBG,'- will change the attributes on an area of the screen');
  221.   FOR I := 1 TO 13 DO
  222.     HtWrite(10+I,10,White+BlueBG,'012345678901234567890123456789012345678901234567890123456789');
  223.   HtDelay(1000);
  224.   X := 20; DX := 1;
  225.   Y := 14; DY := 1;
  226.   FOR I := 1 TO 100 DO
  227.   BEGIN
  228.     HtAttr(Y,X,6,31,Yellow+RedBG);
  229.     HtDelay(50);
  230.     HtAttr(Y,X,6,31,White+BlueBG);
  231.     X := X+DX;
  232.     Y := Y+DY;
  233.     IF Y<12 THEN DY:=1;
  234.     IF Y>17 THEN DY:=-1;
  235.     IF X<11 THEN DX:=1;
  236.     IF X>38 THEN DX:=-1;
  237.   END;
  238.   PressAnyKey(15);
  239. END;
  240.  
  241.  
  242. PROCEDURE PageSix;
  243. BEGIN
  244.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  245.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  246.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  247.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Read Functions');
  248.   HtWrite(8,8,Yellow+BlueBG,'HtReadAttr ');
  249.   HtWriteEos(White+BlueBG,'- will read the attributes on a specified location');
  250.   HtWrite(9,8,Yellow+BlueBG,'HtReadChar ');
  251.   HtWriteEos(White+BlueBG,'- will read the character on a specified location');
  252.   PressAnyKey(15);
  253. END;
  254.  
  255.  
  256. PROCEDURE PageSeven;
  257. VAR I,R1,R2,C1,C2 : BYTE;
  258. BEGIN
  259.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  260.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  261.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  262.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Box Procedures');
  263.   HtWrite(8,8,Yellow+BlueBG,'Box       ');
  264.   HtWriteEos(White+BlueBG,'- will draw a box of specified size');
  265.   HtDelay(1000);
  266.   HtWrite(13,33,Yellow+BlueBG,'Here''s 100...');
  267.   HtDelay(1000);
  268.   FOR I := 1 TO 100 DO
  269.     Box(10+Random(5),10+Random(30),2+Random(9),5+Random(30),Random($7F),SingleBorder,' ');
  270.   PressAnyKey(15);
  271.   HtFill(9,8,16,70,White+BlueBG,' ');
  272.   HtWrite(9,8,Yellow+BlueBG,'AddShadow ');
  273.   HtWriteEos(White+BlueBG,'- will add a shadow to the box');
  274.   HtDelay(1000);
  275.   HtWrite(13,33,Yellow+BlueBG,'Here''s 100...');
  276.   HtDelay(1000);
  277.   FOR I := 1 TO 100 DO
  278.   BEGIN
  279.     R1 := 11+Random(5);
  280.     R2 := 2+Random(7);
  281.     C1 := 10+Random(30);
  282.     C2 := 5+Random(30);
  283.     Box(R1,C1,R2,C2,Random($7F),SingleBorder,' ');
  284.     AddShadow(R1,C1,R2,C2);
  285.   END;
  286.   PressAnyKey(15);
  287.   HtFill(10,8,15,70,White+BlueBG,' ');
  288.   HtWrite(10,8,Yellow+BlueBG,'Explode   ');
  289.   HtWriteEos(White+BlueBG,'- will explode a box of specified size');
  290.   HtDelay(1000);
  291.   HtWrite(13,33,Yellow+BlueBG,'Here''s 20...');
  292.   HtDelay(1000);
  293.   FOR I := 1 TO 20 DO
  294.   BEGIN
  295.     R1 := 12+Random(5);
  296.     R2 := 2+Random(6);
  297.     C1 := 10+Random(30);
  298.     C2 := 5+Random(30);
  299.     Explode(R1,C1,R2,C2,Random($7F),SingleBorder);
  300.     AddShadow(R1,C1,R2,C2);
  301.   END;
  302.   PressAnyKey(15);
  303.   HtFill(11,8,14,70,White+BlueBG,' ');
  304.   HtWrite(11,8,White+BlueBG,'There are 5 pre-defined border-styles : ');
  305.   HtWrite(14,8,LightCyan+BlueBG,'SingleBorder :');
  306.   Box(14,25,1,5,White+CyanBG,SingleBorder,' ');
  307.   HtWrite(18,8,LightCyan+BlueBG,'DoubleBorder :');
  308.   Box(18,25,1,5,White+CyanBG,DoubleBorder,' ');
  309.   HtWrite(14,38,LightCyan+BlueBG,'STopDSide :');
  310.   Box(14,52,1,5,White+CyanBG,STopDSide,' ');
  311.   HtWrite(18,38,LightCyan+BlueBG,'DTopSSide :');
  312.   Box(18,52,1,5,White+CyanBG,DTopSSide,' ');
  313.   HtWrite(22,8,LightCyan+BlueBG,'NoBorder     :');
  314.   Box(22,25,1,5,White+CyanBG,NoBorder,' ');
  315.   PressAnyKey(25);
  316. END;
  317.  
  318.  
  319. PROCEDURE PageEight;
  320. VAR I : BYTE;
  321. BEGIN
  322.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  323.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  324.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  325.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Scroll Procedures');
  326.   HtWrite(8,8,Yellow+BlueBG,'HtScrollUp   ');
  327.   HtWriteEos(White+BlueBG,'- will scroll up the contents of a window');
  328.   HtDelay(1000);
  329.   Box(12,9,11,65,White+GreenBG,SingleBorder,' ');
  330.   FOR I := 1 TO 255 DO
  331.     HtWrite(12+Random(11),9+Random(65),White+GreenBG,Chr(30+Random(30)));
  332.   AddShadow(12,9,11,65);
  333.   HtDelay(1000);
  334.   FOR I := 1 TO 11 DO
  335.   BEGIN
  336.     HtScrollUp(12,9,11,65,White+GreenBG);
  337.     HtDelay(100);
  338.   END;
  339.   HtWrite(9,8,Yellow+BlueBG,'HtScrollDown ');
  340.   HtWriteEos(White+BlueBG,'- will scroll down the contents of a window');
  341.   HtDelay(1000);
  342.   Box(12,9,11,65,White+GreenBG,SingleBorder,' ');
  343.   FOR I := 1 TO 255 DO
  344.     HtWrite(12+Random(11),9+Random(65),White+GreenBG,Chr(30+Random(30)));
  345.   AddShadow(12,9,11,65);
  346.   HtDelay(1000);
  347.   FOR I := 1 TO 11 DO
  348.   BEGIN
  349.     HtScrollDown(12,9,11,65,White+GreenBG);
  350.     HtDelay(100);
  351.   END;
  352.   PressAnyKey(18);
  353. END;
  354.  
  355.  
  356. PROCEDURE PageNine;
  357. VAR Scr : ARRAY[1..6,1..30] OF WORD;
  358.     I,R,C : BYTE;
  359. BEGIN
  360.   HtStoreToScr(1,1,CrtRows,CrtCols,Screen);
  361.   Explode(4,5,5,50,White+BlueBG,SingleBorder);
  362.   AddShadow(4,5,5,50);
  363.   HtWrite(5,10,SameAttr,'Remember this page ? It was saved using');
  364.   HtWrite(6,10,LightCyan+BlueBG,'HtStoreToMem ');
  365.   HtWriteEos(SameAttr,'and re-displayed using');
  366.   HtWrite(7,10,LightCyan+BlueBG,'HtStoreToScr.');
  367.   PressAnyKey(25);
  368.   Box(2,2,23,78,White+BlueBG,SingleBorder,'▒');
  369.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  370.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  371.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Screen save Procedures');
  372.   HtStoreToMem(10,20,6,30,Scr);
  373.   Box(11,21,3,26,White+RedBG,SingleBorder,' ');
  374.   HtWrite(12,22,White+RedBG,'Here''s another example !');
  375.   AddShadow(11,21,3,26);
  376.   HtDelay(1000);
  377.   HtStoreToScr(10,20,6,30,Scr);
  378.   FOR I := 1 TO 20 DO
  379.   BEGIN
  380.     R := 6+Random(10);
  381.     C := 10+Random(30);
  382.     HtStoreToMem(R,C,6,30,Scr);
  383.     Box(R+1,C+1,3,26,White+RedBG,SingleBorder,' ');
  384.     AddShadow(R+1,C+1,3,26);
  385.     HtWrite(R+2,C+2,White+RedBG,'Here''s another example !');
  386.     HtDelay(200);
  387.     HtStoreToScr(R,C,6,30,Scr);
  388.   END;
  389. END;
  390.  
  391.  
  392. PROCEDURE PageTen;
  393. VAR I : BYTE;
  394. BEGIN
  395.   HtFill(1,1,25,80,White+BlackBG,' ');
  396.   SetFont(EGA43Font);
  397.   SetCursor(CursorOff);
  398.   Box(2,2,CRTRows-2,78,White+BlueBG,SingleBorder,' ');
  399.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  400.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  401.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Font Procedures');
  402.   HtWrite(10,10,SameAttr,'There are two procedures to control the number of rows on the');
  403.   HtWrite(11,10,SameAttr,'screen :');
  404.   HtWrite(13,10,LightCyan+BlueBG,'SetFont ');
  405.   HtWriteEos(SameAttr,'- will set the number of rows to 25 or 43/50');
  406.   HtWrite(14,10,LightCyan+BlueBG,'GetFont ');
  407.   HtWriteEos(SameAttr,'- will return the current number of rows to the variable');
  408.   HtWrite(15,20,Yellow+BlueBG,'CRTRows');
  409.   HtWrite(17,10,SameAttr,'There are two pre-defined constants to use in SetFont :');
  410.   HtWrite(19,10,Yellow+BlueBG,'NormalFont ');
  411.   HtWriteEos(SameAttr,'- will give 25 rows');
  412.   HtWrite(20,10,Yellow+BlueBG,'EGA43Font  ');
  413.   HtWriteEos(SameAttr,'- will give 43/50 rows');
  414.   GetFont(CRTRows);
  415.   PressAnyKey(CRTRows);
  416.   SetFont(NormalFont);
  417. END;
  418.  
  419.  
  420. PROCEDURE PageEleven;
  421. VAR I : BYTE;
  422. BEGIN
  423.   SetCursor(CursorOff);
  424.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  425.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  426.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  427.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Pre-defined Constants');
  428.   HtWritec(8,MidCol,SameAttr,'Attributes :');
  429.    HtWrite(9,6,Yellow+BlueBG,'Black      = $00     DarkGray      = $08    BlackBG     = $00');
  430.   HtWrite(10,6,Yellow+BlueBG,'Blue       = $01     LightBlue     = $09    BlueBG      = $10');
  431.   HtWrite(11,6,Yellow+BlueBG,'Green      = $02     LightGreen    = $0A    GreenBG     = $20');
  432.   HtWrite(12,6,Yellow+BlueBG,'Cyan       = $03     LightCyan     = $0B    CyanBG      = $30');
  433.   HtWrite(13,6,Yellow+BlueBG,'Red        = $04     LightRed      = $0C    RedBG       = $40');
  434.   HtWrite(14,6,Yellow+BlueBG,'Magenta    = $05     LightMagenta  = $0D    MagentaBG   = $50');
  435.   HtWrite(15,6,Yellow+BlueBG,'Brown      = $06     Yellow        = $0E    BrownBG     = $60');
  436.   HtWrite(16,6,Yellow+BlueBG,'LightGray  = $07     White         = $0F    LightGrayBG = $70');
  437.   HtWrite(17,6,Yellow+BlueBG,'Blink      = $80     SameAttr      = -1');
  438.   HtWritec(18,MidCol,SameAttr,'Border types :');
  439.   HtWrite(19,6,Yellow+BlueBG,'NoBorder  = 0        SingleBorder = 1       DoubleBorder = 2');
  440.   HtWrite(20,6,Yellow+BlueBG,'DTopSSide = 3        STopDSide    = 4');
  441.   HtWritec(21,MidCol,SameAttr,'Text fonts :');
  442.   HtWrite(22,6,Yellow+BlueBG,'NormalFont = 1       EGA43Font    = 2');
  443.   PressAnyKey(CRTRows);
  444. END;
  445.  
  446.  
  447. PROCEDURE PageTwelve;
  448. VAR I : BYTE;
  449. BEGIN
  450.   SetCursor(CursorOff);
  451.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  452.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  453.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  454.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Procedures');
  455.    HtWrite(7,6,Yellow+BlueBG,'GoToRC(Row,Col : BYTE);             EosToRC(Row,Col : BYTE);');
  456.    HtWrite(8,6,Yellow+BlueBG,'GoToEos;                            HtInit;');
  457.    HtWrite(9,6,Yellow+BlueBG,'SetCursor(Cursor : WORD);           GetCursor(VAR Cursor : WORD);');
  458.   HtWrite(10,6,Yellow+BlueBG,'HtWrite(Row,Col:BYTE; Attr:INTEGER; S:STRING);');
  459.   HtWrite(11,6,Yellow+BlueBG,'HtWriteEos(Attr:INTEGER; S:STRING);');
  460.   HtWrite(12,6,Yellow+BlueBG,'HtAttr(Row,Col,Rows,Cols,Attr:BYTE);');
  461.   HtWrite(13,6,Yellow+BlueBG,'HtFill(Row,Col,Rows,Cols,Attr:BYTE; C:CHAR);');
  462.   HtWrite(14,6,Yellow+BlueBG,'HtScrollUp(Row,Col,Rows,Cols,BlankAttr:BYTE);');
  463.   HtWrite(15,6,Yellow+BlueBG,'HtScrollDown(Row,Col,Rows,Cols,BlankAttr:BYTE);');
  464.   HtWrite(16,6,Yellow+BlueBG,'HtStoreToMem(Row,Col,Rows,Cols:BYTE; Dest);');
  465.   HtWrite(17,6,Yellow+BlueBG,'HtStoreToScr(Row,Col,Rows,Cols:BYTE; Source);');
  466.   HtWrite(18,6,Yellow+BlueBG,'Box(Row,Col,Rows,Cols,Attr,Border:BYTE; Fill:CHAR);');
  467.   HtWrite(19,6,Yellow+BlueBG,'Explode(Row,Col,Rows,Cols,Attr,Border:BYTE);');
  468.   HtWrite(20,6,Yellow+BlueBG,'AddShadow(Row,Col,Rows,Cols:BYTE);');
  469.   HtWrite(21,6,Yellow+BlueBG,'GetFont(VAR CRTRows : BYTE);');
  470.   HtWrite(22,6,Yellow+BlueBG,'SetFont(Font : BYTE);');
  471.   HtWrite(23,6,Yellow+BlueBG,'SetVideoMode(VideoMode : BYTE);');
  472.   PressAnyKey(CRTRows);
  473. END;
  474.  
  475.  
  476. PROCEDURE PageThirteen;
  477. VAR I : BYTE;
  478. BEGIN
  479.   SetCursor(CursorOff);
  480.   Box(2,2,23,78,White+BlueBG,SingleBorder,' ');
  481.   HtWriteC(3,MidCol,White+BlueBG,'Screen Utilities');
  482.   HtWriteC(4,MidCol,White+BlueBG,'for Turbo Pascal 5.5');
  483.   HtWriteC(6,MidCol,LightCyan+BlueBG,'Functions');
  484.    HtWrite(7,6,Yellow+BlueBG,'EosCol : BYTE');
  485.    HtWrite(8,6,Yellow+BlueBG,'EosRow : BYTE');
  486.    HtWrite(9,6,Yellow+BlueBG,'HtReadAttr(Row,Col : BYTE) : BYTE;');
  487.   HtWrite(10,6,Yellow+BlueBG,'HtReadChar(Row,Col : BYTE) : CHAR;');
  488.   HtWrite(11,6,Yellow+BlueBG,'ShadowAttr(Attr : BYTE) : BYTE;');
  489.   HtWrite(12,6,Yellow+BlueBG,'GetVideoMode : BYTE');
  490.   HtWrite(13,6,Yellow+BlueBG,'HtDelay(MS : REAL);');
  491.   HtWrite(14,6,Yellow+BlueBG,'HtReadKey(VAR Fk:BOOLEAN) : CHAR');
  492.   Explode(17,10,4,60,Yellow+BlackBG,SingleBorder);
  493.   AddShadow(17,10,4,60);
  494.   HtWriteC(18,CRTCols DIV 2,White+BlackBG,'The Screen Utilities was written by Harald Thunem.');
  495.   HtWriteC(19,CRTCols DIV 2,White+BlackBG,'No rights reserved !!');
  496.   PressAnyKey(CRTRows);
  497. END;
  498.  
  499.  
  500. BEGIN
  501.   Randomize;
  502.   HtFill(1,1,25,80,White+BlackBG,' ');
  503.   MidCol := CRTCols DIV 2;
  504.   MidRow := CRTRows DIV 2;
  505.   SetCursor(CursorOff);
  506.   PageOne;
  507.   PageTwo;
  508.   PageThree;
  509.   PageFour;
  510.   PageFive;
  511.   PageSix;
  512.   PageSeven;
  513.   PageEight;
  514.   PageNine;
  515.   PageTen;
  516.   PageEleven;
  517.   PageTwelve;
  518.   PageThirteen;
  519.   QuitProgram;
  520. END.
  521.