********************************************************************************
*M* ISCL USER INTERFACE FOR FILE MANIPULATION ON IRBT CONNECTIONS              *
********************************************************************************
*P*      NAME:    ISCL                                                         *
*,*      PURPOSE: ISCL ALLOWS THE USER ACCESS TO THE REMOTE ACCESS             *
*,*               FILE SYSTEM OF ISCL/RATLER. ISCL FORMATS USER RE-            *
*,*               QUESTS AND QUEUES THEM FOR THE APPROPRIATE REMOTE            *
*,*               RATLER, WHO PERFORMS MOST FILE ACCESS, RECONSTRUCT-          *
*,*               ION,EXAMINATION,ETC.                                         *
*,*      DESCRIPTION:  ISCL MUST BE A SPECIAL SHARED PROCESSOR WITH            *
*,*               JIT ACCESS TO ALLOW THE USER CONTROLLED ACCESS TO            *
*,*               REMOTE DEVICES. THESE DEVICES ARE REQUIRED IN EACH           *
*,*               APPROPRIATE WORKSTATION DEFINITION AS BEING DEVICE           *
*,*               'FO' FOR 'FILES OUT' AND SHOULD BE C0-PRIVILEGED             *
*,*               FOR SYSTEM SECURITY.                                         *
*,*                    ISCL SCANS THE INPUT COMMAND STRING ( WHETHER           *
*,*               FROM AN ON-LINE OR BATCH CALL OR AS A M:LINK TARGET )        *
*,*               AND PLACES THE NECESSARY FILE IDENTIFICATION INFOR-          *
*,*               MATION IN A STACK TO FORM THE MESSAGE WHICH WILL BE          *
*,*               PASSED TO THE REMOTE RATLER. IF THE REQUEST IS A             *
*,*               'DELETE', 'LIST', OR 'SEND' OF A FILE FROM THE IRBT,         *
*,*               THE STACK IS WRITTEN TO 'FO' WITH A FORM NAME OF             *
*,*               'ISCL' TO IDENTIFY IT AS A USER REQUEST.                     *
*,*                    OTHERWISE THE REQUEST MUST DESIGN THE PASSING           *
*,*               OF A FILE TO AN IRBT. WHENCE ISCL OPENS THE FILE AND         *
*,*               WRITES A ONE-RECORD HEADER, CONTAINING ALL APPRO -           *
*,*               PRIATE FILE DESCRIPTORS ( NAMELY, READ,WRITE, AND            *
*,*               EXECUTE ACCOUNTS AND EXPIRATION DATE ), FOLLOWED BY          *
*,*               THE FILE RECORDS ( PRECEDED BY RECORD SIZE AND KEY           *
*,*               OR BLOCK NUMBER WHERE APPLICABLE ). AN EOF IS WRITTEN        *
*,*               AT THE END OF THE FILE. ALL OF THIS IS WRITTEN               *
*,*               TO 'FO' WITHOUT A FORM NAME.                                 *
*,*                    LOGICAL RECORDS, WRITTEN TO DEVICE 'FO', ARE            *
*,*               GRANULATED BY ISCL TO 120 BYTES, A SIZE COMPATIBLE           *
*,*               TO THAT HANDLED BY THE HASP INTERPHASE.                      *
*,*                    BECAUSE ISCL BUMPS THE USER'S PRIVILEGE,                *
*,*               EXIT CONTROL IS TAKEN TO GUARANTEE SYSTEM SECURITY.          *
*,*      REFERENCE:  ISCL/RATLER EXTERNAL AND INTERNAL SPECIFICATIONS,         *
*,*               REMOTE PROCESSING MANUAL, AND CORRESPONDING RATLER           *
*,*               REPORTS                                                      *
********************************************************************************
*C*      VERSION  C00 ISCL/RATLER IS A TOTALLY NEW FEATURE.
********************************************************************************
SS       SET      0                 CPV+ IF NON-ZERO
***********************************************************************
         SYSTEM   SIG7
R0       EQU      0
R1       EQU      1
R2       EQU      2
R3       EQU      3
R4       EQU      4
R5       EQU      5
R6       EQU      6
R7       EQU      7
R8       EQU      8
R9       EQU      9
R10      EQU      10
R11      EQU      11
R12      EQU      12
R13      EQU      13
R14      EQU      14
R15      EQU      15
* * * * * * * * * * * * * * * * * * * * * * * * * *
         REF      M:LO              BATCH ONLY : REPRINT COMMAND
         REF      M:DO              INTERNAL READ OF ERROR MESSAGE FILE
         REF      M:SI              COMMAND INPUT
         REF      M:EO              OUTPUT TO 'FO' AT A WORKSTATION
         REF      M:LL              DIAGNOSTIC OUTPUT : ERROR MESSAGES
         REF      M:EI              FILE INPUT AND/OR TARGET FILE CHECK
         REF      J:JIT             INPUT : ONLINE OR BATCH MODE
         REF      J:ACCN            INPUT : USER ACCOUNT
         REF      JB:PRIV           INTERNALLY USED TO BUMP PRIVILEGE
         REF      J:CCBUF           INPUT : COMMAND STRING WHEN LINKED TO
         REF      JB:CCARS          INPUT : SIZE OF STRING WHEN LINKED TO
         REF      ERRMSGE           ROUTINE TO READ ERRMSG FILE
* * * * * * * * * * * * * * * * * * * * * * * * * *
         DEF      ACORN             RELATIVE ZERO FOR PROCEDURE PATCHING
         DEF      PATCH             PATCH LOCATIONS ( 20 WORDS )
         DEF      STARTREE          RELATIVE ZERO FOR DATA PATCHING
         DEF      THRSHLD           INCREMENTAL LOCATION FOR CHANGING
*,*                                 THE NO. OF PAGES OBTAINED WHEN EN-
*,*                                 COUNTERING A 'SHORT BUFFER' CONDITION
* * * * * * * * * * * * * * * * * * * * * * * * * *
HCMASK   EQU      X'F0'
APOMASK  EQU      X'08'
PRMASK   EQU      X'0E'
COMMASK  EQU      X'7F'
ALLMASK  EQU      X'3F'
BLNKMASK EQU      X'70'
SPACEMASK EQU     X'04'
SCMASK   EQU      X'06'
NOAPMASK EQU      X'37'
M8       EQU      X'8'
M2       EQU      X'2'
         SPACE    2
* * * * * * * * * * * * * * * * * * * * * * * * * *
SNDBIT   EQU      X'1'
LSTBIT   EQU      X'2'
DELBIT   EQU      X'4'
OVRBIT   EQU      X'2'
RVRSBIT  EQU      X'4'
LEABIT   EQU      X'4'
RDACBIT  EQU      X'10'
WRACBIT  EQU      X'20'
WSNBIT   EQU      X'40'
LABIT    EQU      X'80'
NXTFBIT  EQU      X'400'
EXPBIT   EQU      X'100'
NLSTBIT  EQU      X'80000000'
LVLP     EQU      X'10000'
* * * * * * * * * * * * * * * * * * * * * * * * * *
ACTBIT   EQU      X'8'
PWDBIT   EQU      X'200'
FLEBIT   EQU      X'1000'
INOUT    EQU      X'4'
IN       EQU      X'1'
KEYED    EQU      X'2'
PBITS    EQU      RDACBIT+WRACBIT+NXTFBIT+;
                  EXPBIT+ACTBIT+PWDBIT
RECSIZ   EQU      X'78'
BLANK    EQU      X'40'
TAB      EQU      X'05'
NAME     EQU      'ISCL'
* * * * * * * * * * * * * * * * * * * * * * * * * * *
PRCDUR   CSECT    1
STARTREE CSECT    0
CSECT1   CSECT    2
CMDLIST  EQU      %
CSECT2   CSECT    2
CMDTBL   EQU      %
         SYSTEM   BPM
* * * * * * * * * * * * * * * * * * * * * * * * * * *
D:P      SET      1
TABL     CNAME
         PROC
         LOCAL    LOC
         USECT    CSECT2
LOC      TEXT     AF
         USECT    CSECT1
         GEN,8,24 S:NUMC(AF),BA(LOC)
         LOCAL
         PEND
BYTE1    CNAME    1
BYTE     CNAME
         PROC
         DO       NAME(1)=1
         DATA,1   AF-FP:
         ELSE
         DATA,1   AF-CMD%
         FIN
         PEND
ASSET    CNAME
         PROC
         USECT    CSECT1
LF(1)    DATA,1   NUM(AF)-1,SSUM,AF(1)
         USECT    CSECT2
         BOUND    4
LF(2)    EQU      %
         DATA,1   0,AF(2)
         DO1      NUM(AF)>2
         DATA,1   AF(3)
         DO1      NUM(AF)>3
         DATA,1   AF(4)
         DO1      NUM(AF)>4
         DATA,1   AF(5)
         DO1      NUM(AF)>5
         ERROR,3  'AF FIELD ILLEGAL'
SSUM     SET      (NUM(AF)+3)**-2
         PEND
* * * * * * * * * * * * * * * * * * * * * * * * * * *
         TABL     'S '
         TABL     'SEND '
         TABL     'L '
         TABL     'LIST '
         TABL     'D '
         TABL     'DELETE '
CMDDIV   EQU      %-CMDLIST
         TABL     'E '
         TABL     'END '
CMDCNT   EQU      %-CMDLIST
PRPLIST  EQU      %
         TABL     'ON '
         TABL     'TO '
         TABL     'OVER '
PRPCNT   EQU      %-PRPLIST
L3LLIST  EQU      %
         TABL     'A'
         TABL     'EA'
L3LCNT   EQU      %-L3LLIST
L3SLIST  EQU      %
         TABL     'RD'
         TABL     'WR'
         TABL     'EXP'
L3SCNT   EQU      %-L3SLIST
L4PLIST  EQU      %
         DATA     L3SLIST
         DATA     L3LLIST
L4PCNT   EQU      %
         DATA     L3SCNT
         DATA     L3LCNT
LVL3LP   EQU      %
         DATA,1   LABIT
         DATA,1   LEABIT
         BOUND    4
CMDVEC   EQU      %
         BYTE     EXIT
         BOUND    4
FPB:VEC  EQU      %
         BYTE1    FP:               DUMMY
         BYTE1    FPMOVE
         BYTE1    FPMOVE
         BYTE1    FPMOVE
         BYTE1    FPSIZE
         BYTE1    FPORG
         BOUND    4
SSUM     SET      0
SNDF,SNDFN ASSET  X'80','#'
         ASSET    X'00','('
         ASSET    X'44',','
         ASSET    X'00','/'
         USECT    CSECT1
SNDCNT   EQU      BA(%)-BA(SNDF)-1
         SPACE    2
         BOUND    4
SSUM     SET      0
LSTF,LSTFN ASSET  X'00','#','/'
         ASSET    X'04','('
         ASSET    X'02',','
         USECT    CSECT1
LSTCNT   EQU      BA(%)-BA(LSTF)-1
         SPACE    2
         BOUND    4
SSUM     SET      0
DELF,DELFN ASSET  X'00','#','/','(',')'
         ASSET    X'02',','
         USECT    CSECT1
DELCNT   EQU      BA(%)-BA(DELF)-1
         SPACE    2
         BOUND    4
CMDBIT   EQU      %
         DATA,1   SNDBIT,LSTBIT,DELBIT
         BOUND    4
CACTF    EQU      %
         DATA     SNDF
         DATA     LSTF
         DATA     DELF
CACTFN   EQU      %
         DATA     SNDFN
         DATA     LSTFN
         DATA     DELFN
         SPACE    2
CACTCNT  EQU      %
         DATA     SNDCNT
         DATA     LSTCNT
         DATA     DELCNT
         SPACE    2
CWLIST   EQU      %
         DATA     X'01000000'
         DATA     X'02000202'
         DATA     X'03000202'
WSNCW    DATA     X'FF000303'
CBLIST   EQU      %
         DATA     FLEBIT
         DATA     ACTBIT
         DATA     PWDBIT
* * * * * * * * * * * * * * * * * * * * * * * * * * *
AP:PRE   EQU      %
         DATA,1   0                 DUMMY
         DATA,1   'C'
         DATA,1   'X'
APOCNT   EQU      BA(%)-BA(AP:PRE)-1
         BOUND    4
* * * * * * * * * * * * * * * * * * * * * * * * * * *
L4:VECB  EQU      %
         DATA     LV3
         DATA     TRT
         DATA     TRTX
* * * * * * * * * * * * * * * * * * * * * * * * * * *
L4PCT    EQU      %
         DATA     PRCNT
         DATA     PRR1CNT
         DATA     PRR2CNT
* * * * * * * * * * * * * * * * * * * * * * * * * * *
L4PF     EQU      %
         DATA     PRF
         DATA     PRR1F
         DATA     PRR2F
* * * * * * * * * * * * * * * * * * * * * * * * * * *
L4PFN    EQU      %
         DATA     PRFN
         DATA     PRR1FN
         DATA     PRR2FN
* * * * * * * * * * * * * * * * * * * * * * * * * * *
L4MASK   EQU      %
         DATA,1   PRMASK,APOMASK,HCMASK
         BOUND    4
* * * * * * * * * * * * * * * * * * * * * * * * * * *
L4:VEC   EQU      %-1
         DATA     EBCD
         DATA     HXCOMP
* * * * * * * * * * * * * * * * * * * * * * * * * *
SSUM     SET      0
PRF,PRFN ASSET    X'00',' ','@',X'05'
         ASSET    X'0A',')'
         ASSET    X'02',','
         USECT    CSECT1
PRCNT    EQU      BA(%)-BA(PRF)
         BOUND    4
* * * * * * * * * * * * * * * * * * * * * * * * * * *
SSUM     SET      0
PRR1F,PRR1FN ASSET X'44',' ',X'05'
         ASSET    X'04','@'
         ASSET    X'00',')'
         USECT    CSECT1
PRR1CNT  EQU      BA(%)-BA(PRR1F)
         BOUND    4
SSUM     SET      0
PRR2F,PRR2FN ASSET X'08',' ','@',X'05'
         ASSET    X'00',')'
         ASSET    X'44',','
         USECT    CSECT1
PRR2CNT  EQU      BA(%)-BA(PRR2F)
         BOUND    4
L4TEND   EQU      %
         DATA,1   X'08',X'08',X'80'
         BOUND    4
* * * * * * * * * * * * * * * * * * * * * * * * * * *
         USECT    PRCDUR
*D*      NAME:    ACORN
*D*
*D*      REGISTERS:  ALL REGISTERS ARE VULNERABLE
*D*
*D*      CALL:    CALL OF PROCESSOR BY USER
*D*
*D*      INTERFACE:  THIS ROUTINE CALLS THE FOLLOWING ROUTINES :
*D*                      MMINIT -> FOR INITIALIZATION OF MEMORY
*D*                                 MANAGEMENT.
*D*
*D*      INPUT:   EXTERNAL DATA INPUT :
*D*                      JB:PRIV -> USER'S NORMAL PRIVILEGE
*D*                      R8      -> MODE OF ENTRY
*D*               NO INTERNAL DATA INPUT.
*D*
*D*      OUTPUT:  NO EXTERNAL DATA AFFECTED.
*D*               INTERNAL DATA ALTERED :
*D*                      UPRIV -> CELL TO HOLD USER PRIVILEGE
*D*
*D*      DESCRIPTION:  THIS ROUTINE ESTABLISHES EXIT CONTROL FOR
*D*               THE PROCESSOR AND INITIALIZES MEMORY MANAGEMENT
*D*               CELLS VIA THE ROUTINE MMINIT. IF THE ENTRY IS A
*D*               RESULT OF AN M:LINK, EXIT IS TO THE ROUTINE LNK.
*D*               OTHERWISE, THE ENTRY MESSAGE IS PRINTED AND THE
*D*               READ ROUTINE ENTERED.
*D*
*D*      ENVIRONMENT:  ISCL MUST HAVE JIT ACCESS TO FUNCTION PRO-
*D*               PERLY. IF NOT, THE PROCESSOR WILL LOOP IN THE
*D*               EXIT CONTROL ROUTINE ATTEMPTING TO STORE IN THE
*D*               USER'S JIT.
*D*
*D*
ACORN,PC M:PC     '>'
,XCTL    M:XCON   XCON
         LB,R0    JB:PRIV
         STW,R0   UPRIV
         STW,R8   XM:R15
         BAL,R15  MMINIT
         LW,R8    XM:R15
         BNEZ     LNK
         LI,R8    HEREMS
,FPTPRNT M:PRINT  (MESS,*R8)
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    READ
*D*
*D*      REGISTERS:  ALL REGISTERS ARE VOLATILE
*D*
*D*      CALL:    B READ  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLED :
*D*                      TRT -> TRANSLATE ROUTINE
*D*                      CBS -> COMPARISON ROUTINE TO DETERMINE
*D*                              TYPE OF COMMAND INPUT
*D*
*D*      INPUT:   EXTERNAL DATA :
*D*                      J:JIT -> USER MODE ( O,B,G )
*D*                      M:SI  -> COMMAND INPUT
*D*               INTERNAL DATA :
*D*                      LNKSIG -> FLAG FOR LINK MODE OF USE
*D*
*D*      DATA:    INTERNAL DATA:
*D*                      INITIAL -> INITIAL VALUES FOR WSNFPT,SIGLOC,
*D*                                  AND LDWSN
*D*                      CMDLIST -> TABLE OF LEGITIMATE COMMANDS
*D*                      CMDCNT  -> TABLE OF COMMAND LENGTHS
*D*                      CMDVEC  -> COMMAND ROUTINE TABLE
*D*
*D*      OUTPUT:  EXTERNAL DATA :
*D*                     M:LO -> COMMAND OUTPUT IF BATCH MODE
*D*               INTERNAL DATA :
*D*                      STACK  -> BLANK FILLED
*D*                      BUFFER -> COMMAND LINE INPUT - BLANK PADDED
*D*
*D*      DESCRIPTION:  READ EXITS IF THIS IS THE RETURN OF A LINKED
*D*               ENTRY. OTHERWISE WSNFPT,SIGLOC, AND LDWSN ARE INI-
*D*               TIALIZED; STACK AND BUFFER BLANK-FILLED. THEN THE
*D*               NEXT COMMAND IS READ THROUGH M:SI. A BLANK REPLACES
*D*               ANY POSSIBLE TRAILING CHARACTER AND THE COMMAND
*D*               LINE IS WRITTEN THROUGH M:LO IF NOT ON-LINE.
*D*                    PRECEDING BLANKS ARE IGNORED, AND THE TRT
*D*               ROUTINE IS CALLED TO FIND THE COMMAND WORD. CBS
*D*               COMPARES THE INPUT COMMAND WITH THE COMMAND TABLE
*D*               EXITING TO THE COMMAND ROUTINE WHEN FOUND.
*D*                    ANY DETECTED COMMAND LINE ERRORS ARE FLAGGED
*D*               BY AN EXIT TO UNK%1, THE MAIN ERROR-HANDLING ROU-
*D*               TINE.
*D*
READ     EQU      %
         MTW,0    LNKSIG
         BNEZ     EXIT
         CAL1,1   ADJUSTEI
         LCI      7
         LM,R10   INITIAL
         STM,R10  WSNFPT
         LW,R1    BLKSG
         MBS,0    BA(CMDTBL)+1
         LW,R1    BLKBF
         MBS,0    BA(CMDTBL)+1
READ2    EQU      %
         M:READ   M:SI,(BUF,BUFFER),(SIZE,80)
         LH,R10   M:SI+4
         SLS,R10  -1
         BLEZ     READ
         LW,R5    R10
         AI,R5    -1
         LI,R11   BLANK
         STB,R11  BUFFER,R5
READ1    EQU      %
         LC       J:JIT
         BCS,8    %+2
         M:WRITE  M:LO,(BUF,BUFFER),(SIZE,*R10)
         LI,R11   X'40'
         LI,R1    0
READ4    EQU      %
         CB,R11   BUFFER,R1         SUPPRESS OPENING BLANKS
         BNE      READ3             OK,DONE
         AI,R1    1                 BUMP INDEX
         AI,R10   -1                DECREMENT COUNT
         BG       READ4
         B        READ2             CONTINUE IF MORE CHARACTERS
READ3    EQU      %
         LI,R7    BA(BUFFER)
         AW,R7    R1                SET UP BUFFER POINTER
         LI,R11   COMMASK           (X'7F')
         BAL,R14  TRT
         B        UNK%1
         BCR,4    UNK%1
         LB,R10   R7
         LW,R2    R4
         LI,R11   CMDLIST
         LI,R9    CMDCNT
         BAL,R14  CBS
         B        UNK%1
         SLS,R1   -1
         CI,R1    CMDDIV**-1
         BL       CMD:
         AI,R1    -CMDDIV**-1       TRUNCATION ERROR HERE OK
         LB,R1    CMDVEC,R1
         B        CMD%,R1
* * * * * * * * * * * * * * * * * * * * * * * *
*F*      NAME:    FIDX
*F*
*F*      PURPOSE:  FIDX AND THE ASSOCIATED ROUTINES COMPRISE THE
*F*               COMMAND PARSING AND INTERPRETATION FUNCTION FOR
*F*               THE ISCL PROCESSOR. THE BASIC PRINCIPLE OF OPER-
*F*               ATION OF THESE ROUTINES IS THE DUAL FUNCTION
*F*               OF THE PARSING AS A VALIDITY CHECK AND MESSAGE
*F*               BUILDER. THIS IS POSSIBLE BECAUSE THE SEQUENCE
*F*               OF PARAMETERS ENCOUNTERED IN THE COMMAND LINE
*F*               IS THE SAME AS THE POSITION OF THOSE PARAMETERS
*F*               IN THE INTERPRETED REQUEST PRODUCED BY ISCL FOR
*F*               A REMOTE RATLER.
*F*                THE COMMAND PARSING IS PERFORMED VIA THE TTBS
*F*               INSTRUCTION. THE SIGNIFICANCE OF EACH BIT IN THE
*F*               TRANSLATE MASK IS THE SAME THROUGHOUT THE ROUTINES
*F*               BUT THE PRE-TRANSLATED IMAGE OF THESE MASKS IS
*F*               MODIFIED TO SUIT THE COMMMAND BEING PARSED. THE
*F*               BIT SIGNIFICANCE IS SUMMARIZED AS :
*F*
*F*                    BIT          MEANING
*F*               X'80'             UNUSED - RESERVED ( LABELLED TAPE )
*F*               X'40'             BLANK PARSING TERMINATOR
*F*               X'20'             ILLEGAL CHARACTER
*F*               X'10'             END OF COMMAND LINE
*F*               X'08'             LEVEL 4 ACTIVATION
*F*               X'04'             LEVEL 3 ACTIVATION
*F*               X'02'             LEVEL 2 ACTIVATION
*F*               X'01'             LEVEL 1 ACTIVATION  .
*F*
*F*                THE LEVEL N BITS ARE SIGNIFICANT IN THE PARSING OF
*F*               A FILE IDENTIFICATION. IN ISCL/RATLER TERMINOLOGY,
*F*               EACH FILE IDENTIFICATION COMPOSES A FIELD, AND EACH
*F*               SUB-UNIT ( NAME, ACCOUNT, OR PASSWORD ) IS A SUB-
*F*               FIELD. LEVELS 3 AND 4 ACTIVATION IMPLY END OF THE
*F*               FIELD, LEVEL 4 IMPLYING THAT A SPECIAL CASED CHAR-
*F*               ACTER HAS BEEN ENCOUNTERED ( CURRENTLY ''' ). LEVEL
*F*               2 ACTIVATION EFFECTS THE END OF THE FIELD, WITH
*F*               SIMILAR FIELDS TO FOLLOW ( THEREBY RESULTING IN A
*F*               RE-ENTRANCY OF THE PARSING LOGIC ). LEVEL 1 MEANS
*F*               THAT THE SUB-FIELD HAS ENDED. IT IS APPARENT THAT
*F*               EACH COMMAND HAS ITS OWN SET OF PRE-TRANSLATED
*F*               IMAGES, SINCE FOR EXAMPLE THE SEND COMMAND HAS NO
*F*               FACILITY FOR THE SENDING OF TWO FILES ONTO ONE FILE
*F*               AS OF YET.
*F*                SPECIAL CASED CHARACTERS CAUSE THE MODIFICATION OF
*F*               THE TRANSLATE TABLE SO THAT THE CHARACTER(S) THAT
*F*               TERMINATE THE SPECIAL FIELD CAN BE FOUND AND THE
*F*               CONTENTS OF THAT FIELD PROPERLY EVALUATED. DUE TO
*F*               THE VAST DIFFERENCE IN TRANSLATE TABLES FOR THE EX-
*F*               AMINATION OF HEXADECIMAL STRINGS, THE TABLE TRXTBL
*F*               IS USED IN THAT CIRCUMSTANCE. OTHER THAN THAT, ALL
*F*               SPECIAL CASED CONDITIONS MODIFY AND UN-MODIFY ,AT
*F*               TERMINATION OF SPECIAL FIELD, THE NORMAL TRANSLATE
*F*               TABLE.
*F*                MESSAGE BUILDING IS ACCOMPLISHED IN THE STACK, INTO
*F*               WHICH EACH PARAMETER FOR EACH FILE IDENTIFICATION IS
*F*               'PUSHED' WHEN PARSED. EACH COMPLETE FILE IDENTIFI-
*F*               CATION IS PRECEDED BY A PARAMETER PRESENCE WORD,
*F*               SET BITS INDICATING WHICH PARAMETERS ARE PRESENT
*F*               IN THE FOLLOWING SET. THE FIRST PRESENCE WORD OF
*F*               THE STACK SERVES AS THE COMMAND WORD ALSO.
*F*               BITS RELATING TO THE COMMAND SPCIFICATIONS ( SUCH
*F*               AS WHICH COMMAND, WAS 'OVER' SPECIFIED, WHAT OPTIONS
*F*               WERE INCLUDED, ETC. ) ARE PRESENT IN THIS WORD.
*F*               ALL THESE PRESENCE WORDS ARE FORWARD-LINKED.
*D*      NAME:    CMD:
*D*
*D*      REGISTERS:  R1,R2,R4,R11,R12,R13,R14 VULNERABLE
*D*
*D*      CALL:    B CMD:   ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THIS ROUTINE CALLS THE FOLLOWING ROUTINES :
*D*                      TRTSET -> SET UP TRANSLATE TABLE
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R1 -> INDEX INTO PARALLEL COMMAND TABLES
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      CMDBIT -> TABLE OF COMMAND BITS FOR SIGNALS
*D*                      CACTCNT-> TABLE OF TRT MODIFICATION COUNTS
*D*                      CACTF  -> TABLE OF ADDRESSES OF MODIFI-
*D*                                 CATION LISTS
*D*                      CACTFN -> TABLE OF ADDRESSES OF MODIFICA-
*D*                                 TION LISTS
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      TRTBL -> MODIFIED TRANSLATE TABLE
*D*
*D*      DESCRIPTION:  THIS ROUTINE SETS THE PROPER COMMAND BIT IN
*D*               SIGNALS ( ZEROING REST OF CELL ) AND THEN PICKS UP
*D*               THE APPROPRIATE COMMAND PARAMETERS FOR THE TRANS-
*D*               LATE TABLE MODIFICATION. THEN THE ROUTINE TRTSET IS
*D*               ENTERED. UPON RETURN, TRANSLATE INITIALIZATION IS
*D*               THE EXIT POINT.
*D*
CMD:     EQU      %
         LB,R4    CMDBIT,R1
         STW,R4   SIGNALS
         LW,R11   CACTCNT,R1
         LW,R12   CACTF,R1
         LW,R13   CACTFN,R1
         BAL,R14  TRTSET
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    TINIT
*D*
*D*      REGISTERS:  R3,R5,R8,R11 VULNERABLE
*D*
*D*      CALL:    B TINIT   ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO ROUTINES CALLED
*D*
*D*      INPUT:   NONE
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      SIGNALS -> CELL CONTAINING PRESENCE BITS,
*D*                                  COMMAND BITS, CONTROL BITS,ETC.
*D*                      STACK   -> STACK FOR FILE PARAMETERS --
*D*                                  POINTERS ARE INITIALIZED
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      SIGLOC -> INITIALIZED TO POINT TO SIGNALS
*D*                      R11    -> INITIAL TRANSLATE MASK
*D*                      R3     -> INITIAL SUB-FIELD COUNTER
*D*                      R5     -> INITIAL STACK POINTER
*D*                      R8     -> INITIAL CONTROL WORD POINTER
*D*
*D*      DESCRIPTION:  TINIT LOADS THE VARIOUS REGISTER POINTERS AND
*D*               INITIALIZES THE AFOREMENTIONED CELLS. EXIT IS TO
*D*               THE ROUTINE FIDX.
*D*
TINIT    EQU      %
         LI,R11   ALLMASK           (X'3F')
         LI,R3    0
         LI,R8    SIGNALS
         STW,R8   SIGLOC
         LI,R8    STACK
         LI,R5    BA(STACK+1)
* * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    FIDX
*D*
*D*      REGISTERS:  R3,R8,R11 PRESERVED
*D*                  R4,R5,R6,R7,R9,R10,R12,R13,R14,R15 VULNERABLE
*D*
*D*      CALL:    B FIDX,FIDXS   ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THIS ROUTINE CALLS THE FOLLOWING ROUTINES :
*D*                      TRT    -> TRANSLATE ROUTINE
*D*                      TEXT   -> COUNT ROUTINE TO COUNT # OF CHARS
*D*                                 LAST TRANSLATED
*D*                      TXT    -> ROUTINE TO CHECK SUB-FIELD COUNTER
*D*                                 AND TRUNCATE COUNT IF NECESSARY
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R3   -> SUB-FIELD COUNTER
*D*                      R5   -> STACK POINTER
*D*                      R7   -> COMMAND LINE POINTER
*D*                      R8   -> CONTROL WORD POINTER
*D*                      R10  -> COMMAND LINE COUNT
*D*                      R11  -> TRANSLATE MASK
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      SIGLOC -> CURRENT SIGNALS POINTER
*D*                      CWLIST -> TABLE OF SUB-FIELD CONTROL WORDS
*D*                      CBLIST -> TABLE OF SUB-FIELD PRESENCE BITS
*D*
*D*      OUTPUT:  WHERE APPROPRIATE ( DEPENDENT ON EXIT POINT ) :
*D*               INTERNAL DATA :
*D*                      R4  -> POINTER TO START OF LAST TRANSLATE
*D*                      R7  -> UPDATED COMMAND LINE POINTER
*D*                      R10 -> UPDATED COMMAND LINE COUNT
*D*                      R12 -> RESULTANT MASK FROM TRANSLATE
*D*                      R14 -> COUNT OF LAST TRANSLATE
*D*                      R15 -> RETURN POINT FOR FOLLOWING ROUTINES
*D*                      SIGLOC -> APPROPRIATE PRESENCE BIT SET
*D*                      STACK -> APPROPRIATE SUB-FIELD CONTROL WORD
*D*
*D*      DESCRIPTION:  IF ENTRY IS AT FIDXS, PRECEDING BLANKS ARE
*D*               SUPPRESSED AND FIDX IS ENTERED. FROM FIDX, THE
*D*               COMMAND POINTER AND COUNT ARE BUMPED OVER THE LAST
*D*               EXAMINED CHARACTER AND A TRANSLATE IS PERFORMED.
*D*               THE ROUTINE TEXT IS CALLED TO COUNT THE CHARACTERS
*D*               AND THE APPROPRIATE CONTROL WORD IS PLACED IN THE
*D*               STACK,AT THE SAME TIME SETTING THE CORRESPONDING
*D*               PRESENCE BIT. LEVEL 4 ACTIVATION IS SHORT-STOPPED TO
*D*               THE LEVEL4 HANDLER, OTHERWISE THE COUNT IS EITHER
*D*               TRUNCATED OR UTILIZED FOR TEXTC FORMATTING IN THE
*D*               ROUTINE TXT AND EXIT IS TO MBS.
*D*                    IF ANYONE ALONG THE WAY DETECTS THE END OF THE
*D*               COMMAND LINE, EXIT IS TO BUILD WITHOUT FINISHING THE
*D*               PROCESS. ERRORS DETECTED BY TRT, INDICATED BY THE CCS,
*D*               RESULT IN EXIT TO THE ERROR ROUTINE UNK%1.
*D*
FIDXS    EQU      %
         LI,R14   BLANK
         CB,R14   0,R7
         BNE      FIDX+3
         AI,R7    1
         BDR,R10  %-3
FIDX     EQU      %
         AI,R7    1
         AI,R10   -1
         BLEZ     BUILD
         BAL,R14  TRT
         B        BUILD
         BCS,15   UNK%1
         BAL,R13  TEXT
         BEZ      EXMN
         LI,R15   EXMN
FID1     EQU      %
         LW,R9    CWLIST,R3
         STW,R9   *R8
         LW,R9    CBLIST,R3
         STS,R9   *SIGLOC
         CI,R12   M8
         BANZ     LVL4
         BAL,R13  TXT
         B        MBS
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    EXMN
*D*
*D*      REGISTERS:  R9 VULNERABLE; ALL OTHERS PRESERVED
*D*
*D*      CALL:    B EXMN  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO INTERNAL CALLS TO ROUTINES.
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      BUFFER -> COMMAND LINE
*D*                      R7     -> COMMAND LINE POINTER
*D*                      R12    -> LAST TRANSLATE RESULTANT MASK
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      STACK -> LAST FLAG SET IN CONTROL WORD
*D*                                POINTED TO BY R8
*D*                      R9    -> CHARACTER CAUSING LEVEL 3 ACT-
*D*                                IVATION WHERE APPLICABLE
*D*
*D*      DESCRIPTION:  EXMN EXAMINES THE LAST RESULTANT TRANSLATE
*D*               MASK TO DETERMINE THE LEVEL OF ACTIVATION. A
*D*               SPECIAL CHECK IS MADE INITIALLY FOR THE SPECIFIC
*D*               INSTANCE OF LEVEL3 ( PAREN ) ACTIVATION CHARACTER
*D*               FOLLOWING A QUOTED STRING OR HEXADECIMAL STRING.
*D*                    OTHERWISE, THE APPROPRIATE ACTIVATION HANDLER
*D*               IS ENTERED. BEFORE ENTERING LEVEL3 OR 4 THOUGH,
*D*               SINCE SUCH ACTIVATION TERMINATES THE FIELD, THE
*D*               LAST VLP FLAG IS SET. THEN THE CHARACTER IS LOOK-
*D*               ED AT TO DIFFERENTIATE THE LEVEL 3 ACTIVATION.
*D*
EXMN     EQU      %
         CI,R12   M8
         BANZ     FID1              CASE : '   '( )
         CI,R12   M2
         BANZ     LVL2
         BL       LVL1
EXMND    EQU      %
         CI,R12   M2
         BANZ     LVL2
         CI,R14   0
         BNEZ     %+3
         AI,R5    -4                SUBTRACT 1 WD FOR MISSING PARAM.
         B        %+3               DONT SET LAST FLAG FOR NON-EXIS-
*                                   TENT PARAMETER.
         LI,R9    LVLP
         STS,R9   *R8
         LB,R9    0,R7
         CI,R9    '@'
         BE       FIDWSN
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    SPACE
*D*
*D*      REGISTERS:  R11,R9 PRESERVED; R5,R6,R7,R8,R12,R13,R14 VULNER-
*D*                   ABLE
*D*
*D*      CALL:    B SPACE  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLED INTERNALLY :
*D*                      WBUMP -> BUMPS THE STACK POINTER AND THE
*D*                                CONTROL WORD POINTER
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R5    -> STACK POINTER
*D*                      R7    -> COMMAND LINE POINTER
*D*                      R8    -> CONTROL WORD POINTER
*D*                      R9    -> ACTIVATION CHARACTER
*D*                      R10   -> COMMAND LINE COUNT
*D*                      R11   -> TRANSLATE MASK
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      TRTBL -> TRANSLATE TABLE
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R12    -> SIMULATED TRANSLATION RESULT
*D*                                 WHERE APPLICABLE
*D*                      F7     -> UPDATED COMMAND LINE POINTER
*D*                      R5     -> UPDATED STACK POINTER
*D*                      R8     -> UPDATED CONTROL WORD POINTER
*D*                      R10    -> UPDATED COMMAND LINE COUNT
*D*                      LDWSN  -> ZEROED WHERE APPLICABLE
*D*
*D*      DESCRIPTION:  SPACE PASSES LEVEL 3 ACTIVATION BY AN OPEN
*D*               PARENTHESIS TO THE ROUTINE LVL4P. OTHERWISE, ALL
*D*               FOLLOWING CHARACTERS LIKE THE ACTIVATION CHARACTER
*D*               ARE SKIPPED. IF SUCH SKIPPING TERMINATES THE COM-
*D*               MAND LINE, VARIOUS POINTERS ARE BUMPED, THE CELL
*D*               LDWSN ( POINTER TO WSN CELL ) IS ZEROED, AND
*D*               PRP IS ENTERED. IF NOT, THE ACTIVATION CHARACTER
*D*               ENCOUNTERED IS EXAMINED FOR LEVEL1 OR 2. IF SO,
*D*               THE SPECIAL CASE OF ')' IS MARKED AS AN ERROR AND
*D*               UNK%1 IS ENTERED. OTHERWISE, EXMND IS THE EXIT
*D*               POINT.
*D*                    IF THE ENCOUNTERED CHARACTER IS NOT AN ACTIVA-
*D*               TION CHARACTER, THE POINTER IS BACK-SPACED AND
*D*               ACTION CONTINUES IN THE NORMAL PATH, ENDING AT PRP.
*D*
SPACE    EQU      %
         CI,R9    '('
         BE       LVL4P
         AI,R7    1
         CB,R9    0,R7
         BNE      %+3
         BDR,R10  %-3
         B        SPAC1
         LB,R6    0,R7
         LB,R12   TRTBL,R6
         AND,R12  R11
         BCR,3    %+4
         CI,R12   M8
         BANZ     UNK%1
         B        EXMND
         AI,R7    -1
SPAC1    EQU      %
         BAL,R14  WBUMP
         AI,R5    -4
         LI,R13   0
         STW,R13  LDWSN
         B        PRP
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    LVL2
*D*
*D*      REGISTERS:  R7,R10 PRESERVED; ALL OTHERS VULNERABLE
*D*
*D*      CALL:    B LVL2  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE INTERNALLY CALLED :
*D*                      WBUMP -> ROUTINE TO ADVANCE STACK POINTER
*D*                                AND CONTROL WORD POINTER
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R5  -> STACK POINTER
*D*                      R8  -> CONTROL WORD POINTER
*D*                      R14 -> SIZE OF LAST TRANSLATE
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R3     -> RE-INITIALIZED SUB-FIELD COUNTER
*D*                      R5     -> ADJUSTED STACK POINTER
*D*                      R8     -> ADJUSTED CONTROL WORD POINTER
*D*                      STACK  -> OLD SIGNALS HAS WORD DISPLACEMENT
*D*                                 TO NEW SIGNALS WHICH IS ZEROED
*D*                      SIGLOC -> ADJUSTED SIGNALS POINTER
*D*
*D*      DESCRIPTION:  LVL2 HANDLES LEVEL 2 ACTIVATION. IF NO SIGNIFI-
*D*               CANT TRANSLATE WAS LAST PERFORMED, THE COMMAND IS
*D*               FLAGGED ERRORED. OTHERWISE, THE LAST CONTROL WORD
*D*               IS MARKED AS THE LAST FOR THIS SIGNALS ENTRY, THE
*D*               VARIOUS POINTERS ( STACK, CONTROL WORD, AND SIGNALS )
*D*               ARE BUMPED APPROPRIATELY. ALSO THE WORD DISPLACEMENT
*D*               BETWEEN THE OLD AND NEW SIGNALS IS STORED IN BYTE 1
*D*               OF THE OLD SIGNALS AND THE NEW SIGNALS IS ZEROED. THE
*D*               SUB-FIELD COUNTER IS ALSO RESET TO ZERO.
*D*
LVL2     EQU      %
         CI,R14   0
         BLE      UNK%1
         LI,R9    LVLP
         STS,R9   *R8
         LI,R13   FIDX
PTRSET   EQU      %
         BAL,R14  WBUMP
         LW,R9    R8
         SW,R9    SIGLOC
         LI,R3    1
         STB,R9   *SIGLOC,R3
         LI,R3    0
         STW,R8   SIGLOC
         STW,R3   *SIGLOC
         AI,R8    1
         AI,R5    4
         B        *R13
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    LVL1
*D*
*D*      REGISTERS:  R7,R10 PRESERVED; R3,R5,R8 MODIFIED; R14 VULNER-
*D*                      ABLE
*D*
*D*      CALL:    B LVL1  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLER INTERNALLY :
*D*                      WBUMP -> ROUTINE TO ADVANCE STACK POINTER
*D*                                AND CONTROL WORD POINTER
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R3  -> SUB-FIELD COUNTER
*D*                      R5  -> STACK POINTER
*D*                      R8  -> CONTROL WORD POINTER
*D*                      R14 -> LAST TRANSLATE COUNT
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R3 -> ADJUSTED SUB-FIELD COUNTER
*D*                      R5 -> ADJUSTED STACK POINTER
*D*                      R8 -> ADJUSTED CONTROL WORD POINTER
*D*
*D*      DESCRIPTION:  LVL1 HANDLES LEVEL 1 ACTIVATION. IF THE LAST
*D*               TRANSLATE COUNT IS NON-ZERO, THE VARIOUS POINTERS
*D*               ARE BUMPED BY A CALL TO WBUMP. IN ANY CASE, THE
*D*               SUB-FIELD COUNTER IS ADVANCED AND IF STILL
*D*               LEGITIMATE, THE TOP OF THE COMMAND-TRANSLATING
*D*               ROUTINES IS ENTERED ( FIDX ).
*D*
LVL1     EQU      %
         CI,R14   0
         BE       %+2
         BAL,R14  WBUMP
         AI,R3    1
         CI,R3    2
         BG       UNK%1
         B        FIDX
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    WBUMP
*D*
*D*      REGISTERS:  R5,R8 MODIFIED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    BAL,R14 WBUMP
*D*
*D*      INTERFACE:  NO ROUTINES ARE CALLED
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R3 -> SUB-FIELD COUNTER
*D*                      R5 -> STACK POINTER
*D*                      R8 -> CONTROL WORD POINTER
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R5 -> ADJUSTED STACK POINTER
*D*                       R8 -> ADJUSTED CONTROL WORD POINTER
*D*
*D*      DESCRIPTION:  FOR THE FIRST SUB-FIELD ( R3 = 0 ), THE CONTROL
*D*               WORD POINTER IS ADJUSTED TO  THE NEXT AVAILABLE WORD
*D*               BEYOND THE CURRENT POSITION OF THE STACK POINTER,
*D*               WHICH IS THEN ADJUSTED TO THE BYTE LOCATION FOUR
*D*               BYTES BEYOND THE CONTROL WORD POINTER.
*D*                    FOR OTHER SUB-FIELDS, THE CONTROL WORD POINTER
*D*               IS BUMPED THREE WORDS WITH THE STACK POINTER AGAIN
*D*               FOUR BYTES BEYOND THAT. IN ALL CASES, EXIT IS A
*D*               RETURN TO THE CALLER VIA R14.
*D*
WBUMP    EQU      %
         CI,R3    0
         BE       WB1
         AI,R8    3
         LW,R5    R8
         AI,R5    1
         SLS,R5   2
         B        *R14
WB1      EQU      %
         AI,R5    3
         SLS,R5   -2
         LW,R8    R5
         SLS,R5   2
         AI,R5    4
         B        *R14
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    FIDWSN
*D*
*D*      REGISTERS:  R5 PRESERVED; R7,R10,R14 MODIFIED; ALL
*D*                   OTHERS VULNERABLE
*D*
*D*      CALL:    B FIDWSN  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLED INTERNALLY :
*D*                      BLPRS -> BLANK PARSING ROUTINE
*D*                      MBS   -> MOVE ROUTINE TO MOVE WSN SPECIFICA-
*D*                                TION
*D*
*D*      INPUT:   INTERNAL DATA:
*D*                      LDWSN -> POINTER TO WSN LOCATION
*D*                      BUFFER-> COMMAND LINE ( WSN SPECIFICATION )
*D*                      SIGNALS -> PRESENCE BITS
*D*                      R4    -> START OF WSN SPECIFICATION
*D*                      R7    -> COMMAND LINE POINTER
*D*                      R10   -> COMMAND LINE COUNT
*D*                      R14   -> COUNT OF WSN SPECIFICATION
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      LDWSN  -> ZERO
*D*                      WSNFPT -> WSN IF NOT ALREADY PRESENT
*D*                      R7     -> MODIFIED LINE POINTER
*D*                      R10    -> MODIFIED LINE COUNT
*D*
*D*      DESCRIPTION:  THIS ROUTINE HANDLES LEVEL 3 ACTIVATION BY
*D*               THE '@' CHARACTER. IF THIS IS THE SECOND FID TO BE
*D*               SCANNED, ( LDWSN = 0 ) , THE ROUTINE WSN2 IS ENTERED.
*D*               OTHERWISE, THE COMMAND LINE IS SCANNED FOR THE NEXT
*D*               BLANK FOLLOWING A NON-BLANK CHARACTER IN THE ROUTINE
*D*               BLPRS. THE FIELD IS TRUNCATED TO 8 CHARACTERS, WHICH
*D*               ARE MOVED INTO THE CELL WSNFPT ( OR WHEREVER R5
*D*               POINTS ) AND SIGNALS IS CHECKED TO DETERMINE THE WAY
*D*               IN WHICH THE EXIT SHOULD BE ACCOMPLISHED. NORMALLY
*D*               LDWSN WILL BE ZEROED AND R5 RESTORED. HOWEVER, WHEN
*D*               THE SECOND WSN SPECIFICATION HAS OCCURRED, LDWSN WILL
*D*               ALREADY BE ZERO, AND R5 WILL POINT CORRECTLY. BUT THE
*D*               CONTROL WORD POINTER WILL NOT, SO THE SUB-FIELD COUNT-
*D*               ER IS SET TO 1, SO THAT A SUBSEQUENT CALL TO PTRSET
*D*               WILL ADJUST BOTH CORRECTLY.
*D*
FIDWSN   EQU      %
         XW,R5    LDWSN
         BEZ      WSN2
FIDW2    EQU      %
         CI,R14   0                 CHECK COUNT.
         BE       UNK%1
         BAL,R13  BLPRS
         B        UNK%1
         BEZ      BLPRS-1
         CI,R14   8
         BLE      %+2
         LI,R14   8
         BAL,R15  MBS
         LW,R13   SIGNALS
         CI,R13   WSNBIT
         BAZ      FIDW1
         CI,R13   RVRSBIT
         BANZ     FIDW1
         LI,R3    1
         B        PRP
FIDW1    EQU      %
         LI,R5    0
         XW,R5    LDWSN
         BAL,R14  WBUMP             BUMP UP PARAMETER AND POINTERS.
         AI,R5    -4                MIGHT BE END, SO DECREMENT.
         B        PRP
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    BLPRS
*D*
*D*      REGISTERS:  R11,R13,R14 DESTROYED; R4,R7,R10 MODIFIED; ALL
*D*                   OTHERS VULNERABLE; R5,R8 PRESERVED
*D*
*D*      CALL:    BAL,R13 BLPRS
*D*               B       ROUTINE TO HANDLE END OF COMMAND LINE
*D*               NORMAL RETURN WITH CCS SET FOR # OF CHARS
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE INTERNALLY USED :
*D*                      TRT -> TRANSLATE ROUTINE
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      BUFFER -> COMMAND LINE
*D*                      R7     -> COMMAND LINE POINTER
*D*                      R10    -> COMMAND LINE COUNT
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R4  -> POINTER TO START OF FIELD
*D*                      R7  -> ADJUSTED COMMAND LINE POINTER ( END
*D*                              OF FIELD )
*D*                      R10 -> ADJUSTED COMMAND LINE COUNT
*D*                      R14 -> COUNT OF LAST TRANLATE OPERATION
*D*                      CCS -> REFLECT STATE OF # OF (R14)
*D*
*D*      DESCRIPTION:  BLPRS SCANS THE COMMAND LINE FROM THE CURRENT
*D*               POSITION FOR A BLANK FOLLOWING A NON-BLANK. THE
*D*               EXIT IS TO TEXT WHICH RETURNS VIA R13, SO THAT THE
*D*               RETURNS ARE AS ABOVE. ANY DETECTED ERRORS WILL BE
*D*               PASSED TO THE ROUTINE UNK%1.
*D*
         AI,R13   -1
BLPRS    EQU      %
         LI,R11   BLNKMASK          (X'70')
         AI,R7    1
         AI,R10   -1
         BLEZ     *R13
         BAL,R14  TRT
         B        UNK%1
         BCR,4    UNK%1
         AI,R13   1
         B        TEXT
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    WSN2
*D*
*D*      REGISTERS:  R5 DESTROYED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    B WSN2  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE: NO ROUTINES CALLED INTERNALLY
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      WSNFPT -> WSN SPECIFICATION OR BLANKS
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      RVRSBIT -> TO SIGNAL A LOCAL SEND
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      SIGNALS -> RVRSBIT SET IF APPROPRIATE
*D*                      R5      -> POINTER TO WSNFPT
*D*
*D*      DESCRIPTION:  THIS ROUTINE HANDLES WSN SPECIFICATION IN THE
*D*               SECOND FID. IF A WSN SPECIFICATION HAS ALREADY OC-
*D*               CURRED, AN ERROR IS FLAGGED. OTHERWISE, RVRSBIT IS
*D*               SET IN SIGNALS TO INDICATE THE SEND OF A LOCAL FILE AND
*D*               R5 IS POINTED TO WSNFPT. EXIT IS BACK IN FIDWSN.
*D*
WSN2     EQU      %
         LB,R5    WSNFPT
         CI,R5    BLANK
         BNE      UNK%1
*        BEZ      WSN3              THESE RECORDS SUPPORT
*        CI,R14   0                 THE UNDOCUMENTED AND
*        BE       UNK%1             UNIMPLEMENTED FEATURE
*        LI,R5    WSNBIT            OF SPECIFYING TWO WSNS
*        STS,R5   SIGNALS           -- CHANGES NOT MADE TO
*        LW,R5    LDWSN             RATLER YET.
*        BAL,R14  WBUMP
*        LW,R14   WSNCW
*        STW,R14  *R8
*        B        FIDWSN+4
WSN3     EQU      %
         LI,R5    RVRSBIT
         STS,R5   SIGNALS
         LI,R5    BA(WSNFPT)
         B        FIDW2
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    LVL4
*D*
*D*      REGISTERS:  R3,R8 PRESERVED; R5 MODIFIED; ALL OTHERS VOL-
*D*                   ATILE
*D*
*D*      CALL:    B LVL4  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES MIGHT BE CALLED :
*D*                      TRT  -> TRANSLATE ROUTINE
*D*                      TRTX -> HEXADECIMAL TRANSLATE ROUTINE
*D*                      TEXT -> COUNT-CALCULATING ROUTINE
*D*                      TXT  -> ROUTINE TO CHECK SUB-FIELD COUNTER
*D*                               AND EITHER FORMAT IN TEXTC OR TRUN-
*D*                               CATE TO 8 CHARACTERS
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      BUFFER -> COMMAND LINE
*D*                      R14    -> COUNT OF LAST TRANSLATE
*D*                      R7     -> COMMAND LINE POINTER
*D*                      R10    -> COMMAND LINE COUNT
*D*                      R3     -> SUB-FIELD COUNTER
*D*                      R5     -> STACK POINTER
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      AP:PRE  -> TABLE OF LEGITIMATE FORMATS WITH
*D*                                  APOSTROPHES
*D*                      APOCNT  -> SIZE OF THAT TABLE
*D*                      L4TEND  -> BYTE TABLE OF LEGITIMATE TRANSLATE
*D*                                  ENDING MASKS
*D*                      L4:VEC  -> TABLE OF EXIT POINTS, INDEXED BY
*D*                                  TYPE OF FORMAT BEING USED
*D*                      L4MASK  -> TABLE OF TRANSLATE MASKS
*D*                      L4:VECB -> TABLE OF TRANSLATE ROUTINES
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R4  -> START OF LAST TRANSLATE
*D*                      R5  -> TOP BYTE CONTAINS COUNT OF LAST TRANS-
*D*                              LATE
*D*                      R6  -> POINTER TO APPROPRIATE TRANSLATE TABLE
*D*                      R7  -> ADJUSTED COMMAND LINE POINTER
*D*                      R9  -> COUNT OF LAST TRANSLATE
*D*                      R14 ->   "
*D*                      R10 -> ADJUSTED COMMAND LINE COUNT
*D*
*D*      DESCRIPTION:  LVL4 HANDLES LEVEL 4 ACTIVATION ( ONLY BY AN
*D*               APOSTROPHE ) . IF MORE THAN ONE CHARACTER WAS TRANS-
*D*               LATED PREVIOUSLY, AN ERROR IS FLAGGED ( UNK%1 ).
*D*               IF NO CHARCTERS WERE SCANNED, THEN IT MUST BE
*D*               A QUOTED STRING ( 'STRING' ), SO THE PROPER INDEX
*D*               IS PLACED IN R6 AND CODE FOR DETERMINING THE TYPE OF
*D*               FORMAT IS SKIPPED. THIS CODE PICKS UP THE TRANSLATED
*D*               CHARACTER, COMPARING IT WITH THOSE IN THE AP:PRE
*D*               TABLE. IF NOT FOUND, AN ERROR IS FLAGGED. IF FOUND,
*D*               SOME REGISTERS ARE SET UP WITH ENDING MASKS, ETC.
*D*               AND THE CORRESPONDING TRANSLATE ROUTINE IS ENTERED.
*D*               IF THE PROPER ENDING OCCURRED, THE COUNT OF THE
*D*               TRANSLATE OPERATION IS CALCULATED BY TEXT. IF THE
*D*               FORMAT IS HEXADECIMAL, THE COUNT IS HALVED, SINCE
*D*               THE FINAL RESULT IS HALF THAT TRANSLATED. EXIT IS
*D*               VIA R15 TO EITHER : HXCOMP FOR HEXADECIMAL FORMAT OR EBCD
*D*               FOR QUOTED FORMAT.
*D*
LVL4     EQU      %
         CI,R14   1
         BG       UNK%1
         BL       LV1
         LW,R4    R7
         AI,R4    -1
         LB,R4    0,R4
         LI,R6    APOCNT
         CB,R4    AP:PRE,R6
         BE       %+4
         BDR,R6   %-2
         B        UNK%1
LV1      EQU      %
         LI,R6    1
         LB,R0    L4TEND,R6
         LW,R15   L4:VEC,R6
LV2      EQU      %
         LB,R11   L4MASK,R6
         AI,R7    1
         AI,R10   -1
         BLEZ     UNK%1
         LW,R14   L4:VECB,R6
         BAL,R14  *R14
         B        UNK%1
         CW,R12   R0
         BAZ      UNK%1
         BAL,R13  TEXT
         BLEZ     UNK%1
         CI,R15   HXCOMP
         BNE      %+2
         SLS,R14  -1
         BAL,R13  TXT
         LW,R9    R14
         STB,R14  R5
         B        *R15
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    HXCOMP
*D*
*D*      REGISTERS:  R3,R7,R8,R10,R14 PRESERVED; R5 MODIFIED; ALL
*D*                   OTHERS VOLATILE
*D*
*D*      CALL:    B HXCOMP  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO ROUTINES CALLED INTERNALLY
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R14 -> HALF THE TRANSLATE COUNT
*D*                      R4  -> START OF LAST TRANSLATE
*D*                      BUFFER -> COMMAND LINE
*D*                      R6  -> ADDRESS OF TRTX TABLE
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      TRXTBL -> HEXADECIMAL TRANSLATE TABLE
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      STACK -> FORMATTED STRING
*D*                      R5    -> ADJUSTED STACK POINTER
*D*                      R7    -> ADJUSTED COMMAND LINE POINTER
*D*                      R10   -> ADJUSTED COMMAND LINE COUNT
*D*                      R11   -> RESTORED TRANSLATE MASK
*D*                      R12   -> RESULT OF FAKED TRANSLATE FOLLOWING
*D*                                HEXADECIMAL PROCESSING
*D*                      R14   -> PRESERVED
*D*
*D*      DESCRIPTION:  HXCOMP IS THE HEXADECIMAL FORMATTING ROUTINE.
*D*               DESIGN IS TO IMITATE A 'MBS' CALL ( COMPRESSING THE
*D*               COMMAND LINE INPUT ), EXITING WITH ALL REGISTERS
*D*               SET SO THAT EXTERNAL TO LVL4, THE HEXADECIMAL FOR-
*D*               MAT IS NOT NOTICED.
*D*                    INITIALLY, THE HEXADECIMAL PART OF THE COMMAND
*D*               LINE IS TRANSLATED TO REPLACE EACH CHARACTER WITH ITS
*D*               NUMERICAL VALUE. THEN THE COMPRESSING LOOP IS ENTERED.
*D*               WHEN ALL COMPRESSION AND MOVING IS COMPLETED, THE
*D*               NEXT CHARACTER FOLLOWING THE TERMINATING APOSTROPHE
*D*               IS EXAMINED AND THE TRANSLATION OF IT IS FAKED.
*D*               EXIT IS THEN TO EXMN TO EXAMINE THE TERMINATING
*D*               CHARACTER.
*D*
HXCOMP   EQU      %
         SLS,R14  1
         STB,R14  R4
         LW,R7    R4
         TBS,R6   0
HC:LP    EQU      %
         LB,R1    0,R4
         SLS,R1   4
         AI,R4    1
         AI,R14   -1
         BLEZ     %+3
         LB,R6    0,R4
         AW,R1    R6
         STB,R1   0,R5
         AI,R5    1
         AI,R4    1
         BDR,R14  HC:LP
         LI,R15   EXMN
FAKIT    EQU      %
         LI,R11   NOAPMASK
         B        %+2
FAK3     EQU      %
         LI,R11   SCMASK
         AI,R7    1                 TO GET PAST '''
         AI,R10   -1
         LB,R6    0,R7
         LB,R12   TRTBL,R6
         AND,R12  R11
         BNSU     UNK%1
         LW,R14   R9
         LI,R11   ALLMASK           RETURN W/ PROPER MASK
         B        *R15
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    EBCD
*D*
*D*      REGISTERS:  R3,R8,R14 PRESERVED; R5,R7,R10 MODIFIED; ALL
*D*                   VOLATILE
*D*
*D*      CALL:    B EBCD  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLED :
*D*                      FAKIT -> ROUTINE TO FAKE TRNNSLATION OF THE
*D*                                NEXT CHARACTER OF THE COMMAND LINE
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      BUFFER -> COMMAND LINE INPUT
*D*                      R4     -> START OF LAST TRANSLATE
*D*                      R5     -> STACK POINTER
*D*                      R7     -> COMMAND LINE POINTER
*D*                      R10    -> COMMAND LINE COUNT
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      STACK -> FORMATTED STRING
*D*                      R5    -> ADJUSTED STACK POINTER
*D*                      R7    -> ADJUSTED COMMAND LINE POINTER
*D*                      R10   -> ADJUSTED COMMAND LINE COUNT
*D*                      R11   -> RESTORED TRANSLATE MASK
*D*                      R12   -> RESULT OF FAKED TRANSLATE FOLLOWING
*D*                                HEXADECIMAL PROCESSING
*D*                      R14   -> PRESERVED
*D*
*D*      DESCRIPTION:  EBCD IS THE QUOTED STRING FORMATTING ROUTINE.
*D*               THE STRING WHICH HAS BEEN COUNTED AND EXAMINED PRE-
*D*               VIOUSLY, IS MOVED INTO THE STACK. THEN THE NEXT
*D*               CHARACTER IS TRANSLATED BY FAKIT. IF THE CHARACTER
*D*               IS NOT AN APOSTROPHE, EXIT IS TO EXMN TO CONTINUE
*D*               NORMAL PROCESSING. IF IT IS AN APOSTROPHE, THEN
*D*               ONE APOSTROPHE IS PLACED IN THE STACK AND THE PATH
*D*               WE JUST CAME DOWN IS RE-ENTERED AT LV1. THIS
*D*               ALLOWS THE USER TO SPECIFY  AN APOSTROPHE AS
*D*               A CHARACTER IN THE QUOTED STRING.
*D*
EBCD     EQU      %
         MBS,R4   0
         LI,R6    1
         BAL,R15  FAKIT
         CI,R6    ''''
         BNE      EXMN
         STB,R6   0,R5
         AI,R5    1
         B        LV1
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    LVL4P
*D*
*D*      REGISTERS:  R3,R5,R8 PRESERVED; R7,R10 MODIFIED; ALL OTHERS
*D*                   VULNERABLE
*D*
*D*      CALL:    B LVL4P  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLED INTERNALLY :
*D*                      TRTPSET -> ROUTINE TO SET UP THE TRT TABLE
*D*                      TRT     -> TRANSLATE ROUTINE
*D*                      CBS     -> COMPARISON ROUTINE
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      BUFFER -> COMMAND LINE INPUT
*D*                      R7     -> COMMAND LINE POINTER
*D*                      R10    -> COMMAND LINE COUNT
*D*                      SIGNALS-> COMMAND BITS
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      TRTBL  -> TRANSLATE TABLE
*D*                      L4PLIST-> TABLE OF POINTERS TO LISTS OF
*D*                                 LEGITIMATE OPTIONS, INDEXED BY :
*D*                                 0 SEND; 1 LIST
*D*                      L4PCNT -> TABLE OF COUNTS OF THE ABOVE TABLE
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      *SIGLOC -> APPROPRIATE COMMAND OPTION BITS SETT
*D*                      R7      -> ADJUSTED COMMAND LINE POINTER
*D*                      R10     -> ADJUSTED COMMAND LINE COUNT
*D*
*D*      DESCRIPTION:  LVL4P HANDLES LEVEL 3 ACTIVATION BY A OPEN PAREN-
*D*               THESIS. THE TRT TABLE IS RE-ADJUSTED FOR THE OPTION
*D*               TRANSLATING, AND A BRIEF PATH IS SHARED WITH LEVEL
*D*               4 PROCESSING. THEN THE NEXT FIELD IS TRANSLATED. THE
*D*               TERMINATING MASK IS CHECKED FOR LEGITIMACY ACCORDING
*D*               TO THE COMMAND ( FOR LIST CHARACTER MUST BE ')'; FOR
*D*               SEND ',' ). THEN THE FIELD IS CHECKED FOR A VALID
*D*               OPTION. WHEN FOUND, THE INDIVIDUAL COMMAND OPTION
*D*               ROUTINES ARE ENTERED. FOR LIST, THE CORRESPONDING
*D*               OPTION BIT IS SET AND THE TRT TABLE RESET, EXITING
*D*               TO FAK3 TO EXAMINE THE NEXT CHARACTER WITH AN IMPLIED
*D*               EXIT THERE TO EXMND. FOR SEND, THE OPTIONS ARE NOT
*D*               YET IMPLEMENTED SO AN ERROR IS FLAGGED.
*D*
LVL4P    EQU      %
         LI,R6    0
         BAL,R14  TRTPSET
         B        LV2
LV3      EQU      %
         BAL,R14  TRT
         B        UNK%1P
         BCS,15   UNK%1P
         LW,R13   SIGNALS
         CI,R13   SNDBIT
         BAZ      LV4
         CI,R12   X'04'
         BE       LV5
         B        UNK%1
LV4      EQU      %
         CI,R13   LSTBIT
         BAZ      UNK%1P
         CI,R12   X'0A'
         BNE      UNK%1P
         LI,R6    1
LV5      EQU      %
         LW,R2    R4
         LW,R11   L4PLIST,R6
         LW,R9    L4PCNT,R6
         BAL,R14  CBS
         B        UNK%1P
         B        %+1,R6
         B        LVL3S
         LB,R9    LVL3LP,R1
         STS,R9   *SIGLOC
LV6      EQU      %
         BAL,R14  TRTPSET
         LI,R15   EXMND
         B        FAK3
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    PRP
*D*
*D*      REGISTERS:  R3,R7,R8,R10 MODIFIED; R5 PRESERVED; ALL OTHERS
*D*                   VULNERABLE
*D*
*D*      CALL:    B PRP  ( NO RETURN TO CALLER )
*D*
*D* *D*  INTERFACE: THE FOLLOWING ROUTINES ARE USED INTERNALLY :
*D*     *D*              BLPRS  -> BLANK PARSING ROUTINE
*D*             *D*      CBS    -> COMPARISON ROUTINE
*D*             *D*      PTRSET -> ROUTINE TO SET UP VARIOUS POINTERS
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      BUFFER -> COMMAND LINE
*D*     *D*              R7     -> COMMAND LINE POINTER
*D*     *D*              R10    -> COMMAND LINE COUNT
*D*     *D*              SIGNALS-> COMMAND BITS
*D*
*D*     *D*TA:    INTERNAL DATA :
*D*     *D*              PRPLIST -> ADDRESS OF TABLE OF LEGI*D*ATE
*D*                                  PREPOSITION SPECIFI*D*IONS
*D*                      PRPCNT  -> COUNT FOR ABOVE TABL*
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*             *D*      R7      -> ADJUSTED COMMAND LINE POINTER
*D*                 *D*  R10     -> ADJUSTED COMMAND LIN*D*OUNT
*D*                      SIGNALS -> OVERBIT SET IF 'OVER ' SPECI*D*D;
*D*                                  AND HIGH ORDER BIT SET *D*PRE-
*D*                                  VENT RE-ENTRANCY
*D*                      R3     -> RE-INITIALIZED SUB-FIELD COUNTER
*D*                      R8     -> RE-INITIALIZED CONTROL WORD POINTER
*D*                      R5     -> RE-INITIALIZED STACK POINTER
*D*
*D*      DESCRIPTION:  PRP IS THE ROUTINE WHICH CHECKS THE PREPOSITION
*D*               USED IN THE COMMAND INPUT. IT ALSO SERVES AS THE
*D*               EXIT POINT FOR THE TRANSLATE PROCESSING.
*D*                    THE NEXT FIELD OF THE COMMAND IS BLANK-PARSED
*D*               BY BLPRS AND THE COMMAND IS CHECKED TO BE A SEND.
*D*               IF EITHER OF THESE TESTS FAIL, EXIT IS TO BUILD,
*D*               TERMINATING THE INPUT AND DECODING PHASE OF
*D*               ISCL PROCESSING.
*D*                    OTHERWISE, CBS IS CALLED TO CHECK THE VALIDITY
*D*               OF THE PREPOSITION INPUT. IF OKAY, THE APPROPRIATE
*D*               BIT IS SET IN SIGNALS, THE HIGH-ORDER BIT SET TO PRE-
*D*               VENT REENTRANCY, THE TRANSLATE MASK RESTORED, AND THE
*D*               VARIOUS POINTERS REINTIALIZED BEFORE RE-ENTERING THE
*D*               TRANSLATE PROCESSING AT THE TOP.
*D*
PRP      EQU      %
         BAL,R13  BLPRS
         B        BUILD
         CI,R14   0
         BEZ      BLPRS-1
         LC       SIGNALS
         BCS,8    UNK%1
         LI,R13   SNDBIT
         CW,R13   SIGNALS
         BAZ      BUILD
         LW,R2    R4
         LW,R15   R3
         LI,R11   PRPLIST
         LI,R9    PRPCNT
         BAL,R14  CBS
         B        UNK%1
         CI,R1    OVRBIT
         BL       %+2
         STS,R1   SIGNALS
         LW,R3    R15               RESTORE R3.
         LI,R11   X'80'
         STB,R11  SIGNALS
         LI,R11   ALLMASK
         BAL,R13  PTRSET
         B        FIDXS
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    CBS
*D*
*D*      REGISTERS:  R1,R2,R3,R4,R14 DESTROYED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    BAL,R14 CBS
*D*               B       ROUTINE TO HANDLE ILLEGAL SPECIFICATION
*D*               ( NORMAL RETURN WITH R1 INDICATING INDEX TO
*D*                  SPECIFIED ENTRY )
*D*
*D*      INTERFACE:  NO ROUTINES INTERNALLY CALLED
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R2  -> POINTER TO SOURCE FOR COMPARE
*D*                      R4  ->   "
*D*                      R9  -> UPPER BOUND FOR INDEX INTO TABLE
*D*                      R11 -> ADDRESS OF TABLE OF ONE-WORD ENTRIES:
*D*                              # OF BYTES,BA(ENTRY):: 8,24
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R1 -> INDEX INTO TABLE ( R11 ) OF THAT ENTRY
*D*                             WHICH MATCHED THE SOURCE
*D*
*D*      DESCRIPTION:  THE CBS ROUTINE SEARCHES THROUGH A TABLE, POINT-
*D*               ED TO BY R11, UNTIL THE UPPER BOUND IS REACHED OR
*D*               UNTIL A MATCH IS FOUND. IF NONE IS FOUND, RETURN IS
*D*               BAL+1; OTHERWISE BAL+2.
*D*
CBS      EQU      %
         LI,R1    0
         LW,R3    *R11,R1
         CBS,R2   0
         BNE      %+3
         AI,R14   1
         B        *R14
         AI,R1    1
         CW,R1    R9
         BGE      *R14
         LW,R2    R4
         B        CBS+1
* * * * * * * * * * * * * * * * * * * * * * * * *
TRTX     EQU      %
         LI,R6    BA(TRXTBL)
         B        TRT+1
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    TRT
*D*
*D*      ENTRY:   TRTX
*D*
*D*      REGISTERS: R4,R6,R12,R14 DESTROYED; R7 MODIFIED; ALL OTHERS
*D*                  PRESERVED
*D*
*D*      CALL:    BAL,R14 TRT
*D*               B       ROUTINE TO HANDLE END OF COMMAND LINE
*D*               ( NORMAL RETURN )
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R7  -> COMMAND LINE POINTER
*D*                      R10 -> COMMAND LINE COUNT
*D*                      R11 -> TRANSLATE MASK
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      TRTBL,TRXTBL -> TRANSLATE TABLES; ENTRY POINT
*D*                                       DETERMINES WHICH IS USED
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R4  -> INITIAL VALUE OF COMMAND LINE POINTER
*D*                      R6  -> TOP BYTE CONTAINS RESULTANT MASK; REST
*D*                              POINTS TO TRT TABLE
*D*                      R12 -> RESULTANT MASK
*D*                      CCS -> TOP FOUR BITS OF RESULTANT MASK
*D*
*D*      DESCRIPTION:  THE TRT ROUTINE EXECUTES A TTBS INSTRUCTION.
*D*               THE C.L. POINTER IS SAVED ON ENTRY, AND THE REGISTERS
*D*               SET UP FOR THE TRANSLATE AND TEST. AFTERWARDS, THE
*D*               RESULTANT MASK IS LOADED INTO THE CONDITION CODES
*D*               AND R12, FOLLOWED BY RETURN TO THE CALLER.
*D*
TRT      EQU      %
         LI,R6    BA(TRTBL)
         STB,R10  R7
         STW,R7   R4
         STB,R11  R6
         TTBS,R6  0
         BCR,1    *R14
         AI,R14   1
         LB,R12   R6
         LC       R6
         B        *R14
* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    MBS
*D*
*D*      REGISTERS:  R4,R5 MODIFIED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    BAL,R15 MBS
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R4  -> SOURCE FOR MOVE
*D*                      R5  -> DESTINATION FOR MOVE
*D*                      R14 -> COUNT OF MOVE
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      STACK -> ITEM MOVED FROM COMMAND LINE TO STACK
*D*                      R5    -> ADJUSTED STACK POINTER
*D*
*D*      DESCRIPTION:  THE MBS ROUTINE MOVES (R14) BYTES FROM (R4) TO
*D*               (R5).
*D*
MBS      EQU      %
         STB,R14  R5
         MBS,R4   0
         B        *R15
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    TEXT
*D*
*D*      REGISTERS:  R10,R14 MODIFIED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    BAL,R13 TEXT
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R7  -> TOP BYTE CONTAINS NEW REMAINING COUNT
*D*                      R10 -> OLD REMAINING COUNT
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R10 -> NEW REMAINING COUNT
*D*                      R14 -> COUNT OF LAST TRANSLATE OPERATION
*D*
*D*      DESCRIPTION:  TEXT OBTAINS THE REMAINING COUNT FROM THE TOP
*D*               OF THE TRANSLATION REGISTER (R7) AND CALCULATES THE
*D*               NUMBER OF BYTES LAST TRANSLATED, LEAVING THE RESULT
*D*               IN R14 AND EXITING VIA R13.
*D*
TEXT     EQU      %
         LW,R14   R10
         LB,R10   R7
         SW,R14   R10
         B        *R13
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    TXT
*D*
*D*      REGISTERS:  R1,R9 DESTROYED; R5,R14 MODIFIED; ALL OTHERS
*D*                   PRESERVED
*D*
*D*      CALL:    BAL,R13 TXT
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R3  -> SUB-FIELD COUNTER
*D*                      R5  -> STACK POINTER
*D*                      R8  -> CONTROL WORD POINTER
*D*                      R14 -> COUNT OF LAST TRANSLATE OPERATION
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      STACK -> CONTROL WORD SIZE IS CALCULATED AND
*D*                                STORED; COUNT IS PLACED TO FORM TEXTC
*D*                                FORMAT
*D*                      R14   -> TRUNCATED TO 8 CHARACTERS WHERE APPRO-
*D*                                PRIATE
*D*
*D*      DESCRIPTION:  IF THE SUB-FIELD COUNTER IS ZERO ( FIRST SUB-
*D*               FIELD ) THEN THE COUNT IS PLACED IN THE STACK TO
*D*               FORM TEXTC FORMAT AND THE CONTROL WORD SIZE SPECIFI-
*D*               CATIONS ARE SET UP.
*D*                    OTHERWISE, THE COUNT IS TRUNCATED TO 8 CHARACTERS
*D*               AND IN EITHER CASE, EXIT IS VIA R13.
*D*
TXT      EQU      %
         CI,R3    0
         BEZ      TEXTC
         CI,R14   8
         BLE      *R13
         LI,R14   8
         B        *R13
TEXTC    EQU      %
         STB,R14  0,R5
         AI,R5    1
         LI,R1    2
         LW,R9    R14
         AI,R9    4
         SLS,R9   -2
         STB,R9   *R8,R1
         AI,R1    1
         STB,R9   *R8,R1
         B        *R13
* * * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    TRTPSET
*D*
*D*      REGISTERS:  R11,R12,R13 VULNERABLE; ALL OTHERS PRESERVED
*D*
*D*      CALL:    BAL,R14 TRTPSET  ( RETURN FROM TRTSET )
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINESS
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R6 -> INDEX INTO TRTSET TABLES
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      L4PCT -> TABLE OF SIZES OF TABLES IN L4PF
*D*                      L4PF  -> TABLE OF ADDRESSES OF TABLES WHERE
*D*                                EACH ENTRY CONSISTS OF :
*D*                                # OF CHARACTER LOCATIONS TO REPLACE,
*D*                                BYTE DISPLACEMENT TO START OF CHAR-
*D*                                ACTER LIST, TRANSLATION FOR EACH
*D*                                CHARACTER IN 8,8,8 FORMAT
*D*                      L4PFN -> TABLE OF ADRESSES OF TABLES POINTING
*D*                                TO LISTS OF CHARACTER LOCATIONS TO BE
*D*                                REPLACED
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R11 -> COUNT OF APPROPRIATE L4PF TABLE
*D*                      R12 -> ADDRESS OF APPROPRIATE L4PF TABLE
*D*                      R13 -> ADDRESS OF APPROPRIATE L4PFN TABLE
*D*
*D*      DESCRIPTION:  TRTPSET IS USED TO SET UP REGISTERS FOR THE
*D*               ROUTINE TRTSET. R6 IS USED AS AN INDEX INTO THE
*D*               TABLES L4PCT,L4PF,L4PFN AND TRTSET IS ENTERED WITH
*D*               R14 THE IMPLIED EXIT.
*D*
TRTPSET  EQU      %
         LW,R11   L4PCT,R6
         LW,R12   L4PF,R6
         LW,R13   L4PFN,R6
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    TRTSET
*D*
*D*      REGISTERS:  R0,R1,R2,R4 DESTROYED; R13 MODIFIED; ALL OTHERS
*D*                   PRESERVED
*D*
*D*      CALL:    BAL,R14 TRTSET
*D*
*D*      INTERFACE: NO ROUTINES CALLED INTERNALLY
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R11 -> MAXIMUM INDEX INTO TABLE (R12)
*D*                      R12 -> ADDRESS OF TABLE OF CONTROL ENTRIES
*D*                              FOR TRT TABLE MODIFICATION
*D*                      R13 -> ADDRESS OF LIST OF CHARACTER LOCATIONS
*D*                              TO BE MODIFIED
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      TRTBL -> MODIFIED TRANSLATE TABLE
*D*
*D*      DESCRIPTION:  TRTSET IS THE ROUTINE USED TO CHANGE THE TRANS-
*D*               LATE TABLE TRTBL. R12 POINTS TO A TABLE WHERE EACH ENT-
*D*               TRY CONTAINS : # OF LOCATIONS TO BE CHANGED TO THIS
*D*               TRANSLATION, BYTE DISPLACEMENT FROM (R13) TO LIST OF
*D*               CHARACTERS TO BE CHANGED, TRANSLATION IN 8,8,8 FORMAT
*D*               R13 POINTS TO THE BASE OF THE LISTS OF CHARACTERS TO
*D*               BE CHANGED. R11 IS THE UPPER BOUND ON THE INTERNAL
*D*               INDEX (R4) INTO (R12). UPON COMPLETION OF THE MODI-
*D*               FICATION, EXIT IS VIA R14.
*D*
TRTSET   EQU      %
         LI,R4    0
         LB,R2    *R12,R4
         AI,R4    1
         LB,R0    *R12,R4
         AW,R13   R0
         AI,R4    1
         LB,R0    *R12,R4
         LB,R1    *R13,R2
         STB,R0   TRTBL,R1
         BDR,R2   %-2
         AI,R4    1
         CW,R4    R11
         BL       TRTSET+1
         B        *R14
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    OPEN
*D*
*D*      REGISTERS:  R5,R6,R7 PRESERVED;R15 MODIFIED; ALL OTHERS DES-
*D*                   TROYED
*D*
*D*      CALL:    BAL,R15 OPEN
*D*               B       ROUTINE TO HANDLE 300 ERRORS WITH ACCOUNT
*D*                        SPECIFIED EITHER NULL OR EQUAL TO USER'S
*D*               B       ROUTINE TO HANDLE 300 ERRORS WITH ACCOUNT
*D*                        SPECIFIED NOT THE USER'S
*D*               NORMAL RETURN
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R6 -> POINTER TO OPEN FPT TO BE USED
*D*                      R5 -> POINTER TO PRESENCE BITS WORD WHICH
*D*                             PRECEDES THE VLP LIST
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      M:EI -> OPEN CAL PERFORMED SO THAT EITHER
*D*                               THE DCB IS OPEN OR THE VLP LIST
*D*                               FROM THE FILE HAS BEEN OBTAINED
*D*
*D*      DESCRIPTION:  OPEN SETS UP AND EXECUTES AN M:OPEN CAL1 ON
*D*               THE M:EI DCB. THE VARIABLE LENGTH PARAMETER LIST
*D*               POINTED TO BY R5 SPECIFIES THE FILE ( OR ACCOUNT )
*D*               TO BE OPENED AND PRESENCE BITS ARE OBTAINED FROM
*D*               THE WORD PRECEDING THE VLP'S. R6 DESIGNATES THE
*D*               FIVE-WORD FPT FRAMEWORK WHICH IS MOVED INTO THE
*D*               FIVE WORDS PRECEDING THE VLP'S. THE CAL1 IS EXE-
*D*               CUTED AND IF ALL GOES WELL, THE SAVED FIVE WORDS
*D*               ARE RESTORED AND THE NORMAL EXIT TAKEN.
*D*                    ANY ABNORMAL OR ERROR CONDITION IS HANDLED BY
*D*               THE ROUTINE ABN. IN SOME CASES ( NOTED ABOVE ) A
*D*               RETURN TO THE CALLER OF OPEN WILL COME FROM ABN.
*D*
OPEN     EQU      %
         LI,R9    PBITS
         LI,R8    0
         LS,R8    0,R5
         AI,R5    -4
         LI,R1    ABN
         CAL1,1   SETEI
         LCI      5
         LM,R0    0,R5
         LM,R10   0,R6
         STM,R10  0,R5
         STS,R8   1,R5
         CAL1,1   *R5
         AI,R15   2
ACCTFND1 EQU      %
         LCI      5
         STM,R0   0,R5
         B        *R15
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    ABN
*D*
*D*      REGISTERS:  R0,R1,R2,R3,R4,R5 PRESERVED; R15 MODIFIED; ALL
*D*                   OTHERS VOLATILE
*D*
*D*      CALL:    B ABN  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE: NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R0-R4 -> SAVED STACK TO REPLACE OPEN FPT
*D*                      R5    -> POINTER TO OPEN CAL1 FPT
*D*                      R10   -> ERROR OR ABNORMAL CODE
*D*               EXTERNAL DATA :
*D*                      J:ACCN -> USER ACCOUNT
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      CWLIST -> CONTROL WORD FOR ACCOUNT VLP
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      PLACE OF RETURN INDICATES ONLY OUTPUT
*D*
*D*      DESCRIPTION:  THE ABN ROUTINE IS THE GENERAL ERROR-HANDLING
*D*               ROUTINE FOR THE M:EI DCB. FOR ANY ERROR OTHER THAN
*D*               300 ERRORS, ABN IMMEDIATELY EXITS TO SIMMERC.
*D*                    IF IT IS A 300 ERROR, ABN SEARCHES FOR THE
*D*               ACCOUNT SPECIFICATION IN THE OPEN FPT, CHECKING
*D*               THE PRESENCE BIT FLAGS THEN LOOKING FOR THE REAL
*D*               ENTRY. IF IT IS FOUND, A CHECK IS MADE TO SEE IF
*D*               THE SPECIFIED ACCOUNT IS THE USER'S. IF NOT, THEN
*D*               THE RETURN REGISTER (R15) IS BUMPED AND EXIT IS TO
*D*               RESTORE THE STACK. IF SO, OR IF NO ACCOUNT WAS
*D*               SPECIFIED, THEN EXIT IS TO RESTORE THE STACK WITH-
*D*               OUT BUMPING THE RETURN.
*D*
ABN      EQU      %
         LH,R9    R10
         SLS,R9   -1
         CI,R9    X'180'
         BNE      SIMMERC
ABN1     EQU      %
         CI,R4    ACTBIT
         BAZ      ACCTEXIT
         LI,R9    LVLP
         LI,R7    3
         LW,R6    R5
         AI,R6    5
         LW,R12   CWLIST+1
         LW,R13   YFF
ACCTSRCH EQU      %
         CS,R12   0,R6
         BE       ACCTFND
         CW,R9    0,R6
         BANZ     ACCTLST
         LB,R8    *R6,R7
         AW,R6    R8
         AI,R6    1
         B        ACCTSRCH
ACCTFND  EQU      %
         LW,R8    J:ACCN
         LW,R9    J:ACCN+1
         CW,R8    1,R6
         BNE      %+3
         CW,R9    2,R6
         BE       ACCTEXIT
ACCTLST  EQU      %
         AI,R15   1
ACCTEXIT EQU      %
         CLM,R15  SSNDLMT           CHECK FOR SHORT SEND ENTRY.
         BCS,9    ACCTFND1          NOPE.
         B        *R15              YES.
*D* * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    SSND
*D*
*D*      REGISTERS:  R4,R6,R7,R8,R9,R12,R13,R14,R15 DESTROYED; R5 MOD-
*D*                   IFIED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    BAL,R14 SSND
*D*
*D*      INTERFACE: THE FOLLOWING ROUTINES ARE CALLED INTERNALLY :
*D*                      PTRSET -> ROUTINE TO SET UP VARIOUS POINTERS
*D*                      ABN1   -> ROUTINE TO FIND ACCOUNT VLP
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      STACK -> INTERPRETED COMMAND DESCRIPTION
*D*                      R5    -> POINTER TO CURRENT END OF STACK
*D*
*D*      DATA:    EXTERNAL DATA :
*D*                      J:ACCN -> USERS ACCOUNT
*D*               INTERNAL DATA :
*D*                      SIGNALS -> COMMAND AND PRESENCE FLAGS
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      STACK -> LENGTHENED COMMAND INTERPRETATION;
*D*                                THE TARGET FILE IS SET UP FROM THE
*D*                                SOURCE FILE SPECIFICATION
*D*
*D*      DESCRIPTION:  THE SSND ROUTINE CONVERTS A SHORT SEND REQUEST
*D*               INTO A NORMAL SEND REQUEST. THE SIZE IN BYTES OF THE
*D*               CURRENT STACK IS CALCULATED AND, AFTER PTRSET BUMPS
*D*               THE VARIOUS POINTERS ( R5,R8,SIGLOC ), THE STACK IS
*D*               COPIED INTO THE NEW STACK POSITION. THE PRESENCE BITS
*D*               ARE COPIED FROM SIGNALS, AND THE ACCOUNT SPECIFICA-
*D*               TION, IF ANY, IS REPLACED BY THE USER'S ACCOUNT.
*D*               EXIT IS VIA R14.
*D*
SSND     EQU      %
         LI,R14   FILCHK
         LI,R7    -BA(SIGNALS+1)
         AW,R7    R5
         BAL,R13  PTRSET
SSND1    EQU      %
         LI,R4    BA(SIGNALS+1)
         STB,R7   R5
         MBS,R4   0
         STW,R5   BLD:R5
         LI,R5    PBITS+FLEBIT
         LI,R4    0
         LS,R4    SIGNALS
         STS,R4   *SIGLOC
         LW,R5    SIGLOC
         AI,R5    1
SSND2    EQU      %
         BAL,R15  ABN1
         B        *R14
SSND3    EQU      %
         CW,R8    J:ACCN
         BNE      *R14
         STW,R8   1,R6
         STW,R9   2,R6
         B        *R14
* * * * * * * * * * * * * * * * * * * * * * * * * *
SFP      EQU      %
         LI,R14   BUILD1
         LW,R7    SIGLOC
         AI,R7    -SIGNALS-1
         SLS,R7   2
         LW,R5    SIGLOC
         AI,R5    1
         SLS,R5   2
         B        SSND1
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    BUILD
*D*
*D*      REGISTERS:  R5 SAVED IN CELL BLD:R5; ALL OTHERS VOLATILE
*D*
*D*      CALL:    B BUILD  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINE IS CALLED INTERNALLY :
*D*                      OPEN -> ROUTINE TO EXECUTE A OPEN CAL1,
*D*                               USING THE VLP'S DESIGNATED BY R5
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      STACK  -> INTERPRETED COMMAND DESCRIPTION
*D*                      WSNFPT -> WSN SPECIFICATION
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      BLD:R5 -> SAVED R5
*D*                      M:EI   -> OPEN TO TARGET FILE IF APPROPRIATE
*D*
*D*      DESCRIPTION:  BUILD IS THE TERMINATING POINT OF COMMAND IN-
*D*               TERPRETATION, AND THE START OF REQUEST PROCESSING.
*D*               THE STACK POINTER IS SAVED FOR LATER REFERENCE, AND
*D*               THE WSN SPECIFICATION IS CHECKED FOR VALIDITY.
*D*               IF INVALID, THE ERROR ROUTINE UNK%3 IS ENTERED.
*D*                    BUILD THEN DETERMINES THE TYPE OF COMMAND BEING
*D*               PROCESSED. IF NOT A SEND COMMAND, THEN THE ROUTINE
*D*               LSTDEL IS ENTERED. OTHERWISE, THE DIRECTION OF THE
*D*               SEND IS DETERMINED. IF THE REQUEST IS A 'SHORT' RE-
*D*               QUEST, THEN SSND OR SFP IS ENTERED TO CONVERT THE
*D*               STACK INTO A COMPLETE STACK. ANYWAYS, THE
*D*               DIRECTION OF THE SEND DETERMINES THE EXIT POINTS:
*D*               FOR REMOTE SENDS - FILCHK; FOR LOCAL SENDS - FP.
*D*
BUILD    EQU      %
         AND,R5   XFFFFFF
         STW,R5   BLD:R5
         LB,R3    WSNFPT
         CI,R3    BLANK
         BE       UNK%3
         LW,R6    SIGNALS
         CI,R6    SNDBIT
         BAZ      LSTDEL
         CW,R6    SHORTBIT
         BAZ      SSND
         EOR,R6   SHORTBIT
         STW,R6   SIGNALS
         LW,R7    *SIGLOC
         CI,R7    FLEBIT
         BAZ      SFP
         CI,R6    RVRSBIT           (X'4')
         BAZ      FILCHK
BUILD1   EQU      %
         LI,R5    SIGNALS
         LI,R7    IN
         LI,R6    TRGTOPEN
         BAL,R15  OPEN
         NOP      0
         B        SIMMERC
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    FP
*D*
*D*      REGISTERS:  ALL REGISTERS VOLATILE
*D*
*D*      CALL:    B FP  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLED :
*D*                      OPEN -> ROUTINE TO EXECUTE AN OPEN CAL1
*D*                      XMIT -> ROUTINE TO CONNECT A STREAM TO
*D*                               THE APPROPRIATE REMOTE DEVICE
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      STACK -> VLP'S FOR DESTINATION FILE
*D*                      FPARAM-> VLP'S ( FIT ) FROM SOURCE FILE
*D*                      BLD:R5-> POINTER TO END OF STACK
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      FPW:CTL -> SIGNIFICANT CONTROL CODES FOR
*D*                                 VLP SCANNING
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      STACK -> SIGNIFICANT VLP'S ENCOUNTERED ARE
*D*                                MOVED INTO STACK
*D*                      M:EI  -> OPEN TO SOURCE FILE
*D*                      C2    -> STREAM CONNECTED TO REMOTE DEVICE
*D*
*D*      DESCRIPTION:  FP IS THE FILE PASSING ROUTINE. IT IS ENTERED
*D*               FOR PROCESSING LOCAL SEND COMMANDS.
*D*                    INITIALLY, THE COMMAND BITS OF SIGNALS ARE
*D*               PLACED IN *SIGLOC. THEN THE OPEN ROUTINE IS CALLED
*D*               TO OPEN M:EI TO THE SOURCE FILE. THE DCB IS SET
*D*               WITH RD:ABN AS THE ERROR ADDRESS ( AND ABN ) AND
*D*               THE ROUTINE XMIT IS CALLED TO CONNECT A STREAM
*D*               TO THE APPROPRIATE REMOTE DEVICE. THEN THE LAST
*D*               VARIABLE LENGTH PARAMETER IS FOUND, TO ESTABLISH
*D*               THE STACK POINTER FOR ADDITIONAL VLP'S. IF AN ERROR
*D*               IS DETECTED EXIT IS TO THE ERROR ROUTINE FP%1.
*D*                    THIS BEING DONE, THE FILE PARAMETERS OF THE
*D*               SOURCE FILE ARE EXAMINED TO PICK UP THOSE TO BE PRE-
*D*               SERVED. AS EACH SIGNIFICANT ENTRY IS FOUND, IT IS
*D*               MOVED INTO THE STACK BY FPMOVE, SETTING THE APPRO-
*D*               PRIATE PRESENCE BIT, AND SAVING THE STACK POINTER
*D*               AT THE START OF THE MOVE TO REMEMBER THE START OF
*D*               THE LAST PARAMETER. THE SIZE FILE PARAMETER IS
*D*               SPECIAL-CASED, SO THAT IF NECESSARY IT CAN BE USED.
*D*                    WHEN THE ORGANIZATION FILE PARAMETER IS ENCOUN-
*D*               TERED EXIT IS TO FPORG, TERMINATING THE VLP SCANNING
*D*               AND CONTINUING TO READ THE FILE RECORDS.
*D*
FP       EQU      %
         LI,R3    7
         LS,R2    SIGNALS
         STS,R2   *SIGLOC
         LI,R7    IN
         LI,R6    PASSOPEN
         LI,R5    SIGNALS
         BAL,R15  OPEN
         NOP      0
         B        SIMMERC:
         LI,R1    RD:ABN
,SETEI   M:SETDCB M:EI,(ERR,*R1)
         BAL,R15  XMIT
         LI,R3    1
         LI,R6    0
         LI,R1    0
         LI,R7    X'FF'
         LW,R5    SIGLOC
FP:FLC   EQU      %
         AI,R5    1
         CB,R3    *R5,R3
         BE       FP:FND
         LS,R6    0,R5
         AW,R5    R6
         B        FP:FLC
FP:FND   EQU      %
         STB,R1   *R5,R3
         LW,R5    BLD:R5
         LI,R11   0
         LW,R9    YFF
FP1      EQU      %
         LI,R2    FPX
         LW,R8    FPARAM,R1
         CS,R8    FPW:CTL,R2
         BE       FP2
         BDR,R2   %-2
         CB,R3    R8,R3
         BE       FP%1
FP:CONT  EQU      %
         AW,R1    R8
         AI,R1    1
         AND,R1   R7
         B        FP1
FP2      EQU      %
         LB,R4    FPB:VEC,R2
         B        FP:,R4
FP:      EQU      %
* * * * * * * * * * * * * * * * * * * * * * * * * *
FPMOVE   EQU      %
         OR,R11   FP:BITS,R2
         ANLZ,R4  FP1+1
         SLS,R4   2
         LS,R6    R8
         AI,R6    1
         SLS,R6   2
         STW,R5   FP:LAST
         STB,R6   R5
         MBS,R4   0
         B        FP:CONT
* * * * * * * * * * * * * * * * * * * * * * * * * *
FPSIZE   EQU      %
         ANLZ,R4  FP1+1
         AI,R4    1
         LW,R4    0,R4
         STW,R4   BLD:R5
         B        FP:CONT
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    FPORG
*D*
*D*      REGISTERS:  R3,R11 PRESERVED; ALL OTHERS MODIFIED OR VULNER-
*D*                   ABLE
*D*
*D*      CALL:    B FPORG  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINE IS CALLED INTERNALLY :
*D*                      XWRITE -> ROUTINE TO WRITE A LOGICAL RECORD
*D*                                 THROUGH M:EO
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      FP:LAST -> BYTE ADDRESS OF BEGINNING OF LAST
*D*                                  FILE PARAMETER IN STACK
*D*                      SIGLOC  -> POINTER TO LAST USED SIGNALS WORD
*D*                      BLD:R5  -> SIZE OF SOURCE FILE IN GRANULES
*D*                      R11     -> VARIOUS PRESENCE BITS FOR SIGLOC
*D*                      R3      -> 1
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      *SIGLOC -> TOP BYTE CONTAINS ORGANIZATION;
*D*                                  PRESENCE BITS FOR RECENTLY MOVED
*D*                                  FILE PARAMETERS SET
*D*                      STACK   -> LAST PARAMETER FLAG SET IN LAST
*D*                                  PARAMETER; SIZE STORED AT END IF
*D*                                  APPROPRIATE, IN WHICH CASE 2ND
*D*                                  BYTE CONTAINS WORD DISPLACEMENT TO
*D*                                  SIZE CELL
*D*               EXTERNAL DATA :
*D*                      C2 -> FIRST LOGICAL RECORD OF BLOCKED FILE
*D*                             IS WWRITTEN THROUGH M:EO
*D*
*D*      DESCRIPTION:  THE SIZE SPECIFICATION IS PICKED UP FROM THE
*D*               FILE PARAMETER LAST EXAMINED, AND PLACED IN *SIGLOC.
*D*               THE PRESENCE BITS ACCUMULATED IN R11 ARE ALSO STORED
*D*               THERE. THEN THE LAST PARAMETER FLAG IS SET IN THE
*D*               LAST PARAMETER AND, IF THE FILE IS A RANDOM FILE,
*D*               THE SIZE SPECIFICATION IS MOVED FROM BLD:R5 TO THE
*D*               STACK, PLACING THE POINTER IN THE 2ND BYTE OF SIGLOC.
*D*                    THEN THE ROUTINE XWRITE IS CALLED TO WRITE THIS
*D*               COMPLETELY FORMED LOGICAL RECORD THROUGH THE STREAM.
*D*               EXIT IS THEN TO XREAD TO BEGIN THE READ-MULTIWRITE
*D*               SEQUENCE OF THE FILE'S RECORDS.
*D*
FPORG    EQU      %
         ANLZ,R7  FP1+1
         AI,R7    1
         LB,R4    *R7
         STS,R11  *SIGLOC
         STB,R4   *SIGLOC
         CI,R4    KEYED
         BNE      %+2
         AI,R4    -1
         LW,R2    FP:LAST
         AI,R2    1
         STB,R3   0,R2
         LW,R7    SIGLOC
         AI,R7    -5
         CI,R4    KEYED
         BLE      FPO1
         AI,R5    3
         SLS,R5   -2
         LW,R15   BLD:R5
         STW,R15  0,R5
         SW,R5    R7
         LI,R6    1
         STB,R5   *SIGLOC,R6
         AI,R5    1
         SLS,R5   2
         LI,R15   FPO2
         B        XWRITE
FPO1     EQU      %
         LW,R6    R7
         SLS,R6   2
         SW,R5    R6
         BAL,R15  XWRITE
FPO2     EQU      %
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    XREAD
*D*
*D*      REGISTERS:  R4 PRESERVED; ALL OTHERS VULNERABLE
*D*
*D*      CALL: B XREAD  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE: THE FOLLOWING ROUTINE IS CALLED INTERNALLY :
*D*                      XWRITE1 -> ROUTINE TO WRITE A LOGICAL RECORD
*D*                                  THROUGH M:EO ( WITHOUT MODIFI-
*D*                                  CATION UNLIKE XWRITE )
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R4  -> FILE ORGANIZATION
*D*               EXTERNAL DATA :
*D*                      SOURCE FILE -> RECORDS ACCESSED SEQUENTIALLY
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R10 -> ERROR OR ABNORMAL CODE ENCOUNTERED
*D*               EXTERNAL DATA :
*D*                      M:EO -> FILE RECORDS WRITTEN AS BLOCKS OF
*D*                               PHYSICAL RECORDS
*D*
*D*      DESCRIPTION:  TWO PAGES ARE OBTAINED FOR THE READ OPERATION
*D*               INITIALLY. THE ORGANIZATION IS PICKED UP FROM *SIG-
*D*               LOC AND IF RANDOM, THE ROUTINE RD:RDM IS ENTERED.
*D*               OTHERWISE, THE BUFFER POINTER IS BUMPED TO ALLOW
*D*               ROOM FOR THE POSSIBLE KEY AND PHYSICAL RECORD HEADER
*D*               WITH THE APPROPRIATE CHANGE TO THE SIZE, AND THE
*D*               READ-MULTIWRITE LOOP IS ENTERED.
*D*                    A FILE RECORD IS READ, THE SIZE OF THE READ
*D*               DETERMINED, AND IF CONSECUTIVE, XWRITE1 CALLED TO
*D*               WRITE THE LOGICAL RECORD, RETURNING TO THE READ
*D*               AGAIN. IF KEYED THOUGH, THE KEY ADDRESS IS LOCATED
*D*               AND THE KEY MOVED TO THE FRONT OF THE RECORD READ,
*D*               PLACING THE START OF THE KEY ON A WORD BOUNDARY.
*D*               THEN XWRITE1 IS CALLED, AS BDESCRIBED ABOVE.
*D*
         LI,R7    2
         BAL,R15  MMG
         LB,R4    *SIGLOC
RD:RTY   EQU      %
         CI,R4    KEYED
         BG       RD:RDM
         AI,R9    10
         SLS,R8   11
         AI,R8    -40
         BAL,R15  %+2
XREAD    EQU      %
         AI,R9    1
         M:READ   M:EI,(BUF,*R9),(SIZE,*R8),(ABN,RD:ABN),;
                  (ERR,RD:ABN)
         LW,R5    M:EI+13
         AI,R9    -1
         STW,R5   *R9
         AI,R5    4
         CI,R4    KEYED
         BL       XR1
         LW,R6    M:EI+10
         LB,R2    *R6
         AI,R2    4
         AND,R2   XFFFC
         AW,R5    R2
         LW,R7    R9
         SLD,R6   2
         SW,R7    R2
         STB,R2   R7
         MBS,R6   0
         SLS,R2   -2
         LW,R7    R9
         SW,R7    R2
         B        XWRITE1
XR1      EQU      %
         LW,R7    R9
         B        XWRITE1
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    RD:ABN
*D*
*D*      REGISTERS:  R7,R9,R15 VOLATILE;ALL OTHERS PRESERVED
*D*
*D*      CALL:    B RD:ABN  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R10 -> ERROR OR ABNORMAL CODE
*D*                      R4  -> FILE ORGANIZATION
*D*                      LIMIT -> MAXIMUM # OF PAGES AVAILABLE
*D*                      CURNOPG -> CURRENT # OF PAGES TAKEN
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R7 -> # OF PAGES DESIRED
*D*                      R10-> ERROR OR ABNORMAL CODE
*D*               EXTERNAL DATA :
*D*                      M:EI -> DCB EITHER CLOSED OR POSITIONED ONE
*D*                               RECORD BACKWARDS DEPENDING UPON EXIT
*D*
*D*      DESCRIPTION:  RD:ABN IS THE ERROR AND ABNORMAL HANDLING ROU-
*D*               TINE FOR M:EI, ONCE THE FILE HAS BEEN OPENED AND
*D*               BLOCKING OF FILE RECORDS IS BEGUN. THE CODE IS CHECK-
*D*               ED FOR THE EXPECTED ERRORS AND IF MATCHED THE PART-
*D*               ICULAR ACTION IS TAKEN :
*D*                    600 - NORMAL TERMINATION AT XCMPLT
*D*                   4200 -    "
*D*                    700 - MORE BUFFER SPACE IS OBTAINED.
*D*               OTHERWISE, THE ROUTINE SIMMERC IS ENTERED WITH THE
*D*               UNEXPECTED CODE STILL IN R10.
*D*                    FOR 700 ERRORS, A CHECK IS MADE OF THE FILE
*D*               ORGANIZATION FOR RANDOM FILES, SINCE THAT ERROR IS
*D*               INCOMPATIBLE WITH PROPER FUNCTIONING OF ISCL. ALSO
*D*               THE FILE IS RE-POSITIONED BACK ONE RECORD TO PREVENT
*D*               THE SKIPPING OF A RECORD.
*D*
RD:ABN   EQU      %
         LH,R9    R10
         CI,R9    X'600'
         BE       XCMPLT
         CI,R9    X'4200'
         BE       XCMPLT
         CI,R9    X'700'
         BE       %+3
CLSEI    EQU      %
,CLS     M:CLOSE  M:EI,(SAVE)
         B        SIMMERC
         CI,R4    KEYED
         BG       SIMMERC
         M:PRECORD M:EI,(REV),(N,1)
THRSHLD  EQU      %
         LW,R7    LIMIT
         SLS,R7   -1
         CW,R7    CURNOPG
         BG       %+2
         LW,R7    LIMIT
         LI,R15   RD:RTY
         B        MMG
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    RD:RDM
*D*
*D*      REGISTERS:  R3,R5,R7,R15 DESTROYED; R8,R9 MODIFIED; ALL OTHERS
*D*                   PRESERVED
*D*
*D*      CALL:    B RD:RDM  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R9 -> ADDRESS OF START OF TWO-PAGE BUFFER
*D*                      R8 -> # OF PAGES IN BUFFER
*D*               EXTERNAL DATA :
*D*                      M:EI -> FILE RECORDS; ONE BY ONE; AND THEIR
*D*                               SIZE ( M:EI+4 )
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      *R9 -> FILE RECORD, PRECEDED BY BLOCK #
*D*                      R5  -> SIZE OF LOGICAL RECORD TO BE OUTPUT
*D*                      R3  -> BLOCK # FOR NEXT READ
*D*                      R7  -> ADDRESS OF START OF LOGICAL RECORD
*D*
*D*      DESCRIPTION:  RD:RDM IS THE RANDOM FILE READ ROUTINE. THE
*D*               BUFFER IS ADJUSTED SO THAT THE FILE READ IS ON A
*D*               PAGE BOUNDARY, AND THE BLOCK # CAN BE PLACED IN
*D*               FRONT OF THE RECORD. THE SIZE OF THE BUFFER IS CAL-
*D*               CULATED, AND THE NEXT FILE RECORD IS READ.
*D*                    THE BUFFER POINTER IS DECREMENTED AND THE BLOCK
*D*               NUMBER IS STORED THERE. THE COUNT IS CALCULATED FROM
*D*               WHAT WAS ACTUALLY READ, AND THE MULTIWRITE ROUTINE IS
*D*               ENTERED.
*D*
RD:RDM   EQU      %
         AI,R9    X'200'
         AI,R8    -1
         SLS,R8   11
         LI,R3    0
         BAL,R15  %+2
RDRDM1   EQU      %
         AI,R9    1
         M:READ   M:EI,(BUF,*R9),(SIZE,2048),(BLOCK,*R3),;
                  (ABN,RD:ABN),(ERR,RD:ABN)
         AI,R9    -1
         STW,R3   *R9
         LW,R7    R9
         AI,R3    1
         LW,R5    M:EI+13
         AI,R5    4
         B        XR1
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    SIMMERC
*D*
*D*      REGISTERS:  ALL REGISTERS DESTROYED
*D*
*D*      CALL:    B SIMMERC  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLED INTERNALLY :
*D*                      ERRMSGE -> ROUTINE TO READ THE ERRMSG FILE
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R10 -> ERROR AND ABNORMAL CODE IN TOP HALF-
*D*                              WORD
*D*
*D*      DATA:    EXTERNAL DATA :
*D*                      M:DO -> DCB FOR ACCESSING ERRMSG FILE
*D*                      ERRMSG FILE -> KEYED FILE CONTAINING MONITOR
*D*                                      ERROR MESSAGES
*D*
*D*      OUTPUT:  EXTERNAL DATA :
*D*                      M:LL -> ERROR MESSAGE OUTPUT
*D*
*D*      DESCRIPTION:  SIMMERC OUTPUTS THE SYSTEM ERROR MESSAGE TO
*D*               THE USER VIA M:LL FROM THE ERROR OR ABNORMAL CODE
*D*               IN R10 ON ENTRY. THE KEY TO THE ERRMSG FILE IS
*D*               FORMED FROM THAT CODE, AND THE REGISTERS FOR
*D*               ERRMSGE ARE SET UP AS:
*D*                    R12 -> KEY TO FILE
*D*                    R2  -> DCB ADDRESS,
*D*                    R3  -> BUFFER ADDRESS,
*D*                    R4  -> BUFFER SIZE IN BYTES.
*D*               UPON RETURN FROM ERRMSGE, THE MESSAGE IS OUTPUT
*D*               AND THE COMMAND READ ROUTINE IS ENTERED.
*D*
SIMMERC: EQU      %
         LI,R10   X'1400'
         B        SM1
SIMMERC  EQU      %
         SLS,R10  -16
         LI,R2    3
         LB,R11   R10,R2
         SLS,R11  -1
         STB,R11  R10,R2
SM1      EQU      %
         LI,R11   X'300'
         STH,R11  R10
         LW,R12   R10
         LI,R2    M:DO
         LI,R3    BUFFER
         LI,R4    X'50'
         BAL,R11  ERRMSGE
         M:WRITE  M:LL,(BUF,BUFFER),(SIZE,*R4)
         B        READ
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    FILCHK
*D*
*D*      REGISTERS:  ALL REGISTERS VOLATILE
*D*
*D*      CALL:    B FILCHK  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINE IS CALLED INTERNALLY :
*D*                      OPEN -> ROUTINE TO PERFORM AN OPEN CAL1
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      STACK   -> VLP'S FOR TARGET FILE
*D*                      SIGLOC  -> POINTER TO PROPER VLP'S
*D*                      SIGNALS -> COMMAND PREPOSITION SPECIFIED
*D*                                  OVRBIT IMPLIES 'OVER'
*D*               EXTERNAL DATA :
*D*                      M:EI -> EXISTENCE OF TARGET FILE
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      TRGTOPEN -> FPT FOR OPEN CAL1
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      ALL INFORMATION IS TRANSFERRED VIA EXIT POINT
*D*
*D*      DESCRIPTION:  FILCHK IS THE COMMAND VALIDITY CHECKING ROUTINE
*D*               FOR A FORWARD SEND COMMAND. A CALL IS MADE TO THE
*D*               OPEN ROUTINE TO DETERMINE THE EXISTENCE OF THE TARGET
*D*               FILE. IF THE FILE DOES NOT EXIST, AND THE ACCOUNT
*D*               SPECIFICATION IS NOT THE SAME AS THE USER'S, EXIT
*D*               IS TO THE SIMMERC: ROUTINE. IF THE FILE EXISTS AND
*D*               'OVER' HAS NOT BEEN SPECIFIED, EXIT IS TO THE ERROR
*D*               ROUTINE FC%. OTHERWISE, COMMAND PROCESSING CONTINUES
*D*               WITH EXIT TO THE XMIT1 ROUTINE.
*D*
FILCHK   EQU      %
         LI,R7    INOUT             (X'4')
         LI,R6    TRGTOPEN
         LW,R5    SIGLOC
         BAL,R15  OPEN
         B        XMIT1
         B        SIMMERC:
         LW,R6    SIGNALS
         CI,R6    OVRBIT            (X'2')
         BAZ      FC%
         B        XMIT1
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    XMIT1
*D*
*D*      REGISTERS:  ALL REGISTERS VOLATILE
*D*
*D*      CALL:    B XMIT1  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE INTERNALLY CALLED :
*D*                      XMIT   -> ROUTINE TO OPEN M:EO DCB TO THE
*D*                                 PROPER REMOTE DEVICE
*D*                      XWRITE -> ROUTINE TO PASS THE DESIGNATED DATA
*D*                                 THROUGH M:EO DCB
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      STACK  -> INTERPRETED COMMAND
*D*                      BLD:R5 -> POINTER TO LAST SIGNIFICANT STACK
*D*                                 BYTE
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R5 -> SIZE OF STACK TO BE XMITTED
*D*                      R7 -> POINTER TO START OF STACK
*D*
*D*      DESCRIPTION:  THE XMIT1 ROUTINE PERFORMS THE ACTUAL PASSING
*D*               OF THE INTERPRETED COMMAND FOR A REMOTE ( FORWARD )
*D*               SEND COMMAND. XMIT IS CALLED TO CONNECT THE M:EO DCB
*D*               TO THE APPROPRIATE REMOTE DEVICE, AND THE REGISTERS
*D*               ARE THEN SET UP FOR THE XWRITE ROUTINE. SINCE THERE
*D*               IS ONLY ONE RECORD TO WRITE, AFTER THE FIRST CALL TO
*D*               XWRITE, THE CLEAN-UP ROUTINE XCMPLT1 IS THE EXIT.
*D*
XMIT1    EQU      %
         BAL,R15  XMIT
         LI,R7    RQACCT
         LW,R5    BLD:R5
         AI,R5    -BA(RQACCT)
         BAL,R15  XWRITE
         B        XCMPLT1
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    XMIT
*D*
*D*      REGISTERS:  ALL REGISTERS VOLATILE
*D*
*D*      CALL:    BAL,R15 XMIT
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINES ARE CALLED INTERNALLY :
*D*                      MMG -> ROUTINE TO OBTAIN SPECIFIED CORE
*D*                  THE FOLLOWING PROCESSOR IS EXTERNALLY CALLED :
*D*                      LDEV -> PROCESSOR TO CONNECT STREAM TO REMOTE
*D*                               DEVICE
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R6 -> FLAG TO DETERMINE FORM NAME FOR STREAM
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      LDEV -> APPROPRIATE PARAMETERS FOR CALL TO
*D*                               THE LDEV PROCESSOR
*D*                      Y1C  -> WORD LITERAL OF COUNT FOR MOVING IN
*D*                               LDEV PARAMETERS
*D*                      CURADR-> POINTER TO LOWEST WORD ADDRESS OF
*D*                                COMMON MEMORY
*D*
*D*      OUTPUT:  EXTERNAL DATA :
*D*                      M:EO -> DCB OPENED TO STREAM CONNECTED TO THE
*D*                               APPROPRIATE REMOTE DEVICE
*D*                      JB:PRIV-> PRIVILEGE LEVEL BUMPED TO 'C0'
*D*
*D*      DESCRIPTION:  THE XMIT ROUTINE CONNECTS THE M:EO DCB TO THE
*D*               APPROPRIATE REMOTE DEVICE. A COMMON PAGE OF MEMORY
*D*               IS OBTAINED ( THE LOWEST ONE IF MORE THAN ONE AL-
*D*               READY AVAILABLE ) AND THE APPROPRIATE LDEV PARAMETERS
*D*               ARE PLACED IN THAT PAGE. IF THIS IS A REVERSE SEND
*D*               REQUEST ( R6 BEING PASSOPEN ) THEN THE FORM NAME
*D*               IS ZEROED. OTHERWISE, THE DEFAULT FORMNAME 'ISCL' IS
*D*               USED. THE NECESSARY PRIVILEGE LEVEL IS OBTAINED FOR
*D*               THE USER, AND THE LDEV PROCESSOR IS LINKED TO. IF
*D*               LDEV DISCOVERED ANY ERROR ( *CURADR NON-ZERO ) THEN
*D*               EXIT IS TO THE LD% ROUTINE. OTHERWISE, RETURN IS VIA
*D*               R15 ( SAVED SINCE LDEV MIGHT DESTROY IT ).
*D*
XMIT     EQU      %
         STW,R15  XM:R15
         LI,R7    1
         BAL,R15  MMG
         LI,R8    BA(LDEV)
         SLS,R9   2
         OR,R9    Y1C
         CI,R6    PASSOPEN
         BNE      %+3
         LI,R15   0
         STW,R15  WSNFPT+4
         MBS,R8   0
         LI,R0    X'C0'
         STB,R0   JB:PRIV
LINK     EQU      %
         M:LINK   'LDEV',':SYS',(ERROR)
         LW,R9    *CURADR
         BNEZ     LD%
         M:OPEN   M:EO,(DEVICE,'C2'),(OUT)
         B        *XM:R15
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    XWRITE
*D*
*D*      REGISTERS:  R5,R7 MODIFIED; R6,R10,R11,R12,R13,R14 VOLATILE
*D*
*D*      CALL:    BAL,R15 XWRITE,XWRITE1
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R5 -> SIZE OF STACK TO BE WRITTEN
*D*                      R7 -> POINTER TO START OF STACK
*D*                      RECSIZ -> PARAMETER DETERMINING SIZE OF CHUNKS
*D*               EXTERNAL DATA :
*D*                      J:ACCN -> USER'S ACCOUNT AND NAME
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      Y8 -> LITERAL WITH HIGH-ORDER BIT SET; USED
*D*                             AS FLAG FOR LAST CHUNK
*D*
*D*      OUTPUT:  EXTERNAL DATA :
*D*                      M:EO -> SPECIFIED DATA WRITTEN THROUGH M:EO,
*D*                               RECSIZ BYTES AT A TIME
*D*
*D*      DESCRIPTION:  THE XWRITE ROUTINE DOES THE ACTUAL WRITING OF
*D*               DATA THROUGH THE M:EO DCB. IF XWRITE IS THE ENTRY
*D*               POINT, THE USER NAME AND ACCOUNT ARE PLACED IN THE
*D*               FIVE WORDS PREVIOUS TO THE DATA ( DATA COUNT ALREADY
*D*               ACCOUNTS FOR THESE ). R11 SERVES AS THE INTERNAL
*D*               CHUNK COUNTER, R6 THE CHUNK SIZE. CHUNKS ARE WRITTEN
*D*               WITH THE CHUNK # IN THE PRECEDING WORD UNTIL THE LAST
*D*               CHUNK IS TO BE WRITTEN. THEN THE LAST CHUNK FLAG IS
*D*               SET IN THE CHUNK # WORD, AND THAT CHUNK WRITTEN WITH
*D*               EXIT VIA R15. NOTE THAT THE ACTUAL # OF WORDS WRITTEN
*D*               IS :
*D*                          (R5)**-2 + # OF CHUNKS  .
*D*
XWRITE   EQU      %
         LCI      5
         LM,R10   J:ACCN
         STM,R10  0,R7
XWRITE1  EQU      %
         LI,R11   0
         LW,R13   Y8
         LI,R6    RECSIZ
XLOOP    EQU      %
         AI,R7    -1
         AI,R5    4
         STW,R11  0,R7
         CW,R6    R5
         BGE      XEND
         AI,R5    -RECSIZ
,FPTWRIT M:WRITE  M:EO,(BUF,*R7),(SIZE,*R6)
         AI,R11   1
         AI,R7    RECSIZ**-2
         B        XLOOP
XEND     EQU      %
         LW,R6    R5
         STS,R13  0,R7
         CAL1,1   FPTWRIT
         B        *R15
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    XCMPLT
*D*
*D*      REGISTERS:  R1 DESTROYED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    BAL,R15 XCMPLT,XCMPLT1
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   EXTERNAL DATA :
*D*                      M:EI -> WORD 0 OF DCB TO CONTROL CLOSING
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      Y002 -> WORD WITH BIT 10 SET FOR TEST TO SEE
*D*                               IF DCB OPEN
*D*
*D*      OUTPUT:  EXTERNAL DATA :
*D*                      M:EI -> CLOSED IF NECESSARY
*D*                      M:EO -> CLOSED
*D*
*D*      DESCRIPTION:  THE XCMPLT ROUTINE CLEANS UP THE DCBS FROM
*D*               A USER REQUEST. IF THE ENTRY POINT IS XCMPLT, A
*D*               END-OF-FILE RECORD IS WRITTEN. THE DCBS ARE CLOSED
*D*               AS REQUIRED AND EXIT IS TO READ FOR ANOTHER USER
*D*               REQUEST.
*D*
XCMPLT   EQU      %
         M:WRITE  M:EO,(BUF,EOF),(SIZE,8)
XCMPLT1  EQU      %
         M:LDEV   'C2',(ASAVE)
         LW,R1    Y002
         CW,R1    M:EI
         BAZ      %+2
         CAL1,1   CLS
         M:CLOSE  M:EO,(SAVE)
         B        READ
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    LNK
*D*
*D*      REGISTERS:  R8 PRESERVED; ALL OTHERS VULNERABLE
*D*
*D*      CALL:    B LNK  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   EXTERNAL DATA :
*D*                      J:PUF -> BYTE COUNT OF J:CCBUF COMMAND
*D*                      J:CCBUF -> COMMAND SPECIFYING USER REQUEST
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      DW:CCBUF -> DOUBLE WORD SET UP FOR MBS
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      BUFFER -> COMMAND MOVED FROM J:CCBUF
*D*                      R10    -> SIZE OF COMMAND
*D*                      LNKSIG -> SAVED R8 FOR LINK FLAG
*D*
*D*      DESCRIPTION:  THE LNK ROUTINE PICKS UP THE ISCL COMMAND LINE
*D*               WHEN ISCL IS THE TARGET OF AN M:LINK. THE COMMAND
*D*               SIZE IS PICKED UP, AND THE COMMAND LINE MOVED TO
*D*               BUFFER, WITH THE LAST CHARACTER BEING BLANKED OUT
*D*               ( TO REMOVE CARRIAGE RETURN OR LINE FEED FOR COMP-
*D*               ATIBILITY ). R10 IS LOADED WITH THE COMMAND
*D*               LENGTH, AND THE READ ROUTINE IS ENTERED AT MID-STREAM.
*D*
LNK      EQU      %
         STW,R8   LNKSIG
         LB,R5    JB:CCARS
         LD,R6    DW:CCBUF
         STB,R5   R7
         AI,R5    -1
         LI,R4    BLANK
         STB,R4   J:CCBUF,R5
         MBS,R6   0
         LW,R10   R5
         B        READ1
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    EXIT
*D*
*D*      REGISTERS:  NO REGISTER MODIFICATIONS
*D*
*D*      CALL:    B EXIT  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      LNKSIG -> R8 ON ENTRY IF PROCESSOR HAS BEEN
*D*                                 TARGET OF AN M:LINK; OTHERWISE 0
*D*
*D*      OUTPUT:  NONE
*D*
*D*      DESCRIPTION:  THE EXIT ROUTINE TERMINATES ISCL PROCESSING.
*D*               IF THE LNKSIG FLAG IS NON-ZERO, AN M:LDTRC CAL1 IS
*D*               EXECUTED TO RETURN TO THE CALLER. OTHERWISE AN M:EXIT
*D*               CAL1 IS EXECUTED.
*D*
CMD%     EQU      %
EXIT     EQU      %
         M:EXIT
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    XCON
*D*
*D*      REGISTERS:  ALL REGISTERS VULNERABLE
*D*
*D*      CALL:    ENTERED ONLY VIA EXIT
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINE IS CALLED INTERNALLY :
*D*                      MMFALL -> ROUTINE TO RELEASE ALL MEMORY
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R12   -> BIT 0 : REGISTERS SET UP FOR EXIT
*D*                                        CONTROL
*D*                               BIT 1 : M:LINK EXECUTED
*D*                      R1    -> POINTER TO PSD IN TCB
*D*                      UPRIV -> USER'S NORMAL PRIVILEGE
*D*                      R8    -> EXIT CONDITION BITS ( SEE B.P. REF )
*D*                      R10   -> ERROR CODE
*D*                      R11   -> ERROR SUB-CODE
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      SM1ADDR -> PSD WORD 1 FOR RETURN TO SM1
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      TCB     -> MODIFIED RETURN ADDRESS IF
*D*                                  APPROPRIATE; R10 IN TCB ALSO
*D*                                  SET UP
*D*               EXTERNAL DATA :
*D*                      JB:PRIV -> USER'S NORMAL PRIVILEGE RESTORED
*D*
*D*      DESCRIPTION:  XCON IS THE EXIT CONTROL ROUTINE FOR ISCL.
*D*               IF EXIT WAS CAUSED BY AN M:LINK, THE CAL1 IS RE-
*D*               EXECUTED, THE USER'S PRIVILEGE RESTORED, EXIT CON-
*D*               TROL RE-ESTABLISHED, THE ISCL PROMPT RESET, AND A
*D*               M:TRTN CAL1 ISSUED TO RETURN TO THE ORIGINAL M:LINK
*D*               +1.
*D*                    IF THIS WAS NOT THE CASE ( OR THE TCB WAS NOT
*D*               AVAILABLE ), A CHECK IS MADE TO SEE IF THE ERROR CODE
*D*               AND SUB-CODE WERE PASSED. IF NOT, THE USER'S PRIVILEGE
*D*               IS RESTORED, MEMORY RELEASED, AND AN M:EXIT CAL1 EX-
*D*               ECUTED. IF THE CODE AND SUB-CODE ARE AT HAND, THE
*D*               REGISTER 10 IN THE TCB IS SETUP TO SIMULATE THE ERROR
*D*               AND THE PSD POINTED TO THE ENTRY POINT SM1 IN THE
*D*               SIMMERC ROUTINE. THEN A M:TRTN CAL1 EXITS THERE.
*D*
XCON     EQU      %
         LI,R3    X'1FFFF'
         LI,R2    0
         LC       R12
         BCR,4    XC1
         BCS,8    XC1
         LS,R2    0,R1
         MTW,1    0,R1
         CI,R2    LINK
         BNE      XC1
         EXU      0,R2
         LW,R0    UPRIV
         STB,R0   JB:PRIV
         CAL1,8   XCTL
         CAL1,1   PC
         M:TRTN   XCON
XC1      EQU      %
         LW,R0    UPRIV
         STB,R0   JB:PRIV
         CI,R8    3
         BANZ     XC2
         M:LDEV   'C2',(AINIT)
         BAL,R15  MMFALL
         M:EXIT
XC2      EQU      %
         SLS,R10  8
         LI,R3    3
         STB,R11  R10,R3
         STW,R10  12,R1
         LW,R3    SM1ADDR
         STW,R3   0,R1
         M:TRTN   XCON
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    LSTDEL
*D*
*D*      REGISTERS:  R7 DESTROYED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    B LSTDEL  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO INTERNALLY ROUTINES CALLED
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R6 -> SIGNALS FROM STACK
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      SIGNALS -> NXTFBIT SET IF NO FILE NAME
*D*                                  SPECIFIED ON A LIST REQUEST
*D*
*D*      DESCRIPTION:  LSTDEL HANDLES POST-SCAN PROCESSING FOR THE
*D*               LIST AND DELETE COMMANDS. IF NO FILE NAME HAS BEEN
*D*               SPECIFIED, THE SIGNALS ARE CHECKED TO DETERMINE THAT
*D*               IT IS A LIST REQUEST. IF ALL IS FAIR, THE NXTFBIT IS
*D*               SET IN SIGNALS. EXIT IS TO XMIT1 IF PROCESSING IS TO
*D*               CONTINUE, UNK%3 IF AN ERROR IS DETECTED.
*D*
LSTDEL   EQU      %
         CI,R6    FLEBIT
         BANZ     XMIT1
         CI,R6    LSTBIT
         BAZ      UNK%3
         LI,R7    NXTFBIT
         STS,R7   SIGNALS
         B        XMIT1
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    MMINIT
*D*
*D*      REGISTERS:  R8,R9,R10 DESTROYED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    BAL,R15 MMINIT
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   EXTERNAL DATA :
*D*                      M:GDDL -> MEMORY MANAGEMENT LIMITS
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      LIMIT   -> MAXIMUM # OF AVAILABLE PAGES
*D*                      CURNOPG -> INITIALIZAED TO ZERO
*D*                      CURADR  ->     "
*D*
*D*      DESCRIPTION:  MMINIT INITIALIZES INTERNAL MEMORY MANAGEMENT
*D*               CELLS. A M:GDDL CAL1 IS EXECUTED TO RETURN THE
*D*               USER LIMIT FOR # OF PAGES, AND CELLS INDICATING THE
*D*               CURRENT # OF PAGES, AND THE LOWEST ADDRESS ARE ZERO-
*D*               ED.
*D*
MMINIT   EQU      %
         M:GDDL
         STW,R10  LIMIT
         LI,R8    0
         STW,R8   CURNOPG
         STW,R8   CURADR
         B        *R15
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    MMG
*D*
*D*      REGISTERS:  R7 MODIFIED; R8,R9 DESTROYED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    LI,7     # OF PAGES DESIRED
*D*               BAL,R15  MMG
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R7 -> # OF PAGES DESIRED
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      CURNOPG -> CURRENT # OF PAGES HELD
*D*                      LIMIT   -> MAXIMUM # OF PAGES AVAILABLE
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      R8      -> # OF PAGES OBTAINED
*D*                      R9      -> STARTING ADDRESS OF MEMORY
*D*                      CURNOPG -> UPDATED
*D*                      CURADR  ->    "
*D*
*D*      DESCRIPTION:  MMG IS THE ROUTINE USED TO OBTAIN COMMON
*D*               MEMORY PAGES. THE REQUESTED NUMBER IS CHECKED
*D*               TO SEE IF EITHER IT EXCEEDS THAT AVAILABLE OR
*D*               IF THE REQUEST CAN ALREADY BE SATISFIED. IN THE
*D*               FORMER CASE, AN ERROR IS MARKED AND THE ERROR
*D*               ROUTINE NOGO IS ENTERED. IN THE LATTER INSTANCE
*D*               THE EXITING REGISTERS ARE SET UP AND WE RETURN
*D*               TO THE CALLER.
*D*                    IF NEITHER OF THESE CIRCUMSTANCES ARE FILLED,
*D*               THE NUMBER OF PAGES ABOVE WHAT ALREADY IS HELD IS
*D*               DETERMINED AND A M:GCP CAL1 IS EXECUTED TO OBTAIN
*D*               THIS NUMBER. IF ANY ERROR OCCURS, EXIT IS TO NOGO.
*D*               OTHERWISE, THE INTERNAL MM CELLS ARE UPDATED, AND
*D*               WE RETURN TO THE CALLER AS BEFORE.
*D*
MMG      EQU      %
         CW,R7    CURNOPG
         BLE      MMG1
         CW,R7    LIMIT
         BG       NOGO
         SW,R7    CURNOPG
         M:GCP    *R7
         BCS,8    NOGO
         AW,R8    CURNOPG
         STW,R8   CURNOPG
         STW,R9   CURADR
         B        *R15
MMG1     EQU      %
         LW,R8    CURNOPG
         LW,R9    CURADR
         B        *R15
MMF      EQU      %
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    MMF
*D*
*D*      REGISTERS:  R7 MODIFIED; R9 DESTROYED; ALL OTHERS PRESERVED
*D*
*D*      CALL:    LI,7     # OF PAGES TO BE RELEASED
*D*               BAL,R15  MMF
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R7 -> # OF PAGES TO BE RELEASED
*D*
*D*      DATA:    INTERNAL DATA :
*D*                      CURNOPG -> CURRENT # OF PAGES HELD
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      CURNOPG -> UPDATED # OF PAGES HELD
*D*                      CURADR  -> UPDATED STARTING ADDRESS
*D*
*D*      DESCRIPTION:  MMF IS THE ROUTINE USED TO RELEASE OBTAINED
*D*               MEMORY PAGES. THE REQUESTED NUMBER IS CHECKED A-
*D*               GAINST THE NUMBER CURRENTLY HELD, AND THE LESSER
*D*               OF THE TWO IS USED FOR A M:FCP CAL1. ( UNLESS
*D*               ENTRY IS VIA MMFALL, IN WHICH CASE, THE #
*D*               IN CURNOPG IS USED ). IF AN ERROR OCCURS, BOTH
*D*               MM CELLS ARE ZEROED. OTHERWISE, THE CURNOPG CELL
*D*               IS DECREMENTED APPROPRIATELY, AND CURADR IS BUMP-
*D*               ED AN APPROPRIATE AMOUNT.
*D*
         CW,R7    CURNOPG
         BLE      %+2
MMFALL   EQU      %
         LW,R7    CURNOPG
         M:FCP    *R7
         BCR,8    MMF1
         LI,R7    0
         STW,R7   CURADR
MMF2     EQU      %
         STW,R7   CURNOPG
         B        *R15
MMF1     EQU      %
         LW,R9    R7
         SLS,R9   9
         AWM,R9   CURADR
         XW,R7    CURNOPG
         SW,R7    CURNOPG
         B        MMF2
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    UNK%1P
*D*
*D*      REGISTERS:  R0,R1,R2,R3,R4,R6,R11,R12,R13 DESTROYED
*D*
*D*      CALL:    B UNK%1P  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  THE FOLLOWING ROUTINE IS CALLED INTERNALLY :
*D*                      TRTPSET -> ROUTINE TO RESET THE TRT TABLE
*D*
*D*      INPUT:   NONE
*D*
*D*      OUTPUT:  INTERNAL DATA :
*D*                      TRT -> APPROPRIATELY RE-ADJUSTED TRANSLATE
*D*                              TABLE
*D*
*D*      DESCRIPTION:  THE UNK%1P ROUTINE ADJUSTS THE TRT TABLE
*D*               BEFORE ENTERING THE UNK%1 ERROR ROUTINE. THE INDEX
*D*               INTO TRTSET TABLES IS LOADED AND THE ROUTINE CALLED
*D*               WITH EXIT TO UNK%1.
*D*
UNK%1P   EQU      %
         LI,R6    1
         BAL,R14  TRTPSET
         B        UNK%1
* * * * * * * * * * * * * * * * * * * * * * * * *
LVL3S    EQU      %
* * * * * * * * * * * * * * * * * * * * * * * * * *
*D*      NAME:    UNK%1
*D*
*D*      REGISTERS:  R1,R2,R3,R4,R8 DESTROYED; R7 MODIFIED
*D*
*D*      CALL:    B UNK%1  ( NO RETURN TO CALLER )
*D*
*D*      INTERFACE:  NO INTERNALLY CALLED ROUTINES
*D*
*D*      INPUT:   INTERNAL DATA :
*D*                      R7 -> POINTER TO COMMAND LINE POSITION
*D*
*D*      OUTPUT:  EXTERNAL DATA :
*D*                      M:LL -> ERROR MESSAGE
*D*                      M:EI -> CLOSED IF REQUIRED
*D*                      M:EO -> CLOSED IF REQUIRED
*D*
*D*      DESCRIPTION:  THE CURRENT COMMAND LINE POINTER IS USED
*D*               TO CALCULATE THE DISPLACEMENT INTO THE COMMAND
*D*               LINE, AND THE ERROR MESSAGE IS PRECEDED BY THAT
*D*               MANY BLANKS IN ORDER TO FLAG THE POINT AT WHICH
*D*               THE ERROR OCCURRED. AFTERWARDS, THE DCBS ARE CLOSED
*D*               IF OPEN AND EXIT IS TO THE READ ROUTINE.
*D*
UNK%1    EQU      %
         LI,R1    BA(BUFFER)
         AI,R7    -BA(BUFFER)+1
         BGEZ     %+3
         LI,R7    0
         B        %+3
         STB,R7   R1
         MBS,0    BA(CMDTBL)+1
         LW,R3    R1
         LI,R2    BA(EHMS)
         LI,R4    5
         STB,R4   R3
         MBS,R2   0
         AI,R7    4
         STB,R7   BUFFER
         LI,R8    BUFFER
ERR%COM  EQU      %
         CAL1,2   FPTPRNT
         LW,R8    Y002
         CW,R8    M:EI
         BAZ      %+2
         CAL1,1   CLS
         CW,R8    M:EO
         BANZ     XCMPLT+3
         B        READ
FP%1     EQU      %
         LI,R8    FPTMS
         B        ERR%COM
FC%      EQU      %
         LI,R8    FEMS
         B        ERR%COM
LD%      EQU      %
         LI,R8    IWMS
         B        ERR%COM
UNK%3    EQU      %
         LI,R8    IDMS
         B        ERR%COM
NOGO     EQU      %
         LI,R8    NPMS
         B        ERR%COM
FC%1     EQU      %
         LI,R8    NYMS
         B        ERR%COM
* * * * * * * * * * * * * * * * * * * * * * * * * *
EHMS     EQU      %
         GEN,40   X'5B0DC5C86F'
         BOUND    4
FPTMS    EQU      %
         TEXTC    'FILE PARAMETERS INCOMPLETE'
FEMS     EQU      %
         TEXTC    'FILE EXISTS - CANNOT COPY'
IWMS     EQU      %
         TEXTC    'ILLEGAL WORKSTATION'
IDMS     EQU      %
         TEXTC    'ILLEGAL COMMAND'
NPMS     EQU      %
         TEXTC    'OUT OF PAGES'
NYMS     EQU      %
         TEXTC    'NOT YOUR FILE'
* * * * * * * * * * * * * * * * * * * * * * * * * *
TRGTOPEN EQU      %
         GEN,8,5,19 X'14',1,M:EI
         DATA     X'41200001'
         DATA     ABN
         DATA     X'80000007'
         DATA     FPARAM
PASSOPEN EQU      %
         GEN,8,24 X'14',M:EI
         DATA     X'45000001'
         DATA     ABN
         DATA     X'80000004'
         DATA     X'80000007'
         BOUND    8
DW:CCBUF DATA     BA(J:CCBUF),BA(BUFFER)
HEREMS   TEXTC    'ISCL HERE'
INITIAL  EQU      %
         DATA     '    ','    '
         DATA     X'C6D6'
         DATA     0
         DATA     NAME
         DATA     SIGNALS
         DATA     BA(WSNFPT)
BLKBF    EQU      %
         GEN,8,24 X'50',BA(BUFFER)
BLKSG    EQU      %
         GEN,8,24 X'50',BA(STACK)
FPW:CTL  EQU      %-1
         DATA     X'04000000'
         DATA     X'05000000'
         DATA     X'06000000'
         DATA     X'0D000000'
         DATA     X'09000000'
FPX      EQU      %-FPW:CTL-1
* * * * * * * * * * * * * * * * * * * * * * * * * *
FP:BITS  EQU      %-1
         DATA     EXPBIT
         DATA     RDACBIT
         DATA     WRACBIT
* * * * * * * * * * * * * * * * * * * * * * * * * *
         BOUND    8
SSNDLMT  EQU      %
         DATA     SSND2,SSND3
EOF      EQU      %
SHORTBIT DATA     X'80000000'
         DATA     -1
Y002     DATA     X'00200000'
SM1ADDR  DATA     X'00C00000'+SM1
XFFFFFF  EQU      %
         DATA     X'FFFFFF'
YFF      EQU      %
         DATA     X'FF000000'
XFFFC    EQU      %
         DATA     X'0000FFFC'
Y1C      EQU      %
         DATA     X'1C000000'
Y8       EQU      %
         DATA     NLSTBIT
ADJUSTEI EQU      %
         GEN,8,24 X'14',M:EI
         DATA     X'E001'
         DATA     0
         DATA     X'01000001'
         DATA     0
         DATA     X'02000002'
         DATA     0,0
         DATA     X'03010002'
         DATA     0,0
* * * * * * * * * * * * * * * * * * * * * * * * * *
         USECT    STARTREE
BLD:R5   DATA     0
BUFFER   RES      20
XM:R15   DATA     0                 THIS CELL GETS ZAPPED BY XWRITE
         BOUND    8
RQACCT   DATA     0,0
         DATA     0,0,0
SIGNALS  DATA     0
STACK    RES      40
FPARAM   RES      90
FP:LAST  RES      1
UPRIV    DATA     0
         DATA     X'03000000'
LNKSIG   DATA     0
LDEV     EQU      %
         DATA     0
         DATA     X'C3F2'
WSNFPT   EQU      %
         DATA     0,0
         DATA     X'C6D6'
         DATA     0
         DATA     NAME
SIGLOC   DATA     SIGNALS
LDWSN    DATA     BA(WSNFPT)
CURNOPG  DATA     0
CURADR   DATA     0
LIMIT    DATA     0
TRXTBL   EQU      %
         DO1      15
         DATA,8   X'1010101010101010'
         DO1      5
         DATA,1   X'10'
         DATA,1   X'80'
         DO1      8
         DATA,8   X'1010101010101010'
         DATA,3   X'101010'
         DATA,1   X'0A'
         DATA,1   X'0B'
         DATA,1   X'0C'
         DATA,1   X'0D'
         DATA,1   X'0E'
         DATA,1   X'0F'
         DO1      5
         DATA,8   X'1010101010101010'
         DATA,1   X'10'
         DATA,1   X'00'
         DATA,1   X'01'
         DATA,1   X'02'
         DATA,1   X'03'
         DATA,1   X'04'
         DATA,1   X'05'
         DATA,1   X'06'
         DATA,1   X'07'
         DATA,1   X'08'
         DATA,1   X'09'
         DO1      6
         DATA,1   X'10'
* * * * * * * * * * * * * * * * * * * * * * * * * *
TRTBL    EQU      %
         DO1      5
         DATA,1   X'30'
         DATA,1   X'44'
         DO1      7
         DATA,1   X'30'
         DATA,1   X'10'
         DO1      7
         DATA,1   X'30'
         DATA,1   X'10'
         DO1      42
         DATA,1   X'30'
         DATA,1   X'44'
         DO1      9
         DATA,1   X'30'
         DATA,1   X'00'
         DATA,1   X'01'
         DATA,1   X'00'
         DATA,1   X'08'
         DO1      3
         DATA,1   X'00'
         DO1      9
         DATA,1   X'30'
         DO1      8
         DATA,1   X'00'
         DO1      8
         DATA,1   X'30'
         DATA,1   X'00'
         DATA,1   X'02'
         DO1      4
         DATA,1   X'00'
         DO1      10
         DATA,1   X'30'
         DATA,1   X'00'
         DATA,1   X'80'
         DATA,1   X'04'
         DATA,1   X'08'
         DO1      2
         DATA,1   X'00'
         DATA,1   X'30'
         DO1      9
         DATA,1   X'00'
         DO1      7
         DATA,1   X'30'
         DO1      9
         DATA,1   X'00'
         DO1      8
         DATA,1   X'30'
         DO1      8
         DATA,1   X'00'
         DO1      5
         DATA,1   X'30'
         DATA,1   X'00'
         DATA,1   X'30'
         DO1      5
         DATA,1   X'00'
         DO1      6
         DATA,1   X'30'
         DO1      2
         DATA,1   X'00'
         DATA,1   X'30'
         DO1      11
         DATA,1   X'00'
         DO1      7
         DATA,1   X'30'
         DO1      9
         DATA,1   X'00'
         DO1      6
         DATA,1   X'30'
         DATA,1   X'00'
         DATA,1   X'30'
         DO1      8
         DATA,1   X'00'
         DO1      6
         DATA,1   X'30'
         DO1      14
         DATA,1   X'00'
         DO1      2
         DATA,1   X'30'
* * * * * * * * * * * * * * * * * * * * * * * * * *
PATCH    RES      100
* * * * * * * * * * * * * * * * * * * * * * * * * *
         END      ACORN

