home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / PCRF.ZIP / PCRF.PAS
Encoding:
Pascal/Delphi Source File  |  1985-12-28  |  19.6 KB  |  848 lines

  1. (*
  2.  * pcrf - pascal cross reference utility
  3.  *        for use with output filters
  4.  *
  5.  * usage:
  6.  *       pcrf FILE.PAS | crfprn >PRN
  7.  *            for a procedure crossreference listing
  8.  *
  9.  *       pcrf FILE.PAS | ph >PRN
  10.  *            for a procedure heriarchy listing
  11.  *
  12.  * shs 9/9/85
  13.  *
  14.  *)
  15.  
  16. {$g1024,p128,d-,c-}
  17.  
  18.  
  19. program pascalcrf (input,
  20.                    output);
  21. const
  22.    identsize =    40;         {identifier size for data type alignment}
  23.    
  24.    {must match 'ph' ident size}
  25.    
  26.    linelen =      128;        {longest line length}
  27.    
  28.    newline =      ^J;
  29.    
  30. type
  31.    anystring =    string [linelen];
  32.    toktypes =     (number,
  33.                    identifier,
  34.                    strng,
  35.                    comment,
  36.                    unknown);
  37.    
  38. var
  39.    ltok:          anystring;
  40.    ptok:          anystring;
  41.    ptoktype:      toktypes;
  42.    tok:           anystring;
  43.    toktype:       toktypes;
  44.    unchrflag:     char;
  45.    utok:          anystring;
  46.    untokflag:     boolean;
  47.    utoktype:      toktypes;
  48.    inproc:        anystring;
  49.    line:          integer;
  50.    srcline:       integer;
  51.    crfall:        boolean;
  52.    crfdata:       boolean;
  53.  
  54. (*
  55.  * pascal lexical scanner
  56.  *
  57.  *)
  58.    
  59.  
  60. function getchar: char;
  61.    var
  62.       c:             char;
  63.       
  64.    begin
  65.       
  66.       if unchrflag <> chr (0) then
  67.       begin
  68.          getchar := unchrflag;
  69.          unchrflag := chr (0);
  70.       end
  71.       else
  72.       begin
  73.          
  74.          if eof (input) then
  75.          begin
  76.             writeln(con, #13, srcline, ' source lines, ',
  77.                               line,    ' crf lines written');
  78.             halt;
  79.          end;
  80.  
  81.          read(input, c);
  82.  
  83.          if c = newline then
  84.          begin
  85.             srcline := srcline + 1;
  86.             if (srcline mod 16) = 1 then
  87.                write(con, #13, srcline);
  88.          end;
  89.  
  90.          getchar := c;
  91.       end;
  92.    end;
  93.  
  94. procedure ungetchar (c:             char);
  95.    begin
  96.       unchrflag := c;
  97.    end;
  98.  
  99. procedure scanident;
  100.    var
  101.       c:             char;
  102.  
  103.    begin
  104.       toktype := unknown;
  105.  
  106.       repeat
  107.          c := getchar;
  108.  
  109.          case c of
  110.             'a'..'z', 'A'..'Z', '0'..'9', '_':
  111.                ltok := ltok + c;
  112.  
  113.             else           toktype := identifier;
  114.          end;
  115.       until toktype = identifier;
  116.  
  117.       ungetchar(c);
  118.    end;
  119.  
  120. procedure scannumber;
  121.    var
  122.       c:             char;
  123.  
  124.    begin
  125.       toktype := unknown;
  126.       
  127.       repeat
  128.          c := getchar;
  129.          
  130.          case c of
  131.             '0'..'9', '.': ltok := ltok + c;
  132.             
  133.             else           toktype := number;
  134.          end;
  135.       until toktype = number;
  136.       
  137.       ungetchar(c);
  138.    end;
  139.  
  140. procedure scanstring;
  141.    var
  142.       c:             char;
  143.       
  144.    begin
  145.       toktype := unknown;
  146.  
  147.       repeat
  148.          c := getchar;
  149.          ltok := ltok + c;
  150.          
  151.          if c = '''' then
  152.          begin
  153.             c := getchar;
  154.             
  155.             if c = '''' then
  156.                ltok := ltok + c
  157.             else
  158.             begin
  159.                ungetchar(c);
  160.                toktype := strng;
  161.             end;
  162.          end;
  163.       until toktype = strng;
  164.    end;
  165.  
  166. procedure scanhex;
  167.    var
  168.       c:             char;
  169.  
  170.    begin
  171.       c := getchar;
  172.       
  173.       while c in ['0'..'9', 'A'..'F', 'a'..'f'] do
  174.       begin
  175.          ltok := ltok + c;
  176.          c := getchar;
  177.       end;
  178.       
  179.       ungetchar(c);
  180.       toktype := number;
  181.    end;
  182.  
  183. procedure scantok;
  184.    var
  185.       c:             char;
  186.       
  187.    begin
  188.       
  189.       repeat
  190.          c := getchar;
  191.  
  192.  
  193.          case c of
  194.             ' ',^I,^M,^J,^@,^L:
  195.                c := newline;
  196.          end;
  197.       until c <> newline;
  198.       
  199.       ltok := c;
  200.       
  201.       case c of
  202.          'a'..'z', '_', 'A'..'Z':
  203.             scanident;
  204.          
  205.          '0'..'9', '#': scannumber;
  206.          
  207.          '''':          scanstring;
  208.  
  209.          '$':           scanhex;
  210.          
  211.  BEGIN
  212.               New (TPLoc);
  213.               WITH TPLoc^ DO
  214.                 BEGIN
  215.                   PLoc     := PosCnt;
  216.                   Oprtion  := OprCh;
  217.                   PAdj     := PAValue;
  218.                   OSet     := AOffset;
  219.                   TwoBytes := Both;
  220.                   PNext    := Nil
  221.                 END;
  222.               New (TPatch);
  223.               WITH TPatch^ DO
  224.                 BEGIN
  225.                   PName      := Id;
  226.                   FixLoc     := TPLoc;
  227.                   LeftPatch  := Nil;
  228.                   RightPatch := Nil
  229.                 END;
  230.               APatch := TPatch
  231.             END
  232.           ELSE IF Id < APatch^.PName THEN
  233.             AddPatch (APatch^.LeftPatch, Both, Id, AOffset, OprCh, PAValue)
  234.           ELSE IF Id > APatch^.PName THEN
  235.             AddPatch (APatch^.RightPatch, Both, Id, AOffset, OprCh, PAValue)
  236.           ELSE
  237.             BEGIN
  238.               New (TPLoc);
  239.               WITH TPLoc^ DO
  240.                 BEGIN
  241.                   PLoc     := PosCnt;
  242.                   Oprtion  := OprCh;
  243.                   PAdj     := PAValue;
  244.                   OSet     := AOffset;
  245.                   TwoBytes := Both;
  246.                   PNext    := Nil
  247.                 END;
  248.               AddLoc (APatch^.FixLoc, TPLoc)
  249.             END
  250.         END;  { AddPatch }
  251.  
  252.       PROCEDURE ViaLabel ( LeadIn  : _String;
  253.                            Both    : Boolean;
  254.                            Id      : LabelStr;
  255.                            AOffset : Boolean;
  256.                            OprCh   : Char;
  257.                            PAValue : Integer );
  258.  
  259.         BEGIN { ViaLabel }
  260.           Write (' Via label [', Id, ']');
  261.           Generate (LeadIn);
  262.           AddPatch (Patches, Both, Id, AOffset, OprCh, PAValue);
  263.           Generate (Null);
  264.           IF Both THEN
  265.             Generate (Null)
  266.         END;  { ViaLabel }
  267.  
  268.       PROCEDURE OperLabel ( LeadIn  : _String;
  269.                             Both    : Boolean;
  270.                             Id      : LabelStr;
  271.                             AOffset : Boolean );
  272.  
  273.         BEGIN { OperLabel }
  274.           Get_Symbol; { Operation | ? }
  275.           IF Sym <> Operation THEN
  276.             ViaLabel (LeadIn, Both, Id, AOffset, '+', 0)
  277.           ELSE
  278.             BEGIN
  279.               TempOpCh := Ch;
  280.               Get_Symbol; { Number }
  281.               IF Sym <> Number THEN
  282.                 Write ('Number expected');
  283.               ViaLabel (LeadIn, Both, Id, AOffset, TempOpCh, Val_Radix (Num, P_Radix) )
  284.             END
  285.         END;  { OperLabel }
  286.  
  287.       PROCEDURE DoReg1 ( LeadIn  : Char;
  288.                          StartOp : Byte );
  289.  
  290.         BEGIN { DoReg1 }
  291.           IF LeadIn <> Skip THEN
  292.             Generate (LeadIn);
  293.           CASE Check_Reg OF
  294.             A : Generate (Chr (StartOp - 0) );
  295.             B : Generate (Chr (StartOp - 7) );
  296.             C : Generate (Chr (StartOp - 6) );
  297.             D : Generate (Chr (StartOp - 5) );
  298.             E : Generate (Chr (StartOp - 4) );
  299.             H : Generate (Chr (StartOp - 3) );
  300.             L : Generate (Chr (StartOp - 2) );
  301.           END
  302.         END;  { DoReg1 }
  303.  
  304.       PROCEDURE DoONCR ( StartOp : Byte );
  305.  
  306.         BEGIN { DoONCR }
  307.           CASE Sym OF
  308.             Identifier : DoReg1 (#$CB, StartOp);
  309.             Left_Bp    :
  310.               BEGIN
  311.                 Get_Symbol;
  312.                   IF Sym <> Identifier THEN
  313.                     Error ('Op code expected')
  314.                   ELSE
  315.                     CASE Check_Reg OF
  316.                       HL : Generate (#$CB + Chr (StartOp - 1) );
  317.                       IX :
  318.                         BEGIN
  319.                           Get_Symbol;
  320.                           IF Sym <> Operation THEN
  321.                             Error ('+ Expected')
  322.                           ELSE
  323.                             Get_Symbol;
  324.                           Generate (#$DD + #$CB + Chr (Val_Radix (Num, P_Radix) ) + Chr (StartOp - 1) )
  325.                         END;
  326.                       IY :
  327.                         BEGIN
  328.               else           toktype := unknown;
  329.       end;
  330.    end;
  331.  
  332. procedure ungettoken;
  333.    var
  334.       i:             integer;
  335.       
  336.    begin
  337.       untokflag := true;
  338.       utoktype := toktype;
  339.       utok := ltok;
  340.       toktype := ptoktype;
  341.       ltok := ptok;
  342.       tok := ptok;
  343.       
  344.       for i := 1 to length (tok) do
  345.          tok[i]:= upcase (tok [i]);
  346.    end;
  347.  
  348. procedure gettok; forward;
  349.  
  350. procedure skipcurlycomment;
  351.    var
  352.       c:             char;
  353.       
  354.    begin
  355.  
  356.       repeat
  357.          c := getchar;
  358.       until c = '}';
  359.       
  360.       toktype := comment;
  361.    end;
  362.  
  363. procedure skipparencomment;
  364.    var
  365.       c:             char;
  366.       
  367.    begin
  368.       
  369.       repeat
  370.          c := getchar;
  371.  
  372.          if c = '*' then
  373.          begin
  374.             c := getchar;
  375.             
  376.             if c = ')' then
  377.                toktype := comment
  378.             else
  379.                ungetchar(c);
  380.          end;
  381.       until toktype = comment;
  382.    end;
  383.  
  384. procedure gettok;
  385.    var
  386.       i:             integer;
  387.       c:             char;
  388.       
  389.    begin
  390.       
  391.       if keypressed then
  392.       begin
  393.          read(kbd, c);
  394.  
  395.          if c =^C then
  396.          begin
  397.             writeln(con, '** ^C');
  398.             halt;
  399.          end;
  400.       end;
  401.  
  402.       if untokflag then
  403.       begin
  404.          untokflag := false;
  405.          toktype := utoktype;
  406.          ltok := utok;
  407.          tok := utok;
  408.          
  409.          for i := 1 to length (tok) do
  410.             tok[i]:= upcase (tok [i]);
  411.       end
  412.       else
  413.       begin
  414.          ptok := ltok;
  415.          
  416.          repeat
  417.             ptoktype := toktype;
  418.             scantok;
  419.             
  420.             if ltok = '{' then
  421.                skipcurlycomment;
  422.             
  423.             if ltok = '(' then
  424.             begin
  425.                c := getchar;
  426.                
  427.                if c = '*' then
  428.                   skipparencomment
  429.                else
  430.                   ungetchar(c);
  431.             end;
  432.          until toktype <> comment;
  433.       end;
  434.       
  435.       tok := ltok;
  436.       
  437.       if toktype = identifier then
  438.          
  439.          for i := 1 to length (ltok) do
  440.             tok[i]:= upcase (ltok [i]);
  441.    end;
  442.  
  443. procedure scaninit;
  444.    begin
  445.       ltok := '';
  446.       ptok := '';
  447.       tok := '';
  448.       toktype := unknown;
  449.       untokflag := false;
  450.       unchrflag := chr (0);
  451.       line := 0;
  452.       srcline := 0;
  453.       inproc := 'MAIN';
  454.    end;
  455.  
  456. procedure nexttoken;
  457.    begin
  458.       gettok;
  459.    end;
  460.  
  461.  
  462. (*
  463.  * pascal parser and output formatting
  464.  *
  465.  *)
  466.  
  467. procedure pblock; forward;
  468.  
  469. procedure pstatement; forward;
  470.  
  471. procedure punit; forward;
  472.  
  473. procedure pvar; forward;
  474.  
  475. procedure syntax (message:       anystring);
  476.    begin
  477.       writeln(con);
  478.       writeln(con, '****** ', message, ',  token="', tok, '"');
  479.    end;
  480.  
  481.  
  482. (*
  483.  * output a token to crf stream unless it is a
  484.  * pascal reserved word
  485.  *
  486.  *)
  487.  
  488. procedure crf_output (lt:            anystring);
  489.    var
  490.       i:             integer;
  491.       t:             anystring;
  492.  
  493.    const
  494.       nkey = 21;
  495.       keyword: array[1..nkey] of anystring =
  496.          ('AND',  'BEGIN', 'CASE',  'DIV',  'DO',   'ELSE', 'END',
  497.           'FOR',  'IF',    'IN',   'MOD',  'NOT',  'OF',
  498.           'OR',   'REPEAT','THEN', 'TO',   'UNTIL','VAR',   'WHILE',
  499.           'WITH');
  500.    begin
  501.       t := lt;
  502.  
  503.       for i := 1 to length (t) do
  504.          t[i]:= upcase (t [i]);
  505.  
  506.       for i := 1 to nkey do
  507.       begin
  508.          if keyword[i] > t then
  509.          begin
  510.             writeln(lt, '' : identsize - length (lt), inproc);
  511.             line := line + 1;
  512.             exit;
  513.          end;
  514.  
  515.  
  516.          if keyword[i] = t then
  517.             exit;
  518.       end;
  519.  
  520.       writeln(lt, '' : identsize - length (lt), inproc);
  521.       line := line + 1;
  522.    end;
  523.  
  524.  
  525. (*
  526.  * get next token and decide if any output
  527.  * to the crf stream is needed
  528.  *
  529.  *)
  530.  
  531. procedure crf_nexttoken;
  532.    begin
  533.       nexttoken;
  534.  
  535.       if crfdata then
  536.       begin                        {generate crossreference for all
  537.                                     identifiers that don't look like procedure
  538.                                     references}
  539.  
  540.          if (tok <> '(') and (ptoktype = identifier) then
  541.             crf_output(ptok);
  542.  
  543.       end
  544.       else
  545.  
  546.       if crfall then
  547.       begin                         {generate corssreference for all
  548.                                       identifiers}
  549.          if toktype = identifier then
  550.             crf_output(ltok);
  551.       end
  552.       else                       {crossreference only procedure and function
  553.                                    calls. note that this will not find
  554.                                    function calls in an expression that
  555.                                    do not have parameters}
  556.  
  557.  
  558.       if (tok = '(') and (ptoktype = identifier) then
  559.          crf_output(ptok);
  560.  
  561.    end;
  562.  
  563.  
  564. (*
  565.  * control statement processors
  566.  *    for, while, repeat, with, idents
  567.  *
  568.  * all expect tok to be keyword
  569.  * all exit at end of statement with next nexttoken as ; or end
  570.  *
  571.  *)
  572.  
  573. procedure pfor;
  574.    begin
  575.  
  576.       repeat
  577.          crf_nexttoken;
  578.       until tok = 'DO';
  579.  
  580.       crf_nexttoken;
  581.       pstatement;
  582.    end;
  583.  
  584. procedure pwhile;
  585.    begin
  586.  
  587.       repeat
  588.          crf_nexttoken;
  589.       until tok = 'DO';
  590.  
  591.       crf_nexttoken;
  592.       pstatement;
  593.    end;
  594.  
  595. procedure pwith;
  596.    begin
  597.  
  598.       repeat
  599.          crf_nexttoken;
  600.       until tok = 'DO';
  601.       
  602.       crf_nexttoken;
  603.       pstatement;
  604.    end;
  605.  
  606. procedure prepeat;
  607.    begin
  608.       crf_nexttoken;
  609.       
  610.       while tok <> 'UNTIL' do
  611.       begin
  612.          pstatement;
  613.          crf_nexttoken;
  614.  
  615.          if tok = ';' then
  616.             crf_nexttoken;
  617.       end;
  618.       
  619.       repeat
  620.          crf_nexttoken;
  621.       until (tok = ';') or (tok = 'END') or (tok = 'ELSE');
  622.  
  623.       ungettoken;
  624.    end;
  625.  
  626. procedure pcase;
  627.    begin
  628.       
  629.       repeat
  630.          crf_nexttoken;
  631.       until tok = 'OF';
  632.       
  633.       crf_nexttoken;
  634.       
  635.       repeat
  636.  
  637.          if tok <> 'ELSE' then
  638.             
  639.             repeat
  640.                crf_nexttoken;
  641.             until tok = ':';
  642.          
  643.          crf_nexttoken;
  644.          pstatement;
  645.          crf_nexttoken;
  646.          
  647.          if tok = ';' then
  648.             crf_nexttoken;
  649.       until tok = 'END';
  650.    end;
  651.  
  652. procedure pif;
  653.    begin
  654.       
  655.       repeat
  656.          crf_nexttoken;
  657.       until tok = 'THEN';
  658.       
  659.       crf_nexttoken;
  660.       pstatement;
  661.       crf_nexttoken;
  662.  
  663.       if tok = 'ELSE' then
  664.       begin
  665.          crf_nexttoken;
  666.          pstatement
  667.       end
  668.       else
  669.          ungettoken;
  670.    end;
  671.  
  672. procedure pident;
  673.    begin
  674.       crf_nexttoken;             {get seperator token and decide if this
  675.                                   is a procedure call with no parameters
  676.                                   that will be missed by crf_nexttoken}
  677.  
  678.       if (tok = ';') and (not crfall) and (not crfdata) then
  679.          crf_output(ptok);
  680.       
  681.       while (tok <> ';') and (tok <> 'END')
  682.             and (tok <> 'ELSE') do
  683.          crf_nexttoken;
  684.       
  685.       ungettoken;
  686.    end;
  687.  
  688.  
  689. (*
  690.  * process single statement
  691.  *
  692.  * expects tok to be first token of statement
  693.  * processes nested blocks
  694.  * exits with tok as end of statement
  695.  *
  696.  *)
  697.  
  698. procedure pstatement;
  699.    begin
  700.       
  701.       if tok = ';' then
  702.          ungettoken
  703.       else
  704.       
  705.       if tok = 'BEGIN' then
  706.          pblock
  707.       else
  708.  
  709.       if tok = 'FOR' then
  710.          pfor
  711.       else
  712.  
  713.       if tok = 'WHILE' then
  714.          pwhile
  715.       else
  716.  
  717.       if tok = 'WITH' then
  718.          pwith
  719.       else
  720.  
  721.       if tok = 'REPEAT' then
  722.          prepeat
  723.       else
  724.  
  725.       if tok = 'CASE' then
  726.          pcase
  727.       else
  728.  
  729.       if tok = 'IF' then
  730.          pif
  731.       else
  732.          pident;
  733.    end;
  734.  
  735.  
  736. (*
  737.  * process begin...end blocks
  738.  *
  739.  * expects tok to be begin
  740.  * exits with tok = end
  741.  *
  742.  *)
  743.  
  744. procedure pblock;
  745.    begin
  746.       crf_nexttoken;                 {get first token of first statement}
  747.  
  748.  
  749.       while tok <> 'END' do
  750.       begin
  751.                           Get_Symbol;
  752.                           IF Sym <> Operation THEN
  753.                             Error ('+ Expected')
  754.                           ELSE
  755.                             Get_Symbol;
  756.                           Generate (#$FD + #$CB + Chr (Val_Radix (Num, P_Radix) ) + Chr (StartOp - 1) )
  757.                         END
  758.                     END;
  759.                 Get_Symbol { Right_BP }
  760.               END
  761.           END
  762.         END;   { DoONCR }
  763.  
  764.       PROCEDURE DoOR;
  765.  
  766.         BEGIN { DoOR }
  767.           Sym   := Sym2;
  768.           Ident := Ident2;
  769.           Num   := Num2;
  770.           CASE OpIs OF
  771.             AND_ :
  772.               IF Check_Reg IN [A .. L] THEN
  773.                 DoReg1 (Skip, $A7)
  774.               ELSE IF Sym = Number THEN
  775.                 Generate (#$E6 + Chr (Val_Radix (Num, P_Radix) ) )
  776.               ELSE
  777.                 ViaLabel (#$E6, False, Ident, False, '+', 0);
  778.             CALL :
  779.               IF Sym = Number THEN
  780.                 Generate (#$CD + Chr (Lo (Val_Radix (Num, P_Radix) ) ) + Chr (Hi (Val_Radix (Num, P_Radix) ) ) )
  781.               ELSE
  782.                 ViaLabel (#$CD, True, Ident, False, '+', 0);
  783.             CP   :
  784.               IF Check_Reg IN [A .. L] THEN
  785.                 DoReg1 (Skip, $BF)
  786.               ELSE IF Sym = Number THEN
  787.                 Generate (#$FE + Chr (Val_Radix (Num, P_Radix) ) )
  788.               ELSE
  789.                 ViaLabel (#$FE, False, Ident, False, '+', 0);
  790.             DEC  :
  791.               CASE Check_Reg OF
  792.                 A  : Generate (#$3D);
  793.                 B  : Generate (#$05);
  794.                 BC : Generate (#$0B);
  795.                 C  : Generate (#$0D);
  796.                 D  : Generate (#$15);
  797.                 DE : Generate (#$1B);
  798.                 E  : Generate (#$1D);
  799.                 H  : Generate (#$25);
  800.                 HL : Generate (#$2B);
  801.                 IX : Generate (#$DD + #$2B);
  802.                 IY : Generate (#$FD + #$2B);
  803.                 L  : Generate (#$2D);
  804.                 SP : Generate (#$3B);
  805.               END;
  806.             IM   :
  807.               CASE Val_Radix (Num, P_Radix) OF
  808.                 0 : Generate (#$ED + #$46);
  809.                 1 : Generate (#$ED + #$56);
  810.                 2 : Generate (#$ED + #$5E);
  811.               END;
  812.             INC  :
  813.               CASE Check_Reg OF
  814.                 A  : Generate (#$3C);
  815.                 B  : Generate (#$04);
  816.                 BC : Generate (#$03);
  817.                 C  : Generate (#$0C);
  818.                 D  : Generate (#$14);
  819.                 DE : Generate (#$13);
  820.                 E  : Generate (#$1C);
  821.                 H  : Generate (#$24);
  822.                 HL : Generate (#$23);
  823.                 IX : Generate (#$DD + #$23);
  824.                 IY : Generate (#$FD + #$23);
  825.                 L  : Generate (#$2C);
  826.                 SP : Generate (#$33);
  827.               END;
  828.             JP   :
  829.               IF Sym = Number THEN
  830.                 Generate (#$C3 + Chr (Lo (Val_Radix (Num, P_Radix) ) ) + Chr (Hi (Val_Radix (Num, P_Radix) ) ) )
  831.               ELSE
  832.                 ViaLabel (#$C3, True, Ident, False, '+', 0);
  833.             JR   :
  834.               IF Sym = Number THEN
  835.                 Generate (#$18 + Chr (Val_Radix (Num, P_Radix) ) )
  836.               ELSE
  837.                 ViaLabel (#$18, False, Ident, True, '+', 0);
  838.             OR_  :
  839.               IF Check_Reg IN [A .. L] THEN
  840.                 DoReg1 (Skip, $B7)
  841.               ELSE IF Sym = Number THEN
  842.                 Generate (#$F6 + Chr (Val_Radix (Num, P_Radix) ) )
  843.               ELSE
  844.                 ViaLabel (#$F6, False, Ident, False, '+', 0);
  845.             POP  :
  846.               CASE Check_Reg OF
  847.                 AF : Generate (#$
  848.