home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / INTER40D.ZIP / INTWHLP1.ZIP / INTWHLP.PAS < prev    next >
Pascal/Delphi Source File  |  1994-02-16  |  20KB  |  697 lines

  1. (*
  2.   Interrupt List -> WinHelp converter V1.01 (c) 1994 by Christian Müller-Planitz
  3.   -----------------------------------------------------------------------------
  4.   Author: cmuelle@eos.ncsu.edu,  cmueller@techfak.uni-bielefeld.de
  5.  
  6.  
  7.   The source and the compiled EXE-file can be freely distributed as long as
  8.   no changes are made without my knowledge.
  9.  
  10.   --------------------------------
  11.   Notes:
  12.    The program was tested with INTLIST38 and INTLIST39 and its output
  13.      was successfully compiled with the MS-Help-compiler "HC31.EXE" V3.10.445.
  14.  
  15.    The program needs the file "INTWHLP.DAT" in the 'source' directory.
  16.  
  17.    The program converted all sourcefiles (INTERRUP.* and *.LST) to
  18.      13 RTF files which needed 11MB on my harddrive.
  19.  
  20.    Compiling the RTF-files without compression took 13 minutes in
  21.      a DOS-Window under Win/NT on a 486-50 (if you run it under DOS
  22.      and if you have a fast hardrive cache, it might be faster).
  23.  
  24.    The (uncompressed) compiled HLP-File was approximately 7MB large.
  25.    If you want to create a compressed HLP-file, you have to exchange the
  26.      comments in the generated help-project file ("RB.HPJ"). Compressing
  27.      reduces the size of the HLP-file to 3MB but it takes
  28.      *more* (?? 28MB ??)  space on your harddrive while compiling.
  29.      In order to speed up compiling the compressed file, I've included a
  30.      temporary file ("RB.PH") of the helpcompiler in this archive.
  31.      Copy this file into the directory containing all the RTF files
  32.      before starting the compiler. This file is specific for INTERLIST39, so
  33.      if you want to get maximal compression in future versions, remove it.
  34.  
  35.    After the compilation finishes, you will find the file "RB.HLP".
  36.      Start Windows, create an icon in the program manager and double-click on it.
  37.  
  38.  
  39.   --------------------------------
  40.  
  41.    If you find this program usefull, if it does not work or if you have ideas
  42.    how to expand its functionality, feel fee to write an e-mail to me.
  43.  
  44.    As usual, I do not take any responsibility for possible damages done by
  45.    this program.
  46.  
  47.  
  48.   Two questions and their answers :
  49.   ---------------------------------
  50.    WHY is the HLP-file so large ?
  51.      In contrast to other programs that convert the interrupt list to
  52.      DOS-based hypertext systems, this program generates a large
  53.      index file that allows you to search for keywords.
  54.  
  55.    WHY did I wrote this program in Pascal and not in C ?
  56.      I think Pascal is a pretty nice language for small projects.
  57.      Another reason is the availability of efficient string handling under Pascal.
  58. *)
  59.  
  60.  {$A+,B-,D-,E-,F-,G+,I+,L-,N-,O-,P-,Q-,R-,S-,T-,V+,X+,Y+}
  61.  
  62.  
  63. {$DEFINE ProcessIntList}
  64. {$DEFINE ProcessPorts}
  65. {$DEFINE ProcessMemory}
  66. {$DEFINE ProcessBugs}
  67. {$DEFINE ProcessCMOS}
  68.  
  69.  
  70.  
  71. Program RB2HLP;
  72.   CONST InPath  : String = 'd:\tmp\';
  73.         OutPath : String = 'd:\tmp\out\';
  74.   CONST IncludeFile      = 'INTWHLP.DAT';
  75.  
  76.   Var OutFileCounter : Word;
  77.       IndexFile      : Text;                    { stores *all* section names }
  78.       IntFile        : Text;                    { stores one entry per int-number }
  79.       SubIntFile     : Text;                    { stores all subfunctions of an int per page }
  80.       HPJ            : Text;                    { hlep compiler project file }
  81.       TopicNo        : Word;
  82.       LastSection    : String;                  { stores number of last processed int }
  83.       IntTopicStr   : String;                   { stores handle to page with subfunctions of the int's}
  84.  
  85.   Const InvalidClassification = '-';
  86.  
  87.  
  88.   procedure CreateHPJ;
  89.     begin
  90.       assign(HPJ, OutPath + 'RB.HPJ');
  91.       rewrite(HPJ);
  92.       writeln(HPJ, '[OPTIONS]'#10'CONTENTS=CONTENTS'#10'COMPRESS=NO'#10';COMPRESS=YES'#10);
  93.       writeln(HPJ, '[CONFIG]'#10'BrowseButtons()'#10);
  94.       writeln(HPJ, '[FILES]'#10'index.rtf');
  95.      {$IFDEF ProcessIntList}
  96.       writeln(HPJ, 'int.rtf'#10'subint.rtf');
  97.      {$ENDIF}
  98.     end;
  99.  
  100.  
  101.  
  102.  
  103.  
  104.   Procedure NewHlpPage(VAR F : Text; S, ID : String; Classification : Char);
  105.     VAR q : Word;
  106.         BrowseID : STring;
  107.  
  108.     Procedure FootNote(Note: Char; ID : String);
  109.       begin
  110.         writeln(F, '{\up6 ',Note,'{\footnote \pard\plain \s2\f0\fs20\cf0\qj\lotusoutlinelevel0');
  111.         writeln(F, '{\up6 ',Note,'}{\field{\*\fldinst SYMBOL 16 \\f "" \\s 10 \\h}}', ID, '}}');
  112.       end;
  113.  
  114.  
  115.     Procedure StoreKeyWords(SS: String);
  116.       VAR p : Word;
  117.  
  118.        begin
  119.           repeat
  120.             p := POS(' - ', ss);
  121.             if p <> 0 then
  122.               begin
  123.                 ss[p+1] := ' ';
  124.                 ss[p+2] := ';';
  125.               end;
  126.           until p=0;
  127.  
  128.           FootNote('K', SS);
  129.        end;
  130.  
  131.  
  132.     begin
  133.       BrowseID := ID;
  134.       while Length(BrowseID) < 6 do
  135.         insert('0', BrowseID, 1);
  136.  
  137.       write(F, '\page ');
  138.       FootNote('#', ID);
  139.       FootNote('$', S);
  140.       FootNote('+', BrowseID);
  141.       if (Classification = InvalidClassification)
  142.         then StoreKeyWords(s)
  143.         else StoreKeyWords(Classification + ';' + s);
  144.  
  145.       writeln(F, '\pard\plain \s3\f0\fs28\cf1\b\sb144\sa72\lotusoutlinelevel1\keep\keepn {\up6 ', S, '}');
  146.  
  147.  
  148.       writeln(F, '\par \pard\plain \s4\f1\fs20\cf1\lotusoutlinelevel0 \tx855\tx1710\tx2565\tx3420\tx4275' +
  149.                  '\tx5130\tx5985\tx6840\tx7695');
  150.  
  151.  
  152.  
  153.     end;
  154.  
  155.  
  156.  
  157.   Procedure Out(VAR F: Text; S : String);
  158.     begin
  159.       write(F, S);
  160.     end;
  161.  
  162.  
  163. {Note: The table is not complete. But for it is sufficient for this purpose * }
  164.  
  165.   Function OEMtoANSI(q: Byte) : Byte;
  166.     Const Tab : Array[0..127]  of Byte =
  167.     ( 199,252,233,226,228,224,225,231,234,235,232,239,238,236,196,197,
  168.       201,230,198,244,246,242,251,249,253,214,220,162,163,165,182,131,
  169.       128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
  170.       128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
  171.       128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
  172.       128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
  173.       128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
  174.       128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128);
  175.  
  176.     begin
  177.       if q < 128
  178.         then OEMtoANSI := q
  179.         else OEMtoANSI := Tab[q-128];
  180.     end;
  181.  
  182.  
  183.  
  184.   Function HEX(b:byte):string;
  185.     Const h : array [0..15] of char = ('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
  186.     begin
  187.       Hex := h[b shr 4]+h[b and 15];
  188.     end;
  189.  
  190.  
  191.   Procedure ReadLine(VAR F: Text; VAR S: String);
  192.     VAR q: Word;
  193.         c: Byte;
  194.  
  195.     begin
  196.       readln(F, S);
  197.  
  198.       q:= 1;
  199.       while q <= Length(s) do    { duplicate all '\' }
  200.         begin
  201.           if s[q] = '\' then
  202.             begin
  203.               insert('\', s, q);
  204.               Inc(q);
  205.             end;
  206.           Inc(q);
  207.         end;
  208.  
  209.       q:= 1;
  210.       while q <= Length(s) do
  211.         begin
  212.           c := ord(s[q]);
  213.           if c = 9 then
  214.             begin
  215.               s[q] := '\';
  216.               insert('tab ', s, q+1);
  217.               Inc(q, 4);
  218.             end;
  219.  
  220.           if c >= 128 then   { escape all 'Umlaute' }
  221.             begin
  222.               insert(#39+HEX( OEMtoANSI(ord(s[q])) ), s, q+1);
  223.               s[q] := '\';
  224.               Inc(q,2);
  225.             end;
  226.           Inc(q);
  227.         end;
  228.  
  229.     end;
  230.  
  231.  
  232.  
  233.   Procedure OutLN(VAR F: Text; S : String);
  234.     begin
  235.       write(F, '\par ');
  236.       Out(F, S);
  237.       writeln(F);
  238.     end;
  239.  
  240.  
  241.   Procedure AddTopic(VAR F: Text; S, ID : String);
  242.     begin
  243.       write(F, '\par {\uldb ');
  244.       Out(F, s);
  245.       write(F, '}{\v ');
  246.       Out(F, ID);
  247.       writeln(F, '}');
  248.     end;
  249.  
  250.  
  251.  
  252.   Procedure CopyHeader(VAR F: Text);
  253.     VAR F3 : Text;
  254.         c  : Char;
  255.  
  256.     begin
  257.      {$I-}
  258.       assign(F3, InPath + 'INTWHLP.DAT');
  259.       reset(F3);
  260.      {$I+}
  261.       if IOResult <> 0 then
  262.         begin
  263.           writeln('Error opening ', InPath + IncludeFile);
  264.           HALT;
  265.         end;
  266.  
  267.     { this is certainly slow, but simple }
  268.       while not EOF(F3) do
  269.         begin
  270.           read(F3, c);
  271.           write(F, c);
  272.         end;
  273.       close(F3);
  274.     end;
  275.  
  276.  
  277.  
  278.   Procedure OpenRTF(VAR F: Text; Name: String);
  279.     begin
  280.      {$I-}
  281.       assign(F, OutPath + Name);
  282.       rewrite(F);
  283.      {$I+}
  284.       if IOResult <> 0 then
  285.         begin
  286.           writeln('Error craeting ', InPath + Name);
  287.           HALT;
  288.         end;
  289.  
  290.       CopyHeader(F);
  291.     end;
  292.  
  293.  
  294.   Procedure CloseRTF(VAR F: Text);
  295.     begin
  296.       writeln(F, '}');
  297.       close(F);
  298.     end;
  299.  
  300.  
  301.   Procedure OpenOutFile(VAR FData: Text);
  302.       VAR Name : String;
  303.  
  304.       begin
  305.         STR(OutFileCounter, Name);
  306.         Name := 'RB' + Name + '.RTF';
  307.  
  308.         OpenRTF(FData, Name);
  309.         writeln(HPJ, Name);
  310.         Inc(OutFileCounter);
  311.       end;
  312.  
  313.  
  314.  
  315.   Procedure CheckKeyWords(VAR s : STring);
  316.     CONST KeyWords = 9;
  317.     CONST Keys : Array[1..KeyWords] of String[10] = ('Desc:', 'Notes:', 'Note:', 'Warning:', 'Index:', 'SeeAlso:',
  318.                                                      'Return:', 'BUG:', 'Program:');
  319.     CONST IStr = '\par {\b ';
  320.     VAR q,p : Word;
  321.  
  322.     begin
  323.  
  324.       for q:= 1 to KeyWords do
  325.         begin
  326.           p := POS(Keys[q], S);
  327.           if p <> 0 then
  328.             begin
  329.               insert(IStr, S, p);
  330.               insert('}', S, p+Length(Keys[q]) + Length(IStr));
  331.             end;
  332.         end;
  333.     end;
  334.  
  335.  
  336. {this function has to be changed or expanded if new flags are added by R.Brown }
  337. {reading in the flags would be neat }
  338.  
  339.   Function GetSpecialNote(Note : Char)  : String;
  340.     VAR s: STring;
  341.  
  342.     begin
  343.        case Note of
  344.          'U' : s:= 'undocumented function ';
  345.          'u' : s:= 'partially documented function ';
  346.          'P' : s:= 'available only in protected mode ';
  347.          'R' : s:= 'available only in real or V86 mode ';
  348.          'C' : s:= 'callout or callback (usually hooked rather than called) ';
  349.          'O' : s:= 'obsolete (no longer present in current versions) ';
  350.          else s:= '<unknown note in header> ';
  351.       end;
  352.  
  353.       GetSpecialNote := s;
  354.     end;
  355.  
  356.  
  357.   Function ProcessIntList(FName : String) : Boolean;
  358.     LABEL STOP;
  359.     VAR s      : String;
  360.         q          : Word;
  361.         NewSection : Boolean;
  362.         SS         : String;
  363.         Section : String;
  364.         SubFunc    : String;
  365.         TopicStr  : String;
  366.         SpecialNote : String;
  367.  
  368.         Title     : String;
  369.         Classification      : Char;
  370.         F1, F2        : Text;
  371.  
  372.  
  373.     begin
  374.      {$I-}
  375.       assign(F1, InPath + FName);
  376.       reset(F1);
  377.      {$I+}
  378.       if IOResult <> 0 then
  379.         begin
  380.           ProcessIntList := FALSE;
  381.           EXIT;
  382.         end;
  383.  
  384.       writeln('Processing : ', InPath + FName);
  385.       OpenOutFile(F2);
  386.  
  387.       readLine(F1, s);    { ignore copyright in 1st two lines }
  388.       readLine(F1, s);
  389.  
  390.       SpecialNote := '';
  391.  
  392.  
  393.       while not(EOF(F1)) do
  394.         begin
  395.           readLine(F1, s);
  396.           NewSection := (s[1]= '-') and (Pos('--------', s) <> 0);
  397.  
  398.           if NewSection then
  399.             begin
  400.               if IntTopicStr <> '' then
  401.                 begin
  402.                   AddTopic(F2, 'INT ' + Section, IntTopicStr);
  403.                 end;
  404.  
  405.               Inc(TopicNo);
  406.               str(TopicNo, TopicStr);
  407.               Section  := copy(s, 11, 2);
  408.               SubFunc  := copy(s, 13, 2);
  409.  
  410.               Classification := s[9];
  411.               if Classification = '!' then
  412.                 begin
  413.                   s := copy(s, 13, 255);
  414.  
  415.                   q:=0;
  416.                   while (s[q] <> '-') and (q < Length(s)) do
  417.                     Inc(q);
  418.                   s[0] := chr(q-1);  { remove '-' chars at the end }
  419.  
  420.                   if s = '' then s:= 'Note';   { shit ! }
  421.  
  422.                   if EOF(F1)  then   { last line of document ?}
  423.                     goto STOP;
  424.                 end
  425.               else
  426.                 begin
  427.                   readLine(F1, s);
  428.                   while (s[8] <> '-') do   { special flags in titel-line ? }
  429.                     begin
  430.                       if s[8] <> ' ' then
  431.                         SpecialNote := SpecialNote  + GetSpecialNote(s[8]);
  432.                       delete(s, 8, 1);
  433.                     end;
  434.  
  435.                   Insert(subFunc+' ', S, 8);
  436.                 end;
  437.  
  438.               if LastSection <> Section then
  439.                 begin
  440.                   IntTopicStr := 'S' + TopicStr;
  441.                   if LastSection = ''
  442.                     then begin
  443.                            AddTopic(IntFile, 'Notes', IntTopicStr)
  444.                          end
  445.  
  446.                     else AddTopic(IntFile, s, IntTopicStr);
  447.  
  448.                   NewHlpPage(SubIntFile, s, IntTopicStr, InvalidClassification);
  449.                   LastSection := Section;
  450.                 end;
  451.  
  452.  
  453.               NewHlpPage(F2, s, TopicStr, Classification);
  454.               if SpecialNote <> '' then
  455.                 begin
  456.                   OutLN(F2, '\par {\f1\fs20\cf0 '+ SpecialNote + '}');
  457.                   SpecialNote := '';
  458.                 end;
  459.  
  460.               OutLN(F2, '\par {\f1\fs20\cf0 Categorie : '+ Classification + '}');
  461.               OutLN(F2, '\par {\b Inp.:}');
  462.               AddTopic(IndexFile, s, TopicStr);
  463.               AddTopic(SubIntFile, s, TopicStr);
  464.             end
  465.           else          { no new section }
  466.            begin
  467.              CheckKeyWords(s);
  468.              OutLN(F2, s);
  469.            end;
  470.  
  471.  
  472.         end;
  473.  
  474.       STOP:
  475.       close(F1);
  476.       closeRTF(F2);
  477.       ProcessIntList := TRUE;
  478.     end;
  479.  
  480.  
  481.   Procedure NewPage(VAR F: Text; Title : String);
  482.     VAR TopicStr : String;
  483.  
  484.       begin
  485.         Inc(TopicNo);
  486.         str(TopicNo, TopicStr);
  487.         AddTopic(IndexFile, Title, TopicStr);
  488.         NewHlpPage(F, Title, TopicStr, InvalidClassification);
  489.       end;
  490.  
  491.  
  492.   Procedure ProcessPorts(FName : String);
  493.     LABEL STOP;
  494.     VAR s          : String;
  495.         TopicStr   : String;
  496.         NewSection : Boolean;
  497.         F1, F2     : Text;
  498.  
  499.  
  500.  
  501.     begin
  502.      {$I-}
  503.       assign(F1, InPath + FName);
  504.       reset(F1);
  505.      {$I+}
  506.       if IOResult <> 0 then
  507.         begin
  508.           writeln('Unable to open ', InPath + FName);
  509.           EXIT;
  510.         end;
  511.  
  512.       writeln('Processing : ', InPath + FName);
  513.       OpenOutFile(F2);
  514.  
  515.       NewPage(F2, 'Port : Note');
  516.  
  517.       while not(EOF(F1)) do
  518.         begin
  519.           readLine(F1, s);
  520.           NewSection := (s[1]= '-') and (Pos('---------', s) <> 0);
  521.  
  522.           if NewSection then
  523.             begin
  524. {Changed!}    readLine(F1, s);
  525.  
  526.               if EOF(F1)  then   { last line of document ?}
  527.                 goto STOP;
  528.  
  529.               if s <> '' then                { why does this happend }
  530.                 NewPage(F2, s);
  531.             end
  532.           else
  533.             begin
  534.              CheckKeyWords(s);
  535.              OutLN(F2, s);
  536.             end;
  537.         end;
  538.  
  539.       STOP:
  540.       close(F1);
  541.       closeRTF(F2);
  542.     end;
  543.  
  544.  
  545.   Procedure ProcessFile(FName : String; Title : String);
  546.     VAR s          : String;
  547.         F1, F2     : Text;
  548.  
  549.  
  550.  
  551.     begin
  552.      {$I-}
  553.       assign(F1, InPath + FName);
  554.       reset(F1);
  555.      {$I+}
  556.       if IOResult <> 0 then
  557.         begin
  558.           writeln('Unable to open ', InPath + FName);
  559.           EXIT;
  560.         end;
  561.  
  562.       writeln('Processing : ', InPath + FName);
  563.  
  564.       while not(EOF(F1)) do
  565.         begin
  566.           readLine(F1, s);
  567.           OutLN(IndexFile, s);
  568.         end;
  569.  
  570.       close(F1);
  571.     end;
  572.  
  573.  
  574.   Procedure Credits;
  575.     begin
  576.       OutLn(IndexFile, '\par');
  577.       AddTopic(IndexFile, 'Credits', 'IDCredit');
  578.       NewHlpPage(IndexFile, 'Credits', 'IdCredit', InvalidClassification);
  579.       OutLN(IndexFile, '\par          Interrupt List (c) by R.Brown \par');
  580.       OutLn(IndexFile, '\par This list was converted from the released ASCII file');
  581.       OutLn(IndexFile, '\par          to the Windows Help-Format by \par \par' +
  582.                        '\par             {\b Christian M\''FCller-Planitz}');
  583.       OutLn(IndexFile, '\par                cmuelle@eos.ncsu.edu' +
  584.                        '\par         cmueller@techfak.uni-bielefeld.de');
  585.     end;
  586.  
  587.  
  588.   Procedure Intro;
  589.     begin
  590.       writeln(#10'Int-WinHelp preprocessor V1.01 (c) 1994 by Christian Müller-Planitz'#10);
  591.  
  592.       writeln('This program converts the Interrupt List written by Ralf Brown');
  593.       writeln('to a RTF-Format that is used as an input format by the Microsoft');
  594.       writeln('WinHelp compiler.');
  595.       writeln('In order to generate a Windows 3.1 helpfile you need the WinHelp compiler');
  596.       writeln('"HC31.EXE", which is distributed with almost all Windows compilers and');
  597.       writeln('which is also available on many Internet sites and FIDO BBS systems.'#10);
  598.       writeln('Please note that you also need a fast computer and a *lot* of free space on');
  599.       writeln('your harddrive (18 MB at least).');
  600.  
  601.       writeln('If you want to find out whether you are able to compile a RTF file, I recomend');
  602.       writeln('to put only a few source files (e.g. only "INTERRUP.A") in the source directory');
  603.  
  604.       writeln('After this program finishes, you have to invoke the WinHelp compiler with');
  605.       writeln('the command "HC31.EXE RB.HPJ".'#10);
  606.       writeln('Have fun ! --CMP'#10);
  607.       writeln('P.S. If you have problems building the helpfile or if you simply want to write');
  608.       writeln('     an e-mail to me, please write to:');
  609.       writeln('     "cmuelle@eos.ncsu.edu" or "cmueller@techfak.uni-bielefeld.de"'#10);
  610.     end;
  611.  
  612.  
  613.   VAR ch : Char;
  614.  
  615.   begin
  616.     TopicNo := 0;
  617.     LastSection := '';
  618.     IntTopicStr := '';
  619.     OutFileCounter := 0;
  620.  
  621.     Intro;
  622.  
  623.     write('Source directory: ');
  624.     readln(InPath);
  625.     InPath := InPath + '\';
  626.  
  627.     write('Dest. directory (has to be created in advance) : ');
  628.     readln(OutPath);
  629.     OutPath := OutPath + '\';
  630.  
  631.     CreateHPJ;
  632.  
  633.     OpenRTF(IndexFile, 'INDEX.RTF');
  634.     NewHlpPage(IndexFile, 'Interrupt List Contents', 'CONTENTS', InvalidClassification);
  635.  
  636.    {$IFDEF ProcessIntList}
  637.     OpenRTF(IntFile,   'INT.RTF');
  638.     OpenRTF(SubIntFile,'SUBINT.RTF');
  639.  
  640.     AddTopic(IndexFile, 'Interrupt Index', 'IdIndex');
  641.     AddTopic(IndexFile, 'Interrupt Functions', 'IDInterrupts');
  642.    {$ENDIF}
  643.  
  644.    {$IFDEF ProcessPorts}
  645.     AddTopic(IndexFile, 'Ports', 'IdPorts');
  646.    {$ENDIF}
  647.  
  648.    {$IFDEF ProcessMemory}
  649.     AddTopic(IndexFile, 'Memory', 'IdMemory');
  650.    {$ENDIF}
  651.  
  652.    {$IFDEF ProcessBugs}
  653.     AddTopic(IndexFile, 'CPU', 'IdCPU');
  654.    {$ENDIF}
  655.  
  656.    {$IFDEF ProcessCMOS}
  657.     AddTopic(IndexFile, 'CMOS', 'IdCMOS');
  658.    {$ENDIF}
  659.     Credits;
  660.  
  661.    {$IFDEF ProcessIntList}
  662.     NewHlpPage(IndexFile, 'Interrupt Index', 'IdIndex', InvalidClassification); { the program adds all following entries }
  663.     NewHlpPage(IntFile, 'Interrupts', 'IDInterrupts', InvalidClassification);
  664.  
  665.     ch := 'a';
  666.     while ProcessIntList('interrup.'+ch) do
  667.       ch := chr (ord(ch)+1);
  668.  
  669.     closeRTF(IntFile);
  670.     closeRTF(SubIntFile);
  671.    {$ENDIF}
  672.  
  673.    {$IFDEF ProcessPorts}
  674.     NewHlpPage(IndexFile, 'Ports', 'IdPorts', InvalidClassification); { the program adds all following entries }
  675.     ProcessPorts('ports.lst');
  676.    {$ENDIF}
  677.  
  678.    {$IFDEF ProcessMemory}
  679.     NewHlpPage(IndexFile, 'Memory', 'IdMemory', InvalidClassification); { the program adds all following entries }
  680.     ProcessFile('memory.lst', 'Memory');
  681.    {$ENDIF}
  682.  
  683.    {$IFDEF ProcessBugs}
  684.     NewHlpPage(IndexFile, 'CPU', 'IdCPU', InvalidClassification); { the program adds all following entries }
  685.     ProcessFile('86bugs.lst', 'CPU');
  686.    {$ENDIF}
  687.  
  688.    {$IFDEF ProcessCMOS}
  689.     NewHlpPage(IndexFile, 'CMOS', 'IdCMOS', InvalidClassification); { the program adds all following entries }
  690.     ProcessFile('cmos.lst', 'CMOS');
  691.    {$ENDIF}
  692.  
  693.  
  694.     closeRTF(IndexFile);
  695.     close(HPJ);
  696.   end.
  697.