Index of /ukdwk_archive/dwkwebcomplekt/C

[ICO]NameSizeDescription
[DIR]Parent Directory -  
[   ]C.DSK1.5M 
                                                                                                                                            
Image  :   C.DSK

Format :   DSK 
Size   :   1'581 Kb

Volume ID: RAFOS
Owner    : 

File       Blocks    Date       Bytes
---------- ------ ----------- ----------
CC    .SAV    98  17-Dec-1986     50'176
CLIB  .OBJ    67  17-Dec-1986     34'304
STDIO .H       6  17-Dec-1986      3'072
AS    .SAV    84  17-Dec-1986     43'008
SUPORT.OBJ     1  17-Dec-1986        512
GC    .SAV    16  17-Dec-1986      8'192
TDAT  .C       4  17-Dec-1986      2'048
TDAT  .SAV    11  17-Dec-1986      5'632
ALLCC .DOC   843  17-Dec-1986    431'616
ALLLIB.DOC  1172  17-Dec-1986    600'064
APB   .DOC   147  17-Dec-1986     75'264
APC   .DOC    55  17-Dec-1986     28'160
C2    .SYS   546  05-May-1986    279'552
GRAFED.SAV    38  17-Dec-1986     19'456
GPA   .SAV    36  17-Dec-1986     18'432
---------- ------ ----------- ----------
 15 Files, 3124 Blocks
 0 Free blocks                                                                                                  - 2 -                                     
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                "C". DECUS                                                                                         
                                                                                                                                            
                                                                                                                                            
                                                                                                                                  
                                                                                                                                            
                      &                                                                                                 
                                                                                                                       
                                                                                                                                            
                                                                        1.  ............................................  6         
                                                                                                                                            
                                                                                                                                            
          :                                             2.   ..............................  7         
          :       .                                                                                                    
                                                                        2.1.       UNIX......................  8         
                                                                        2.2.      .......................  8         
                                                                        2.3.      ...........................  9         
                                                                        2.4.      ............................. 10         
                                                                        2.5.      ........... 11         
                                                                        2.6.     ...................... 11         
                                                                        2.7.      ..................... 12         
                       2.8.    ................................. 13         
    "" DECUS     RSX/VMS/RSTS/RT11.          2.9.    ............................... 13         
           -                                                                              
   .                                                               3.   ................................ 14         
                                                                                                                                            
                                                                        3.1.   ....................................... 14         
                                                                        3.2.      "C"............... 17         
               , DECUS                   3.3.      RSTS/E................... 17         
                    6  1980                           3.4.     RSX-11.................... 17         
                                                                        3.5.     RT-11..................... 18         
                                                                        3.6.     ............................ 18         
                                                                        3.7.    ........................... 19         
                                                                                                                                            
                                                                        4.    ................... 20         
                                                                                                                                            
                                                                        4.1.      ................. 20         
                                                                        4.2.   .................................... 23         
                                                                        4.2.1.      .......... 23         
                                                                        4.2.2.    ................................. 24         
                                                                        4.2.3.   ,   ........ 25         
                                                                        4.3.     ................. 27         
                                                                                                                                            
                                                                        5.    ....................... 28         
                                                                                                                                            
                                                                        5.1.     RADIX-50  ASCII............... 28         
                                                                        5.2.     ............................... 29         
                                                                        5.3.     ( MACRO)............... 29         
                                                                        5.4.       ASCII.......... 30         
                                                                        5.5.     .                                 
                                                                               /............................... 31         
                                                                        5.6.   /   ............ 31         
                                                                        5.7.      ............ 32         
                                                                        5.8.     .......................... 32         
                                                                        5.9.    ................................. 33         
                                                                        5.10.    .................... 34         
                                                                        5.11.   LONG  ASCII...................... 36         
                                                                        5.12.      "C"................... 36         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 3 -                                                                - 4 -                                     
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   5.13.     $$NARG................  38          5.63.      ASCII..............  80         
   5.14.      ........................  39          5.64.  ,   - ...................  81         
   5.15.      RSX................  39          5.65.  ,   - ...................  81         
   5.16.    R1-R5  ..............  40          5.66.  ,   -  .............  81         
   5.17.      -                       5.67.  ,   -  ............  82         
            BPT.............................  40          5.68.     ASCII...................  82         
   5.18.    ......................  41          5.69.                              
   5.19.   ................................  41                 ASCII...........................................  83         
   5.20.   ASCII  RADIX-50.................  42          5.70.     -                      
   5.21.    EIS............................  42                  ASCII.......................................  83         
   5.22.   LONG<>INT......................  44                 .......................................  85         
   5.25.    ASCII     -                       5.73.      ...........  86         
             .................  45          5.74.   LONG * LONG...........................  87         
   5.26.   ASCII  ....................  45          5.75.      RSTS/E.......................  87         
   5.27.   ASCII   ............  46          5.76.    ................  88         
   5.28.    ..................  46          5.77.    ....................  90         
   5.29.    ()                           5.78.      ........................  91         
          "C".............................................  47          5.79.     ...........................  92         
   5.30.   ("C")   ................  48          5.80.      ...................  92         
   5.31.    ,  -                       5.81.   RADIX-50  ASCII.................  93         
            .........................  49          5.82.    .......................  93         
   5.32.     ................  50          5.83.   .........................  94         
   5.33.    ...........  50          5.84.                             
   5.34.   ..............................  51                 ..........................................  95         
   5.35.     ................  52          5.85.     ...................  95         
   5.36.   ..............................  52          5.86.    ......................  96         
   5.37.                             5.87.     ............  96         
          "C".............................................  53          5.88.     -                      
   5.38.      ASCII.............  54                 ..............................................  97         
   5.39.       ...........  55          5.89.    /................ 100         
   5.40.     ...............  55          5.90.    CTRL/C (  RSTS/E                      
   5.41.        "C"..............  57                   RT11).................................. 105         
   5.42.      "C".......................  57          5.91.      -                      
   5.43.    ............................  59                  ....................................... 105         
   5.44.    ...........................  59          5.92.   ................................. 106         
   5.45.    ..........................  59          5.93.   ............................... 107         
   5.46.    ............................  60          5.94.   ................................. 107         
   5.47.     ..........................  61          5.95.   .................................... 108         
   5.48.     .........  62          5.96.    (  -                      
   5.49.     ....................  62                   ).................................. 108         
   5.50.   ..................................  63          5.97.    (  ).......... 109         
   5.51.    ...........................  67          5.98.    ............................. 109         
   5.52.    ,                         5.99.      ............. 110         
           .......................................  68          5.100.     ............. 110         
   5.53.    ...............  68          5.101.                          
   5.54.                                       ( )................................ 111         
           ......................................  69          5.102.     -                     
   5.55.       -                              ............................................ 112         
          .........................................  70          5.103.      .............. 114         
   5.56.    ........................  71          5.104.   ................ 114         
   5.57.     ...............  71          5.105.    SIZEOF(INT)............ 115         
   5.58.   ..................................  75          5.106.   ,                           
   5.59.     STDIN.......................  75                 .......................................... 115         
   5.60.     .............  76          5.107.   ............................ 116         
   5.61.      ..................  76                                                                    
   5.62.    /................  77          1.  ........................................... 118         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 5 -                                                                - 6 -                                     
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   2.     .................... 119                                 1.                                   
                                                                                                                                            
                                                                                                                                            
   3.    ...................... 120                                                                              
                                                                                                                                            
                                                                               "C"              
   4.     .................... 123          :                                                            
                                                                                                                                            
   4.1.      RSTS/E......................... 123                 - ,                
   4.2.      VMS............................ 125                        (           
   4.3.      RSX-11M........................ 126                           ),         
   4.4.      RT-11.......................... 126                        ;                   
                                                                                                                                            
                                                                               - ,                 
                                                                                 "C",   ,    -         
                                                                                  ,               
                                                                                                 
                                                                                 ;                                                
                                                                                                                                            
                                                                               -  ()    -         
                                                                                  / UNIX.                                 
                                                                                                                                            
                                                                                              
                                                                         .     -         
                                                                              "C". -         
                                                                                       
                                                                                           
                                                                             .  -         
                                                                             .                
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 7 -                                                                - 8 -                                     
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                   2.                                        2.1.     UNIX                          
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                             
                                                                        /     "C".                 
        _________.               ,        -         
          "C"  DECUS.             RSX    RMS,             
           7               .          
   UNIX                :                                                           
    ,   "$"  "."  RADIX-50.                  -    ;                                
                                                                               -    ;                                    
         ,   "C",    -                 -    .                                      
        .                                                                                  
   ,    , -               ,         :            
   ,  ,                                  
     (  )  "C:".                 .                
   RSX-11M      "LB:[1,1]".    ,            RMS/FCS.   ,              
      "C",     -          "C"      .               
   :                                                                                                                                     
                                                                                "C"  ,          
          RSX  >TKB                                                        :                                                
               TKB> TASK/CP,MAP=OBJECTS,LB:C/LB                                                                                             
               TKB> /                                                          STDIN     -   ;                        
               ENTER OPTIONS:                                                  STDOUT    -   ;                       
               TKB> STACK=2000                                                 STDERR    -    .                
               TKB> //                                                                                                                      
                                                                        STDERR         .           
          RT11    .R LINK                                               STDIN  STDOUT     ,          
                  *SAVE,MAP=OBJECTS,C:SUPORT,C:CLIB/B:2000                     .         
                  *^C                                                                                                                       
                                                                                                                                            
   ,   RSX-11M       -                                                                              
   .     RSTS/E  VMS                       2.2.                               
    RSX.     RSX-11M                                                                                  
       ,   "/CP"  -                                                                              
     .   "/CP"      ,                                                                                
          (    )                  FOPEN  FCLOSE        .         
   .      -              :                          
      ,    .                                                                                      
                                                                               #INCLUDE       /*   / */            
         RT-11  "/B" ( )                    FILE *IOPTR;            /*    */              
        .   -                 ...                                                          
   ,       -                 IF ((IOPTR=FOPEN ("_",""))==NULL)               
   .      ,                          ERROR ("   ");                           
       -   .                                                                                  
                                                                                    ,         
                 /              FOPEN().  -         
     "C:STDIO.H" ( "LB:[1,1]STDIO.H"             ,                
    RSX-11M)           "C"            .          IOV.           
   :                                                          ""  ,     -         
                                                                        :                                                                 
          #INCLUDE                                                                                                                 
                                                                               R                                             
                                                                               W                                           
                                                                               A        (                   
                                                                                     ) (    RT11).            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 9 -                                                                - 10 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
         -                         REGISTER INT CCOUNT;                                 
   :                                                                                 REGISTER INT LCOUNT;                                 
                                                                                       REGISTER INT C;                                      
          N        ( )                               FILE         *IOPTR;                                 
          U    RSX:                                   IF ((IOPTR=FOPEN("FOO.BAR","R"))==NULL)              
                                                                                ERROR ("   ");                
               RT11:                                 CCOUNT=0;                                            
                     .TTYOUT                                                           LCOUNT=0;                                            
                                                                                       WHILE ((C=GETC(IOPTR)) !=EOF)[                       
           "N",  /  RSX                                   CCOUNT++;                                    
       RMS,   -                                 IF (C=='\N') LCOUNT++;                       
   ,      -                         ]                                                    
     .  RT-11   /                           PRINTF ("%D , %D .\N",                    
                                                   CCOUNT,LCOUNT);                          
       .                                                ]                                                            
                                                                                                                                            
         "U"  RSX  RT-11     .                                                                                
      RSX,                       :                                 
    .                                                                                       
   FGET()  FPUT().        -         GETS        ;                      
       GET$  PUT$  RMS/FCS. ( RT-11         FGETS      ;                                   
   FPUT()          ,         GETSS                   
       FGET().                UNGETC       ;                          
    "N").                                                        FSEEK       .                    
                                                                                                                                            
          "U"    RT-11    -                    FERR()           
    ,        (          FEOF(),   ,  -         
      .TTYOUT).                  .    ,           
      (                 ,    .                 
   .PRINT).    STDERR                                                                                 
   "U",  STDOUT   .   ,   -                                                                              
    /                                                                                    
   .        STDOUT,                    2.4.                                     
      :                                                                                                   
                                                                                                                                            
          IF (FREOPEN ("TT:","WU",STDOUT)==NULL)                                                                                            
              ERROR("");                                                                      
                                                                        ,    :                          
                                                                                                                                            
                            PUTCHAR     ;                           
   FCLOSE(IOPTR).                  PUTC        ;                               
   ,  .   FMKDL(IOPTR)           PUTS        ;                         
          .               FPUTS       ;                             
                                                                       PUTSS       ;                             
                                                                       FTELL      ( FSEEK).                          
                                                                                                                                            
             2.3.                                                                                                        
                                                                               PRINTF()  FPRINTF()          
                                                                             (   -         
                                                                         ).  PRINTF()  ,           
                  -                  ,      -         
   GETCHAR()  GETC(),                        .                
   . ,                                                                                      
     :                                                                                                                          
                                                                                                                                            
          #INCLUDE                                                                                                                 
          MAIN( )                                                                                                                           
          [                                                                                                                                 
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 11 -                                                               - 12 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
             2.5.                               -  ;             
                                                                                                                                            
                                                                               - ,   RT-11  USR  ("           
                                                                                 ")      .         
              -                                   
           -                    IOV ,    USR               
          .                     .              
     :                                                        ;                                    
          - RT-11;                                                                                                                          
          - RSX-11M  IAS;                                                   -  RSX-11M    -         
          - RT-11,   RSTS/E;                                          .  ,   LUN            
          - RSX-11M,   RSTS/E;                                             -         
          - RSX-11M,   VAX/VMS.                                         (    ).          
                                                                                                                                            
                                                                                             
   ,      .                                                                                  
                                                                                  2.7.                             
                                                                                                                                            
                                                                                                                                            
             2.6.                                                                                                  
                                                                              FWILD()  FNEXT()              
                                                                         " "  .                        
                                                                                                                                            
        RT-11, RSTS/E  RSX-11M                    RSX-11M    VMS/RSX  ,           
      /.  ,            /                    
                    "*",    . -  -         
    .    :               FILES-11 RSX-11M (ODS1),            
                                                                         ".", ";0"  ";-1"                  
          -  RT-11                 RSX-11M.  , ,    "*.MAC"         
                  .TTYOUT              .   FWILD()               
            .PRINT.     FOPEN()              ,   VAX/VMS    -         
            ,    ;              ODS2.       ,             
                                                                           FWILD()     -         
          -  RSX-11M     -            ,     ".",  ";0"    ";-1"         
             .    " -           .              
            "      1    -          DECUS  SRD,   "/WB".                            
              STDERR.                                                                                      
            FOPEN() (  IOV   STDERR  -                  ,             
              ,                         UIC  . ,            
            FOPEN()). FCLOSE()    STDERR;               RSX-11M  VMS,   ";-1"  (    )         
                                                                            ,           
          -                          FWILD().                                         
            /    MSG()                                                                               
            REGDMP(),                       RSX-11M,   RSTS/E,     -         
             1.                         "*"         
                .  RT-11 MSG()            "?".    ,           
            REGDMP()    .PRINT;           UIC(PPN)  .                                     
                                                                                                                                            
          -        ""                RT-11   /     -         
              STDIN  STDOUT.               "*", "%"  "?"   .  "?"           
               0  1  (RT-11)    2    3           "%".       -         
            (RSX-11M).  FCLOSE()                    .    -         
            ,                          RT-11, -         
                                              
            ;                                                      FWILD()    FNEXT()      "C".            
                                                                        FWILD/FNEXT   480    .    ,         
          -    /            ,                  
                ,                  1024  (    ),           
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 13 -                                                               - 14 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            -                 ]                                                            
   .                                                                                                                                     
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
             2.8.                                                                                                            
                                                                                         3.                              
                                                                                                                                            
                                                                                                                                            
                MALLOC().                                                                                
        , -                                                                              
       RSX  RT11/RSTS.    RT-11                   "C"    -         
         -            VMS V2.0, RSX-11M V3.2, RSTS/E  V7.0    RT-11         
    .SETTOP   -2.        -          V3B.                     
          -                -         
     (PLAS).                                                .                 
                                                                          RT-11,      -         
         SBREAK()    -          ,          .         
     . ,                   "C"        IAS,         
   SBREAK()    .                                  RSX-11D, RSX-11M-PLUS  HT-11.                                      
                                                                                                                                            
                                                                              "C"   9-            
                                                                           DOS.      -         
             2.9.                                       2400  (    600 ).                        
                                                                                                                                            
                                                                                                                                            
                                                                             _________.  ""  DECUS;             
         ,               .  -            
     "C" ,                       -         
      ,     -          ,   ,               
    .                 .               
   :                                                                              
                                                                        "   " DECUS.                         
          - ,       "C",                                                                                
                '    -                                 
            ,        -            ,       .         
             . ,                  , ,      -         
            "C"    SQRT() (  -          .                                                              
                  ),                                                                                
                   -                                                                              
              .  ,                                                                                  
             SQRT()      -                    3.1.                                            
                ,                                                                                
                "" -                                                                              
             .                                                                                                                   
                                                                                            
          -   ,     "C"           UIC [5,3].   UIC    :          
               ,                                                                                  
                    .                   -                  
               ,                         CC???.MAC.             
                     ,                    CC0RT.MAC,                 
                   -                   CC00?.MAC, CC10?.MAC, CC20?.MAC  CC3??.MAC, -         
               .  ,                     .      -         
             RSX  RSTS/E V7.0,   -                   :                                                       
               :                                                                                                     
                                                                               0                                                            
          INT EOF         /* */                                       -                  
          MAIN( ) [                                                                                    
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 15 -                                                               - 16 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                    #DEFINE, #INCLUDE  #IFDEF;                                
                                                                         ,       RSTS/E -         
          1                                                                "ATPK".     RSTS/E  -         
                 -      -          ,     .                
                    ,                                                                                  
                      .  -                              
                                 :    VMS     "V";         
                        .                   RT-11  RSTS/E -         
                                         "R",    RSX-11M -    "X".         
                    .                   RT-11       "T",         
                    ,  .           RSX-11M -    "M".   "XMAKCC.CMD"         
                       ,             "CC"   RSX-11M  RSTS/E. -         
                      ;                                 ".TKB"       -         
                                                                         .                                                      
          2                                                                                                                                 
                 -                                                                                      
                          -               _________.    -         
                    PDP-11 ( ,  -           ,    ,           
                    AS);                                                   SXT  (         
                                                                        ).      PDP-11,  EIS         
          3                                                             (    ),                 
                 -                 LSI-11 (11/03, LSI-11, 11/23).               
                          -            ,                 
                   .                                                 11/05, 11/10, 11/20    11/40   EIS,             
                                                                          RSX.MAC  RT11.MAC    -         
                                                                            C$$EIS  .  -         
        _________.                 ,       -         
   ASCII.                       C$$EIS.                                    
   RSX-11M, RSTS/E  RT-11                                                                                    
   .  RT-11    -                   RSX-11M  -         
    '   .                    EIS.   -         
   ( )      -            (EIS      -         
      :                                           RSX-11M),  -         
                                                                            RSX.MAC             
          #OUT.S[N1],INTERM.TM1[N2],EXPAND.TMP[N3]=IN.C                  C$$EIS    .               
                                                                        RT-11      RSTS/E             
        ,               EIS "CLIB.OBJ",                
     ,   #INCLUDE.            EIS "CLIBN.OBJ".                                                    
           -                                                                              
   .                                                                            RT-11  -         
                                                                        ,   EIS,   CLIB.OBJ. , -         
          -   "C"      '                       ,         
            PDP-11   AS,                 EIS.  ,   RT-11,           
                AS???.MAC.    AS                RSTS/E    .                    
            AS.DOC;                                                                                                                         
                                                                                              
          -      -          RSX-11M    RSX-11M  RSTS/E.   ,         
                  A????.MAC.                 '   -         
                                 .                                 
            .   ,   ,                                                                              
               .                                                                                              
                                                                                                                                            
                                                                                                 
    .       -                                                                              
            -                                                                              
     .    ,                                                                                    
                                                                                        
      . VMS, RSX-11M  RT-11                                                                              
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 17 -                                                               - 18 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
             3.2.    "C"                              3.5.   RT-11                         
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
              -                   RT-11             
       :[5,4]  [5,5].  [5,4]                     '           
   ,    /.           (SYSLIB).  CALL()  "C"    -         
   [5,5]    /.                        -         
                                                                        . ,   SYSLIB,    -         
                           /,   .                        
    RT11  RSX.                                                                                   
     RT11.MAC (  EIS)  RSX.MAC, -                                                                              
         .                                                                                             
                                                                                  3.6.                                   
                                                                                             
    :                                                                                                                        
                                                                                                                                            
          RMAKLB.CMD       RT-11  RSTS/E;                                        
          VMAKLB.COM       RSX  VMS;                         [6,*]         "C".             
          XMAKLB.CMD       RSX  RSTS/E;                          [6,1]      "         
          MMAKLB.CMD       RSX;                               ",               
          TMAKLB.COM       RT-11.                              "C".    :                        
                                                                                                                                            
         [5,5]      GETCMD.C,            ECHO                                                                
         -                 -         -         
   .    RSTS/E      [5,1]RLBCMD.CMD                       .                 
           -                      ;                     
   .                                                                                                                                 
                                                                        GREP                                                                
             MACRO PDP-11.                     - "   ".   -         
                                                                                       ,             
                                                                                    ;                        
                                                                                                                                            
             3.3.    RSTS/E                        KWIK                                                                
                                                                               -  : "     -         
                                                                                 ";                                                       
                                                                                                                                            
         [5,6]   ,           SORTC                                                               
      "C"                        -   ;                               
    RSTS/E. ,     -                                                                              
      [5,6]README.506, .                            SORTS                                                               
                                                                               -  -               
                                                                                  ;                                          
                                                                                                                                            
             3.4.   RSX-11                         WC                                                                  
                                                                               -  ,                    
                                                                                 ;                                                    
                                                                                                                                            
         [5,7]   ,           CCXREF                                                              
      "C"                        -              
    RSX-11M,  AST.     -                         "C".               
      [5,7]CX.DOC.      -                                                                              
        RSX-11M   RSTS/E  (                                    
   VMS),   IAS  RSX-11M-PLUS.                                    README.???  .                               
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 19 -                                                               - 20 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
             3.7.                                  FIXDOC                                                              
                                                                               -  RSTS/E  "" RUNOFF VMS           
                                                                                  "   "  (  80)           
                                                                                         (         
                                      72).     GETRNO,  -         
   CC.RNO  AS.RNO, .  ,                         ".TITLE" RUNOFF.            
   [5,1]  [.COMMAND]    ".DOC"  -                   FIXDOC   .  ,           
    RUNOFF.      -                          RNO.TSK    RSTS/E           
     CBUGS.RNO,     -                   RUNOFF  VMS;                                              
   ,   CC.RNO   .                         -    FIXDOC.C               
                                                                                 [5,1]  [.COMMAND].             
                                                                                   "C:". ,            
        _________.     -                     RSTS/E.                                           
     " RUNOFF" VMS      ,                                                                              
                                                                            
     RUNOFF.                           - [5,1]RGTRNO.CMD    [5,1]RGTDOC.CMD            
   .                                                                    RSTS/E,  VGTRNO.COM   VGTDOC         
                                                                                 -  VMS.                                                   
                                                                                             
     (MACRO)   .                                                                                           
                                                                                                                                            
               ,                                                                                
          :                           4.                        
                                                                                                                                            
   GETRNO                                                                                                                                   
          -        .                                                                              
                                                                                                  
            (                                    
            ).                 ASCII    .           
               .    -            ,      -         
               ,    -          .        -             
              GETRNO.C;                                             PDP-11.                 
          -  GETRNO     RUNOFF,                           
                            .                                                              
               ;                                                                                                   
          -   GETRNO.C     [5,1]                                                                              
             [.COMMAND].    -                                                                              
              "C:".                                                       4.1.                         
                                                                                                                                            
   GETKWK                                                                                                                                   
          -                                                                                      
            ,                                             
            "" .  GETKWK            .    ,   -         
             KWIK.                                         ,   .   -         
          -   GETKWK       [5,1]              .   -         
             [.COMMAND].    -           :                                                      
              "C:".                                                                                                                 
                                                                                                                                            
   KWIK                                                                 C                                                                   
          -   "   ",  -                 -                       
                  -                   (.STNG.);                                                  
            .                                                                                      
            .                                               O                                                                   
          -   KWIK.C    [6,1]                 -                      
             [.TOOLS].                         (.DATA.);                                                  
                :                                                                              
            "PUB:"  RSTS/E; "BIN:"  VMS.                              P                                                                   
                                                                               -      (.PROG.);         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 21 -                                                               - 22 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
    :                                              T                                                                   
                                                                               - ,  "";                                    
   L []                                                                                                                                
          -   ;                                 E                                                                   
                                                                               - ,  "";                                      
   J []                                                                                                                                
          -    ;                                 K                                                                   
                                                                               -  ;                               
   X                                                                                                                                        
          -   ;                                           T                                                                   
                                                                               -  .                                               
   N                                                                                                                                        
          -   ;                                                  ,                
                                                                        ,  :                                               
      ..:                                                                                                            
                                                                               (A+B*(C & 4))*D                                              
   A                                                                                                                                        
          -   .EVEN;                             ,   ,         
                                                                         ,    .   -         
   B []                                                                .                 
          -  .BLKB [];                                 :                                                     
                                                                                                                                            
   D                                                                                           !                                            
          -   ;                                               --------------------                                 
                                                                                       !                  !                                 
   G                                                                               ----------             !                                 
          -  .GLOBL;                                                  !        !             !                                 
                                                                                   !    ---------         !                                 
   H                                                                               !    !       !         !                                 
          -  .BYTE;                                                   !    !     -----       !                                 
                                                                                   !    !     !   !       !                                 
   I                                                                             ((A + (B *  (C & 4))) *  D)                                
          -  .WORD   ;                                                                                    
                                                                                            
   Y                                                                       :                                          
          -  .WORD;                                                                                                            
                                                                        FACT(N)        D FACT  \  FACT                     
    :                                                [              N 0 4   \                                
                                                                          IF (N==0)    F 1     \ ""   1                     
   W                                                                                   Z[N==0] \                      
          -   ;                            RETURN(1)   R       \                                     
                                                                                       Z 1     \                      
   Q                                                                                   J 2     \  2                                 
          -     ( - "T");              RETURN(N*FACT(N-1))                                              
                                                                                       L 1     \ 1 (N:=0)                              
   M                                                                                   R       \                                     
          -     ;                                    Z[N*FACT(N-1)]                                       
                                                                                               \                      
   TRF- ():                                                          L 2     \ 2                                     
                                                                        ]              X       \                              
   R                                                                                   G FACT  \.GLOBL FACT                                 
          - RETURN;                                                                                                                         
                                                                                   "C"             
   S                                                                            .         
          - ;                                                   ,   -         
                                                                        .     -         
   E                                                                    .  ,      (         
          -   ;                             )      -         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 23 -                                                               - 24 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
    ( 5),      -                  :                     
        .                                                                                                   
                                                                               - R0    R1                  
                                                                                 ;                                                
                                                                                                                                            
             4.2.                                                 - R2, R3  R4              
                                                                                  "C"    "REGISTER ...". -         
                                                                                      -         
                                                                                 ,    (   -         
                                       );                   
    ,    "-                                                                              
    ".      -                 -  SETHI-ULLMAN'     -         
       .                       ,     .             
        ,                             ,     ,         
    SETHI-ULLMAN',                           R0  R1    -         
   .  SETHI-ULLMAN'    "THE JOURNAL  OF                    ;                                          
   ACM"  17,  4   1970 . . 715-728.                                                                                    
                                                                               - " ,     -         
                                                                                        -         
                                                                                  ";                                             
                                                                                                                                            
           4.2.1.                            -   GETREG    .           
                                                                                   ,    -         
                                                                                 ,  GETREG       ,           
                                                                                  .                                         
          :                                                                                                  
                                                                                                                                            
          -  ;                                                                                                   
                                                                                4.2.2.                                         
          -   ;                                                                                               
                                                                                                                                            
          -    ,    "-(-A)",                                                                              
            "!(!A)", "^(^A)", "A&A)"  "A";                                        -         
                                                                           .        (CTAB,         
          -      :  "*(&A)"            ETAB, STAB  RTAB)    -  (TTAB).             
            "&(*A)"   "A";                               RTAB .        CTAB           
                                                                        ETAB,    RTAB.                   
          -                  STAB,                     
              "&A + ";                            -7:                                                              
                                                                                                                                            
          -     -                 [RTAB]                                                       
               (  ,                   MOV     REG,-(SP)                                            
             "*(  +  )"    "*(  -                                                                              
            )";                                                     ()          
                                                                        : " ", " "  ..            
          -     "*P++"    "*--P"                                                                                
               PDP-11;                                            
                                                                        (INT, CHAR, LONG, UNSIGNED, FLOAT, DOUBLE  )           
          -     ""  "-           (CONSTANT, ADDRESS, EASY  ANY).                              
            "        -                                                                              
            ;                                                             ,  ,    :              
                                                                                                                                            
          -    ;                             INT    ANY     INT  CON1  ; 1                       
                                                                               [LL]               ;                
          -  "AND"   "BIC";                              INC     [R]        ;INC RX                                   
                                                                        INT    ANY     INT  ADDR  ;                     
          -    ,    "+0",  "-0",                                    ;-                                
            "&-1", "\0", "^0", "\=0"  ..                                    [LL]               ;                
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 25 -                                                               - 26 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
          ADD     [VAR],[R]  ;ADD VAR,RX                                [AR]                                                                
   INT    ANY     INT  EASY                                                    -   ;                                        
          [SRV]              ;NOP,                                                                                              
          [LL]               ;                 [ARN]                                                               
          ADD     [AR],[R]   ;ADD VAR,RX                                       -      ;                  
   INT    ANY     INT  ANY                                                                                                                  
          [PR]               ;                [OP0]                                                               
          [LL]               ;                        -  ;                                              
          ADD     (SP)+,[R]  ;ADD (SP)+,RX                                                                                                  
                                                                        [OP1]                                                               
           , "=" (  "A=B;"):                   -  ;                                              
                                                                                                                                            
   INT    ANY     INT  CON0   ;I=0;                                     [AL+2]                                                              
   CHAR   ANY     INT  CON0   ;C=0;                                            -   , LONG;                                   
          [SLAC]              ;                                                                                          
                              ;                                 [AR+2]                                                              
          CLR[TL] [AL]        ;SLR[B]  VAR                                     -   , LONG;                                  
   INT    ADDR    INT  ANY                                                                                                                  
   CHAR   ADDR    INT  ANY                                              [TL]                                                                
          [LR]                ;                      -   ;                                           
          MOV[TL] [R],[AL]    ;MOV[B]  RX,VAR                                                                                               
   INT    ANY     INT  EASY                                             [T]                                                                 
   CHAR   ANY     INT  EASY                                                    -     ;                                
          [SRV]                                                                                                                             
          [SLAC]                                                        [SRVA]                                                              
          MOV[TL] [AR],[AL]                                                    -      ;               
   INT    ANY     INT  ANY                                                                                                                  
   CHAR   ANY     INT  ANY                                              [SRV]                                                               
          [PLA]                                                                -    ;                          
          [LR]                                                                                                                              
          MOV[TL] [R],'(SP)+                                            [SRAA]                                                              
                                                                               -      ;                  
                                                                                                                                            
                                                                        [SRA]                                                               
           4.2.3. ,                         -    ;                             
                                                                                                                                            
                                                                        [SLVA]                                                              
                                                                               -      ;                
            :                                                                                             
                                                                        [SLV]                                                               
   [M]                                                                         -    ;                           
          -   ;                                                                                                      
                                                                        [SLAA]                                                              
   [F]                                                                         -      ;                   
          -   ;                                                                                                     
                                                                        [SLA]                                                               
   [R]                                                                         -    ;                              
          -  ;                                                                                                                
                                                                        [SLAC]                                                              
   [R+1]                                                                       -       ;            
          -   + 1;                                                                                                            
                                                                        [LL]                                                                
   [AL]                                                                        -   ;                                     
          -   ;                                                                                                              
                                                                        [LL+1]                                                              
   [ALN]                                                                       -     [R+1];                             
          -      ;                                                                                        
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 27 -                                                               - 28 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   [LR]                                                                              5.                          
          -   ;                                                                                                         
                                                                                                                                            
   [PL]                                                                                                                                     
          -     ;                                                                                                   
                                                                                             
   [PLA]                                                                 ,       "C".         
          -      ;                             .         
                                                                                                                                            
   [PR]                                                                              /           
          -     ;                                               
                                                                        UNIX V7,  ,       .         
   [V]                                                                          "THE  "C"         
          - ADC  SBC   .                            PROGRAMMING  LANGUAGE",  BRIAN  KERNIGHAN,  DENNIS  PITCHIE         
                                                                        (ENGLEWOOD CLIFFS, NJ: PRENTICE-NALL, ISBN 0-13-110163-3).          
                                                                                                                                            
                                                                                ,      "$$",         
             4.3.                            /.   -         
                                                                          "ABC$X"     "ABC"             
                                                                         "X". , "ASL$LI"            
                                                                           LONG      INT         
                              .                                                     
   ,       -                                                                              
       EIS (  -                                                                              
    -)  FPU (   -                                                                              
        ).                                             5.1.   RADIX-50  ASCII                   
                                                                                                                                            
              :    EIS                                                                              
                                                                          ***********          
          "FATAL                                                         *  $$C5TA *          
   COMPILER ABORT" ("     -                                                         ***********          
   ").                                                                                                                                    
                                                                          : C5TA.MAC                                 
           EIS,                                                                                   
      ( EISTAB   CC206.MAC)            :                                                       
    .   .                                                                                                    
                                                         MOV     _RAD50,R1                                       
                         -                   MOV     __,R0                            
        ,                         CALL    $$C5TA                                               
      .                                                                                   
   .  ,   ,                 :                                                     
     ,        -                                                                                
     .                                                   R0 -                                                 
                                                                               R1 -                                        
                                                                                                                  
                                                                                                                                            
                                                                        :                                                           
                                                                                                                                            
                                                                                    RADIX-50               
                                                                        ASCII.      .               
                                                                           ,                 
                                                                        .                                                        
                                                                                                                                            
                                                                        :                                                          
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 29 -                                                               - 30 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
             5.2.                                                 5.4.     ASCII              
                                                                                                                                            
                                                                                                                                            
                                                  ***********                                                          ***********          
                                                  *  $$CL16 *                                                          *  $$DTDA *          
                                                  ***********                                                          ***********          
                                                                                                                                            
     : CL16.MAC                                    : DTDA.MAC                                 
                                                                                                                                            
   :                                                       :                                                      
                                                                                                                                            
          $$CL16();   /*    */                               $$DTDA (BUFF,CONV,FIELD,DPLACE,VALUE)                          
                                                                               CHAR    *BUFF;  /*   */             
   :                                                                   CHAR    CONV;   /* */                       
                                                                               INT     FIELD;  /*  */                 
                 /.                   INT     DPLACE; /*  */                  
         "C".                          DOUBLE  VALUE;  /* */                   
                                                                                                                                            
   :                                                           CHAR   *                                                       
                                                                             $$ECVT (NEGFL,SCALE,FIELD,DPLACE,VALUE)                        
   :                                                                  INT     *NEGFL; /*0  "+", 1  "-" */                  
                                                                               INT     *SCALE; /*                     
                                                                                                 */                                
                                                                               INT     FIELD;  /*  */                 
             5.3.   ( MACRO)                           INT     DPLACE; /*  */                  
                                                                               DOUBLE  VALUE;  /* */                   
                                                                                                                                            
                                                  ***********                CHAR  *                                                        
                                                  *  $$DIV2 *                $$FCVT (NEGFL,SCALE,FIELD,DPLACE,VALUE)                        
                                                  ***********                  INT     *NEGFL; /*0  "+", 1  "-" */                  
                                                                               INT     *SCALE; /*                     
     : DIV2.MAC                                                           */                                
                                                                               INT     FIELD;  /*  */                 
   : MOV _,R0 ;,                   INT     DPLACE; /*  */                  
   MOV   _,R1   ;,          MOV                 DOUBLE  VALUE;  /* */                   
   ,R2 ; JSR PC,$$DIV2 ;  MOV                                                                              
   R0, ;,   MOV R1,  ;          :                                                           
     MOV R2, ;                                                                                          
                                                                              $$DTDA   PRINTF  -         
   :                                                                  ASCII.  -         
                                                                          BUFF[]. "FIELD"  "DPLACE"            
            .                "F"  "D"     "%F.DF"  -         
                                                                        . "CONV"  "E",  "F"    "G",           
   :                                                           . ,                
                                                                         .                                                   
                                                                                                                                            
                                                                              $$ECTVT    $$FCVT    ,         
                                                                             .   -         
                                                                          NEGFL   ,   -         
                                                                         ,  SCALE     .          
                                                                                                                                            
                                                                        :                                                     
                                                                                                                                            
                                                                        :                                                             
                                                                                                                                            
                                                                               - "%G"  .  "%F";                 
                                                                                                                                            
                                                                               -                 
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 31 -                                                               - 32 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
              .                                                  5.7.                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                       ***********          
             5.5.              .                                                              * $$FSAV  *          
                  /                                                                                   ***********          
                                                                                                                                            
                                                                          : FIS.MAC                                  
                                                  ***********                                                                               
                                                  * $$FADD  *           :                                                      
                                                  ***********                                                                               
                                                                               $$FSAV          /*  */             
     : FADD.MAC                                         $$FRTA          /*   A*/                   
                                                                               $$FRTB          /*   B*/                   
   :                                                                                                                           
                                                                        :                                                           
          DOUBLE                                                                                                                            
          $$FADD (A,B)    /*  , A+B*/                       -         
                                                                         .                   
          DOUBLE                                                        "C".                                                                
          $$FSUB (A,B)    /*   A-B*/                                                                                
                                                                        :                                                          
          DOUBLE A;                                                                                                                         
          DOUBLE  B;                                                                                                                        
                                                                                                                                            
   :                                                                      5.8.                                 
                                                                                                                                            
              -                                                                              
    .                                                                                                        ***********          
                                                                                                                       * $$GCMD  *          
   :                                                                                                          ***********          
                                                                                                                                            
                                                                          : GETCMD.MAC                               
                                                                                                                                            
             5.6. /                    :                                                      
                                                                                                                                            
                                                                               ARGC   = $$GCMD (TEXT,IN,OUT,AVP);                           
                                                  ***********                  CHAR   *TEXT;   /* */                         
                                                  * $$FMUL  *                  CHAR   **IN;    /*   STDIN*/                      
                                                  ***********                  CHAR   **OUT;   /*   STDOUT*/                     
                                                                               CHAR   ***AVP;  /* ARGV[]*/                        
     : FMUL.MAC                                                                                                      
                                                                        :                                                           
   :                                                                                                                           
                                                                                     ARGV[].         
          DOUBLE                                                             /,               
          $$FMUL (A,B)    /*  A*B */                   .                                      
          DOUBLE  A;                                                                                                                        
          DOUBLE  B;                                                         :  $$GCMD    .             
                                                                        AGRV[]      .                           
   :                                                                                                                                
                                                                             $$GCMD    .                  
                                                                                           
     .                                                       $$GCMD   :                   
                                                                                                                                            
   :                                                                  /*                                                           
                                                                                *     TTY                                   
                                                                                */                                                          
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 33 -                                                               - 34 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
          CHAR    **INFILE = &DEF_IN;                                   VF$EOF / VF$ERR                
          CHAR    *DEFIN = "TT:";                                        . R0        ,  -1           
          /*                                                                .   .         
           *     TTY                                                                                                      
           */                                                           :                                                           
          CHAR    **OUTFILE = &DEF_OUT;                                                                                                     
          CHAR    *DEF_OUT = "TT:";                                           $$GETC      "-         
          /*                                                             ".               
           *   ARGV[]                                R0.    .                           
           *                                                                                                        
           */                                                                $$GET            "         
                                                                        ". ,     (R1) -         
          CHAR    **ARGVP                                                   RSX.  RT11   - 512         
          CHAR    *DUMMY = "MAIN"                                       () .                                                  
          INT     ARGC;                                                                                                                     
          ...                                                                    "" ( "N"   -         
          AR     GC = $$GCMD ((STRLEN(CMDLIN == 0) ?                          FOPEN()),           
                          DUMMY :CMDLIN,                                    " " (\N),             
                          &INFILE, &OUTFILE, &ARGVP);                   .                                                          
          IF (ARGC < 0)                                                                                                                     
             ERROR ("  ");                       :                                                             
          STDIN = FOPEN (INFILE,"R");                                                                                                       
          IF (**OUTFILE == ">")                                                -   ""  RT-11   "  -         
                STDOUT = FOPEN (*OUTFILE+1,"A");                                 " .                  
          ELSE  STDOUT = FOPEN (*OUTFILE,"W");                                   " "             
                                                                                  ;                                              
   :                                                                                                                               
                                                                               - RT-11  .TTYIN     -         
                                                                                 .                    
                                                                                 .GTLIN,       -         
                                                                                   .                                   
             5.9.                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                  ***********                    5.10.                           
                                                  * $$GETC  *                                                                               
                                                  ***********                                                                               
                                                                                                                       ***********          
     : GETC.MAC                                                                                 * $$INIT  *          
                                                                                                                       ***********          
   :                                                                                                                           
                                                                          : INIT.MAC                                 
          MOV     #IOV,R4         ;R4 ->  /                                                                                
          CALL    $$GETC          ;                         :                                            
                                                                                                                                            
   RSX:   MOV     #IOV,R4         ;R4 ->  /                   $$INIT()                                                     
          MOV     #BUFFER,R0      ;R0 ->                                                                                               
          MOV     BUFLEN,R1       ;R1 :=  '           :                                                           
          CALL    $$GET           ;                                                                                           
                                                                                  "C"    ,           
   VF$EOF / VF$ERR                        ARGV[]         
    . R0:=  ,  -1                               
      .   .                   .  :                 
                                                                                                                                            
   RT11:                                                                      RSX-11M (  ) ARGV[0]           
          MOV     #BLKNBR,R0      ;R0:=                .   RT-11 ARGV[0]               
          CALL    $$GET           ;                         .                                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 35 -                                                               - 36 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
         RT-11,       -                   5.11.  LONG  ASCII                          
   ,   "ARGV:"      -                                                                              
    .                                                                                   
         :                                                                ***********          
                                                                                                                       * $$LTOA  *          
          $$NARG = 1;                                                                                                  ***********          
          MAIN (ARGV,ARGC) [                                                                                                                
          ...                                                             : LTOA.MAC                                 
                                                                                                                                            
    $$NARG                  :                                                      
    , MAIN()    ()  -                                                                              
   .                                                                     $$LTOA (BUFF,RADIX,VALUE);                                   
                                                                               CHAR    *BUFF;  /*    */               
   :                                                                 INT     RADIX;  /*    */               
                                                                               LONG    VALUE;  /*     */               
           ,     -                                                                              
                    :                                                           
   . ,    ,    -                                                                              
        .                  PRINTF              
          .                  ACSII        .    RADIX         
                                                                         :                                          
   :                                                                                                                             
                                                                        D                                                                   
     CANNOT OPEN STANDART INPUT [_], CODE=NNNNNN                       -  ;                                       
     CANNOT OPEN STANDART OUTPUT [_], CODE=NNNNNN                                                                                   
     NO MEMORY                                                          O                                                                   
         [], =NNNNNN                        - ;                                              
         [], =NNNNNN                                                                                    
                                                               U                                                                   
                                                                               -  ;                                    
     "CANNOT  OPEN"  ("  ")                                                                                
       /.  -          X                                                                   
         FCS,                   -  (10-15 = A-F).                           
     RSX.     RT-11  -                                                                                
      "C" (  IOV).                         : .                                                        
                                                                                                                                            
    "NO MEMORY" (" ")                                                                                  
       .                                                                                            
                                                                                 5.12.     "C"                       
           .                                                                                                     
                                                                                                                                            
   :                                                                                                             ***********          
                                                                                                                       * $$MAIN  *          
          -      -                                                         ***********          
             , .. $$INIT                                                                                   
             ;                                      : SUPORT.MAC                               
                                                                                                                                            
          -  RSX-11M       (          :                                                      
             BPT),                                                                                   
            STDERR    .                  $$MAIN::                 /*    "C" */               
                                                                        EXTERN   INT   $$OPSY   /*      */               
                                                                        EXTERN   INT   $$RSTS   /*  ,  RSTS/E    */               
                                                                        EXTERN   INT   $$UIC    /* RSX: UIC     */               
                                                                        EXTERN   INT   $$STND   /*          */               
                                                                        EXTERN   INT   $$SCCA   /* RT-11:  .SCCA */               
                                                                        EXTERN   INT   $$TASK[] /* RSX:           */               
                                                                        EXTERN   INT   $$TICK   /* RT-11: 50  60    */               
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 37 -                                                               - 38 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                     "$$"      -         
                                                                           . ..               
   EXTERN  INT (*$$PPTR)()  /*      */            .                                                              
   EXTERN  INT  $$ARGC      /*           */                                                                                
   EXTERN  INT  $$$ARGV[]   /*   */            :                                                        
   EXTERN  INT  *$$MTOP     /*       */                                                                                
   EXTERN  INT  *$$MEND     /*        */                  RSX-11      BPT,           
                                                                             .              
   :                                                                ,  '           
                                                                           .                                       
              -                                                                              
        "C".   "-          :                                                          
   "   "C"        MAIN().                                                                              
          MAIN()                                                                                  
   EXIT()                                                                                          
    .                                                         5.13.    $$NARG                     
                                                                                                                                            
              :                                                                              
                                                                                                                       ***********          
   $$OPSY                                                                                                              * $$NARG  *          
          -   ,                                                              ***********          
            .    7  RT-11,    -                                                                              
              GTSK$  ,  -            : NARG.MAC                                 
              RSX:                                                                                                                     
                                                                        :                                                      
                  RSX-11D         0                                                                                                         
                  RSX-11M         1                                            INT     $$NARG = <>                                  
                  RSX-11S         2                                            ...                                                          
                  IAS             3                                            MAIN()    [                                                  
                  RSTS/E V7       4                                            ...                                                          
                  VMS             5                                            ]                                                            
                  RT-11           7                                                                                                         
                                                                        :                                                           
   $$RSTS                                                                                                                                   
          -     ,     -                 RT-11,                  
                RSTS/E.      ,           ,   "ARGV:"             
                 RSX  RT-11          ,                     
              VMS   ;                           ARGV[].    ,    -         
                                                                             "C"               
   $$STND                                                               $$NARG,   :                                          
          - ()    ;                                                                                                
                                                                               INT     $$NARG  = 1;                                         
   $$SCCA                                                                                                                                   
          -   .SCCA  RT-11.                    .         
             RSTS/E     ;               ARGV[]     .                   
                                                                                                                                            
   $$TASK                                                                                      
          -  RSX,     ASCII;                           $$NARG,     ,             
                                                                          "ARGV:".                                         
   $$TICK                                                                                                                                   
          -  RT-11,                       ,   $$NARG   -         
             .   50  60;                            .             
                                                                            MAIN().                                 
   $$UIC                                                                                                                                    
          -  RSX,  UIC  ,  GTSK$.                  : .                                                        
                                                                                                                                            
   :                                                                                                                              
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 39 -                                                               - 40 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.14.                                            5.16.   R1-R5                     
                                                                                                                                            
                                                                                                                                            
                                                  ***********                                                          ***********          
                                                  *  $$PUTC *                                                          *  $$SVR1 *          
                                                  ***********                                                          ***********          
                                                                                                                                            
     : PUTC.MAC                                    : SAVR1.MAC                                
                                                                                                                                            
   :                                                       :                                                      
                                                                                                                                            
          MOV  #IOV, R4   ; R4 ->  /                          JSR    R5, $$SVR1  ;  R1-R5                   
          MOV  BYTE, R0   ; R0 ->                                 . . .                                                        
          CALL $$PUTC                                                                                                                       
                                                                               RETURN             ;  R1-R5               
   :                                                                                      ;                
                                                                                                                                            
         $$PUTC                 :                                                           
          .                                                                                  
     ,  R0.                                           R1-R5                
                                                                         .      RETURN         
   :                                                              (RTS PC),      -         
          -   RT-11  RSTS/E -             R1-R5       ,           
             , ,               .                                                             
            "*"      .TTYOUT.                                                                                
             ,    .            :                                                             
                                                                               -  ,   "C",  .              
                                                                                                                                            
                                                                                                                                            
            5.15.     RSX                                                                                          
                                                                                 5.17.     -              
                                                                                         BPT                                  
                                                  ***********                                                                               
                                                  *  $$QIOW *                                                                               
                                                  ***********                                                          ***********          
                                                                                                                       *  ABORT  *          
     : QIOW.MAC                                                                                 ***********          
                                                                                                                                            
   :                                                         : ABORT.MAC                                
                                                                                                                                            
          MOV  <___>, R0                           :                                                      
          MOV  <_IOV>, R4                                                                                                          
          CALL $$QIOW                                                          ABORT()                                                      
          BCS  <>                                                                                                                     
                                                                        :                                                           
   :                                                                                                                                
                                                                                ,    -         
              QIO$                     ,   BPT.                                        
   /,    .  R0, R1.                                                                                
                                                                        : .                                                        
                 RSX.                                                                              
       RT-11                                                                                  
        BPT.                                                                                           
                                                                                                                                            
   : .                                                                                                                             
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 41 -                                                               - 42 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.18.                                        5.20.  ASCII  RADIX-50                      
                                                                                                                                            
                                                                                                                                            
                                                  ***********                                                          ***********          
                                                  *  ABS    *                                                          *  ASCR50 *          
                                                  ***********                                                          ***********          
                                                                                                                                            
     : ABS.MAC                                     : ASCR5.MAC                                
                                                                                                                                            
   :                                                       :                                                      
                                                                                                                                            
          ABS (VAL)                                                            ASCR50 (COUNT, INPUT, OUTPUT)                                
          INT  VAL;                                                            INT    COUNT;                                                
                                                                               INT    *OUTPUT;                                              
   :                                                                   CHAR   *INPUT;                                               
                                                                                                                                            
            .              :                                                           
                                                                                                                                            
   : .                                                               "COUNT"   ASCII      RADIX-50.         
                                                                                ,             
                                                                             .    ASCII         
                                                                            .               
            5.19.                                          ,                  
                                                                           ,     .           
                                                                                                                                            
                                                  ***********           : .                                                        
                                                  *  ALLOC  *                                                                               
                                                  ***********                                                                               
                                                                                                                                            
     : ALLOC.MAC                                          5.21.   EIS                                 
                                                                                                                                            
   :                                                                                                                           
                                                                                                                       ***********          
          CHAR  *                                                                                                      *  ASL$I  *          
          ALLOC(N)   /* -1,    */                                                                         ***********          
                                                                                                                                            
   :                                                              : EIS.MAC                                  
                                                                                                                                            
           ,              :                                                      
     .      -                                                                              
   .                                                                      ASL$I (A,B);  /*  A<>B */                           
         ALLOC()   -1,                   MUL$I (A,B);  /*  A*B  */                           
       .                                        DIV$I (A,B);  /*  A/B  */                           
                                                                               MOD$I (A,B);  /*  A%B  */                           
         FREE()                                                                                     
    .                                                   :                                                           
                                                                                                                                            
             MALLOC(),  REALLOC()                  -.    -         
   SBREAK().                                                             "C"    .                        
                                                                                                                                            
   : .                                                                -         
                                                                           EIS.   RT11.MAC         
   :                                                               RSX.MAC     C$$EIS:           
          -   ALLOC()  .                                                                                     
              MALLOC().                                      0     EIS                                    
                                                                               1     EIS                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 43 -                                                               - 44 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
     C$$EIS    RT-11                          5.23.  LONG<>(-N)                                                         ***********          
    .                                                                                                         *  ASL$LI *          
                                                                                                                       ***********          
   :                                                                                                                                  
          -         -            : ASLLI.MAC                                
               .                                                                                                        
                                                                        :                                                      
                                                                                                                                            
                                                                               LONG                                                         
            5.22.  LONG<>INT                           
   :                                                                                                                                
                                                                                                                                            
              -                                                         ***********          
         .                                                             *  ASR$U  *          
      ,   .                                                           ***********          
       ASH.                                                                                                 
                                                                          : ASCU.MAC                                 
        ,   N , :                                                                                              
                                                                        :                                                      
          ( L<>(-N) )                                                                                                           
                                                                               UNSIGNED                                                     
   :                                                                  ASR$U    (U,N)                                               
                                                                               UNSIGNED U;                                                  
                                                                               INT      N;                                                  
                                                                                                                                            
                                                                        :                                                           
                                                                                                                                            
                                                                               U>>N   . -         
                                                                        , ,  N ,  ,              
                                                                          U<<(-N).                                             
                                                                                                                                            
                                                                        : .                                                        
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 45 -                                                               - 46 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.25.   ASCII     -                        5.27.  ASCII                    
                                                                                                                
                                                                                                                                            
                                                                                                                       ***********          
                                                  ***********                                                          *  ATOL   *          
                                                  *  ATOD   *                                                          ***********          
                                                  ***********                                                                               
                                                                          : ATOL.MAC                                 
     : ATOD.MAC                                                                                                      
                                                                        :                                                      
   :                                                                                                                           
                                                                               LONG                                                         
          DOOBLE                                                               ATOL (P)                                                     
          ATOD   (BUFFER)                                                      CHAR    *P;                                                  
          CHAR    *BUFFER;                                                                                                                  
                                                                        :                                                           
   :                                                                                                                                
                                                                                .    -         
         -     -            .                
      .  -          ,      .    ,         
          .  ,            ,   /    .         
         .                 .                             
                                                                                                                                            
   :                                                              : .                                                        
          -    (..                                                                                    
              ).                                                                                                   
                                                                                                                                            
                                                                                 5.28.                          
                                                                                                                                            
            5.26.  ASCII                                                                                                
                                                                                                                       ***********          
                                                                                                                       *  BREAK  *          
                                                  ***********                                                          ***********          
                                                  *  ATOI   *                                                                               
                                                  ***********             : BREAK.MAC                                
                                                                                                                                            
     : ATOI.MAC                                  :                                                           
                                                                                                                                            
   :                                                              CHAR  *                                                      
                                                                               OLD = SBRK (INCREMENTS)                                      
          ATOI (P)                                                             INT   *OLD;                                                  
          CHAR     *P;                                                         INT   INCREMENTS;                                            
                                                                                                                                            
   :                                                                   CHAR  *                                                      
                                                                               OLD = BRK (VALUE)                                            
           .    -                 INT   *OLD;                                                  
     .                     INT   *VALUE;                                                
   ,      .    ,                                                                              
   ,   /       -                 CHAR  *                                                      
   .     .                             NEW = SETTOP (VALUE)                                         
                                                                               INT   *VALUE;                                                
   : .                                                                INT   *NEW;                                                  
                                                                                                                                            
                                                                        :                                                           
                                                                                                                                            
                                                                              SBRK()    "INCREMENTS"    .         
                                                                         BRK()   "VALUE"           
                                                                        .                    
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 47 -                                                               - 48 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
    .  SETTOP()   -                 LONG    CALL();                                              
      "VALUE".                                                      LONG    MYFUN();                                             
                                                                               LONG    LARG;                                                
              "NULL".                 LONG    RESULT;                                              
   ""   .    -                 RESULT = (LONG) CALL (MYFUN,1,&LARG);                        
     SETTOP().                                                                                                                  
                                                                        :                                                             
   :                                                                                                                                  
          -        RT-11.                 - :  ,  -         
                RSX   -                    PDP-11    /.    ,         
                  -                        .               
               IOT;                                                                                                        
          -       ALLOC().                                                                               
              .                                                                                                              
                                                                                 5.30.  ("C")                        
                                                                                                                                            
                                                                                                                                            
            5.29.   ()                                                                  ***********          
                  "C"                                                                                                  *  CALLC  *          
                                                                                                                       ***********          
                                                                                                                                            
                                                  ***********             : CALLC.MAC                                
                                                  *  CALL   *                                                                               
                                                  ***********           :                                                      
                                                                                                                                            
     : CALL.MAC                                         INTEGER CALLC                                                
                                                                               IVAL = CALLC(ROUTINE,ARG1,...ARGN)                           
   :                                                                                                                           
                                                                        :                                                           
          _ =                                                                                                           
             CALL (ROUTINE,COUNT,&ARG1,...,&ARGN);                               -         
          EXTERN  INT  ROUTINE (); /*  PDP-11*/                  ,   "C".                 
          INT     COUNT;           /* */                                                                                     
                                                                              :                                          
   :                                                                                                                                
                                                                        ROUTINE                                                             
               "C"                 -    "C",  ;                  
      "C"    ,                                                                                  
        PDP-11.  ,          ARG1                                                                
     CALL()                         - ()  .                                 
   R2-R5.                                                                                                                                   
                                                                             :                                                      
          :                                                                                                   
                                                                               CALL CALLC (SORT,TABLE,NELEMENT)                             
   ROUTINE -    PDP11;                                                                                                
   COUNT   -  ,   ;                 :                                                             
   ARGL    -  .                                                                                                               
                                                                               -  .             
       :                                                                  /,    "C"           
                                                                                 ;                                          
          EXTERN  INT     SORT();                                                                                                           
          INT     __ [NDATA];                                -   ,  -         
          INT     NDATA = _;                                           "C"              
          CALL (SORT,2,&__,&_);                     :                                                 
                                                                                                                                            
   , ,        -                        -  "C"    -         
   , , LONG,  ROUTINE  CALL()    -                            (CSV$),           
    ':                                                                       "C";               
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 49 -                                                               - 50 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                      '  ,                   :               
                   /,     -                  .         
                   ;                                                   CSV$, PCSV$  $$PROF,           
                                                                          .                                             
                 -   ,   ,                                                                                 
                    ;                                  :                                                          
                                                                                                                                            
                 -     ,                                                                                    
                      "C",                                                                                
                    ,  ,                       5.32.                         
                   ,                                                                                      
                   "C";                                                                                                                     
                                                                                                                       ***********          
          -  ,  ,                                                            * CALLOC  *          
            ,                                                              ***********          
             CSV$,   CALLC.MAC                                                                                
             .                                     :                                                      
                                                                                                                                            
                                                                               CHAR    *                                                    
                                                                               CALLOC (N,M);   /*  ,  NULL*/           
            5.31.   ,  -                                                                                   
                                                   :                                                           
                                                                                                                                            
                                                                              CALLOC()     N  -         
                                                  ***********           ,  M     .               
                                                  * CALLER  *           .       -         
                                                  ***********           .                                                                
                                                                                                                                            
     : CALLER.MAC                                              ,         
                                                                         CALLOC()  NULL.                                   
   :                                                                                                                           
                                                                                  MALLOC(),  REALLOC()           
          CHAR    *                                                     SBREAK().                                                           
          CALLER ();                                                                                                                        
                                                                                  FREE().           
   :                                                                                                                                
                                                                        :                                                     
         ,                                                                                     
          ,          : .                                                        
    CALLER()                                                                                       
   .      -                                                                              
    ,                                                                                     
   .                                                                                                                                  
                                                                                 5.33.                   
        :                                                                                                                             
                                                                                                                                            
          FOO ()                                                                                                       ***********          
          [                                                                                                            *  CALLTR *          
               FOOBAR ();                                                                                              ***********          
          ]                                                                                                                                 
          FOOBAR ()                                                       : CALLTR.MAC                               
          [                                                                                                                                 
               EXTERN CHAR *CALLER();                                   :                                                      
               PRINTF ("FOOBAR   %S\N",CALLER());                                                                                  
          ]                                                                    CAUTRACE (OUTFD);                                            
                                                                               FILE         *OUTFD;                                         
   :                                                                                                                              
                                                                        :                                                           
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 51 -                                                               - 52 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
         CALLTRACE()                       5.35.                         
    ( MAIN()  ,    -                                                                              
    CALLTRACE())   .  -                                                                              
       :                                                                                         ***********          
                                                                                                                       *  COPY   *          
          [MAIN SUBR1 SUBR2]                                                                                           ***********          
                                                                                                                                            
    ,   ,  -            : COPY.MAC                                 
                                                                                            
            "C",          :                                                      
           NNNNNN  (  NNNNNN  -                                                                              
        ).  ,                   CHAR    *                                                    
     ,   ,   ,                 COPY (OUT,IN,NBYTES)                                         
     CALLTRACE().                                               CHAR    *OUT;                                                
                                                                               CHAR    *IN;                                                 
                -                 INT     NBYTES;                                              
   ,                                                                                     
        ERROR().                           :                                                           
                                                                                                                                            
   :                                                                                
                                                                         .      -         
        :                   .                                        
         .                                                                              
     CSV$, PCSV$  $$PROF,                :                                                          
      .                                                                                                      
                                                                                                                                            
          ERROR()                                                                                  
   ,     ,                       5.36.                                     
       ERROR().                                                                                                         
                                                                                                                                            
   :                                                                                                          ***********          
                                                                                                                       *  CPYSTR *          
                                                                                                                       ***********          
                                                                                                                                            
            5.34.                                        : CPYSTR.MAC                               
                                                                                                                                            
                                                                        :                                                      
                                                  ***********                                                                               
                                                  * CONCAT  *                  CHAR    *                                                    
                                                  ***********                  CPYSTR (OUT,IN);                                             
                                                                               CHAR    *OUT;                                                
     : CONCAT.MAC                                       CHAR    *IN;                                                 
                                                                                                                                            
   :                                                       :                                                           
                                                                                                                                            
          CHAR    *                                                           "IN"  "OUT".               
          CONCAT (OUT,IN0,IN1,...,INN,0);                                 .     -         
          CHAR    *OUT                                                  :                                                                
          CHAR    *IN0,IN1,...,INN;                                                                                                         
                                                                               CHAR    *PTR;                                                
   :                                                                   CHAR    BUFFER[BUFSIZ]                                       
                                                                               EXTERN  CHAR    *CPYSTR();                                   
         CONCAT      -                                                                              
   .                           PTR = CPYSTR (BUFFER,);                                 
   .                                                                     PTR = CPYSTR (PTR,_);                     
                                                                                                                                            
   :                                                                           
                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 53 -                                                               - 54 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   .                                                                    R5    .             
                                                                                 R5.         
   :                                                                         
                                                                          C$PMTR.              
                                                                             C$AUTO.   -         
                                                                                      
            5.37.                     .                                                   
                  "C"                                                                                                                       
                                                                              CSV$     $$MAIN          
                                                                                       
                                                  ***********           (RSX).                                                              
                                                  *  CSV$   *                                                                               
                                                  ***********           :                                                          
                                                                                                                                            
     : CSV.MAC                                                                                                       
                                                                                                                                            
   :                                                                5.38.     ASCII                  
                                                                                                                                            
          JSR     R5,CSV$                                                                                                                   
          ...                                                                                                          ***********          
          JMP     CRET$                                                                                                *  CTIME  *          
                                                                                                                       ***********          
   :                                                                                                                                
                                                                          : CTIME.MAC                                
                    "C"                                                                                             
                                                                        :                                                      
         ,   "C",  -                                                                              
       CSV$                     CHAR *                                                       
    CRET$.                         CTIME (BUFFER);                                              
           .                    STRUCT  TIME [                                               
                                                                                       INT   YEAR;     /* G.TIYR -1900 */                
                     "C"                         INT   MONTH;    /* G.TIMO  =1 */               
    R5    "".   -                         INT   DAY;      /* G.TIDA           */               
       :                                                INT   HOUR;     /* G.TIHR 00-23     */               
                                                                                       INT   MINUTE;   /* G.TIMI 00-59     */               
            --------------------------                                                 INT   SECOND;   /* G.TISC 00-59     */               
      SP==> !1-  ! -10(R5) C$AUTO(R5)                              INT   TICK;     /* G.TICT 00-TSEC-1 */               
            --------------------------                                                 INT   TSEC;     /* G.TICP /*/              
            !     R2      !  -6(R5)                                 ] BUFFER;                                                    
            --------------------------                                         DAYOFWEEK (BUFFER);                                          
            !     R3      !  -4(R5)                                 STRUCT TIME BUFFER;                                          
            --------------------------                                                                                                      
            !     R4      !  -2(R5)                          :                                                           
            --------------------------                                                                                                      
      R5==> !     R5      !                                         CTIME()        ,         
            --------------------------                                          ,               
            !           !  +2(R5)                          RTIME(),    :                               
            --------------------------                                                                                                      
            !    1-        !  +4(R5) C$PMTR+0(R5)                    SUN SEP 16 01:03:52 1973/0/0                                 
            --------------------------                                                                                                      
            !    2-        !  +6(R5) C$PMTR+2(R5)                 . ,               
            --------------------------                                           ,         
                                                                          UNIX (                  
     R0-R4      -          <_>).                                                    
   .  R0  R1                                                                                     
           -                CTIME(0)     ,           
   .                                                                  RTIME()    .                             
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 55 -                                                               - 56 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
             -                 ENVRESET(FP,HVAL,LVAL)                                       
     UNIX    ,   ,  -                 INT     *FRAME; /*       */                 
     UNIX                        INT     HVAL;   /*    */                 
     ,     .                        INT     LVAL;   /*    */                 
                                                                                                                                            
         DAYOFWEEK()       (-          :                                                           
    = 0)      -.                                                                                      
                                                                                           
   :                                                                 "C"                
                                                                         .                                                           
          -                                                                                    
              .                                            ENVSAVE()      ,         
                                                                         .    ENVRESET()    -         
                                                                                 ,           
                                                                         ,    ,             
            5.39.                        ENVSAVE(),                  
                                                                         ()  ENVRESET().                          
                                                                                                                                            
                                                  ***********                  ENVRESET()                 
                                                  *  DIV$LI *           ,              
                                                  ***********              (                   
                                                                        ENVSAVE()). ENVRESET()                  
     : DIVL.MAC                                    -   .            
                                                                             ENVRESET(),  -         
   :                                                            .           
                                                                          (, ,   ),  -         
          DIV$LI (LONG,INTEGER)                                              LONG.  ..    1-           
          DIV$L  (LONG,LONG)                                            2-    ,     "C"         
          MOD$LI (LONG,INTEGER)                                           .                                                
          MOD$L  (LONG,LONG)                                                                                                                
                                                                                   -         
   :                                                              ,      .            
                                                                                                                                            
            LONG.   -                               
   ,        -          ENVSAVE()  ENVRESET().                                             
   .                                                                                                                               
                                                                               INT     *SAVE_FRAME                                          
   :                                                                     PROCESS() [                                                  
                                                                               ...                                                          
          -  --                      SAVE_FRAME = ENVSAVE();                                      
            CRET$.  ,    .                    IF (SUBPROCESS()) [                                          
                                                                                  /*                                                        
                                                                                   *                                                 
                                                                                   */                                                       
                                                                               ]                                                            
            5.40.                                ELSE [                                                       
                                                                                  /*                                                        
                                                                                   *                                                
                                                  -----------                      */                                                       
                                                  ! ENVSAVE !                    ]                                                          
                                                  -----------                  ]                                                            
                                                                               SUBPROCESS() [                                               
     : ENVSET.MAC                                          /*                                                        
                                                                                   *                              
   :                                                                  */                                                       
                                                                               IF (...)                                                     
          INT     *                                                                ENVRESET (SAVE_FRAME,0);                                 
          ENVSAVE();                                                               /*                                                       
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 57 -                                                               - 58 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
               *                                        EXIT ();         /*             */           
               */                                                                                                                           
          RETURN (1);                                                          EXITS(STATUS);   /*     */           
          ]                                                                                                                                 
                                                                               $$FAIL();        /*             */           
     SUBPROCESS()  ,    -                                                                              
     ENVRESET()      ,                   EXTERN INT  $$EXST; /*   */           
   PROCESS(),   "".                                                                                                     
                                                                        :                                                         
   :                                                                                                                                  
                                                                               JMP     $$EXIT  ;                        
          -  ,      ENVSAVE()                                                                              
              ,   -          :                                                           
             .                                                              :                      
                                                                               -    WRAPUP();              
                                                                               -  ( ) ;                   
                                                                               -   ;                                     
            5.41.       "C"                           -      -         
                                                                                 .                                                        
                                                                                                                                            
                                                  -----------                  EXITS()      ,         
                                                  !  ERROR  !                           
                                                  -----------           . RT-11  RSX-11M     -         
                                                                          ;     EXITS()           
     : ERROR.MAC                                   .                                        
                                                                                                                                            
   :                                                             RT-11   RSX-11M                                       
                                                                                1.       1.       -              
          ERROR (FORMA,ARGLIST)  /*                            2.       0.                                   
                                                  */                      4.       2.                                           
                                                                                8.       4.                                     
   :                                                                                                                                
                                                                         EXIT()     EXITS(1).  ,           
          STDERR      -                $$EXST           
    .      ,              EXIT():                                              
   STDERR    .                                                                                                
                                                                               EXTERN  INT   $$EXST;                                        
          ($$EXST)       ERROR                 ...                                                          
   ().                                                                   $$EXST = 4;                                                  
                                                                               EXIT;                                                        
   :                                                                                                                          
                                                                                         
   :                                                           $$FAIL,                  
                                                                         ,  WRAPUP()    .          
                                                                                                                                            
                                                                        :                                                     
            5.42.     "C"                                                                                                 
                                                                        :                                                          
                                                                                                                                            
                                                  -----------                                                                               
                                                  !  EXIT   !                                                                               
                                                  -----------                                                                               
                                                                                                                                            
     : EXIT.MAC                                                                                                      
                                                                                                                                            
   :                                                                                                                           
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 59 -                                                               - 60 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.43.                                            FFLUSH(IOP);                                                 
                                                                               FILE    *IOP;                                                
                                                                                                                                            
                                                  -----------           :                                                         
                                                  !  FEOF   !                                                                               
                                                  -----------                  MOV     #IOV,R4         ;R4-> /             
                                                                               CALL    $$FLSH          ;                 
     : FEOF.MAC                                                                                                      
                                                                            .                                
   :                                                                                                                           
                                                                               MOV     #BUFADR,R0      ;R0->                    
          FEOF (IOP);                                                          MOV     NBYTES,R1       ;R1:=                       
          FILE    *IOP;                                                        MOV     #IOV,R4         ;R4-> /             
                                                                               CALL    $$PUT           ;                 
   :                                                                                           ;                        
                                                                                                                                            
         1,     IOP                .                                
    , -0.                                                                                                                    
                                                                        :                                                           
   :                                                                                                                               
                                                                                   .             
                                                                          /.    -         
                                                                        ,  $$FERR.                                
            5.44.                                                                                                        
                                                                        :                                                         
                                                                                                                                            
                                                  -----------                $$FLSH        /         
                                                  !  FERR   !              .                                      
                                                  -----------                                                                               
                                                                             $$PUT     RSX             
     : FERR.MAC                                  . $$PUT     RSX. -         
                                                                             RT-11               
   :                                                            BPT.                    
                                                                                                                                            
          FERR (IOP);                                                   :                                                          
          FILE    *IOP;                                                                                                                     
                                                                                                                                            
   :                                                                                                                                
                                                                                 5.46.                                    
         1,      -                                                                              
   .                                                                                                                                      
                                                                                                                       -----------          
   :                                                                                                          !  FGET   !          
                                                                                                                       -----------          
                                                                                                                                            
                                                                          : FGET.MAC                                 
            5.45.                                                                                                       
                                                                        :                                                      
                                                                                                                                            
                                                  -----------                  FGET (BUFFER,MAXBYTES,IOP);                                  
                                                  ! FFLUSH  !                  CHAR    *BUFFER;                                             
                                                  -----------                  INT     MAXBYTES;                                            
                                                                               FILE    *IOP;                                                
     : FFLUSH.MAC                                                                                                    
                                                                        :                                                           
   :                                                                                                                           
                                                                                 . MAXBYTES -         
                                                                          ' .                                     
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 61 -                                                               - 62 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
         RT-11       FPUT().                    - ,   FGETS()             
                                                                                 ,   FGETSS()  GETS()    .         
         RSX                                             
   "U" ( ).                                                  FGETS(),  :                      
                                                                                                                                            
              .                   BUFFER[STRLEN(BUFFER)-1] = 0;                                
        FOEF().                                                                                      
                                                                                                                                            
   :                                                                                                                              
                                                                                 5.48.                  
         RT-11,      FPUT(),                                                                                
      .                                                                                    
    ,     . (                                                           -----------          
   ,  ,     ).                                                         !  FLUN   !          
                                                                                                                       -----------          
   :                                                                                                                               
                                                                          : FLUN.MAC                                 
                                                                                                                                            
                                                                        :                                                      
                                                                                                                                            
            5.47.                                           FLUN(IOP);                                                   
                                                                               FILE    *IOP;                                                
                                                                                                                                            
                                                  -----------           :                                                           
                                                  !  FGETS  !                                                                               
                                                  -----------                    -         
                                                                           ( RT-11   ).                  
     : FGETS.MAC                                                                                                     
                                                                        :                                                          
   :                                                                                                                           
                                                                                                                                            
          CHAR    *                                                                                                                         
          FGETS (BUFFER,MAXBYTES,IOP);                                           5.49.                             
          CHAR    *BUFFER;                                                                                                                  
          INT     MAXBYTES;                                                                                                                 
          FILE    *IOP;                                                                                                -----------          
                                                                                                                       !  FMKDL  !          
          CHAR    *                                                                                                    -----------          
          FGETSS (BUFFER,MAXBYTES,IOP);                                                                                                     
          CHAR    *BUFFER;                                                : FMKDL.MAC                                
          INT     MAXBYTES;                                                                                                                 
          FILE    *IOP;                                                 :                                                      
                                                                                                                                            
   :                                                                   FMKDL(IOP);                                                  
                                                                               FILE    *IOP;                                                
         FGETS()                                                                                       
   . MAXBYTES      -          :                                                           
   .       ,                                                                              
       0.                       FMKDL()              
   FGETS()    .             .   0    -         
        NULL.                              -1  .                                                
                                                                                                                                            
          FGETSS()    FGETS()                    RT-11                 
   ,      .  (  -          ,    .  $$FERR -         
      GETS(),                  "  ",     -         
    UNIX).                                                    (  ),   . -         
                                                                        ,  RT-11      -         
   :                                                               .                                                         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 63 -                                                               - 64 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.50.                                                         ;.                   
                                                                                       ; CRET$  $$FOPE                 
                                                                        MOV    IOV,R4  ;R4->IOV                                             
                                                  -----------           MOV    LUN,R3  ;R3:=LUN                                             
                                                  !  FOPEN  !           MOV    DBLK,R1 ;R1->    RADIX-50                  
                                                  -----------           JMP    $$FOPR  ;                
                                                                                       ;  RADIX-50   RT-11 -- -         
     : FOPEN.MAC                                                ;               
                                                                                       ;.               
   :                                                                      ; CRET$  $$FOPE.                             
                                                                        MOV    IOV,R4  ;R4->IOV                                             
          FILE    *                                                     CALL   $$FOPN  ;                    
          FOPEN (NAME,MODE);                                                           ;  $$FOPX  $$FOPE                  
          CHAR    *NAME;  /*   */                                       ; .  RSX                 
          CHAR    *MODE;  /*   */                                        ; ,                
                                                                        MOV    IOV,R4  ;R4->IOV                                             
          FILE    *                                                     CALL   $$FOPO  ; ,                   
          FREOPEN (NAME,MODE,IOP);                                                     ;  $$FOPX.  RSX,                       
          CHAR    *NAME;  /*   */                                       ;    $$FOPO            
          CHAR    *MODE;  /*   */                                        ;  "  " --                  
          FILE    *IOP;   /*  / */                                 ;   FOPEN()             
                                                                                       ; FNEXT().   ( RSX) R0->FCB           
   :                                                                         ;                
                                                                                       ; $$FOPE                                        
   MOV    IOV,R4  ;R4->IOV,  ANY,  R4:=0                       MOV    IOV,R4  ;R4->IOV,                                  
   CALL   $$FLUN  ;   LUN,                              JMP    $$FOPX  ;   FOPEN                           
                  ; FDB.                                               ; RSX, $$FOPX                   
                  ; : R4->IOV, R3:=LUN,                       MOV    IOV,R4  ;R4->IOV ( R4==0)                                 
                  ;R0  R1                                     MOV    CODE,R0 ;R0:=  ( $$FERR)                      
                  ;:                            JMP    $$FOPE  ;    FOPEN                            
                  ;  $$FOPE                                              ; $$FOPE                   
                  ;:   RSX LUN                                      ;    ,                  
                  ;  2,   RT-11                                           ;                      
                  ;-  0.                                                             ; .                                  
   MOV    IOV,R4  ;R4->IOV                                                                                                                  
   CALL   $$FOPT  ;C$PMTR+2(R5)=>                           :                                                           
                  ; :    FDB                                                                                          
                  ;R0 -                                               FOPEN()               
                  ;:                              :                                                 
                  ;  $$FOPE                                                                                                   
   MOV    IOV,R4  ;R4->IOV                                              R                                                                   
   CALL   $$FCSI  ;C$PMTR+0(R5)=>                                      -    ;               
                  ;                                                                                                   
                  ; FDB                                  W                                                                   
                  ;R0-R3                                               -                 
                  ;:                                     ;                                                   
                  ;  $$FOPE                                                                                                   
   MOV    SIZE,R0 ;                                    A                                                                   
   CALL   $$FALO  ;                                                 -   ;                                        
                  ; : R0->                                                                                              
                  ;  :                         N                                                                   
                  ;   $$FOPE                           -       ;                
   MOV    IOV,R4  ;R4->IOV                                                                                                                  
   MOV    LUN,R3  ;R3:=LUN                                              U                                                                   
   JMP    $$FOPA  ;  RT-11 (                      -  RSX:    ;             
                  ; ASCII). C$PMTR+0(R5)=>                        -  RT-11:  .TTYIN  .TTYOUT.               
                  ;   ASCII.                                                                                       
                  ;   CSI.                          -  "R", "W", "A".  -         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 65 -                                                               - 66 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
    "N"  "U"  .  "N"             FREOPEN()                
      .  "U"              FSEEK().                                     
      RSX  RT-11.                                                                                                       
                                                                                          
         RSX  "U" ,                RT-11,    "U",              
   /,   FGET() /  FPUT().                                    
   -   (,    FPRINTF)            .                                                              
   .                                                                                                                                 
                                                                              FREOPEN()     ,           
         RSX   "N"  "U"               IOP, ,  . ,             
    "__".     RSX/RSTS           IOP .  FREOPEN()            
     (  "N"  "U")              IOP.    ,  ,   IOP,         
    "".                                                    . ,    FOPEN()           
                                                                           FWILD/FNEXT.                              
         RSX,                                                                                       
   (F.RATT  FDB)  ,   ,             :                                                         
     "N". , ,     -                                                                              
     _/_,                          -         
       .  -              FOPEN/FWILD.              
     ,                ,                 
    _  .                                ,  FOPEN(),                 
                                                                        $$FERR   .                                
         RT-11,   FOPEN  ,                                                                                  
       ,                     $$FCSI       FDB                   
       /  (                     $$FOPT                             
   .TTYIN  .TTYOUT). , ,                      $$FLUN    LUN                             
         ,  -                 $$FALO     FOPEN                           
        JSW  "_".                 $$FOPA    RT-11     ASCII              
              ,                 $$FOPE      FOPEN                             
       ,                      $$FOPN   ,                       
   .                                                                 $$FOPR    RT-11     RADIX-50           
                                                                               $$FOPX     FOPEN                            
         FOPEN()    NULL -- -                 $$CSIB     CSI                                 
    $$FERR   .  RT-11   , -                 $$DFNB                              
     RSTS/E (  IOV),   RSX                                                                                  
    FCS.                                                               :    FOPEN()      RSX/RSTS         
                                                                                PPN         
         RT-11  ,   "IO_NAME"   IOV,          (UIC)  .   ( $$FCSI)    -         
      ,     FOPEN(),               RSTS/E.                       
      ASCII,   4- -                                                                              
        RADIX-50,                :                                                             
      FWILD/FNEXT.   -                                                                              
     RSTS/E      -                 -   RT-11     -         
        PPN,    -                    ,  65535 ;                             
      RT-11.                                                                                                                 
                                                                               - RT-11                  
        ,      "                         ,               
   " (IE.NBF  E$$NSP)    "                       RT-11/RSTS/E;                                  
   "  (IE.ILU    E$$NOC)                                                                                    
   FOPEN().  RT-11,                         -  FREOPEN()     -         
       ,  -                     STDERR, ..     /         
     E$$ILU.                                                                  STDERR.         
                                                                                 ,           ,         
                                      ;                                  
     ,    ,                                                                                  
      ,     -                 -  RSX ,   ,           
           FTELL()/FSEEK().                        ,             
    ,     REWIND()                                       
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 67 -                                                               - 68 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            (FSRSZ$),                        5.52.   ,                
             FOPEN.MAC.      -                                                                      
             FSRSZ$  8.    -                                                                              
                  4  .                                                                                  
             ( )   -                                                         -----------          
                 (RSX.MAC)                                                           !  FREC   !          
              N$$FIL;                                                                            -----------          
                                                                                                                                            
          -      .              : FREC.MAC                                 
            RSX,          ,                                                                              
                             :                                                      
             .                                                                                                              
                                                                               FREC (IOP);                                                  
                                                                               FILE    *IOP;                                                
                                                                                                                                            
                                                                        :                                                           
            5.51.                                                                                                        
                                                                                1,             
                                                                         . :    ,          
                                                  -----------            ,                   
                                                  !  FPUT   !             .  ,          
                                                  -----------                  ,  ,         
                                                                        .                                                             
     : FPUT.MAC                                                                                                      
                                                                        :                                                          
   :                                                                                                                           
                                                                                                                                            
          FPUT (BUFFER,NBYTES,IOP);                                                                                                         
          CHAR    *BUFFER;                                                       5.53.                       
          INT     NBYTES;                                                                                                                   
          FILE    *IOP;                                                                                                                     
                                                                                                                       -----------          
   :                                                                                                           !  FSEEK  !          
                                                                                                                       -----------          
            .    -                                                                              
        "N",                  : FSEEK.MAC                                
      .                                                                                                                    
                                                                        :                                                      
         RT-11      FGET().                                                                                    
                                                                        FSEEK (IOP,OFFSET,PARAM);                                           
            NBYTES.                      FILE   *IOP;   /*          */              
                                                                        LONG   OFFSET; /*                 */              
               FPUT()            INT    PARAM;  /* 0    */              
    FERR().                                                                                                                          
                                                                        :                                                           
   :                                                                                                                                  
                                                                              FSEEK()   /           
          -  RT-11                     .                 
            .       "            FTELL().  PARAM      0.         
            "  FGET(),                  /   .                        
            "_+1".                                                                                                            
                                                                              FSEEK()  ,    -         
                                                                         ,  EOF,   .            
                                                                          ,  EOF  ERR .                  
                                                                                                                                            
                                                                               FLSEEK()                 
                                                                           .                               
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 69 -                                                               - 70 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   :                                                                    .                                                     
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.54.                                5.55.      -              
                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                  -----------                                                          -----------          
                                                  !  FSPOOL !                                                          !  FTELL  !          
                                                  -----------                                                          -----------          
                                                                                                                                            
     : FSPOOL.MAC                                  : FTELL.MAC                                
                                                                                                                                            
   :                                                       :                                                      
                                                                                                                                            
          FSPOOL (FP);                                                         LONG                                                         
          FILE    *FP;    /*IOV   */                             FTELL (IOP);                                                 
                                                                               FILE    *IOP;   /*   */             
   :                                                                                                                                
                                                                        :                                                           
                                                                                                
   FCLOSE(),                              FTELL()                    
       .     -          /  .     -         
            -                             
   .                                                                  FSEEK().  ,                   
                                                                        ,       .    RSX           
         FSPOOL()  0,     -                  FTELL().         
       ,     -          ( RT-11  FLUSH()  ).                       
   -  .                                                                                      
   RT-11                                      
   " " (E$$NOD=6).                                     :                                                     
                                                                                                                                            
                                POSITION = FTELL(FD)                                         
   ,       -                 IF (FGETS(BUFFER,SIZEOFBUFER,FD) != EOF) [                   
   ,   RSX-11M, ,     -                         /*                                                   
   ,    SPWN()  -                          * "POSITION"   ,             
     RSX      MCR.                                   *   FGETS()                       
                                                                                        */                                                  
                                ]                                                            
       RSTS/E,                                                                                  
                     :                                                             
   RSTS/E      UU.SPL.                                                                                   
                                                                               -  RSX     -         
         RSTS/E V7.0                            , ..     -         
     ( RSX)   LP0:     RT-11.                   .   RT-11  / (           
        ,   -                   )                  
       FSPOOL().                                   .                 
                                                                                   , ..     -         
                FWILD()                       FSEEK().                                          
   FNEXT(),    ,   -                                                                              
      FNEXT()     -                                                                              
   .                                                                                                                                      
                                                                                                                                            
   :                                                                                                                                  
                                                                                                                                            
          -  RSTS/E   RT-11       -                                                                              
                   -                                                                              
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 71 -                                                               - 72 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.56.                                         VMS  FWILD/FNEXT          
                                                                            RSX (           
                                                                          ODS2).     RSX-11M,           
                                                  -----------                 FILES-11  (ODS1),           
                                                  !  FTTY   !           FWILD/FNEXT     . -         
                                                  -----------           ,      "FOO.*;3",  "FOO.*;*",         
                                                                        "FOO.*;0"  "FOO.*;-1".              
     : FTTY.MAC                                  "FOO.*"  "FOO.*;0". ,    0         
                                                                         "" ,     -1  -         
   :                                                        "". (        -         
                                                                          RT-11  RSTS/E.)                                   
          FTTY(IOP)                                                                                                                         
          FILE  *IOP;                                                            RSX-11  (               
                                                                        FILES-11)                 
   :                                                               .      0    -1         
                                                                                -         
         1,                   SRD.       (..         
   .   ,                        ).           
    .                                                  FNEXT()    .                 
                                                                                                                                            
   :                                                                 RT-11                 
                                                                                                 
                                                                        FWILD/FNEXT.               
                                                                          ,      "*"           
            5.57.                           "%",                 
                                                                              -         
                                                                        .    "?"               
                                                  -----------           "%"   .                                            
                                                  !  FWILD  !                                                                               
                                                  -----------                :                       
                                                                        FCLOSE(U),         .           
     : FWILD.MAC                                  ,   -         
                                                                          FWILD/FNEXT:                                        
   :                                                                                                                           
                                                                               IF (GETS(_)==NULL)                                 
  FILE *                                                                          EXIT();                                                   
  FWILD (NAME, MODE);                                                          IF ((FD=FWILD(_,"R"))==NULL)                       
  CHAR *NAME   /*   */                                             ERROR("   %S\N", _);               
  CHAR *MODE   /*   */                                           FOR (COUNT=0; FNEXT(FD)!=NULL; COUNT++)[                     
  FILE *                                                                          /*                                                        
  FNEXT (IOP);                                                                     *                                   
  FILE *IOP;   /*  / */                                        */                                                       
                                                                                  WHILE (FGETS(, SIZEOF , FD)                     
   :                                                                               !=NULL)[                                         
                                                                                       /*                                                   
         FWILD()                                *                              
   (       -                          */                                                  
   ).                              ]                                                         
   FOPEN().  ,    ,                   ]                                                            
       .  NULL ,   -                 /*                                                           
       .                                    *   FNEXT()  ;  .            
                                                                                *  COUNT                 
         FNEXT()      -                  *                                                     
   ,                            */                                                          
   FWILD().   FNEXT()  NULL,   -                 IF (COUNT==0)                                                
   ,   () ,    -                    ERROR ("   ");               
     .                                                                                                              
                                                                                     ,         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 73 -                                                               - 74 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
         "C":                 IF ((FD=FWILD(FILE, "R"))==NULL)                             
                                                                                   ERROR ("    %S\N", FILE);               
   RSX-11M                                                                     IF ((FD --> IO_FLAG & IO_VER)!=0                             
          - "*"    ,                              && ___)                          
            .  ;0  ;-1                         FD --> IO_FLAG\=IO_VM1;                                  
             ODS2.  "UIC"                                                                                     
             ;                                                -    RT-11      RT-11         
                                                                                  RSTS/E    FWILD/FNEXT           
   RSX/VMS                                                                       ,                  
          -   ,  ,      ;-1                      (,                 
            " "  .                          ).     ,         
             .                            ,   :                     
                .                                                                                
             VMS    ODS2;                   IF ((FD=FWILD( , ))!=NULL)                     
                                                                                    ISWILD=1;                                               
   RSX/RSTS                                                                     ELSE IF ((FD=FOPEN( , ))!=NULL)                
          -   RSTS/E    -                      ISWILD=0;                                               
             : "*"       -                  ELSE ERROR ("   ");                        
            .  "?"   .    "PPN"                                                                                
               .                    -                
              RSTS/E.                                             ISWILD                 
                                                                                  FNEXT()        -         
   RT-11                                                                          ;                                   
          -  "*"   ,  "%"                                                                                 
            "?"   ,   .                   -    RSTS/E    ,  -         
                                                                                           ..         
   RT11/RSTS                                                                          -         
          -     RSTS/E                     . ..              
              .                                         ,      -         
                                                                                  ,  ,   -         
   :                                                                        ,    " " -         
                                                                                 .                  
          -    RSX-11M,   -                   RSTS/E;                                                    
               ODS1  (FILES-11),                                                                                  
             ,                      -   FWILD/FNEXT               
             (,                         .               
            SRD).                                     -         
            FWILD()      ;0   ;-1,                    ,   .                    
                 ;                                                                                  
                                                                        :                                                         
          -    (CSI1$)                                                                                 
             VMS      -1  (-                 -         RSTS/E,             
                      VMS)                       RSX (       VMS),         
              FWILD()    -                       RT-11,   -         
            ;                                                                    FWILD.MAC   -         
                                                                                   ;                                      
          -      ,   FWILD                                                                              
                                      -       -         
            "FOO.*"  "FOO.*;0", ,                          RSTS/E                 
            FNEXT()   ,     -                    RSX  RSTS/E.     -         
                    IOV,                           RSTS/E;                   
            .                                                                                                                           
                                                                               -     '  ;                
     IO_VER  " 0  -1",                                                                                 
   IO_VM1     -1.  , ,                  -    "C"           
           FNEXT();                          SRD         
                                                                                 ( ).                                     
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 75 -                                                               - 76 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.58.                                          ,        .    GETS()         
                                                                             NULL             
                                                                        .                                                              
                                                  -----------                                                                               
                                                  ! GETCHAR !           : .                                                        
                                                  -----------                                                                               
                                                                                                                                            
     : GETCHA.MAC                                                                                                    
                                                                                 5.60.                      
   :                                                                                                                           
                                                                                                                                            
          GETCHAR ();                                                                                                  -----------          
                                                                                                                       ! GETTTY  !          
          GETC (IOP);                                                                                                  -----------          
          FILE *IOP;                                                                                                                        
                                                                          : GETTTY.MAC                               
   :                                                                                                                                
                                                                        :                                                      
         GETCHAR()                                                                                       
    .  GETC()      -                 GETTTY (BUFFER);                                             
     .                                                        CHAR *BUFFER;                                                
                                                                                                                                            
          EOF     .                  :                 
                                                                        .      ,             
               EOF,              .                                                             
   :                                                                                                                               
                                                                        :                                                             
          IOP -> IO_FLAG &= ^(IO_ERR \ IO_EOF);                                                                                             
                                                                               -   RSX.  GETTTY           
   :                                                                        GLUN$                 
                                                                                     STDERR (   -         
          -  "   EOF"  -                      ).                           
              RT11/RSTS     .                                                                                  
              VMS      (                 -   RT-11.  GETTTY()           
                 EOF).   -                   IOVTOA()      ,             
               .                                              STDERR.                  
                                                                                    .                     
                                                                                                                                            
                                                                                                                                            
            5.59.    STDIN                                                                                                 
                                                                                 5.61.                            
                                                                                                                                            
                                                  -----------                                                                               
                                                  !  GETS   !                                                          -----------          
                                                  -----------                                                          !  GETW   !          
                                                                                                                       -----------          
     : GETS.MAC                                                                                                      
                                                                          : GETW.MAC                                 
   :                                                                                                                           
                                                                        :                                                      
          CHAR *                                                                                                                            
          GETS (BUFFER);                                                       GETW (IOP);                                                  
          CHAR *BUFFER;                                                        FILE *IOP;                                                   
                                                                                                                                            
   :                                                            :                                                           
                                                                                                                                            
         GETS()                        GETW()     (16-)             
     (STDIN).      -           .      -         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 77 -                                                               - 78 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
        FERR()  FEOF().                  #DEFINE IO_VM1 0000010 /*  ;-1 */                             
                                                                        #DEFINE IO_WLD 0000004 /*   */                     
   : .                                                         #DEFINE IO_MOD 0000003 /*   : */                 
                                                                                               /*  = 0 */                             
                                                                                               /*  = 1 */                             
                                                                                               /*  = 2 */                         
            5.62.   /                                             /*   =  */                        
                                                                                                                                            
                                                                         #DEFINE IO_EOR (IO_ERR \ IO_EOF)                                   
                                                  -----------                                                                               
                                                  !  IOV    !            EXTERN INT  $$FERR     /*   */                          
                                                  -----------            EXTERN FILE *STDIN     /*                        
                                                                                          */                                            
     : IOV.MAC                                    EXTERN FILE *STDOUT    /*                       
                                                                                                          */                            
   :                                                        EXTERN FILE *STDERR    /*                           
                                                                                                          */                     
   RSX:                                                                                                                               
     TYPEDEF STRUCT IOV [                                              :                                                          
          INT IO_FLAG;    /*   */                                                                                           
          INT IO_UGET;    /*     UNGET */                 EXTERN FILE *$$LUNS[]; /*                         
          INT IO_BCNT;    /*    */                                IOV */                                             
          CHAR *IO_BPTR;  /*    */              EXTERN FILE *$$LUNE;   /*                              
          CHAR *IO_RBUF;  /*    */                                      */                                      
          INT IO_RBSZ;    /* '   */                      EXTERN (INT)(HCAR *$$LMAX); /*  RSX                     
          CHAR *IO_BBUF;  /*    */                                                           $$LUNS */                     
          CHAR *IO_WILD;  /*     */             EXTERN CHAR **$$IFIL;  /* ->   STDIN */                    
          INT IO_UIC;     /*  UIC (PPN) */                       EXTERN CHAR **$$OFIL;  /* ->   STDOUT */                   
          INT IO_IOSB[2]; /*   / */              EXTERN INT  *$$EIOV;   /* RSX:  LUN' */                     
          INT IO_FDB[0];  /*    */                               FILE *$$EIOV;   /* RSX: IOV  STERR */                    
      ] FILE;                                                                                                                               
                                                                        :                                                           
   RT-11:                                                                                                                             
      TYPEDEF STRUCT IOV [                                                      / -         
          INT IO_FLAG;    /*   */                           "C"  . -         
          INT IO_UGET;    /*     UNGET */                ,           RSX           
          CHAR *IO_NAME;  /*    */                   RT-11.  ,     IO_FLAG  -         
          CHAR *IO_WILD;  /*    */                  /.                    
          INT IO_LUN;     /*   RT-11 */                                                                                          
          INT IO_BCNT;    /*    */                                                                                   
          CHAR *IO_BPTR;  /*    */                  IOV  RSX                  
          INT IO_BNBR;    /*     */                    (FDB). "IO_UIC" ,  ,    UIC  ,         
          CHAR *IO_BBUF[512]; /*   */                              ,     UIC  "-         
      ] FILE;                                                           ".   UIC,                  
                                                                        IOVTOA().                                                           
    IOV.IO_FLAG:                                                                                                                    
   #DEFINE IO_OPN 0010000 /*   */                                IOV  RT-11   , -         
   #DEFINE IO_REC 0004000 /*    */                        ,                 
   #DEFINE IO_TTY 0020000 /*   */                      ASCII   ,     ASCII  -         
   #DEFINE IO_EOF 0010000 /*    */                     ( FOPEN()).                
   #DEFINE IO_ERR 0004000 /*   */                        IOVTOA()      .         
   #DEFINE IO_FIL 0002000 /*    */                                                                                               
   #DEFINE IO_$$$ 0001000 /*   */                           :                              
   #DEFINE IO_NOS 0000400 /*      */                                                                                 
   #DEFINE IO_UBF 0000200 /*   */                       STDIN     ;                            
   #DEFINE IO_BZY 0000100 /*     */                        STDOUT    ;                           
   #DEFINE IO_WF1 0000040 /* " " FWILD */                          STDERR   . :  RSX               
   #DEFINE IO_VER 0000020 /*     */                           STDERR     1.           
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 79 -                                                               - 80 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
             $$FERR  (  ).            IO_BPTR                                                             
      ,                      -       ;           
   /  .     RSX                                                                              
       /.   RT-11          IO_BNBR                                                             
           -                 -       -         
     RSTS/E:                                                       .     -         
                                                                                  ,     -         
                                                           .                                                
                                                                                                                                            
    E$$ILE     02. 002      ;                           : .                                                        
    E$$NOR     04. 004                                                                                             
                         ;                                                                                                        
    E$$FNF     05. 005        ;                                                                                    
    E$$NOD     06. 006     ;                               5.63.     ASCII                   
    E$$ILU     07. 007     /  ;                                                                                     
    E$$NOO     09. 011     /  ;                                                                                     
    E$$EOF     11. 013       ;                                                                   -----------          
    E$$FAT     12. 014                                                                          !  IOVTOA !          
                          /;                                                                                -----------          
    E$$ERR     13. 015                                                                                            
                          ;                                     : IOVTOA.MAC                               
    E$$FND     16. 020       ();                                                                                        
    E$$NOC     17. 021                      :                                                      
                          ;                                                                                                       
    E$$NSP     32. 040        ;                        CHAR *                                                       
                                                                               IOVTOA (IOP, BUFFER);                                        
          12.      -                 FILE *IOP;                                                   
     .                        CHAR *BUFFER;                                                
     RT-11,                                                                                    
     (             :                                                           
     /).                                                                                                               
                                                                                 ASCII     .          
          7 ,     FOPEN()                                                                              
     ,   .                          RSX-11M (    RSTS/E)   ASCII  -         
                                                                          ,     . UIC  -         
   :                                                          ,       UIC   .         
                                                                        (,   VMS     UIC    -         
         RSX                .)                                                               
      RSX (FSC).   -                                                                              
      (    -,                  RT-11    ,               
      ).                                     FOPEN()     -  .           
                                                                              FWILD/FNEXT, -         
         RT-11                  . ( RSTS/E            
   "C",  $$PUTS, $$FLSH, $$GETC  $$GET.   -          PPN.)                                                               
         :                                                                              
                                                                              IOVTOA()    ,  -         
          -  IO_BPTR  ,      .           .                                                       
            IO_BCNT    ,   -                                                                              
              ($$GET)                  :                                                             
               ,                                                                                          
            /.      -                 -        -         
            :                                                              .                                                     
                                                                                                                                            
   IO_BCNT                                                                                                                                  
          -   ,                                                                                  
                                                                                                      
            ;                                                                                                                          
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 81 -                                                               - 82 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.64. ,   -                                 ISLOWER (C);                                                 
                                                                               INT C;                                                       
                                                                                                                                            
                                                  -----------           :                                                           
                                                  ! ISALPHA !                                                                               
                                                  -----------            1,  "C"    , 0         
                                                                          .                                                 
     : ISALPH.MAC                                                                                                    
                                                                        : .                                                        
   :                                                                                                                           
                                                                                                                                            
          ISALPHA (C);                                                                                                                      
          INT C;                                                                 5.67. ,   -                   
                                                                                                                                            
   :                                                                                                                                
                                                                                                                       -----------          
         1,  "C"  , 0   -                                                         ! ISUPPER !          
    .                                                                                                         -----------          
                                                                                                                                            
   : .                                                           : ISUPPE.MAC                               
                                                                                                                                            
                                                                        :                                                      
                                                                                                                                            
            5.65. ,   -                                 ISUPPER (C);                                                 
                                                                               INT C;                                                       
                                                                                                                                            
                                                  -----------           :                                                           
                                                  ! ISDIGIT !                                                                               
                                                  -----------                 1,  "C"               
                                                                        , 0   .                                       
     : ISDIGI.MAC                                                                                                    
                                                                        : .                                                        
   :                                                                                                                           
                                                                                                                                            
          ISDIGIT (C);                                                                                                                      
          INT C;                                                                 5.68.    ASCII                        
                                                                                                                                            
   :                                                                                                                                
                                                                                                                       -----------          
         1,  "C"     ASCII,                                                         !  ITOA   !          
   0   .                                                                                               -----------          
                                                                                                                                            
   : .                                                           : ITOA.MAC                                 
                                                                                                                                            
                                                                        :                                                      
                                                                                                                                            
            5.66. ,   -                            CHAR *                                                       
                                                                               ITOA (VALUE, STRING);                                        
                                                                               INT VALUE;                                                   
                                                  -----------                  CHAR *STRING;                                                
                                                  ! ISLOWER !                                                                               
                                                  -----------           :                                                           
                                                                                                                                            
     : ISLOWE.MAC                                      ITOA()   "VALUE"  -         
                                                                          ( ).    .           
   :                                                       ITOA()     .                    
                                                                                                                                            
                                                                             ,      ( -         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 83 -                                                               - 84 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   )       SPRINTF  (BUFFER,          :                                                           
   "%D", VALUE);                                                                                                                            
                                                                                   ASCII.           
   : .                                                          .   10  15 () -         
                                                                           "A"  "F".  ITOAX()          
                                                                           .                                      
                                                                                                                                            
            5.69.                           ,                 
                  ASCII                                                      SPRINF (BUFFER,  "%X",         
                                                                        VALUE);                                                             
                                                                                                                                            
                                                  -----------           : .                                                        
                                                  !  ITOA8  !                                                                               
                                                  -----------                                                                               
                                                                                                                                            
     : ITOA8.MAC                                          5.71.                          
                                                                                                                                            
   :                                                                                                                           
                                                                                                                       -----------          
          CHAR *                                                                                                       !  MALLOC !          
          ITOA8 (VALUE, STRING);                                                                                       -----------          
          INT VALUE;                                                                                                                        
          CHAR *BUFFER;                                                   : MALLOC.MAC                               
                                                                                                                                            
   :                                                            :                                                       
                                                                                                                                            
              -                 CHAR *                                                       
     .                          MALLOC (SIZE);      /* NULL,    */               
   .                                                                     UNSIGNED SIZE;      /*   */                         
                                                                                                                                            
        ,                          MFREE (P);                                                   
     (  )    SPRINTF  (BUFFER,  "%0",                 FREE (P);                                                    
   VALUE);                                                                     CHAR *P;            /*   */                      
                                                                                                                                            
   :                                                              :                                                         
                                                                                                                                            
          -      .                   MOV  SIZE, R0       ;                         
            , :                                           CALL $$ALOC         ; MALLOC()                        
                SPRINTF (BUFFER, "%060", VALUE);                                                                                            
                                                                               : R0 -->  ( 0),                  
                                                                                         .                                 
                                                                                                                                            
            5.70.    -                      MOV  POINTER, R0    ;                         
                   ASCII                                                    CALL $$FREE         ; FREE()                          
                                                                                                                                            
                                                                               : R0 ,   .             
                                                  -----------                  $$LINK()            /*    */           
                                                  !  ITOAX  !                                                                               
                                                  -----------                  :                                 
                                                                                                                                            
     : ITOAX.MAC                                 :                                                           
                                                                                                                                            
   :                                                             MALLOC()    ,  -         
                                                                             .              
          CHAR *                                                           ,   MALLOC()           
          ITOAX (VALUE, BUFFER);                                        NULL.     .                
          INT VALUE;                                                                                                                        
          CHAR *BUFFER;                                                       FREE()  MFREE()              
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 85 -                                                               - 86 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   .    .                             MOV  #START,-(SP)      ;  ( )              
                                                                          CALL MEMDMP            ;                          
            REALLOC()  SBREAK().                                                                                 
                                                                          MOV  #START,R0         ;                               
   :                                                            MOV  #END,R1           ;                            
                                                                          CALL $$DUMP            ;                          
                ,            MOV  VALUE,R0          ;                        
         ,              MOV  #BUFFER,R1        ;                            
   .      :             CALL $$TOCT            ;                            
           ___ + _                                                                                      
                                                                          :                                                          
                                   R0                                              
   .      .  "_"                  R1        ->                      
   ,      .                      R2-R5                                           
                                                                                                                                            
        ,      -  -          :                                                           
   .   '                                                                                      
    .                                                              /  .           
                                                                         .                                                
         $$LINK()     -                                                                              
       STDERR.                        MEMDMP()             
    MALLOC()    .  ,            ,   .                             
     .                                                 ,                  
                                                                        / "C".                                                   
   :                                                                                                                             
                                                                        :                                                             
             ,    -                                                                              
    FREE()   ,     -                 -    ;                               
         ,                                                                                
    MALLOC(). ,     -                 -  RSX,   ,              
         .                                      1.                            
                                                                                                                                            
   : .                                                                                                                             
                                                                                                                                            
                                                                                 5.73.                     
                                                                                                                                            
            5.72.                                                                                             
                                                                                                              -----------          
                                                                                                                       !  MSG    !          
                                                                                                                       -----------          
                                                  -----------                                                                               
                                                  !  MEMDMP !             : MSG.MAC                                  
                                                  -----------                                                                               
                                                                        :                                                      
     : MEMDMP.MAC                                                                                                    
                                                                               MSG  (TEXT)                                                  
   :                                                              CHAR *TEXT;                                                  
                                                                                                                                            
     MEMDMP (START, END);  /*    */           :                                                          
     CHAR   *START;        /*   */                                                                                     
     CHAR   *END;          /*   */                     MOV  #TEXT, R0                                               
     REGDMP()              /*   */                          CALL $$MSG                                                   
                                                                                                                                            
  :                                                           :                                                           
                                                                                                                                            
     CALL REGDMP            ;                                   .           
                                                                            .   -         
     MOV  #END,-(SP)        ;  ( )               :   .                                      
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 87 -                                                               - 88 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   :                                                              : .                                                        
                                                                                                                                            
          -  RSX   ,                                                                                    
                1.                                                                                                 
                                                                                 5.76.                        
                                                                                                                                            
                                                                                                                                            
            5.74.  LONG * LONG                                                                                -----------          
                                                                                                                       !  PRINTF !          
                                                                                                                       -----------          
                                                  -----------                                                                               
                                                  !  MUL$L  !             : PRINTF.MAC                               
                                                  -----------                                                                               
                                                                        :                                                      
     : MULL.MAC                                                                                                      
                                                                               PRINT   (FORMAT, ARG1, ... );                                
   :                                                              CHAR    *FORMAT;                                             
                                                                                                                                            
          LONG                                                                 FPRINTF (IOV, FORMAT, ARG1, ... );                           
          MUL$L (A, B);  /* LONG = LONG * LONG */                              FILE    *IOV;                                                
          LONG  A;                                                             CHAR    *FORMAT;                                             
          LONG  B;                                                                                                                          
                                                                               SPRINTF (BUFFER, FORMAT, ARG1, ... );                        
          MUL$LI (A, B); /* LONG = LONG * INT */                               CHAR    *BUFFER;                                             
          LONG  A;                                                             CHAR    *BUFFER;                                             
          INT   B;                                                                                                                          
                                                                        :                                                           
   :                                                                                                                                 
                                                                              PRINTF() ,              
            .  -                  ,           
      "C"    -              PUTCHAR().  FPRINTF()  -         
     .                                                      .   SPRINTF()         
                                                                              .             
   : .                                                                                                                             
                                                                                    ,           
                                                                           ':  ,             
                                                                           ,   ,         
            5.75.     RSTS/E                                      -         
                                                                             PRINTF().                      
                                                                                                                                            
                                                  -----------                     "%"         
                                                  !  PEEK   !              .   :                                 
                                                  -----------                                                                               
                                                                               -    "-",             
     : PEEK.MAC                                                           
                                                                                  ;                                            
   :                                                                                                                           
                                                                               -   ,  -         
          PEEK (LOCATION)                                                         ;     -         
          INT  *LOCATION;                                                         ,   ,    -         
                                                                                     (  ,               
   :                                                                        )     ;         
                                                                                      "*"   "?",         
             RSTS/E.                                        . (:           
                                                                                 "?"  .);                                 
                                                                                            
   BPT,      RSTS/E.                                       -     ".",             
                                                                                      ;                  
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 89 -                                                               - 90 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
          -    (),                      . :                             
              ,    -                                                                              
             ,   "F"    "E",                   BUG (ARGS)                                                   
                .                   [                                                            
               "*"  "?",  -                     ERROR ("ERROR AT %R", &ARGS);                            
             ;                                                   ]                                                            
                                                                                                                                            
          - ,      -                :                 
            .                                                                                                                            
                                                                               BUG ("ERROR %D AT %S\N", VAL, NAME);                         
        :                                                                                          
                                                                        S                                                                   
   D                                                                           -      (         
          -   ;                                                 )         ,         
                                                                                           -         
   U                                                                             ,      ;           
          -  ;                                                 0      ,         
                                                                                      .                       
   O                                                                                                                                        
          - ;                                                       "%"    -         
                                                                        ,    .  ..    "%"             
   X                                                                        "%%".              
          - , 10-15   A-F.                  ;  -         
                                                                          ,       -         
    ,     ,             . ,     PRINTF(),         
      .                PUTCHAR().                            
            "L",                                                                              
    ""   .  ,              :                                                             
   UNIX                                                                                      
   ;                                                             -  "E", "F"  "G"   ;             
                                                                                                                                            
   F                                                                           - %R    .                              
          -                                                                                    
             "[-]DDD.DD",    "D"  -                                                                              
               ,     -                                                                              
            .    ,    6  .                   5.77.                            
               0,       -                                                                              
               ;                                                                                                     
                                                                                                                       -----------          
   E                                                                                                                   !  PROFIL !          
          -                                                                 -----------          
               "[-]D.DDDE+-DD",  -                                                                              
                 ,    -            : PROFIL.MAC                               
                   ,                                                                                  
            ;    ,    6          :                                                      
            ;                                                                                                                           
                                                                               $$PROF ();                                                   
   G                                                                                                                                        
          -        ;                        EXTERN INT $$PRNL;                                           
                                                                                                                                            
   C                                                                           EXTERN CHAR *$$PFIL;                                         
          -  -. (,  "LC"  -                                                                              
                .)                        :                                                           
                                                                                                                                            
   R                                                                          $$PROF()      ,         
          - "  ".                       -         
            PRINTF()  .  ,                .                                                          
             .                                                                                 
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 91 -                                                               - 92 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
               "PROFIL.OUT".          : .                                                        
       $$PFIL.                                                                                             
                                                                                                                                            
          $$PRNL                                                                                   
     ,      .                   5.79.                                    
       4   .    $$PRNL                                                                              
    N,   N   ,  -                                                                              
     () . :                                                                        -----------          
                                                                                                                       !  PUTS   !          
          $$PRNL=0;                                                                                                    -----------          
                                                                                                                                            
        .                           : PUTS.MAC                                 
                                                                                                                                            
          ,    -          :                                                      
    :                                                                                                                                
                                                                               PUTS (S);                                                    
          EXTERN CHAR *$$PFIL;                                                 CHAR  *S;                                                    
          . . .                                                                                                                             
          $$PFIL:="TI:";                                                       FPUTS (S, IOP);                                              
                                                                               CHAR  *S;                                                    
          "%8S                 FILE  *IOP;                                                  
   %6U".            ,                                                                              
        .                            FPUTSS (S, IOP);                                             
                                                                               CHAR  *S;                                                    
        ,         -                 FILE  *IOP;                                                  
                                                                                         
         .                          :                                                           
                                                                                                                                            
   : .                                                               PUTS()      -         
                                                                         .   ,   ,             
                                                                         .                                                       
                                                                                                                                            
                                                                              FPUTS()        .         
            5.78.                                       .                                   
                                                                                                                                            
                                                                              FPUTSS()       .         
                                                  -----------              .                                      
                                                  !  PUTC   !                                                                               
                                                  -----------           : .                                                        
                                                                                                                                            
     : PUTCHA.MAC                                                                                                    
                                                                                                                                            
   :                                                                5.80.                             
                                                                                                                                            
          PUTCHAR (C);                                                                                                                      
          CHAR    C;                                                                                                   -----------          
                                                                                                                       !  PUTW   !          
          PUTC    (C, IOP);                                                                                            -----------          
          CHAR    C;                                                                                                                        
          FILE    *IOP;                                                   : PUTW.MAC                                 
                                                                                                                                            
   :                                                            :                                                      
                                                                                                                                            
         PUTCHAR()                        PUTW (WORD, IOP);                                            
    .  PUTC()       -                 INT  WORD;                                                   
     .                                                       FILE *IOP;                                                   
                                                                                                                                            
          , EOF   .          :                                                           
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 93 -                                                               - 94 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
         PUTW()      .                 SEED = (69069 * SEED + 1);                                   
     EOF    0                      TEMP = (SEED >> 8) & 32767;                                  
   .                                                                   RETURN ((MAX == 0)? TEMP : TEMP % MAX);                      
                                                                                                                                            
   : .                                                                    MTH$RANDOM             
                                                                              VMS.              
                                                                        RAND()   ,   -         
                                                                         .                                                     
            5.81.  RADIX-50  ASCII                                                                                           
                                                                             ,      -         
                                                                         ,                
                                                  -----------            .                                              
                                                  !  R50TOA !                                                                               
                                                  -----------           : .                                                        
                                                                                                                                            
     : R50TOA.MAC                                                                                                    
                                                                                                                                            
   :                                                                                                                           
                                                                                 5.83.                                
          R50TOA (BUFF, R5VEC, R5CNT);                                                                                                      
          CHAR *BUFF;  /*    */                                                                                       
          INT  *R5VEC; /*   RADIX-50 */                                                                    ***********          
          INT  R5CNT;  /*   RADIX-50 */                                                                       * REALLOC *          
                                                                                                                       ***********          
   :                                                                                                                                
                                                                          : REALLO.MAC                               
         R5CNT     RADIX-50                                                                                 
   ASCII.     .             :                                                      
       :  ,                                                                                  
   ,  .                                             CHAR *                                                              
                                                                        REALLOC(BUFF, SIZE);                                                
   : .                                                         CHAR            *BUFF;  /*   MALLOC() */                  
                                                                        UNSIGNED        SIZE;   /*    BUFF*/                  
                                                                                                                                            
                                                                        :                                                           
            5.82.                                                                                                    
                                                                             REALLOC()   ,             
                                                                        BUFF,     (  ).         
                                                  -----------                  -         
                                                  !  RAND   !                .                                    
                                                  -----------                                                                               
                                                                             REALLOC()  ,  BUFF   ,         
     : RAND.MAC                                        MALLOC(),  REALLOC()         
                                                                          CALLOC().                 
   :                                                       FREE(), MALLOC()  REALLOC()    -         
                                                                            MALLOC()    .             
          RAND (MAX)                                                                                                                        
          INT  MAX;                                                             MALLOC(), CALLOC()  SBREAK().         
          EXTERN LONG SEED; /*    */                                                                                 
                                                                        :                                                        
   :                                                                                                                                
                                                                               ,  BUFF   -         
           .    MAX             ,    MALLOC()  CALLOC().            
   ,     0..32767.   MAX                                                                                
    ,   MOD(NUMBER,MAX).                   : .                                                        
                                                                                                                                            
   :                                                                                                                                
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 95 -                                                               - 96 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.84.                               .   -         
                                                                     GTIM$   RSX11-M.                             
                                                                                                                                            
                                                                        : .                                                        
                                                   **********                                                                               
                                                   * REWIND *                                                                               
                                                   **********                                                                               
                                                                                 5.86.                              
     : REWIND.MAC                                                                                                    
                                                                                                                                            
   :                                                                                                       **********          
                                                                                                                        * SALLOC *          
   REWIND(IOP);                                                                                                         **********          
   FILE            *IOP;                                                                                                                    
                                                                          : SALLOC.MAC                               
   :                                                                                                                                
                                                                        :                                                      
            .  -1,                                                                               
   ,    - 0.                                      CHAR *                                                              
                                                                        SALLOC(N);              /*   NULL   */                  
         RT11,      ,   -                                                                              
        .                            :                                                           
                                                                                                                                            
   :                                                                               
                                                                        ,          .         
           RT11                                     
   ,       .              ,  SALLOC().                                        
       FOPEN(),   ,                                                                               
        .                             ,  ,               
                                                                           .                                         
   : .                                                                                                                             
                                                                              SALLOC()  NULL,    -         
                                                                            ,             
                                                                          1000 .                                      
            5.85.                                                                                                 
                                                                        :                                                        
                                                                                                                                            
                                                    *********                : .                                                   
                                                    * RTIME *                                                                               
                                                    *********                                                                               
                                                                                                                                            
     : RTIME.MAC                                          5.87.                     
                                                                                                                                            
   :                                                                                                                           
                                                                                                                        **********          
   RTIME(BUFFER);                                                                                                       * SBREAK *          
   STRUCT TIME [                                                                                                        **********          
           INT     YEAR;   /* G.TIYR   - 1900   */                                                                                       
           INT     MONTH;  /* G.TIMO  . = 1     */                     : SBREAK.MAC                               
           INT     DAY;    /* G.TIDA               */                                                                                       
           INT     HOUR;   /* G.TIHR  00 .. 23     */                   :                                                      
           INT     MINUTE; /* G.TIMI  00 .. 59     */                                                                                       
           INT     SECOND; /* G.TISC  00 .. 59     */                   CHAR *                                                              
           INT     TICK;   /* G.TICT  00 .. TSEC-1 */                   SBREAK(AMOUNT);                                                     
           INT     TSEC;   /* G.TICP  / */                   INT             AMOUNT;                                             
   ] BUFFER;                                                                                                                                
                                                                        :                                                           
   :                                                                                                                                
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 97 -                                                               - 98 -                                    
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
        SBREAK()      -           :                                                         
     .                                                                                      
   .                                                            ' '                                                                 
                                                                               -  ,                 
   :                                                                      ;  -         
                                                                                     "%[ \T\N]";              
         NULL,     .                                                                              
       ""  .                 X                                                                   
                                                                               -   ( %)               
   : .                                                                   ;                                            
                                                                                                                                            
   :                                                          %                                                                   
                                                                               -     "%", -         
         SBREAK()    .                            "*"  (    -         
                                                                                 ),             
                                                                                    .                       
                                                                                                                                            
            5.88.    -                                   
                                                                      "*",        -         
                                                                        ,          .         
                                                                             ,            
                                                    *********           ,                 
                                                    * SCANF *                (  ).                   
                                                    *********                                                                               
                                                                                 :         
     : SCANF.MAC                                                                                                     
                                                                        %                                                                   
   :                                                              -   "%"   ,  -         
                                                                                   ;                                        
   SCANF(FMT, POINTER(S));                                                                                                                  
   CHAR            *FMT;   /*         */                   D, O, X                                                             
                                                                               -    (, ,         
   FSCANF(FD, FMT, POINTER(S));                                                  )   ; -         
   FILE            *FD;    /*  .*/                                    ;         
   CHAR            *FMT;   /*         */                                           
                                                                                    "L",    -         
   SSCANF(BUF, FMT, POINTER(S));                                                   ; , "%LD"    "%D";         
   CHAR            *BUF;   /*   */                               ;            
   CHAR            *FMT;   /*         */                              ;  SCANF()               
                                                                                   ,                 
   :                                                                     ,   ;                          
                                                                                                                                            
          ,              S                                                                   
     (   ),  -                 -     ;               
     -.     -                     ,                
    :                                                                ;    -         
                                                                                        -         
   SCANF                                                                              ;             
          -     ;                             ;                                      
                                                                                                                                            
   FSCANF                                                               C                                                                   
          -    ;                                     -   ;              
                                                                                  --  ,              
   SSCANF                                                                        ,   ,  -         
          -    .                                       "%1S";      ,    -         
                                                                                               
             -                        ;               
          -                                                                              
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 99 -                                                               - 100 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   E, F                                                                          5.89.   /                     
          -         -                                                                              
            ;                                                                                    
                "L",    -                                                          **********          
                     ;                                                          * SCREEN *          
                  ,                                                             **********          
             "":  ,                                                                                 
                  ,              : SCREEN.MAC                               
              ,    -                                                                              
                 ;  -          :                                                      
                 "E",                                                                                
              ,   ;                    SCDOWN()                /*     */                  
                                                                                                                                            
   [ ]                                                                  SCERLN(LINE, COLUMN)    /*    */               
          - ,     ;              INT             LINE;   /*           */                  
              "^",        :          INT             COLUMN; /*          */                  
                ,     -                                                                              
              ,    ,  -          SCERPG(LINE, COLUMN)    /*    */               
               ; ,   -          INT             LINE;   /*           */                  
               ;    -          INT             COLUMN; /*          */                  
                "^",                                                                                 
             :      -                                                                              
            ,      ,              CHAR *                                                              
            ,       ;  -          SCGET(BUFF, SIZE, TEXT) /*     */                  
                 ;          CHAR            *BUFF;  /*     */                  
                .                 INT             SIZE;   /*          */                  
                                                                        CHAR            *TEXT;  /* .   */                  
        SCANF()       -                                                                              
     .      ,                                                                              
     EOF (-1). :                                  INT                                                                 
                                                                        SCLMARGIN(LMARG)        /*   . */                  
   MAIN()                                                               INT             LMARG;  /*     */                  
   [                                                                                                                                        
           REGISTER INT    C;                                                                                                               
           INT             I;                                           SCOUT(LINE, COLUMN, TEXT)                                           
           CHAR            TEXT[10];                                                            /*    */                 
                                                                        INT             LINE;   /*           */                  
           C = SCANF("%D%9S", &I, &TEXT);                               INT             COLUMN; /*          */                  
           PRINTF("I = %D, TEXT = %S\N",                                CHAR            *TEXT;  /*        */                  
                   I, TEXT);                                                                                                                
   ]                                                                                                                                        
                                                                        SCPUT(OLDBF)            /*   */                
            "150 FOOBAR",  -          CHAR            *OLDBF; /*          */                  
    :                                                                                                                           
                                                                                                                                            
           I = 150, TEXT = FOOBAR                                       INT                                                                 
                                                                        SCSET(NEWBF, SIZE, OLD) /*  . */                  
   :                                                         CHAR            *NEWBF; /*            */                  
                                                                        CHAR            SIZE;   /*    */                  
        SCANF()   -1,                  CHAR            **OLD;  /*  ..*/                 
   ( )      .                                                                                
    -2,         ,                                                                              
     "%".                                                       INT                                                                 
                                                                        SCSETTYPE(TYPE)         /*   */               
   :                                                              INT             TYPE;   /*          */                  
                                                                                                                                            
          -     --                                                                                    
               .                            INT                                                                 
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 101 -                                                              - 102 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   SCTYPE()                /*   */                             .         
                                                                        ,     RT11,            
                                                                        ,      ,   -         
   :                                                              ""  "Z"  -         
                                                                        ,    VT52   VT100.             
            "                 ,     ,         
    "    VAX/VMS.                      ,           
     , -             "STDERR".                                        
      ( DIGITAL).  -                                                                              
       VT52  VT100 ( ANSI)  -                    "STDERR"  (         
      ,     -            ).             
   .                                                              "STDIN".                  
                                                                                ,         
        ,                    ""  /.  ,  -         
   ,    (STDERR).               SPRINTF()  -         
                                                                           ,               
            :                   SCOUT().                                 
                                                                                                                                            
   LINE                                                                        :                                
          -    ,                                                                                      
             ;                         SCDOWN()                                                    
              1;                                                                                     
            ,    ;                                     .           
                                                                              ,            
   COLUMN                                                                   ,              
          -  ,                  ,  ,          ,         
            ;                  (VMS LIB$DOWN_SCROLL).                                     
                (   );                                                                              
                                      SCERLN(LINE, COLUMN)                                        
             ;    (  -                                                                              
            )      ,                    ( )            
            ;                                                  (VMS LIB$ERASE_LINE).                          
                                                                                                                                            
   TEXT                                                                         SCERPG(LINE, COLUMN)                                        
          - ,      -                                                                              
              ;  TEXT   ,              ( )            
                    -            (VMS LIB$ERASE_PAGE).                                  
            .                                                                                                                         
                                                                                SCGET(BUFF, SIZE, TEXT)                                     
                                                                                              
   .       -            ,  ,              
   ,        -          ,   .                 
       .                   (  STDIN)  . SCGET()           
       .                   (SCGET          
   SCPUT()  SCSET()                FGETSS()   ) (VMS LIB$GET_SCREEN).               
   .      .   -                                                                              
                               SCLMARGIN(LMARG)                                            
      .                                                                                   
      12 .                     (  LMARG    ).         
    .                                                  SCLMARGIN()    LMARG.            
                                                                        SCLMARGIN()      1               
              ,               LMARG.                                                      
           .                                                                              
     SCSET()   ,                    SCOUT(LINE, COLUMN, TEXT)                                   
        ,                                                                                  
    .  SCPUT()  ,                      ,             
                         .                    
   .                                                              ,       .             
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 103 -                                                              - 104 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
     ,      (            SUBR()                                                            
     ) (VMS LIB$PUT_SCREEN).                       [                                                                 
                                                                              CHAR        **OLDBUF;                                         
           SCPUT(OLDBF)                                                       CHAR        MYBUF[100];                                       
                                                                                                                                            
   SCPUT()                         SCSET(MYBUF, SIZEOF MYBUF, &OLDBUF);                          
      ,    .                 SCOUT(1, 1, "STUFF");                                         
   OLDBUF ,                        SCPUT(OLDBUF);                                                
     .  OLDBUF  ,      -            ]                                                                 
          (-                                                                              
      SCSET())              :                                                             
     .                                                                                   
    (VMS LIB$PUT_BUFFER).                                               -      ,         
                                                                                    ;                               
           SCSET(NEWBF, SIZE, OLD)                                                                                                          
                                                                               - ,                    
   SCSET()         .                     ,   -         
   NEWBF   ,                             :                                   
    SIZE (SIZE        12  -                                                                              
   ). OLD   ,                           -     RSX-11M             
      (  ).                                 VMS    QIO         
       SCPUT().  SCSET    ,                            "   -         
     ,   -1,  SIZE                              ".                 
   12  (VMS LIB$SET_BUFFER).                                                              -         
                                                                                        ,    ,              
           SCSETTYPE(TYPE)                                                               VT100.   ,           
                                                                                         ,  ,   VT52;         
       ,  -                                                                              
   ,      .   SCSETTYPE()                        -    RSTS/E            
    ,   ""    (                           "  "   -         
    SCTYPE).       -                            ,             
   :                                                                               ;                                               
                                                                                                                                            
           0                                                           -     RT11           
           65      VT52  VT100   VT52                                           PEEK,   -         
           97      VT100   ANSI                                                       RT11,           
                                                                                        ,             
          TYPE    -     ,                              (      XM).         
   SCSETTYPE()    .                                                       "Z"         
                                                                                           ,             
           SCTYPE()                                                                         ;           
                                                                                                                                            
       .   -                 - ,       ,         
     :                                                            ;                                     
                                                                                                                                            
           0                                                    -   ,    / -         
           1                                                 VMS,   -         
           1+64    VT52                                                           ,      -         
           1+96    VT100                                                         :                                                       
                                                                                                                                            
        :   VT100                             -   VMS  ,           
    VT52   VT100                                                    
   .                                                                                      -         
                                                                                         ; ,   -         
                                         ,     -         
   SCSET()  SCPUT()                                                                        -         
                                                                                        ;     ,           
                                                                                            (-         
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 105 -                                                              - 106 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                SLEEP(DELAY);                                                       
                         );          INT             DELAY;                                              
                     ,                                                                                  
                    : "LINE_NO,  COL_NO,  -          :                                                           
                   ";                                                                                                                    
                                                                                             
                 -                  .                                                             
                   ,   VMS      -                                                                              
                      (SYS$OUTPUT:            :                                                             
                   TT:),       -                                                                              
                       (SYS$ERROR                 -   RSTS/E                 
                    CO:).                                                      SLEEP()                
                                                                                 ;                                                   
                                                                                                                                            
                                                                               -    RSX-11M     -         
            5.90.   CTRL/C (  RSTS/E                         RSX  VMS  SLEEP()   -         
                    RT11)                                                    (MRKT$)   ,         
                                                                                    1;                                  
                                                                                                                                            
                                                    *********                  -       RT11     SLEEP()         
                                                    * SETCC *                       .TWAIT.                         
                                                    *********                                                                               
                                                                                                                                            
     : SETCC.MAC                                                                                                     
                                                                                 5.92.                                        
   :                                                                                                                           
                                                                                                                                            
   SETCC(FUNCTION);                                                                                                     **********          
   EXTERN INT FUNCTION();                                                                                               * STRCMP *          
                                                                                                                        **********          
   :                                                                                                                                
                                                                          : STRCMP.MAC                               
          ,                                                                                      
       CTRL/C.   SETCC(0)  -          :                                                      
      CTRL/C.                                                                                                               
                                                                        STRCMP(A, B);                                                       
        :              CHAR            *A;                                                 
   (,      CTRL/C                      CHAR            *B;                                                 
   FUNCTION()),     .                                                                                    
                                                                        :                                                           
   :                                                                                                                                  
                                                                               , :                              
          -    RSTS/E   RT11.                                                                                        
                                                                                -1      A  < B                                              
                                                                                 0      A == B                                              
                                                                                +1      A  > B                                              
            5.91.     -                                                                                   
                                                                : .                                                        
                                                                                                                                            
                                                                                                                                            
                                                    *********                                                                               
                                                    * SLEEP *                                                                               
                                                    *********                                                                               
                                                                                                                                            
     : SLEEP.MAC                                                                                                     
                                                                                                                                            
   :                                                                                                                           
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 107 -                                                              - 108 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.93.                                                5.95.                                           
                                                                                                                                            
                                                                                                                                            
                                                   **********                                                           **********          
                                                   * STRCPY *                                                           * STRLEN *          
                                                   **********                                                           **********          
                                                                                                                                            
     : STRCPY.MAC                                  : STRLEN.MAC                               
                                                                                                                                            
   :                                                       :                                                      
                                                                                                                                            
   CHAR *                                                               STRLEN(S);                                                          
   STRCPY(OUT, IN);                                                     CHAR            *S;                                                 
   CHAR            *OUT;                                                                                                                    
   CHAR            *IN;                                                 :                                                           
                                                                                                                                            
   :                                                                   ,    -         
                                                                        .                                                                 
          "IN"   "OUT".  "OUT".                                                                              
                                                                        : .                                                        
   :                                                                                                                                  
                                                                                                                                            
          -     ,                                                                                    
            OUT+STRLEN(IN) (.  CPYSPR()).                               5.96.   (  -              
                                                                                         )                                       
                                                                                                                                            
                                                                                                                                            
            5.94.                                                                                          *********          
                                                                                                                         * SWABB *          
                                                                                                                         *********          
                                                    *********                                                                               
                                                    * STREQ *             : SWABB.MAC                                
                                                    *********                                                                               
                                                                        :                                                      
     : STREQ.MAC                                                                                                     
                                                                        SWABB(BUFFER);                                                      
   :                                                       CHAR            *BUFFER;                                            
                                                                                                                                            
   STREQ(A, B);                                                         :                                                           
   CHAR            *A;                                                                                                                      
   CHAR            *B;                                                        BUFFER[0]  BUFFER[1],    ,           
                                                                           .      -         
   :                                                               .                                               
                                                                                                                                            
         ,   .                           : .                                                        
                                                                                                                                            
   : .                                                                                                                             
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 109 -                                                              - 110 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.97.   (  )                         5.99.                       
                                                                                                                                            
                                                                                                                                            
                                                    *********                                                          ***********          
                                                    * SWABI *                                                          * TOLOWER *          
                                                    *********                                                          ***********          
                                                                                                                                            
     : SWABI.MAC                                   : TOLOWE.MAC                               
                                                                                                                                            
   :                                                       :                                                      
                                                                                                                                            
   SWABI(VALUE);                                                        TOLOWER(C);                                                         
   INT             VALUE;                                               INT             C;                                                  
                                                                                                                                            
   :                                                            :                                                           
                                                                                                                                            
         ,     .                ""   ,    -         
                                                                          .      ,           
   : .                                                         "".                                                                
                                                                                                                                            
                                                                        : .                                                        
                                                                                                                                            
            5.98.                                                                                                          
                                                                                                                                            
                                                                                 5.100.                      
                                                     ********                                                                               
                                                     * TIME *                                                                               
                                                     ********                                                          ***********          
                                                                                                                       * TOUPPER *          
     : TIME.MAC                                                                                 ***********          
                                                                                                                                            
   :                                                         : TOUPPE.MAC                               
                                                                                                                                            
   LONG                                                                 :                                                      
   TIME(0);                                                                                                                                 
                                                                        TOUPPER(C);                                                         
   LONG                                                                 INT             C;                                                  
   TIME(TLOC);                                                                                                                              
   LONG            *TLOC;                                               :                                                           
                                                                                                                                            
   :                                                                  ""   ,      -         
                                                                          .    ,           
         TIME        .            "".                                                                
   TLOC  ,                                                                                      
      ,   TLOC.                       : .                                                        
                                                                                                                                            
         RTIME()     .                                                                                 
                                                                                                                                            
   :                                                                                                                                  
                                                                                                                                            
          -   TIME    UNIX                                                                                      
            00:00:00 GMT, 1   1970  ,                                                                                  
            ;                                                                                       
            .                                                                                                                       
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 111 -                                                              - 112 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.101.                             $$FLOW,       -         
                  ( )                                                 .                                      
                                                                                                                                            
                                                                                            
                                                    *********            ERROR()     (,          
                                                    * TRACE *              ),              
                                                    *********           STDERR      .           
                                                                                                                                            
     : PCSV.MAC                                                                
                                                                        CALLTRACE().                                                        
   :                                                                                                                           
                                                                        :                                                         
   #INCLUDE                                                                                                                        
   EXTERN  FILE    *$$FLOW;                                                    -  CSV$               
                                                                                 ;                                                 
   $$FLOW = FOPEN("TRACE.OUT", "W");                                                                                                        
                                                                               -      ,            
   /*  $$FLOW = STDERR;     */                              -         
   ...                                                                                     -         
   $$FLOW = NULL;          /*     */                          ;    -         
                                                                                     "TRAPS";           
            INTERNAL                                                                 .                 
                                                                                                                                            
   JSR     R5,PCSV$                                                     : .                                                        
   .WORD   NAME            ;                                                                                                  
                                                                                                                                            
       :                                                                                                       
                                                                                 5.102.    -             
   NAME:   .WORD   0       ;                                                                                                     
           .ASCIZ  /NAME/  ;                                                                                                      
                                                                                                                                            
   :                                                                                                             *********          
                                                                                                                         * TRAPS *          
          ,                                                               *********          
   ,       -                                                                              
   .  ,     600 -            : TRAPS.MAC                                
      ,                                                                                    
   .                                                          :                                                      
                                                                                                                                            
         $$FLOW      ,                                                                        
   ,        -                                                                              
       ,    -          $$SSTT::                ;                           
    .                                                                       ;  RSX                            
                                                                                                                                            
            :                            $$T410::                ;    RT11                    
                                                                                                ;  4, 10                            
    _                                                                                                 
                                                                        :                                                           
                                                                                                                                         
                                                                                ,             
   _                                                            ,   -         
          -   ;                                        .              
                                                                              .              
                                                                                                                                   
          -  ,                             ,         
            (  ),  , -            MAIN(),              
              R5 (                .                                                 
                ).                                                                                   
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 113 -                                                              - 114 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
           ():                           5.103.                        
                                                                                                                                            
          -        (                                                                                
             4);                                                                                                 **********          
                                                                                                                        * UNGETC *          
          -     (                                                              **********          
            10);                                                                                                                            
                                                                          : UNGETC.MAC                               
          - BPT (,     -                                                                              
            );                                                        :                                                      
                                                                                                                                            
          - IOT;                                                        UNGETC(C, IOP);                                                     
                                                                        CHAR            C;                                                  
          -   TRAP (   -          FILE            *IOP;                                               
             );                                                                                                             
                                                                        :                                                           
          -   EMT (  RSX);                                                                                   
                                                                                   . -         
          -    ( ).                BPT,               
                                                                         .                                                 
                                                                                                  
                     : .                                                        
      STDOUT.  ,                                                                                 
             STDOUT                                                                                
    ERROR().                                                                                                                         
                                                                                 5.104.                       
            ,                                                                                    
         "  -                                                                              
   ".                                                                                                                 **********          
                                                                                                                        * UNWIND *          
        ,   ,                                                             **********          
         ,                                                                                
         ""               : UNWIND.MAC                               
     ,  .                                                                                         
                                                                        :                                                      
   :                                                                                                                              
                                                                        SETEXIT();                                                          
          -   PCSV$     -                                                                              
             .      RSX11-M            UNWIND();                                                           
               SVTK$.      RT11                                                                              
                .TRPSET. -          :                                                           
               .TRPSET                                                                                      
                   (                       -         
            4)        (  10),            ,                
                             .                                                          
               (.ASECT).                                                                                             
                                                                             SETEXIT()        -         
   : .                                                       UNWIND().             
                                                                        0.                                                                  
   :                                                                                                                                  
                                                                             UNWIND()  "",   -         
          -   ,    -            SETEXIT().      -         
                ().                  ,      -         
                                                                          SETEXIT().               
   :                                                            UNWIND().     SETEXIT()  -         
                                                                          1. :                                        
          -      ,                                                                                
              .                                                                                                          
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 115 -                                                              - 116 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
     IF (SETEXIT()) [                                                        WRAPUP     .                          
                     /* UNWIND        */                                                                                             
     ]                                                                  : .                                                        
     ELSE [                                                                                                                                 
                     /*  SETEXIT */                                                                                         
     ]                                                                                                                                      
                                                                                 5.107.                                   
   ,   SETEXIT(),                                                                                 
     UNWIND().                                                                                                                     
                                                                                                                          ********          
   : .                                                                                                           * ZERO *          
                                                                                                                          ********          
                                                                                                                                            
                                                                          : ZERO.MAC                                 
            5.105.    SIZEOF(INT)                                                                                     
                                                                        :                                                      
                                                                                                                                            
                                                   **********           ZERO(ADDR, NBYTES);                                                 
                                                   * WDLENG *           CHAR            *ADDR;                                              
                                                   **********           INT             NBYTES;                                             
                                                                                                                                            
     : WDLENG.MAC                                :                                                           
                                                                                                                                            
   :                                                              .    .         
                                                                                                                                            
   WDLENG()                                                             : .                                                        
                                                                                                                                            
   :                                                                                                                                
                                                                                                                                            
          .                                                                                                             
                                                                                                                                            
   : .                                                                                                                             
                                                                                                                                            
             :                                                                                                 
                                                                                                                                            
       #DEFINE WDLENG() (SIZEOF (INT))                                                                                                      
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
            5.106.   ,                                                                                       
                                                                                                                                      
                                                                                                                                            
                                                                                                                                            
                                                   **********                                                                               
                                                   * WRAPUP *                                                                               
                                                   **********                                                                               
                                                                                                                                            
     : WRAPUP.MAC                                                                                                    
                                                                                                                                            
   :                                                                                                                           
                                                                                                                                            
   WRAPUP()                                                                                                                                 
                                                                                                                                            
   :                                                                                                                                
                                                                                                                                            
          (   )                                                                               
     ,                                                                                   
        WRAPUP().                                                                                          
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 117 -                                                              - 118 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                               1.                                   
                                                                                                                                            
                           A                                                                                                      
                                                                                                                                            
                                                                                                                                            
                                                                    ""      2400         
                           ----------                                   ,  ,    -         
                                                                        .        3-         
                                                                           600    ,               
                                                                           .                        
                                                                        9-      DOS.           
                                                                                  RSTS/E         
                                                                        V7.0.    [5,2]    -         
                                                                         ASCII.     [5,2]               
                                                                           .                              
                                                                                                                                            
                                                                                             
                                                                          [5,1]  [5,7]                 
                                                                         "".                  
                                                                          .              
                                                                        RSX-11M  RT-11       -         
                                                                         .                  
                                                                         RSX-11M,   .                       
                                                                                                                                            
                                                                              ,       [6,1]           
                                                                        [6,7],     ,               
                                                                        ,      "".               
                                                                              "",  -         
                                                                         [6,1]KWIK             
                                                                         .       -         
                                                                           "",     .         
                                                                                 [6,6]  .         
                                                                         [6,7]      SRD.TSK,         
                                                                             ,           
                                                                          RSX-11M.                                            
                                                                                                                                            
                                                                                          
                                                                           ,               
                                                                          RSX-11M (),     -         
                                                                         RSTS/E ().              
                                                                          ""      ,   -         
                                                                               -         
                                                                           .                                  
                                                                                                                                            
                                                                          [5,1]    ,   ..                      
                                                                          [5,2]      RSTS/E.                               
                                                                          [5,3]      .                          
                                                                          [5,4]      ( /).                        
                                                                          [5,5]     /   .                  
                                                                          [5,6]      RSTS/E.                         
                                                                          [5,7]      RSX-11M.                        
                                                                                                                                            
                                                                          [6,1]   " ".                                
                                                                          [6,2]     --   .                     
                                                                          [6,3]   -   -.                      
                                                                          [6,4]     .                       
                                                                          [6,5]   - -.                      
                                                                          [6,6]       .                        
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 119 -                                                              - 120 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
     [6,7]    DECUS  SRD  RSX-11M.                               3.                          
                                                                                                                                            
         ,        -                                                                              
   , 600                                                                                       
   :                                                                                                                                 
                                                                        [5,1]   [.COMMAND]                                                  
     1:   [5,1], [5,2],  [5,4]                                    -       -         
     2:   [5,3], [5,5], [5,6],  [5,7]                                (.RNO),                
     3:    [6,*]                                                  ,        ;         
                                                                                       -         
           ,   README.NNN                     ,       -         
     . ,                           ""  (,  TS1.CMD),            
    [5,1]   README.501.                                                 -         
                                                                                  .                                                 
                                                                                                                                            
                                                                                            
                                                                              "",                
               2.                               (GETCMD.C)       (GETRNO.C,         
                                                                        GETKWK.C, FIXDOC.C).                
                                                                         MCR.BAS,    RSTS/E  -         
                                                                             "".                            
                                                                                                                                            
         ,                         RGTDOC.CMD    VGTDOC.COM           
      "",   :            .    -         
                                                                          :                                               
   .CMD                                                                                                                                     
          -       RSTS/E,                 1.    .                          
               RSX-11M                                                                                  
              MAC.TSK  MACRO.SAV;                                   2.  GETRNO.C,  GETKWK.C    RSTS/E           
                                                                        VMS,      FIXDOC.C  --      VGTRNO.COM           
   V?????                                                               RGTRNO.CMD.                                                         
          -    VAX/VMS;                                                                                              
                                                                             3. ,    [6,1]KWIK.C.             
   X?????                                                                                                                                   
          -   RSTS/E    RSX;                          4.  GETRNO              
                                                                        RUNOFF --   VGTDOC.COM  RGTDOC.CMD.                 
   R?????                                                                                                                                   
          -   RSTS/E    RT-11;                        5.  RNO.TSK               
                                                                        RSX-11M  RSTS/E,   RUNOFF            
   M?????                                                                 VMS V2.0.                                             
          -    RSX-11M;                                                                                              
                                                                             6.   RSTS/E  VMS     FIXDOC         
   T?????                                                                ,  ""  .DOC  ,  -         
          -    RT-11;                             RNO.TSK    ( -         
                                                                            RGTDOC.CMD  VGTDOC.CMD).                       
   .COM                                                                                                                                     
          -    RT-11  VMS;                           GETCMD.C                 
                                                                                  .         
   .TKB                                                                                  
          -     ;                RVNET.CMD    .  -         
                                                                                            
   .ODL                                                                   RLBCMD.CMD.             
          -     .                  .                                   
                                                                                                                                            
                                                                        [5,2]     RSTS/E                                           
                                                                               -        -         
                                                                                   RSTS/E     RT-11.         
                                                                                      VMS.             
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 121 -                                                              - 122 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                 , -                         ,                     
                 .                                   /.                   
                                                                                           RSX-11M,         
             VMS      /                     RT-11.     ,           
            -                                 
            .  ,                       .                                              
   CC.DOC, AS.DOC, CBUGS.DOC, CLIB.DOC  WIZARD.DOC                                                                                
     .                                                                  -         
                                                                          ,      -         
                   .          :                                                                
   ,    RSX-11M  (CX.OLB)                                                                              
      .                     @    VMAKLB.COM       VMS                                 
   RSX-11M.  RSX-11M  ,  CX.OLB            ATPK XMAKLB.CMD      RSTS/E   RSX                         
      RSX-11M,                ATPK RMAKLB.CMD      RSTS/E   RT-11                       
      RSTS/E,        .           @    MMAKLB.CMD       RSX                                 
          [5,7].                    @    TMAKLB.COM       RT-11                               
                                                                                                                                            
   [5,3]   [.COMP]                                                      [5,6]     RSTS/E                                           
          -                            -         RSTS/E,         
               (CC????.MAC), -                         RSTS/E         
             (AS????.MAC)                           "".                                 
            (A?????.MAC).                                                                                                                   
                                                                        [5,7]     RSX-11/M                                         
                                -          RSX-11M.         
       ,   -                   ,        -         
        RSX  RT-11    -                      VMS  RSTS/E.                      
    /.    .                                                                                             
                                                                        [6,1]   [.TOOLS]                                                    
                               -    "".            
       CC:                                         [.TOOLS]README.601.  RSTS/E  -         
                                                                                               
    @    VMAKCC.COM       VMS                                           [6,1]RTOOLS.CMD.  VMS              
    ATPK XMAKCC.CMD      RSTS/E   RSX                                    [.TOOLS]VTOOLS.COM.      -         
    ATPK RMAKCC.CMD      RSTS/E   RT-11                                                   
    @    MMAKCC.CMD       RSX                                           . ,     -         
    @    TMAKCC.COM       RT-11                                          ,      -         
                                                                                   (PUB:  RSTS/E, BIN:  VMS).            
           :                                                                                                  
                                                                        [6,2]   [.MISC]                                                     
    @    VMAKAS.COM       VMS                                         -          .                 
    ATPK XMAKAS.CMD      RSTS/E   RSX                                   [6,2]README.602                  
    ATPK RMAKAS.CMD      RSTS/E   RT-11                                 .      RSTS/E           
    @    MMAKAS.CMD       RSX                                           VMS   .                                
    @    TMAKAS.COM       RT-11                                                                                                    
                                                                        [6,3]   [.CROSS]                                                    
   [5,4]   [.OTSCOM]                                                           -  -.             
          -          ""                     [.6,3]README.603.   -         
             .                               ""  8080,  -         
            /                           DR. DOBBS JOURNAL,  1980.                
            (,       -                                                                              
                  ).          [6,4]   [.LEX]                                                      
                  -                 -   .                        
              (..                                                                                  
              EIS).   -          [6,5]   [.MICROSS]                                                  
              [-.OTSIO]  [5,5]).                                         -  -    -         
                                                                                 .         -         
   [5,5]   [.OTSIO]                                                                 .                 
          -                                                                                          
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 123 -                                                              - 124 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
   [6,6]                                                                        PIP DISK:[*,*]=TAPE:[*,*]                                   
          -                                                                                     
            - ,   YACC                [5,2]     -         
               .                                        RSTS/E.                   
                                                                          [5,1]RBUILD.CMD   ATPK.  ,         
   [6,7]                                                                                  
          -     DECUS    SRD.TSK.             BASIC-PLUS - MCR.BAC.               
              ,                   BASIC-PLUS        ,           
            RSX-11                   MCR.BAC      "?WRONG  MATH         
            .   ,    ,          PACKAGE" (  ).   ,          
                                        MCR.BAS.            
            (FWILD/FNEXT),   .            [5,1]TS1.CMD     .          
                 -                                                                              
              FWILD().                                        CX.OLB     RSTS/E               
                                                                        .          ,         
                                                                                              
                                                                        [5,1].                                                              
                                                                                                                                            
                                                                                              
               4.                              (  RBUILD):             
                                                                                                                                            
                                                                         RUN $UTILTY                                                        
                                                                         ADD LOGICAL [5,2] C     !    "C"            
                                                                         CCL XCC-=C:CC.TSK;0     ! CC   RSX                    
             "" ,  -           CCL XAS-=C:AS.TSK;0     ! AS   RSX                     
       "README.???",   -           CCL CC-=C:CC.SAV;8220   ! CC   RT-11                  
        CC.DOC  WIZARD.DOC ( -           CCL AS-=C:CC.SAV;8220   ! AS   RT-11                   
    [5,2]),                  CCL MCR-=C:MCR.*;30000  !  CCL                        
   .                                                                                      !                            
                                                                                                                                            
                                                                                 ""  -         
                                                           -   PUB:.            
                                                                          [1,2]  -  ""         
     RT11.MAC  RSX.MAC,     -          .       ,  -         
   ,    SXT.               PUB:   "  -         
       PDP-11.              " .                                                          
   ""          PDP-11/20,                                                                              
   PDP-11/05  PDP-11/40  EIS,    -               ,                 
      ,  "C$$SXT =  0"            ,   C:.               
      .                                <40> (      ).             
                                                                          CC.HLP   HELP.             
                                                                          HELP  RSTS/E V7.0.                                 
                                                                                                                                            
             4.1.    RSTS/E                                          -         
                                                                         [5,1]RBUILD.CMD   90    -         
                                                                          11/70.                                               
                                                                                                                                            
               RSTS/E               ,        RSTS/E         
   V7.0.       ,                          
     ,     -             CCL,               
      .      -               .             
    SUPORT.MAC, INIT.MAC, FWILD.MAC  SBREAK.MAC            ""    <232>   .                   
    ,      -                                                                              
     ,     V7.0.                                                                                
                                                                                                                                            
            [5,1]  [5,7]    [6,1]                                                                              
    [6,7].            .                                                                              
         :                                                                                       
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 125 -                                                              - 126 -                                   
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
             4.2.    VMS                                     . - ,    -         
                                                                          ,     -         
                                                                          .                                                 
                                                                                                                                            
            VMS  V2.0.                                 
       ,    -           VBUILD.COM.   -         
     ,      -                 [.COMMAND] (         
    .                                                     [...DECUSC]).      -         
                                                                         BIN:,               
              [5,1]            .                                                
       [.COMMAND]:                                                                                                     
                                                                              [.COMMAND]CCHLP.COM    -         
           $ CREATE/DIR DISK:[DECUSC]                                    CC.HLP              
                                                                        (VMS V2.0).                  
          VMS V2.0               HELP.                                                    
       :                                                                                                    
                                                                                                                                            
           [-.SUBDIRECTORY]                                                                                                                 
                                                                                  4.3.    RSX-11M                             
     "                                                                                   
    ,         ".                                                                                
       UNIX:                                                                                                    
                                                                                 M?????.CMD.     -         
           ../SUBDIRECTORY                                                    RSX-11M  V3.2.     ,         
                                                                           "@",            
                           . ,            
   VMS.       VMS V2.0,             CX.OLB (  RSX)               
       .COM -          [5,2].     RSX -         
    .                      V3.2      -         
   :                                                           (  RSTS/E   RSX-11M).                
                                                                                                                                            
   [5,1]   [.COMMAND]                                                                                            
   [5,2]   [.RSTS]          RSTS (  )                                                                                     
   [5,3]   [.COMP]                                               4.4.    RT-11                               
   [5,4]   [.OTSCOM]         ( /)                                                                                       
   [5,5]   [.OTSIO]          /                                                                                       
   [5,6]   [.RSTSLB]        RSTS/E                                                                                                
   [5,7]   [.RSXLIB]        RSX-11M                                      RT-11  -           
                                                                            RSTS/E. ,  ATPK         
   [6,1]   [.TOOLS]           ""                      RTKIT.CMD (  ),  -         
   [6,2]   [.MISC]                                            ,   RT-11.    -         
   [6,3]   [.CROSS]        -                                   C:           
   [6,4]   [.LEX]                                     ,    "INCLUDE <>"           
   [6,5]   [.MICROSS]       -                       .   .                                              
                                                                                                                                            
                                      T?????.COM           
   [.COMMAND]   [5,1]VRKIT.COM               ""  RT-11.                 
    :                                                            .                          
                                                                                                                                            
           $ SET DEFAULT [.COMMAND]                                            "RT11.MAC"  "RSX.MAC"  (           
           $ MOUNT/FOREIGN MTA0:                                        ),       -         
           $ MCR FLX SY:=MTA0:[5,1]VRKIT.COM/DO                           .                  
                                                                         ""                 
           VRKIT.COM                     "".                                    
       (     -                                                                              
         600  ,                        ""      PDT-150,         
   VRKIT1.COM, VRKIT2.COM,  VRKIT3.COM                   .               
   ).   VRKIT    -                 .             
                                                                                                                                            
                                                                                                                                            

                                                                                                                                            
                             - 127 -                                                                                                        
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            
                                                                                         
     :                                                                                                                  
                                                                                                                                            
          -  RT-11,                                                                                      
            , , LINK.SAV  LIBR.SAV;                                                                                        
                                                                                                                                            
          -  CC.SAV, AS.SAV  STDIO.H                                                                                  
            (       -                                                                              
            ).       C:.                                                                                  
                                                                                                                                            
          -        -                                                                              
               CLIB.OBJ  SUPORT.OBJ.                                                                                             
                                                                                                                                            
           ""                                                                                      
   .     300                                                                                  
    CLIB.OBJ   SUPORT.OBJ.                                                                                    
                                                                                           
    ""      /                                                                              
      . ,    MAZE.C                                                                              
   ( [6,2])     200                                                                                    
     .       -                                                                              
   .                                                                                                                                    
                                                                                                                                            
            ""    -                                                                              
     HT-11.                                                                                   
      RT-11  3,   -                                                                              
     HT-11. ,       -                                                                              
       .