         TITLE    'ALL LINE PRINTER HANDLERS'                                   
*                                                                               
* THIS MODULE DESIGNED AND WRITTEN BY:                                          
*                                                                               
*                 GENE MALLORY                                                  
*                 5656 BUFFALO AVE.                                             
*                 VAN NUYS, CALIF.                                              
*                 91401                                                         
*                                                                               
         SYSTEM   OPTIONS                                                       
         DO   (#PAX+#LP7446+#LPRNTLC+#LPRINT+#LP346X)>0                         
         DEF      LP                                                            
         DO1      #LP7446                                                       
         DEF      LPPRE,LPPOST                                                  
         DO1      #LPRNTLC                                                      
         DEF      PRTLCOUT,PRTLCCU                                              
         DO1      #LP346X                                                       
         DEF      346XPRE,346XPOST                                              
         DO1      #PAX                                                          
         DEF      PAXLPRE,PAXLPOST                                              
         DO1      #LPRINT                                                       
         DEF      PRTOUT,PRTCU                                                  
         SYSTEM   SIG5P                                                         
OLAYFLAG EQU      'LP'                                                          
         SYSTEM   CPRMON                                                        
LP       RES      0                                                             
         TITLE    'LINE PRINTER PRE-HANDLERS'                                   
        DO       (#LP7446+#LPRINT)>0                                            
**********************************************                                  
* 7440/41/45/46/61/62/63/64/65/66    PRE-HANDLER                                
**********************************************                                  
LPPRE    RES      0                                                             
PRTOUT   RES      0                                                             
         LI,R10   DOTLP                                                         
         B        CHECKTOF                                                      
        FIN      #LPSIGMA OR #LPRINT                                            
        DO       #LPRNTLC                                                       
**********************************************                                  
* 7450 LOW COST LINE PRINTER PRE-PROCESSOR                             *        
**********************************************                                  
PRTLCOUT LI,R10   DOTLPLC                                                       
         B        CHECKTOF                                                      
        FIN      #LPRNTLC                                                       
        DO       #LP346X                                                        
**********************************************                                  
* 550 LINE PRINTER PRE PROCESSOR                                                
**********************************************                                  
346XPRE  EQU      %                                                             
         LI,R10   DOT346X                                                       
         OR,R4    Y2                SET HOLD FOR SENSE                          
         B        CHECKTOF                                                      
        FIN      #LP346X                                                        
        DO       #PAX                                                           
**********************************************                                  
* 2310 PAX SPECIAL LINE PRINTER                                                 
**********************************************                                  
PAXLPRE  RES      0                                                             
         LI,R10   DOTPAXLP                                                      
         LI,R5    X'0A'             SINGLE SPACE FORMAT CODE                    
         SLS,R5   24                PUT IN TOP                                  
         BAL,R0   RE:ENT                                                        
         STW,R5   IOQ12,R3          PUT INTO IOQ12                              
         LI,R0    0                                                             
         STB,R0   IOQ4,R3                                                       
         STB,R0   IOQ5,R3           FORCE FUNCTION CODE TO ZERO                 
         B        COMLIST                                                       
        FIN      #PAX                                                           
CHECKTOF RES      0                                                             
         LB,R5    IOQ5,R3           GET FUNCTION CODE                           
         CI,R5    FCWLPF            IS IT A PRINT WITH FORMAT                   
         BNE      COMLIST           NO, DONT WORRY ABOUT TOF                    
*                                   YES, DO WORRY                               
         LW,R6    IOQ8,R3           GET BUFFER PTR                              
         LB,R7    0,R6              GET FIRST BYTE                              
         CI,R7    X'F1'             IS IT A TOF COMMAND                         
         BNE      COMLIST           NO, NO PROBLEM                              
*                                   YES,                                        
         LH,R5    DCT1,R1           GET DEVICE ADDR                             
         TDV,R5   0,R5              GET TDV STATUS                              
         BCS,12   COMLIST           FORGET IT IF LP NOT READY                   
         CW,R5    Y1                IS LP ALREADY AT TOP OF FORM                
         BAZ      COMLIST           NO, NO PROBLEM                              
*                                   YES, MUST NOT TOP OF FORM AGAIN             
         LI,R12   TYCOK                                                         
         LI,R11   0                                                             
         BAL,R0   RE:ENT            CHECK FOR RE-ENTRANCE AND INHIBIT           
         MTW,1    IOQ8,R3           BUMP BUFFER PTR                             
         MTH,-1   IOQ9,R3           DECREMENT BYTE COUNT                        
         BEZ      IOSCU             CLEAN UP IF THATS ALL TO DO                 
         LI,R5    FCWLPWOF          PRINT WITHOUT FORMAT FUNCTION               
         STB,R5   IOQ5,R3           AND PUT IT INTO CURRENT FUNCTION            
         B        COMLIST           BUILD CLIST AREA                            
         TITLE    'COMMAND DOUBLE-WORD SUBROUTINES'                             
        DO       #LP346X                                                        
**********************************************                                  
* SENSE CDW SUBROUTINE FOR 550 LP                                               
**********************************************                                  
SENSEBUF EQU      4                 WORD POSITION IN CLIST FOR SENSE DATA       
SENSE    EQU      %                                                             
         LI,R0    SENSEBUF**-1                                                  
         AH,R0    DCT7,R1                                                       
         SLS,R0   3                                                             
         OR,R8    R0                                                            
         B        USECOM                                                        
        FIN      #LP346X                                                        
         TITLE    '7440/41/45/50 LINE PRINTER POST-HANDLER'                     
        DO       (#LPRINT+#LPRNTLC)>0                                           
**********************************************                                  
* 7440/41/45/50 LINE PRINTER POST PROCESSOR                                     
**********************************************                                  
PRTCU    RES      0                                                             
PRTLCCU  RES      0                                                             
         BAL,R9   NEWIOCK           CHECK FOR ANY ERRORS                        
         B        LPERR             YES, ANALYZE ERRORS                         
LPOK     RES      0                                                             
         LI,R12   TYCOK             SET OK COMPLETITION                         
         B        IOSCU             AND CLEAN-UP                                
         PAGE                                                                   
**********************************************                                  
* 7440/41/45/50  LINE PRINTER ERROR ANALYSIS                                    
**********************************************                                  
LPERR    RES      0                                                             
         CI,R8    (BIT1+BIT2)**-16  DEVICE STATE                                
         BANZ     LPNOTOP           NOT OPERATIONAL                             
*                                   OK                                          
         LCF      DCT20,R1          TDV CC                                      
         BCS,8    %+2                                                           
         BCS,4    LPTM              TEST MODE                                   
*                                                                               
         CI,R5    BIT14**-16        IOP HALT                                    
         BAZ      LPERR10           NO                                          
*                                   YES                                         
         CI,R5    (BIT9+BIT10+BIT11+BIT12+BIT13)**-16 IOP PROBLEM               
         BANZ     LPRBCCK           YES, CHECK RBC                              
         B        LPERR20           NO, CHECK FOR ICL                           
*                                                                               
LPERR10  RES      0                                                             
         CI,R5    BIT1**-16         BUFFER PARITY ERROR                         
         BANZ     LPRBCCK           YES, CHECK RBC                              
*                                   NO                                          
         CI,R8    BIT4**-16         UNUSUAL END                                 
         BAZ      LPERR20           NO                                          
*                                   YES                                         
         CI,R8    BIT3**-16         AUTOMATIC                                   
         BAZ      LPINCST           NO, RESET WHILE BUSY                        
*                                                                               
LPERR20  CI,R5    BIT8**-16         INCORRECT LENGTH                            
         BANZ     LPOK              OK IF ICL                                   
         B        LPINCST           ELSE INCONSISTENT STATE                     
         PAGE                                                                   
*                                                                               
* CHECK REMAINING BYTE COUNT                                                    
*                                                                               
LPRBCCK  RES      0                                                             
         LB,R0    IOQ5,R3           CURRENT FUNCTION CODE                       
         CI,R0    FCWLPF            PRINT WITH FORMAT                           
         BNE      LPRETRY           NO, RETRY AS IS                             
*                                   YES                                         
         LI,R0    X'FFFF'           MASK                                        
         AND,R0   R11               GET RBC                                     
         SH,R0    IOQ9,R3           SUBTRACT IBC                                
         LCW,R0   R0                MAKE POSITIVE # OF BYTES XFERED             
         CI,R0    0                                                             
         BEZ      LPRETRY           RETRY IF NO BYTES TRANSFERED                
*                                   NON ZERO                                    
         LW,R8    DCTMOD,R1         GET MODEL #                                 
         CW,R8    MDL7440           IS IT 7440                                  
         BE       LPRBCCK1          YES                                         
*                                   NO                                          
         CW,R8    MDL7445           IS IT A 7445                                
         BE       LPRBCCK1          YES                                         
*                                   NO                                          
         CI,R0    1                 WAS JUST ONE BYTE TRANSFERED                
         BE       LPINCST           YES, RESULT INCONSISTENT                    
         B        LPRBCCK2          NO, RETRY W/NEW FORMAT BYTE                 
*                                                                               
LPRBCCK1  RES     0                                                             
         CI,R0    8                 WERE 8 BYTES TRANSFERED                     
         BL       LPINCST           NO, RESULTS INCONSISTENT                    
LPRBCCK2 RES      0                                                             
         BAL,R8   NEWFORMAT                                                     
         B        LPRETRY                                                       
        FIN      #LPRINT                                                        
         PAGE                                                                   
        DO       #LP7446                                                        
**********************************************                                  
* 7446/61/62/63/64/65/66 SIGMA LINE PRINTER POST-PROCESSOR                      
**********************************************                                  
LPPOST    RES     0                                                             
         BAL,R9   NEWIOCK           WAS I/O OK                                  
         B        LP10              NO                                          
*                                   YES                                         
LP05     RES      0                                                             
         LI,R12   TYCOK                                                         
         B        IOSCU             COMPLETION OK                               
         TITLE    '7446/61/62/63/64/65/66 LINE PRINTER POST-HANDLER'            
**********************************************                                  
* 7446/61/62/63/64/65/66 SIGMA LINE PRINTER ERROR ANALYSIS                      
**********************************************                                  
LP10     RES      0                                                             
         CI,R8    (BIT1+BIT2)**-16  IS DEVICE READY                             
         BANZ     LPNOTOP           NO                                          
*                                   YES                                         
         LCF      DCT20,R1          TDV CC                                      
         BCS,8    LP20              TEST MODE  (CC=01--)                        
         BCS,4    LPTM              YES                                         
*                                                                               
LP20     RES      0                                                             
         CI,R5    TDVRM1**-16       RECOVERY MODE 1                             
         BAZ      LP30              NO                                          
*                                   YES                                         
         CI,R5    TDVIOPH**-16      IOP HALT                                    
         BANZ     LPRETRY           YES                                         
*                                   NO                                          
LP25     RES      0                                                             
         CI,R8    TIODUE**-16       DEVICE UNUSUAL END                          
         BAZ      LPINCST           NO, DONT KNOW WHAT ERROR                    
*                                   YES                                         
         CI,R5    TDVICL**-16       INCORRECT LENGTH                            
         BANZ     LPINCST           YES, CANT HAPPEN FOR FORMAT ORDER           
*                                   NO                                          
         CI,R8    TIODA**-16        DEVICE AUTOMATIC                            
         BANZ     LPRETRY           YES, RETRY                                  
         B        LPINCST           NO, RESET WHILE READY                       
         PAGE                                                                   
LP30     RES      0                                                             
         CI,R5    TDVRM2**-16       RECOVERY MODE 2                             
         BANZ     LP40              YES                                         
*                                   NO                                          
         CI,R5    TDVICL**-16       INCORRECT LENGTH                            
         BANZ     LP05              YES, COMPLETION OK                          
         B        LPINCST           NO                                          
*********                                                                       
LP40     RES      0                                                             
         LB,R9    IOQ5,R3           CURRENT FUNCTION STEP                       
         CI,R9    FCWLPF            IS IT PRINT WITH FORMAT                     
         BNE      LPRETRY           NO                                          
         BAL,R8   NEWFORMAT                                                     
         B        LPRETRY                                                       
        FIN      #LP7446                                                        
         TITLE    '3462/62/63/64/65/66 LINE PRINTER POST-HANDLER'               
        DO       #LP346X                                                        
**********************************************                                  
*   550 LINE PRINTER POST-PROCESSOR *                                           
**********************************************                                  
346XPOST EQU      %                                                             
         LB,R4    IOQ5,R3           GET CURRENT FUNCTION CODE                   
         CI,R4    FCSENS1           IS IT A SENSE ORDER                         
         BGE      346X50            YES, GO TO FOLLOW-ON PROCESSING             
         BAL,R9   NEWIOCK                                                       
         B        346X10            ERROR                                       
346X05   EQU      %                                                             
         LI,R12   TYCOK             SET FLAG: COMPLETION OK                     
         B        IOSCU                                                         
         PAGE                                                                   
*                                                                               
*        ERROR FILTER                                                           
*                                                                               
346X10   EQU      %                                                             
         CI,R8    (BIT1+BIT2)**-16 IS CONTROLER OPERATIONAL                     
         BANZ     LPINCST           NO, CANT EVEN SENSE                         
*                                   OPERATIONAL                                 
         LC       DCT20,R1          ARE TDV CC'S OK                             
         BCS,8+4  346XIS            NO                                          
*                                   YES                                         
         LW,R6    R5                GET TDV STATUS                              
         SLS,R6   -13               SHIFT OVER MODE BITS                        
         AND,R6   M2                MASK OFF MODE BITS                          
         B        %+1,R6            AND JUMP                                    
         B        346X40            00 NO RECOVERY MODE                         
         B        346XRTY           01 RECOVERY MODE 1                          
         B        346X30            10 RECOVERY MODE 2                          
         B        346XIS            11 INCONSISTANT STATUS                      
*                                                                               
346X30   RES      0                 RECOVERY MODE 2                             
         LB,R4    IOQ5,R3           CURRENT FUNCTION                            
         CI,R4    FCFLP             IS IT FORMAT                                
         BE       346XIS            YES, SENSE AND QUIT                         
*                                   NO                                          
         CI,R4    FCWLPF            IS IT PRINT WITH FORMAT                     
         BNE      346XRTY           NO, CAN JUST RETRY ORDER                    
*                                   YES, NEED NEW FORMAT                        
         LI,R7    FCSENS1**8        SENSE, THEN NEW FORMAT                      
         BAL,R0   RE:ENT                                                        
         STH,R7   DCT17,R1                                                      
         B        346XRTY           GO RETRY                                    
         PAGE                                                                   
346X40   RES      0                 NO MODES SET                                
         CI,R8    BIT4**-16         UNUSUAL END SET                             
         BANZ     346XIS            YES, INCONSISTANT STATUS                    
*                                   NO                                          
         CI,R5    BIT9**-16         TRANSMISSION DATA ERROR                     
         BANZ     346XRTY           YES, RETRY                                  
*                                   NO                                          
         CI,R5    BIT8**-16         INCORRECT LENGTH                            
         BANZ     346XIS            YES, NOT ALLOWED, INCONSISTANT STATUS       
*                                   NO                                          
         CI,R8    BIT3**-16         MANUAL                                      
         BAZ      346XIS            NO, INCONSISTANT STATUS                     
         B        346X05            YES, ITS OK                                 
************************************************************************        
* 346X RETRY LOGIC                                                              
************************************************************************        
346XRTY  RES      0                                                             
         LI,R12   FLGRETRY+FLGHOLD  SET FOR RETRY AND HOLD FOR SENSE            
*                                                                               
         BAL,R0   RE:ENT                                                        
*                                                                               
         LH,R0    DCT1,R1           GET DEVICE ADDRESS                          
         HIO,R0   *R0               HIO JUST FOR LUCK                           
*                                                                               
         B        IOSCU                                                         
         PAGE                                                                   
*                                                                               
**********************************************                                  
*        'INCONSISTENT STATUS' COMPLETION                                       
**********************************************                                  
346XIS   EQU      %                                                             
         BAL,R0   RE:ENT                                                        
         MTB,1    IOQ11,R3          INCR RETRY COUNT FOR A SENSE                
*                                    ORDER WITHOUT FOLLOW-ON                    
         LI,R7    FCSENS3**8        GET RTY CODE FOR SENSE-NO-FOLLOW            
         STH,R7   DCT17,R1                                                      
         B        346XRTY                                                       
         LI,R12   FLGRETRY+FLGHOLD                                              
         B        IOSCU                                                         
         PAGE                                                                   
**********************************************                                  
*        SENSE ORDER POST-PROCESSING                                            
**********************************************                                  
346X50   EQU      %                                                             
         BAL,R9   NEWIOCK                                                       
         NOP      0                                                             
**********************************************                                  
*        SENSE DATA LOGGING                                                     
**********************************************                                  
         DO       #XRBM                                                         
         DO       #ERRORLOG                                                     
         MTW,0    LOGFLAG           IS ERROR LOGGING ON                         
         BEZ      346X55            NO                                          
*                                   YES                                         
         BAL,R0   RE:ENT                                                        
         LW,R7    IOQERROR,R3       IS THERE A ERROR LOG BUFFER                 
         BEZ      346X55            NO                                          
*                                   YES                                         
         LH,R5    DCT7,R1           CLIST ADDR                                  
         SLS,R5   1                 MAKE IT A WORD ADDRESS                      
         AI,R5    SENSEBUF          POINTER TO SENSE DATA                       
*                                                                               
         LCI      4                                                             
         LM,R8    0,R5                                                          
         STM,R8   LOGSENSE,R7       STORE AWAY SENSE DATA                       
         LM,R8    ZEROS                                                         
         STM,R8   0,R4              CLEAR SENSE DATA IN CLIST                   
         PAGE                                                                   
*                                                                               
* SENSE DONE                                                                    
*                                                                               
346X55   RES      0                                                             
         LB,R0    IOQ14,R3          GET REQUEST PRIORITY                        
         CI,R8    X'FF'             IS IT BACKGROUND                            
         BNE      346X57            NO                                          
*                                   YES                                         
         MTB,0    IOQ11,R3          ANY RETRIES LEFT                            
         BEZ      LPHELP            NO, ASK FOR HELP                            
*                                                                               
346X57   RES      0                                                             
         ENABLE                                                                 
         FIN      #ERRORLOG                                                     
         FIN      #XRBM                                                         
         LB,R4    IOQ5,R3           GET CURRENT FUNCTION CODE                   
         CI,R4    FCSENS4           IS IT A SENSE 4                             
         BE       346X70            YES, FOLLOW ON                              
*                                   NO                                          
         CI,R4    FCSENS3           IS THIS A SENSE-NO-FOLLOW CLEAN-UP          
         BE       LPINCST           REPORT INCONSISTENT STATUS                  
*                                                                               
         CI,R4    FCSENS2           IS IT MODE 1                                
         BE       346X60            YES                                         
*                                   NO, ITS MODE 2                              
         BAL,R8   NEWFORMAT         SET UP NEW FORMAT                           
         B        346X70            AND FOLLOW ON                               
         PAGE                                                                   
346X60   RES      0                                                             
         LB,R4    IOQ4,R3           INITIAL FUNCTION                            
         BAL,R0   RE:ENT            CHECK RE:ENTRANCE                           
         STH,R4   DCT17,R1          SET FOR FOLLOW ON                           
346X70   RES      0                                                             
         LI,R12   FLGFOLOW+FLGINTER SET FLAG FOR FOLLOW-ON                      
         B        IOSCU                                                         
        FIN      #LP346X                                                        
         TITLE    '2310 LINE PRINTER POST HANDLER'                              
        DO       #PAX                                                           
**********************************************                                  
* PAX SPECIAL LINE PRINTER POST HANDLER                                         
**********************************************                                  
PAXLPOST  RES     0                                                             
         BAL,R9   NEWIOCK           SET UP REGISTERS                            
         NOP      0                 IGNORE ERRORS                               
         LI,R12   TYCOK             SET FOR TYC OK                              
         B        IOSCU                                                         
        FIN      #PAX                                                           
         TITLE    'COMMON POST-HANDLER ROUTINES'                                
**********************************************                                  
* COMPUTE NEW FORMAT BYTE FROM OLD FORMAT BYTE                                  
*                                                                               
* LINK IS R8                                                                    
**********************************************                                  
NEWFORMAT RES     0                                                             
         LW,R5    IOQ8,R3           BUFFER ADDRESS                              
         LB,R5    0,R5              FORMAT BYTE                                 
         SLS,R5   -4                                                            
         AND,R5   X7                                                            
         LB,R5    NEWFORM,R5        NEW FORMAT BYTE                             
         STB,R5   R5                LEFT JUSTIFY                                
*                                                                               
         BAL,R0   RE:ENT                                                        
         STW,R5   IOQ12,R3          TO IOQ12                                    
         MTW,1    IOQ8,R3           INCREMENT BYTE ADDRESS                      
         MTH,-1   IOQ9,R3           DECREMENT BYTE COUNT                        
*                                                                               
         LI,R5    FCWLPNF**8+FCWLPNF WRITE LP WITH NEW FORMAT                   
         STH,R5   DCT17,R1                                                      
         B        *R8               RETURN                                      
*                                                                               
NEWFORM  EQU      %-1               TABLE TO LOCATE NEW FORMAT BYTE             
         DATA,1   X'C0',X'60',X'60',X'C0'                                       
         PAGE                                                                   
**********************************************                                  
* PAGE ABORT EXIT BECAUSE OF INCONSISTENT STATUS                                
**********************************************                                  
LPINCST  RES      0                                                             
         LI,R13   MSG2                                                          
LPPGABT  RES      0                                                             
         LI,R12   TYCPGABT+FLGMSG                                               
*                                                                               
         LB,R8    IOQ14,R3          GET REQUEST PRIORITY                        
         CI,R8    X'FF'             IS IT BACKGROUND                            
         BE       LPHELP            YES, ASK FOR HELP                           
         B        IOSCU             NO, REPORT ERROR                            
**********************************************                                  
* TEST MODE EXIT                                                                
**********************************************                                  
LPTM     RES      0                                                             
         LI,R13   MSG9                                                          
         BAL,R0   RE:ENT                                                        
         DO       #ERRORLOG                                                     
         BAL,R0   IOERROR           RECORD STATUS                               
         FIN      #ERRORLOG                                                     
         B        LPPGABT                                                       
         PAGE                                                                   
**********************************************                                  
* NOT OPERATIONAL EXIT                                                          
**********************************************                                  
LPNOTOP  RES      0                                                             
         LI,R13   MSG4A                                                         
         BAL,R0   RE:ENT                                                        
         DO       #ERRORLOG                                                     
         BAL,R0   IOERROR           RECORD STATUS                               
         FIN      #ERRORLOG                                                     
         B        LPPGABT                                                       
         PAGE                                                                   
**********************************************                                  
* RETRY EXIT                                                                    
**********************************************                                  
LPRETRY  RES      0                                                             
         BAL,R0   RE:ENT                                                        
*                                                                               
         LH,R0    DCT1,R1           GET DEVICE ADDRESS                          
         HIO,R0   *R0               HIO DEVICE FOR LUCK                         
*                                                                               
         LI,R12   FLGRETRY+FLGHOLD+FLGINTER                                     
*                                                                               
         MTB,0    IOQ11,R3          IS RETRY COUNT RUN DOWN                     
         BNEZ     IOSCU             NO, RETRY                                   
*                                   YES                                         
         LB,R8    IOQ14,R3          GET REQUEST PRIORITY                        
         CI,R8    X'FF'             IS IT BACKGROUND                            
         BNE      IOSCU             NO, REPORT IOERROR ON RETRYS GONE           
*                                   YES                                         
LPHELP   RES      0                                                             
         BAL,R0   RE:ENT                                                        
*                                                                               
         LH,R0    DCT1,R1           GET DEVICE ADDRESS                          
         HIO,R0   *R0               HIO IT FOR LUCK                             
*                                                                               
         MTB,1    IOQ11,R3          BUMP RETRY COUNT FOR LUCK                   
*                                                                               
         LI,R13   MSG2              ERROR MESSAGE                               
         LI,R12   FLGKEYC+FLGINTER  ASK FOR OPERATORS OPINION                   
*                                                                               
         LB,R0    IOQ4,R3           GET INITIAL FUNCTION                        
         STB,R0   IOQ5,R3           AND REPLACE CURRENT FUNCTION FOR RETRY      
         B        IOSCU                                                         
         PAGE                                                                   
         DO       (#LPRINT+#LPRNTLC)>0                                          
MDL7440  TEXT     '7440'                                                        
MDL7445  TEXT     '7445'                                                        
         FIN      LPRINT OR LPRNTLC                                             
         TITLE    'COMMAND LIST CONTROL TABLES'                                 
         DO       #LP346X                                                       
**********************************************                                  
*   COMMAND LISTS FOR 550 LINE PRINTER                                          
**********************************************                                  
*                                                                               
         BOUND    8                                                             
DOT346X  RES      0                                                             
DOT      SET      %                                                             
FCWLPWOF  :DOT     NSWRLP,5,FCSENS2,FCSENS3   0 WRITE LP W/O FORMAT             
FCWLPF    :DOT     NSWRLPF,5,FCSENS1,FCSENS3  1 WRITE LP, FORMAT                
FCFLP     :DOT     NSFORM,5,FCSENS2,FCSENS3   2 FORMAT LP                       
FCWLPNF   :DOT     NSNEWF,5,FCSENS4,FCSENS3   3 WRITE LP, NEW FORMAT            
FCSENS1   :DOT     NSSENS,5,FCSENS1,FCSENS3   4 SENSE, THEN MODE 2              
FCSENS2   :DOT     NSSENS,5,FCSENS2,FCSENS3   5 SENSE, THEN MODE 1              
FCSENS3   :DOT     NSSENS,5,FCSENS3,FCSENS3   6 SENSE, THEN TYCPGABT            
FCSENS4   :DOT     NSSENS,5,FCSENS4,FCWLPNF   7 SENSE, THEN NEW FORMAT          
         PAGE                                                                   
NSSENS   :CLIST   LPSENSE                        SENSE                          
NSWRLP   :CLIST   WRNC                           WRITE LP                       
NSNEWF   :CLIST   WRLPNF                         NEW FORMAT                     
NSWRLPF  :CLIST   WRNCF                          WRITE LP, FORMAT               
NSFORM   :CLIST   FORMNC                         FORMAT                         
         FIN      #LP346X                                                       
         PAGE                                                                   
        DO       (#LPRINT+#LP7446)>0                                            
**********************************************                                  
*   COMMAND LISTS FOR SIGMA LINE PRINTER                                        
**********************************************                                  
*                                                                               
         BOUND    8                                                             
DOTLP    EQU      %                                                             
DOT      SET      %                                                             
*                                                                               
FCWLPWOF  :DOT   CLWRLP,1,FCWLPWOF              0 WRITE LP W/O FORMAT           
FCWLPF    :DOT   CLWRLPF,1,FCWLPF               1 WRITE LP, FORMAT              
FCFLP     :DOT   CLFORM,1,FCFLP                 2 FORMAT LP                     
FCWLPNF   :DOT   CLNEWF,1,FCWLPNF               3 WRITE LP, NEW FORMAT          
CLWRLP   :CLIST   WRNC                           WRITE LP                       
CLNEWF   :CLIST   WRLPNF,WRNCF                   NEW FORMAT, WRITE              
CLWRLPF  :CLIST   WRNCF                          WRITE LP, FORMAT               
CLFORM   :CLIST   FORMNC                         FORMAT                         
        FIN      #LPRINT OR #LP7446                                             
         PAGE                                                                   
        DO       #LPRNTLC                                                       
**********************************************                                  
*   COMMAND LIST OFFSETS FOR LOW-COST LINE PRINTER                              
**********************************************                                  
*                                                                               
         BOUND    8                                                             
DOTLPLC   EQU     %                                                             
DOT      SET      %                                                             
FCWLPWOF  :DOT   WRLPLC,1,FCWLPWOF              0 PRINT (LOW-COST) WITHOUT FORMA
FCWLPF    :DOT   WRLPLCF,1,FCWLPF               1 PRINT (LOW-COST) WITH FORMAT  
FCFLP     :DOT   FORMLC,1,FCFLP                 2 FORMAT (LOW-COST)             
FCWLPNF  :DOT     NFORMLC,1,FCWLPNF                                             
         PAGE                                                                   
*                                                                               
*   COMMAND LISTS FOR LOW-COST PRINTER                                          
*                                                                               
WRLPLC   :CLIST   WRC                           PRINT                           
         :CLIST   WRNC                                                          
WRLPLCF  :CLIST   WRCF                          PRINT WITH FORMAT               
         :CLIST   WRNCF                                                         
FORMLC   :CLIST   FORMNC                        FORMAT                          
NFORMLC  :CLIST   WRLPNF,WRCF,WRLPNF,WRNCF      NEW FORMAT AND WRITE            
         BOUND    4                                                             
        FIN      #LPRNTLC                                                       
         PAGE                                                                   
        DO       #PAX                                                           
**********************************************                                  
* PAX COMMAND LISTS                                                             
**********************************************                                  
*                                                                               
         BOUND    8                                                             
DOTPAXLP   SET    %                                                             
DOT      SET      %                                                             
*                                                                               
FCWLPWOF  :DOT   CLPAX,1                                                        
CLPAX    :CLIST   WRLPNF,WRNC                                                   
*                                                                               
        FIN      #PAX                                                           
         PAGE                                                                   
*                                                                               
* COMMANDDOUBLEWORD SKELETONS FOR ALL LINE PRNTERS                              
*                                                                               
         BOUND    8                                                             
WRNC     :CDW     1,0,NCC,2         LP WRITE                                    
        DO1      #LPRNTLC                                                       
WRC      :CDW     1,0,CC,2          LP WRITE                                    
WRNCF    :CDW     5,0,NCC,2         LP WRITE,     FORMAT                        
        DO1      #LPRNTLC                                                       
WRCF     :CDW     5,0,CC,2          LP WRITE,     FORMAT                        
FORMNC   :CDW     3,0,NCC,2         LP FORMAT                                   
WRLPNF   :CDW     5,0,DC,1,1        LP NEW     FORMAT,1 BYTE FROM IOQ12         
         DO1      #LP346X                                                       
LPSENSE  :CDW     4,SENSE,NCC,4,3   LP SENSE                                    
         FIN      ANY LP AT ALL                                                 
         TITLE    'SYMBOLS'                                                     
         END                                                                    
