home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / busi / ncref20.zip / NCREF20.MOD < prev   
Text File  |  1989-11-30  |  19KB  |  394 lines

  1.  
  2. MODULE NCREF20;      (* JPI TopSpeed Modula-2 V1.16 - Ron Buelow 11/89 *)
  3.  
  4.              IMPORT  Lib, SYSTEM;
  5.  FROM IO     IMPORT  KeyPressed, RdKey, WrChar, WrCharRep, WrLn, WrStr;
  6.  FROM Window IMPORT  Black, Blue, Cyan, LightCyan, LightGray, White,
  7.                      Clear, Close, DoubleFrame, GotoXY, Hide, Info, Open,
  8.                      PutOnTop, SetWrap, TextColor, TextBackground, Use,
  9.                      WinType, WinDef;
  10.  
  11.  VAR   NCWin, MWin : WinType;
  12.                 ch : CHAR;
  13.                  i : CARDINAL;
  14.  
  15.  PROCEDURE OpenWindows;
  16.  BEGIN
  17.    MWin := Open(WinDef(54,16,76,22,White,Blue,
  18.    FALSE,FALSE,TRUE,TRUE,DoubleFrame,White,Blue));
  19.      GotoXY(2,3);
  20.      WrStr("L  Lotus 123 2.01");
  21.      GotoXY(2,4);
  22.      WrStr("W  WordPerfect 5.0");
  23.      GotoXY(6,0);
  24.      WrStr(" User Menu ");     
  25.      GotoXY(2,2);              
  26.      WrStr("1 ");
  27.      TextColor(LightGray);
  28.      TextBackground(Black);
  29.      WrStr(" LoanPak 1.2     ");
  30.  
  31.    NCWin := Open(WinDef(0,0,80,25,LightCyan,Black,
  32.    FALSE,FALSE,FALSE,TRUE,DoubleFrame,LightCyan,Black));
  33.      GotoXY(32,0);
  34.      WrStr(" NC V2.0 Qk Ref ");
  35.    Use(NCWin)
  36.  END OpenWindows;
  37.  
  38.  PROCEDURE Page1;   
  39.  BEGIN
  40.    GotoXY(1,2);
  41.    WrStr(" F1  Help Screen │  Ctrl-F1  Left Panel On/Off  │ Alt-F1  Left Panel Drive ");
  42.    WrStr(" F2  User Menu   │  Ctrl-F2  Right Panel On/Off │ Alt-F2  Rght Panel Drive ");
  43.    WrStr(" F3  View File   │ Shift-F3  View Selected File │ Alt-F3  View File"); WrLn;
  44.    WrStr(" F4  Edit File   │ Shift-F4  Edit Selected File │"); WrLn;
  45.    WrStr(" F5  Copy File   │ Shift-F5  Copy Selected File │"); WrLn;
  46.    WrStr(" F6  Rename/Move │ Shift-F6  Rn/Mov Select File │"); WrLn;
  47.    WrStr(" F7  Make DIR    │ Shift-F7  Make DIR           │ Alt-F7  Find-File Window ");
  48.    WrStr(" F8  Delete File │ Shift-F8  Del Selected File  │ Alt-F8  Command History  ");
  49.    WrStr(" F9  Setup Menu  │ Shift-F9  Save Setup to Disk │ Alt-F9  43/50 Line Mode  ");
  50.    WrStr(" F10  Quit NC    │"); WrCharRep(' ',31);  WrStr("│ Alt-F10  NCD Tree Window");
  51.  
  52.    GotoXY(1,13);
  53.    WrStr(" Home  Begin of List   │ ^U  Swap Panels        │ Ins     Sel/De-Sel File  ");
  54.    WrStr(" End   End of List     │ ^O  Toggle All On/Off  │ Gray +  Sel File Group   ");
  55.    WrStr(" "); WrChar(32C); WrStr("  Move Cursor     │ ^P  Inactive Panel Off │ Gray -  De-Sel File Grp  ");
  56.    WrStr(" ^\    Goto Root Dir   │ ^L  Status Panel       │ Ctrl-PgUp  Parent DIR    ");
  57.    WrStr(" PgUp/Dn  PgUp/Dn List │ ^I  Switch (Also Tab)  │ Ctrl-PgDn  Subdirectory");
  58.  
  59.    GotoXY(1,19);
  60.    WrStr(" Esc  Cancels or quits process   Ctrl-Break  Cancels operation in progress  ");
  61.    WrStr(" Enter  Change into directory / execute command line or file under cursor    ");
  62.    WrStr(" Ctrl-Enter  Copy file / directory name to command line or Command complete  ");
  63.    WrStr(" Ctrl-R  Select drive to view in active panel and re-read directory          ");
  64.    WrStr(" Alt-<key>  Speed-search for file or directory name beginning with <key>");
  65.  
  66.    TextColor(LightGray);
  67.    TextBackground(Blue);
  68.    GotoXY(2,1);
  69.    WrCharRep(' ',31); WrStr("Function Keys"); WrCharRep(' ',32);
  70.    GotoXY(2,12);
  71.    WrCharRep(' ',25); WrStr("Panel Navigation & Control"); WrCharRep(' ',25);
  72.    GotoXY(2,18);
  73.    WrCharRep(' ',29); WrStr("General Operations"); WrCharRep(' ',29)
  74.  END Page1;
  75.  
  76.  PROCEDURE Page2;
  77.  BEGIN
  78.    GotoXY(1,2);
  79.    WrStr("  Enter  Execute        │ ^T      Del Word Right │ ^E  Previous Command    ");
  80.    WrStr(" ^Enter  Copy Panel     │ ^K      Del to EOL     │ ^X  Next Command        ");
  81.    WrStr(" ^, ^A  Word Left      │ ^Y,Esc  Del Line       │ ^S  Cursor Left 1 Char  ");
  82.    WrStr(" ^"); WrChar(32C); WrStr(", ^F  Word Right     │ ^G,Del  Del Character  │ ^D  Cursor Right 1 Char ");
  83.    WrStr(" ^BS,^W  Del Word Left  │  BkSp   Del Char Left  │");
  84.  
  85.    GotoXY(1,8);
  86.    WrStr("  , ^E  Cursor Up Line │  Home   Start of Line  │ BS  Del Character Left  ");
  87.    WrStr("  , ^X  Cursor Dn Line │  End    End of Line    │ Del, ^G  Del Chacacter  ");
  88.    WrStr('  '); WrChar(32C); WrStr(", ^D  Cursor Right   │^Home,^PgUp  Start File │ BS, ^W   Del Word left  ");
  89.    WrStr("  , ^S  Cursor Left    │ ^End,^PgDn  End File   │ ^T  Del Word Right      ");
  90.    WrStr(" ^, ^A  Word Left      │ ^R, PgUp  Page Up      │ ^Y  Del Line            ");
  91.    WrStr(" ^"); WrChar(32C); WrStr(", ^F  Word Right     │ ^C, PgDn  Page Down    │ ^K  Del to End of Line  ");
  92.    WrStr("    F1   Help           │                         │ ^Q  Quote Next Char     ");
  93.    WrStr("    F2   Save           │  Shift-F2  Save as ... │ F10, Esc   Quit Editing ");
  94.    WrStr("    F7   Search         │  Shift-F7  Search More │ Shift-F10  Save & Quit");
  95.  
  96.    GotoXY(1,18);
  97.    WrStr("  , ^E  Scroll Up Line │  Home   Start of File  │ F7  Search              ");
  98.    WrStr("  , ^X  Scroll Dn Line │  End    End of File    │ Shift-F7  Search More   ");
  99.    WrStr('  '); WrChar(32C); WrStr(", ^D  Scroll Right   │^Home,^PgUp  Start File │ Ctrl-Break  Stop Search ");
  100.    WrStr("  , ^S  Scroll Left    │ ^End,^PgDn  End File   │ Esc, F10  Quit View     ");
  101.    WrStr(" ^, ^A  Scroll L 40col │ ^R, PgUp  Page Up      │"); WrLn;
  102.    WrStr(" ^"); WrChar(32C); WrStr(", ^F  Scroll R 40col │ ^C, PgDn  Page Down    │");
  103.  
  104.    TextColor(LightGray);
  105.    TextBackground(Blue);
  106.    GotoXY(2,1);
  107.    WrCharRep(' ',29); WrStr("Command Line Keys"); WrCharRep(' ',30);
  108.    GotoXY(2,7);
  109.    WrCharRep(' ',31); WrStr("File Edit Keys"); WrCharRep(' ',31);
  110.    GotoXY(2,17);
  111.    WrCharRep(' ',31); WrStr("File View Keys"); WrCharRep(' ',31)
  112.  END Page2;
  113.  
  114.  PROCEDURE Page3;
  115.  BEGIN
  116.    GotoXY(1,2);
  117.    WrStr("  , ^E  Cell Up        │  Home  Top Left Cell   │ ^, Tab  Scroll Page L  ");
  118.    WrStr("  , ^X  Cell Down      │  End  Last Active Cell │ ^"); WrChar(32C); WrStr(", Shift-Tab  Page R     ");
  119.    WrChar(32C); WrStr(", ^D  Cell Right     │ ^R, PgUp  Page Up      │ Esc, F10  Quit View     ");
  120.    WrStr("  , ^S  Cell Left      │ ^C, PgDn  Page Down    │");
  121.  
  122.    GotoXY(1,7);
  123.    WrStr("  , ^E  Scroll Back 1  │  Grey +  Previous Rec. │ F1  General Info"); WrLn;
  124.    WrStr("  , ^X  Scroll Fwd 1   │  Grey -  Next Record   │ F2  Field Info"); WrLn;
  125.    WrStr(" ^R, PgUp  Page Up      │^Home,^PgUp  First Rec. │ F5  Goto Record"); WrLn;
  126.    WrStr(" ^C, PgDn  Page Down    │ ^End,^PgDn  Last Rec.  │ F7  Search"); WrLn;
  127.    WrStr(" Shift-F7  Search More  │ Ctrl-Break  Stop Srch. │ Esc, F10  Quit View");
  128.  
  129.    GotoXY(1,13);
  130.    WrStr("   Panels                Move Cursor : Single Click Left Button"); WrLn;
  131.    WrStr("                   Scroll Up or Down : Single Click Left Button & Drag"); WrLn;
  132.    WrStr("                     Point and Shoot : Double Click Left Button"); WrLn;
  133.    WrStr("             Select / De-Select File : Single Click Right Button"); WrLn;
  134.    WrStr("            Select / De-Select Group : Single Click Right Button & Drag"); WrLn;
  135.    WrStr("  Windows             Execute Action : Single Click Either Button"); WrLn;
  136.    WrStr("            Execute Highlight Option : Single Click Right Button Outside Box ");
  137.    WrStr("    Menus          Bring Up Menu Bar : Single Click Either Button on Top Row ");
  138.    WrStr("                 Execute Menu Option : Single Click Either Button on Item    ");
  139.    WrStr("                     Shifted Version : Single Click Either Button Shift Down ");
  140.    WrStr("  General   Cancel (Same as Esc Key) : Press BOTH Buttons and Release");
  141.  
  142.    TextColor(LightGray);
  143.    TextBackground(Blue);
  144.    GotoXY(2,1);
  145.    WrCharRep(' ',30); WrStr("Lotus View Keys"); WrCharRep(' ',31);
  146.    GotoXY(2,6);
  147.    WrCharRep(' ',30); WrStr("dBASE View Keys"); WrCharRep(' ',31);
  148.    GotoXY(2,12);
  149.    WrCharRep(' ',24); WrStr("General Rules Using a Mouse"); WrCharRep(' ',25)
  150.  END Page3;
  151.  
  152.  PROCEDURE Page4;
  153.  BEGIN
  154.    GotoXY(1,3);
  155.    WrStr("  <F9> to call Setup, <Esc> Exits.  Highlight section desired < "); WrChar(32C); WrStr(">, <Enter>. ");
  156.    WrStr("  Pull-down menus will appear.  Check marks (√) show your current defaults.   ");
  157.    WrStr("  Highlight a new option and press <Enter>.  Setup will exit automatically,   ");
  158.    WrStr("  reflecting change. IMPORTANT: To save changes permanently press <Shift-F9>.");
  159.  
  160.    GotoXY(1,8);
  161.    WrStr("  Commands (HotKey) │  Options        (Meaning)   │  Right/Left   (Meaning)   ");
  162.    WrStr("  --------          │  -------                    │  ----------"); WrLn;
  163.    WrStr("  NCDtree  Alt-F10 │  Color        Color Option │√ Brief   File Names Only ");
  164.    WrStr("  Findfile  Alt-F7 │  Auto menus   Auto Menu On │  Full    Full File Panel ");
  165.    WrStr("  History   Alt-F8 │√ Path prompt  C:\PATH> On  │  Info    Info Panel      ");
  166.    WrStr("  43/50Ln   Alt-F9 │√ Key bar ^B   Key Bar On   │  Tree    NCD Tree Panel  ");
  167.    WrStr("  Swap panels   ^U │√ Fullscreen   Big Panel On │  On/Off  Panel On/Off    ");
  168.    WrStr("  Panel on/off  ^O │√ Ministatus   Stat Line On │  ----------"); WrLn;
  169.    WrStr("  Compare directory │√ Ins move dn  LineFeed On  │√ Name    Sort by Name    ");
  170.    WrStr("  Menu file edit    │  cLock        Dig Clock On │  eXt     Sort by Ext     ");
  171.    WrStr("  eXt file edit     │  Editor...    Specify your │  tiMe    Sort by Time    ");
  172.    WrCharRep(' ',37);                   WrStr("own editor   │  Size    Sort by Size    ");
  173.    WrStr('  (Note: You can "jump" to the       invoked <F4>,│  Unsorted  No File Sort  ');
  174.    WrStr("  selection just by pressing the     uses NC.EXT  │  ----------"); WrLn;
  175.    WrStr("  item's capitalized letter key).    arguments.   │  Shift-F2  ReRead Drive");
  176.  
  177.    TextColor(LightGray);
  178.    TextBackground(Blue);
  179.    GotoXY(3,1); WrStr(" Customizing Setup <F9> ")
  180.  END Page4;
  181.  
  182.  PROCEDURE Page5;
  183.  BEGIN
  184.    GotoXY(1,3);
  185.    WrStr("  Bring up Setup <F9>, then Highlight [Commands] and select [eXt file edit].");
  186.  
  187.    GotoXY(1,5);
  188.    WrStr("  Extension file edit allows you to run a file with any extension by calling  ");
  189.    WrStr("  its application program.  For example, a spreadsheet or word processor data ");
  190.    WrStr("  file gets its program application by matching the extension you specify to  ");
  191.    WrStr("  the application.  NC does this by inserting the program application on the  ");
  192.    WrStr("  command line followed by the file/ext selected and executing the command.");
  193.  
  194.    GotoXY(1,11);
  195.    WrStr("  A PATH in your autoexec.bat file may be required for DOS to locate your     ");
  196.    WrStr("  program, or with DOS 3.0 and later include the entire path in NC.EXT file.");
  197.  
  198.    GotoXY(1,14);
  199.    WrStr("      (Example)              (Explanation)             (NC.EXT Arguments)     ");
  200.    WrStr("          "); GotoXY(62,15); WrStr("  "); WrLn;
  201.    WrStr(" c: c:\prg\bin\qc/b ! │ For example, the line: │ !.! Insert File Name and Ext ");
  202.    WrStr(" dbf: d:\db3\dbase !  │     wpd: c:\wp\wp !.!  │ !   Insert File Name Only    ");
  203.    WrStr(" doc: edit !.!        │ Tells the Commander to │ !:  Insert Current Drive & : ");
  204.    WrStr(" txt: edit !.!        │ load file with the ext │ !/  Insert Path Name"); WrLn;
  205.    WrStr(" wkq: c:\quattro\q !  │ .wpd into WordPerfect, │ !!  Insert Single !"); WrLn;
  206.    WrStr(" wpd: c:\wp\wp !.!    │ if highlighted and the │ *:  rem Remark for No Match  ");
  207.    WrStr(" *: rem No Run File   │ <Enter> key is pressed │ (*: Should be the last line)");
  208.  
  209.    TextColor(LightGray);
  210.    TextBackground(Blue);
  211.    GotoXY(3,1);
  212.    WrStr(" Extension File Edit NC.EXT ")
  213.  END Page5;
  214.  
  215.  PROCEDURE Page6;
  216.  BEGIN
  217.    GotoXY(1,3);
  218.    WrStr("  Bring up Setup <F9>, then Highlight [Commands] and select [Menu file edit]. ");
  219.    WrStr("  NC will ask if you want to edit a Main (Global) or Local (Directory) Menu.");
  220.  
  221.    GotoXY(1,6);
  222.    WrStr("  A Main Menu will pop-up from any location on the drive whenever <F2> is     ");
  223.    WrStr("  pressed UNLESS a Local Menu is present in the directory you are in. In this ");
  224.    WrStr("  case the Local Menu will take priority and pop-up instead of the Main Menu.");
  225.  
  226.    GotoXY(1,10);
  227.    WrStr("  NC will prompt you to create a new Menu file if one is not present.  Once   ");
  228.    WrStr("  in the Menu file edit screen create a menu file such as in the Example:");
  229.  
  230.    GotoXY(1,13);
  231.    WrStr("  Writing This ... ───────────────────────────────── ... Produces This:"); WrLn;
  232.    WrStr("    (Example)                (Explanation)                (Sample Menu)"); WrLn;
  233.    WrStr("        "); GotoXY(63,15); WrStr("  "); WrLn;
  234.    WrStr("  1:LoanPak 1.2     │  HotKey:Title for Menu      │"); WrLn;
  235.    WrStr("   c:\bat\loan.bat  │   INDENT command to execute │"); WrLn;
  236.    WrStr("  L:Lotus 123 2.01  │  HotKey:(Next) Menu Title   │"); WrLn;
  237.    WrStr("   c:\lotus\123     │   INDENT command to execute │"); WrLn;
  238.    WrStr("  'version 3.0 on D │  ' designates comment line  │"); WrLn;
  239.    WrStr("  W:WordPerfect 5.0 │ (* Note the colon : between │"); WrLn;
  240.    WrStr("   c:\wp\wp         │    HotKey & Menu Title *)   │");
  241.  
  242.    TextColor(LightGray);
  243.    TextBackground(Blue);
  244.    GotoXY(3,1); WrStr(" Menu File Edit NC.MNU <F2> ")
  245.  END Page6;
  246.  
  247.  PROCEDURE Page7;
  248.  BEGIN
  249.    GotoXY(14,2); WrStr("(Brief Panel)"); GotoXY(54,2); WrStr("(Full Panel)");
  250.    WrLn;
  251.    WrStr(" ╔═══════════╤═══════════╤═══════════╗  ╔══════════╤════════╤════════╤══════╗ ");
  252.    WrStr(" ║   Name    │   Name    │   Name    ║  ║   Name   │  Size  │  Date  │ Time ║ ");
  253.    WrStr(" ║           │append  com│basica  com║  ║                                   ║ ");
  254.    WrStr(" ║4201    cpi│assign  exe│chkdsk  com║  ║4201   cpi│   16958│ 5-10-88│ 8:00a║ ");
  255.    WrStr(" ║5202    cpi│attrib  com│command com║  ║5202   cpi│     278│ 5-10-88│ 8:00a║ ");
  256.    WrStr(" ║ansi    sys│backup  com│comp    com║  ║ansi   sys│    1912│ 5-10-88│ 8:00a║ ");
  257.    WrStr(" ╟───────────┴───────────┴───────────╢  ║append com│    5794│ 5-10-88│ 8:00a║ ");
  258.    WrStr(" ║..         UP-DIR  1-01-80  1:40a║┐║assign exe│    1534│ 5-10-88│ 8:00a║ ");
  259.    WrStr(" ╚═══════════════════════════════════╝ │╚══════════╧════════╧════════╧══════╝");
  260.    GotoXY(23,12);        WrStr("√ Mini status on ┘"); WrLn;
  261.    WrStr(" ╔═══════════════════════════════════╗  ╔═══════════════════════════════════╗ ");
  262.    WrStr(" ║ The Norton Commander V2.0 (C)1988 ║  ║                                  ║ ");
  263.    WrStr(" ╟───────────────────────────────────╢  ║ ├──BAT      √ cLock option on ─┘  ║ ");
  264.    WrStr(" ║       655,360 Bytes Memory        ║  ║ ├──DOS                            ║ ");
  265.    WrStr(" ║        425,648 Bytes Free         ║  ║ ├──PRG      Enter  Change Dir    ║ ");
  266.    WrStr(" ║ 33,400,832 total bytes on drive C ║  ║ │  ├──M2    Grey+  Dn Same Level ║ ");
  267.    WrStr(" ║  4,151,296 bytes free on Drive C  ║  ║ │  └──MSC   Grey-  Up Same Level ║ ");
  268.    WrStr(" ║                C:\                ║  ║ └──WP     Alt-Key  Speed Search  ║ ");
  269.    WrStr(" ╟───────────────────────────────────╢  ╟───────────────────────────────────╢ ");
  270.    WrStr(" ║ Root Dir  (─ `DirInfo' F4 Edits) ║  ║C:\                                ║ ");
  271.    WrStr(" ╚═══════════════════════════════════╝  ╚═══════════════════════════════════╝");
  272.  
  273.    TextColor(LightGray);
  274.    TextBackground(Blue);
  275.    GotoXY(2,1);   WrStr(" Panel Examples:  Type and Position: <F9-Right/Left>   Length: <F9-Options> ");
  276.  
  277.    TextColor(Black);           (* write "reversed" text *)
  278.    TextBackground(LightGray);
  279.    GotoXY(16,3);  WrStr(" C:\DOS  ");
  280.    GotoXY(56,3);  WrStr(" C:\DOS ");
  281.    GotoXY(3,5);   WrStr("..         ");
  282.    GotoXY(42,5);  WrStr("..        │UP-DIR│ 1-01-80│ 1:40a");
  283.    GotoXY(17,13); WrStr(" Info ");
  284.    GotoXY(57,13); WrStr(" Tree ");
  285.    GotoXY(42,14); WrStr(" \ ")
  286.  END Page7;
  287.  
  288.  PROCEDURE GetTime(VAR hrs, min, sec : CARDINAL);
  289.  VAR
  290.    r : SYSTEM.Registers;
  291.  BEGIN
  292.    r.AH := 2CH;                (* get DOS time *)
  293.    Lib.Dos(r);
  294.    hrs  := CARDINAL(r.CH);
  295.    min  := CARDINAL(r.CL);
  296.    sec  := CARDINAL(r.DH)
  297. (* hsec := CARDINAL(r.DL) <- add this and declare variable for hundreths *)
  298.  END GetTime;
  299.  
  300.  PROCEDURE WrTime;
  301.  CONST xArr = '0123456789';    (* constant for hours and minutes *)
  302.        yArr = ': ';            (* constant for blinking colon ":" & " " *)
  303.  VAR hrs, min, sec : CARDINAL;
  304.                 am : BOOLEAN;
  305.  BEGIN
  306.    GetTime(hrs, min, sec);
  307.    am := hrs < 12;
  308.    IF hrs > 11 THEN hrs := (hrs - 12) END;     (* make a 12 hour clock *)
  309.    IF (hrs > 0) AND (hrs < 10) THEN        (* skip 1st digit *)
  310.      WrChar(' ')
  311.    ELSE                        (* otherwise write "1" *)
  312.      WrChar('1')
  313.    END;
  314.    IF hrs = 0 THEN             (* if midnight hour write "12" *)
  315.      WrChar('2')
  316.    ELSE
  317.      WrChar(xArr[hrs MOD 10])
  318.    END;
  319.    WrChar(yArr[sec MOD 2]);          (* write a blinking colon *)
  320.    WrChar(xArr[min DIV 10 MOD 6]);   (* write minutes *)
  321.    WrChar(xArr[min MOD 10]);         
  322.    IF am THEN
  323.      WrChar('a')               (* am - pm *)
  324.    ELSE
  325.      WrChar('p')
  326.    END
  327.  END WrTime;
  328.  
  329.  PROCEDURE WrPage7Clocks;      (* procedure for Page7 *)
  330.  BEGIN                         
  331.  REPEAT
  332.    GotoXY(72,13); WrTime;
  333.    GotoXY(33,3); WrTime
  334.  UNTIL KeyPressed();
  335.    ch := RdKey()
  336.  END WrPage7Clocks;
  337.  
  338.  PROCEDURE WrPage(pagevalue:CARDINAL);
  339.  CONST xArr = '0123456789';
  340.  VAR WD : WinDef;
  341.      on : BOOLEAN;             (* SetWrap() variable *)
  342.  BEGIN
  343.    Info(MWin,WD);
  344.      IF WD.Hidden = FALSE THEN (* check if the MWin window from procedure *)
  345.        Hide(MWin)              (* Page6 is hidden before changing pages   *)
  346.      END;
  347.  
  348.    SetWrap(FALSE);             (* free window border up for hard write *)
  349.      TextColor(Black);
  350.      TextBackground(Cyan);
  351.      GotoXY(16,25); WrStr(" Page   of 7 - PgUp/Dn * Home/End - Esc Exits ");
  352.      GotoXY(22,25); WrChar(xArr[i]); (* insert the current page number *)
  353.      TextColor(LightGray);
  354.      TextBackground(Black);
  355.    SetWrap(on);                (* text procedures use end of line wrap on *)
  356.  
  357.    Clear;                      (* clear screen before each page write *)
  358.  
  359.    CASE pagevalue OF
  360.      1 : Page1
  361.    | 2 : Page2
  362.    | 3 : Page3
  363.    | 4 : Page4
  364.    | 5 : Page5
  365.    | 6 : Page6; PutOnTop(MWin); Use(NCWin) (* show MWin when page6 is called *)
  366.    | 7 : Page7
  367.    END
  368.  END WrPage;
  369.  
  370.  PROCEDURE GetPage;
  371.  CONST   esc = 33C; up = 110C; pgup = 111C; home = 107C;
  372.          spc = 40C; dn = 120C; pgdn = 121C;  end = 117C;
  373.  BEGIN
  374.    i := 1;
  375.    WrPage(i);                  (* start with Page1 *)
  376.      REPEAT
  377.        IF i = 7 THEN
  378.          WrPage7Clocks         (* show the clocks if Page7 *)
  379.        ELSE ch := RdKey() END;
  380.        CASE ch OF
  381.          pgup, up      : IF i = 1 THEN i := 7 ELSE DEC(i) END; WrPage(i)
  382.        | pgdn, dn, spc : IF i = 7 THEN i := 1 ELSE INC(i) END; WrPage(i)
  383.        | home          : IF i # 1 THEN i := 1; WrPage(i) END
  384.        | end           : IF i # 7 THEN i := 7; WrPage(i) END
  385.        END
  386.      UNTIL ch = esc            (* repeat until escape key is hit *)
  387.  END GetPage;
  388.  
  389.  BEGIN
  390.    OpenWindows;                (* run program *)
  391.    GetPage;
  392.    Close(MWin);                (* close windows on exit *)
  393.    Close(NCWin)
  394.  END NCREF20.