         PCC      0
 TITLE   'MPC FIRMWARE LOADER       V001        3-22-77'
*        THIS PROGRAM WILL GENERATE LOAD MODULES FOR EACH
*        FILE NAME SPECIFIED.
*        TO SPECIFY A LIST OF NAMES OF F/W FILES ON THE MPC
*        TAPE, DO THE FOLLOWING:
*
*          (1) SET NSPEC -> # OF FILES YOU WANT HANDLED
*          (2) ENTER EACH OF THE NSPEC ROWS IN ARRAY FILESPEC
*              ACCORDING TO THE FOLLOWING FORMATS:
*
*                 COL 1 BEGINS 7 CHARACTER CP-V LMN NAME
*                 COL 9 BEGINS 4 CHARACTER FIRMWARE NAME
*                       CORRESPONDING TO COLS 73-76 OF %OBJECT
*                 COL 14 BEGINS 6 CHARACTER FILE IDENTIFIER
*                        CORRESPONDING TO COLS 42-47 OF %OBJECT
*                 COL 21 BEGINS 4 CHARACTER MDR LABEL
*                        CORRESPONDING TO COLS 25-28 OF %OBJECT
*
NSPEC    EQU       2                BOTH HANDLERS
FILESPEC EQU       %
         TEXT      'MPC9210,XER1,MSP450,AD19'  DISK
         TEXT      'MPC9310,M601,MTP601,MMT6'  TAPE
*        PLEASE NOTE THAT THERE IS NO NEED FOR FILES TO BE IN
*        ANY ORDER AS THE PROGRAM ISSUES A REWIND BEFORE
*        SCANNING FOR EACH NEW NAME
*
         SPACE    3
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*        MPC FIRMWARE TAPE READ ROUTINE FOR XEROX EQUIPMENT
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*        THIS ROUTINE READS THE STANDARD HONEYWELL MPC
*        FIRMWARE TAPE AND BUILDS MPC FIRMWARE LOAD MODULES.
*        THE INFORMATION ASSOCIATED WITH EACH LOAD MODULE
*        IS RETAINED IN A 6 WORD TABLE AS FOLLOWS:
*
*        WORD 0 - 4 EBCDIC CHARACTER PROGRAM NAME
*        WORD 1 - STARTING ADDRESS OF THE PROGRM IN CORE
*        WORD 2 - DISPLACEMENT FROM THE STARTING ADDRESS
*                 TO THE FIRST LOCATION OF READ/WRITE
*                 MEMORY OVERLAY DATA.
*        WORD 3 - FIRST MPC ROS ADDRESS
*        WORD 4 - FIRST MPC R/W MEMORY ADDRESS
*        WORD 5 - END ADDRESS OF THE PROGRAM IN CORE
*
*        FIRMWARE TAPE FORMAT:
*
*        BLOCK SIZE - PHYSICAL RECORDS ARE VARIABLE IN LENGTH UP
*                  TO A MAXIMUM BLOCK SIZE OF 320 36 BIT WORDS.
*
*        BLOCK CONTROL WORD - A BLOCK CONTROL WORD EXISTS AS THE
*                  FIRST WORD OF EACH PHYSICAL RECORD AND CONTAINS
*                  TWO BINARY VALUES AS FOLLOWS:
*                  BITS 0-17   BLOCK SERIAL NUMBER - THE SEQUENTIAL
*                  NUMBER OF THIS PHYSICAL RECORD WITHIN THE
*                  CURRENT FILE.
*
*                  BITS 18-35  BLOCK SIZE - SIZE OF THE BLOCK IN
*                  WORDS, NOT INCLUDING THIS BLOCK CONTROL WORD.
*
*        RECORD CONTROL WORD - LOGICAL RECORDS CONTAINED WITHIN
*                  EACH BLOCK ARE VARIABLE LENGTH AND CONTAIN A
*                  RECORD CONTROL WORD AS THE FIRST WORD OF EACH
*                  RECORD. THE CONTENTS OF THE RECORD CONTROL
*                  WORD ARE AS FOLLOWS:
*
*                  BITS 0-17   RECORD SIZE IN WORDS, NOT INCLUDING
*                  THE RECORD CONTROL WORD.  THIS VALUE CAN BE
*                  ZERO AND THE WORD IS INTERPRETED AS A FILE MARK.
*
*                  BITS 18-19  NEXT AVAILABLE (NINE-BIT) CHARACTER
*                  POSITION IN LAST WORD.
*
*                  BITS 20-23  NOT USED.
*
*                  BITS 24-25  ZEROS
*
*                  BITS 26-29  LOGICAL RECORD MEDIA CODE:
*                     BIT 29 - BINARY CARD IMAGE
*                     BIT 28 - HOLLERITH CARD IMAGE
*
*                  BITS 30-35  REPORT CODE (NOT USED)
*
*        LOGICAL FILE FORMAT:
*
*                  %OBJECT CARD
*                  PREFACE CARD
*                  CONTROL STORE OVERLAY DATA
*                  READ-WRITE MEMORY OVERLAY DATA
*                  DECK IDENTIFIER
*                  %DKEND CARD
*
*        %OBJECT CARD:
*
*                  COL. 1    %
*                  COL. 8-13  OBJECT
*                 COL. 25-28 MDR LABEL -> IDENTIFIES 1ST MDR
*                  COL. 35-37 DAT
*                 COL. 42-47 LABEL FIELD#2 -> IDENTIFIES THE FILE
*                  COL. 67-72 DATE OF ASSEMBLY
*                  COL. 73-76 SEQUENCE LABEL
*                  COL. 77-80 SEQUENCE NUMBER
*
*        PREFACE CARD:
*
*                  WORD 1 (COL. 1-3)
*                  BITS 0-17   OCTAL CONSTANT 405505
*                  BITS 18-35  LENGTH OF TOTAL PROGRAM - CONTROL
*                  STORE DATA, READ-WRITE MEMORY DATA, MPC
*                  CHECKSUM AND IDENTIFIER FIELD.
*
*                  WORD 2 (COL. 4-6)
*                  CARD CHECKSUM OF COL. 1-3 AND COL. 7-72
*
*                  WORD 3 (COL. 7-9)
*                  BITS 0-17   ZERO
*                  BITS 18-35  OCTAL CONSTANT 400004
*
*                  WORD 4 (COL. 10-12)
*                  CONSTANT = 'BOOT  '
*
*                  WORD 6 (COL. 16-18)
*                  CONSTANT = 'DECK  '
*
*                  ALL OTHER WORDS NOT USED
*
*        DATA CARDS:
*
*                  WORD 1 (COL 1-3)
*                  BITS 0-11   2005 OCTAL CONSTANT
*                  BITS 12-17  NUMBER OF DATA WORDS ON THIS
*                  CARD (19 MAXIMUM) IN OCTAL
*                  BITS 18-35  SYSTEM LOADING ADDRESS FOR THE
*                  FIRST DATA WORD IN OCTAL (THIS IS NOT
*                  AN MPC ADDRESS)
*
*                  WORD 2 (COL. 4-6)
*                  SYSTEM CHECKSUM OF COL. 1-3 AND COL. 7-72
*
*                  WORDS 3-5 (COL. 7-15)
*                  NOT USED
*
*                  WORDS 6-24 (COL. 16-72)
*                  MPC MICROINSTRUCTION DATA. EACH 36 BIT WORD
*                  ON THE CARD (PUNCHED IN 3 COLUMNS) CONTAINS
*                  AN EVEN-ODD PAIR OF MICROINSTRUCTIONS. EACH
*                  16 BIT MICROINSTRUCTION IS DIVIDED INTO TWO
*                  8 BIT BYTES WITH EACH BYTE PUNCHED IN A 9 BIT
*                  SEGMENT OF THE WORD WITH A LEADING ZERO.
*                  THEREFORE, BITS 0,9,18, AND 27 OF EACH WORD
*                  ARE ALWAYS ZERO WITH THE MICROINSTRUCTION
*                  BYTES FOLLOWING THEM. THERE ARE A MAXIMUM OF
*                  19 DATA WORDS ON THE CARD (38 MICROINSTRUCTIONS).
*                  THE LAST DATA WORD OF THE LAST RELOCATABLE CARD
*                  CONTAINS THE 16 BIT TWO'S COMPLEMENT OF THE
*                  ENTIRE MICROPROGRAM. THE CHECKSUM IS IN BITS
*                  0-17 OF THE WORD WITH BITS 0 AND 9 BEING ZERO.
*
*        DECK IDENTIFIER:
*
*                  THIS MAY BE A SEPERATE CARD OR MAY BE INCLUDED
*                  AS PART OF A DATA CARD AND CONSISTS OF A TEN
*                  WORD TRAILER ENDING WITH THE CONSTANT 'MPCBOT'.
*
*                  WORD 5  READ/WRITE MEMORY DATA LOCATION -
*                  THE UPPER HALF OF THIS WORD (BITS 0-17) CONTAINS
*                  THE SYSTEM ADDRESS RELATIVE TO THE START OF THE
*                  MICROPROGRAM DATA WHERE THE FIRST DATA WORD FOR
*                  READ/WRITE MEMORY HAS BEEN STORED.
*
*                  WORD 6
*                  BITS 0-17   FIRST MPC ROS ADDRESS
*                  BITS 18-35  FIRST MPC R/W MEMORY ADDRESS
*
*        DECK END CARD
*
*                  COL. 1   %
*                  COL. 8-12 DKEND
*
*
*        NO SOPHISTICATED TAPE HANDLING HAS BEEN ATTEMPTED IN
*        THIS PROGRAM. LABEL SEARCH MUST BE ACCOMPLISHED THROUGH
*        CONVERSION OF OCTAL HOLLERITH LABELS INTO A HEX CONSTANT
*        FIELD.
*
*        SPECIAL HANDLING FOR MDR'S:
*
*        ASSOCIATED WITH EACH MDR IS A 62 WORD LEADER WHICH
*        DEFINES THE NUMBER, LOCATION AND LENGTH OF OVERLAYS.
*        ALTHOUGH THIS DATA IS CONTAINED AS PART OF THE
*        MICROPROGRAM DATA, IT IS NOT IN THE 9 BIT ASCII
*        FORMAT AND THEREFORE MUST BE CONVERTED AS OCTAL DATA.
*
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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:EI,M:LO,M:EO
         REF      F:EO
         SYSTEM    SIG7
         SYSTEM   BPM
START    EQU       %
         STW,R8   LDTRC+1           SAVE RETURN INFO
         M:OPEN   F:EO,(DEVICE,'NO')
RESTART  EQU      %
         M:OPEN   M:EI,(DEVICE,'9T'),(IN),(SN,'FIRM')
         M:REW    M:EI
         MTW,1     LASTRCW          INSURANCE THAT IT'S NE 0
         LI,R4     0
         STW,R4    NUMFILE
         LI,R4     FILETAB
         STW,R4    FILEDAT
         LI,R4     PROGRM
         STW,R4    PCNTR
         NOP       0
         NOP       0
         M:WEOF   M:LO              TOP THE PAGE
*
*
*                 COL 1 BEGINS 7 CHARACTER CP-V LMN NAME
*                 COL 9 BEGINS 4 CHARACTER FIRMWARE NAME
*                       CORRESPONDING TO COLS 73-76 OF %OBJECT
*                 COL 14 BEGINS 6 CHARACTER FILE IDENTIFIER
*                        CORRESPONDING TO COLS 42-47 OF %OBJECT
*                 COL 21 BEGINS 4 CHARACTER MDR LABEL
*                        CORRESPONDING TO COLS 25-28 OF %OBJECT
*
*
INROW    EQU       %
         MTW,1     TBLINDX
         LW,R15    TBLINDX          CURRENT ROW IN FILESPEC
         CI,R15    NSPEC            HAVE WE EXHAUSTED SPEC
         BG        EXIT             S:  YES, WE'RE THRU
*                                   F:  NO, CONTINUE W/ THIS ROW
         MI,R15    6                6 WDS/ROW
         AI,R15    FILESPEC         C(R15)=WA(FILESPEC+6*TBLINDX)
*                                   WHICH PTS AFTER CURR ROW
         LI,R4     -6                    MOVE CURR
MOVE     LW,R5     *R15,R4               ROW OVER
         STW,R5    INCBUF+6,R4           TO MITCH'S
         BIR,R4    MOVE                  INCBUF
         LW,R4    INCBUF+2          GET FIRMWARE NAME (4 CHARACTERS)
         STW,R4   FIRMWNAM          AND PLANT IT
         LD,R4    INCBUF            GET LMN (TRAILING ,)
         SLD,R4   -8                RIGHT JUSTIFY
         LI,R15   7                 TEXTC COUNT
         STB,R15  R4                MAKE LMN TEXTC
         STW,R4   EOVLP+1           NEED FOR OPEN
         STW,R5   EOVLP+2
         STW,R4   TREE              ALSO FOR LMN TREE
         STW,R5   TREE+1
         MTB,1     R4               BYTE COUNT INCL FINAL ':'
         STW,R4    RFDFNAM
         STW,R5    RFDFNAM+1
         LW,R4    INCBUF+3          GET 6 CHAR LABEL#2
         LW,R5    INCBUF+4
         SLD,R4   8                 SHIFT OFF LEADING ,
         BAL,R15  EBC2BCD           CONVERT TO BCD
         LD,R4    BCDCHARS          GET IT
         STW,R4   LABEL             AND SAVE 1ST 32 BITS
         STW,R5   LABEL+1           AND LAST 4 BITS
         LW,R4    INCBUF+5          GET 4 CHAR LABEL#1
         LW,R5    BLANK
         BAL,R15  EBC2BCD           CONVERT TO BCD
         LW,R4    BCDCHARS          GET 'EM
         AND,R4   MS24B             ONLY 4 CHARACTERS
         STW,R4   MDRLAB            AND PLANT 'EM
TAPERD   EQU       %
         LI,R4     -360
         LI,R5     0                CLEAR
         STW,R5    TBUF+360,R4      TAPE
         BIR,R4    %-1              BUFFER
         M:READ   M:EI,WAIT,(BUF,TBUF),(SIZE,1440)
         MTW,0    FWSW              DID WE FIND FIRMWARE YET??
         BEZ      TAPERD1           NO -> DO NOT WRITE F:EO
         LH,R4    M:EI+4            GET ARS
         SLS,R4   -1                -> R4
         M:WRITE  F:EO,(BUF,TBUF),(SIZE,*R4),WAIT
TAPERD1  EQU      %
         BAL,R15   BLKFMT
         LI,R6     1                BYPASS BLOCK CONTROL WORD
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                    RCW
*
*        THIS ROUTINE EXAMINES THE RECORD CONTROL WORD AND DETERMINES
*        IF THE RECORD IS IN HOLLERITH OF BINARY FORMAT.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
RCW      EQU       %                RECORD CONTROL WORD
         LD,R4     IMAGE,R6
         SLD,R4    2                ALIGN RECORD SIZE, CARD TYPE
         LH,R8     R4               CHECK FOR END OF FILE
         XW,R8     LASTRCW          C(R8)=LAST REC'S SIZE
*                                   C(LASTRCW)=SIZE OF REC JUST RD IN
         MTW,0     LASTRCW          IS CURR REC E.O.F. (RECSZ=0)
         BNEZ      RCW1             S:  NO..NORMAL REC SO CONTINUE
*                                   F:  YES..TEST FOR END-OF-REEL
*                                       E-O-R = 2 EOFS
         CI,R8     0                WAS LAST REC ALSO E-O-F
         BNEZ      TAPERD           S:  NO..JUST 1 E-O-F..RD NXT BLK
*                                   F:  YES..END OF REEL HIT
         B         CANTFIND         ABORT SYSGEN
RCW1     EQU       %
         AND,R4    HOLTH            =X'00000020'
         BGZ       HOLITH           IT'S HOLLERITH TYPE CARD
         MTW,0     RSIP             IS RECORD SEARCH IN PROGRESS?
         BEZ       BIN              NO, THEN BINARY CARD BY DEFAULT
         B         TAPERD           RECORD SEARCH, GET NEXT BLOCK
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                 HOLITH
*
*        THIS ROUTINE EXAMINES A HOLLERITH RECORD AND DETERMINES
*        IF IT IS A %  OBJECT OR %  DKEND RECORD.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
HOLITH   EQU       %                HOLLERITH CARD TYPE
         AI,R6     2                BYPASS FIRST WORD
         LD,R4     IMAGE,R6         GET SECOND WORD
         CW,R4     OBJEC            =X'4264A155'
         BE        OBJECT           THIS IS %  OBJECT CARD
         B         TAPERD           MUST BE %  DKEND CARD
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                 OBJECT
*
*        THIS ROUTINE DETERMINES WHICH OF TWO LABEL FIELDS OF A
*        %  OBJECT CARD IS TO BE CHECKED IN DETERMINING IF THIS
*        SUB-FILE IS APPLICABLE FOR THE SUBSYSTEM BEING LOADED.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
OBJECT   EQU       %
         LI,R0     0
         STW,R0    CNT62            RESET PROCESS FLAG AND
         STW,R0    CNTR62           WORD COUNTER
         MTW,0     MDRFLG           IS LOAD MDR FLAG SET?
         BEZ       FWITR            IF NO, THEN FIRMWARE LOAD
         B         MDRS
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                  FWITR
*
*        THIS ROUTINE IS ENTERED WHEN LOADING FIRMWARE OR ITR'S
*        AND CHECKS LABEL FIELD #2 FOR SUBSYSTEM APPLICABILITY.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
FWITR    EQU       %                FIRMWARE LOAD
         AI,R6     6                MOVE TO WORD #8
         LD,R4     IMAGE,R6         LABEL FIELD #2
         CW,R4     LABEL            =X'532C8124' FOR DSS19X
         BNE       NXTFILE          PERFORMS CHECKING
         CW,R5    LABEL+1           CHECK IT ALL
         BNE       NXTFILE          PERFORMS FURTHER CHECKS
         MTW,0     MATCH            IS THIS FIRST RECORD OF FILE?
         BNEZ      CHKWD5           NO, CHECK FOR LABEL IN WORD #5
         MTW,1     MATCH            YES - SET MATCH FOUND
         MTW,0     MDREQ            MDR'S REQUESTED?
         BEZ       OBJ15            NO - GO BUILD LMN
         MTW,1     MDRFLG           YES - SET MDR FLAG
         MTW,1     RSIP             SET RECORD SEARCH IN PROGRESS
         B         TAPERD           GO FIND MDR'S
CHKWD5   AI,R6     -3               POINT TO WORD #5
         LD,R4     IMAGE,R6
         LW,R8     R4
         LW,R9     MS24B
         CS,R8     MDRLAB
         BE        CLENUP
         AI,R6     3
         MTW,0    FWSW              HAS FIRMWARE BEEN FOUND YET??
         BNEZ     OBJ15             YES -> ITRS ALREADY ERASED
         MTW,-6   FILEDAT           ***ITRS NOT NEEDED
         LI,R4    PROGRM
         STW,R4   PCNTR
         B         OBJ15
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                  OBJ15
*
*        THIS ROUTINE ENTERS A 4 CHARACTER PROGRAM NAME AND
*        STARTING ADDRESS IN THE FILE TABLE.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
OBJ15    EQU       %                BUILD LOAD MODULE NAME
         AI,R6     5                MOVE TO WORD 13
         LD,R4     IMAGE,R6         GET OCTAL CARD LABEL
         BAL,R15   CREATE
         DATA      0                LABEL RETURNED HERE
*        -         -                PROGRAM RETURNS HERE
         LW,R8     %-1
         STW,R8    *FILEDAT         PROGRAM NAME
         CW,R8    FIRMWNAM          IS THIS FIRMWARE MODULE??
         BNE      OBJ15A            NO -> DO NOT SET SWITCH
         MTW,1    FWSW              YES -> SET SWITCH ETC.
         LH,R4    M:EI+4            GET ARS
         SLS,R4   -1                -> R4
         M:WRITE  F:EO,(BUF,TBUF),(SIZE,*R4),WAIT
OBJ15A   EQU      %
         MTW,1     FILEDAT
         STW,R8    PBUF
         LW,R8     BLANK
         STW,R8    PBUF+1
         M:WRITE  M:LO,(BUF,PBUF),(SIZE,8)
         LW,R8     PCNTR
         STW,R8    *FILEDAT         STARTING ADDRESS
         MTW,1     FILEDAT
         MTW,1     NUMFILE          COUNT NUMBER OF FILES
         AI,R6     2                POINT TO NEXT WORD
         B         RCW
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                 CREATE
*
*        THIS ROUTINE IS CALLED BY OBJ15 TO PRODUCE A 4 CHARACTER
*        EBCDIC LOAD MODULE NAME FROM THE OCTAL NAME IN WORD #13
*        OF THE %  OBJECT CARD.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
CREATE   EQU       %                CONVERTS OCTAL CARD LABEL
         AND,R4    MS24B            GET MS 24 BITS
         LW,R5     R4               PREP FOR DOUBLE REG SHIFT
         LI,R3     0
CONT     SLD,R4    6                SHIFT 6 BITS
         AND,R4    H3F              =X'3F' OCTAL MASK
         LB,R8     OCODE,R4         GET CONVERSION BYTE
         STB,R8    *15,R3           STORE IN CALL+1
         AI,R3     1
         CI,R3     4                LAST BYTE STORED?
         BL        CONT             NO - GET THE NEXT
         AI,R15    1                INCREMENT RETURN
         B         *15              RETURN
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                 EBC2BCD
*
*        THIS ROUTINE CONVERTS THE 1ST 6 EBCDIC CHARACTERS IN R4,R5
*        TO OCTAL BCD CHARACTERS AND STORES THEM AT BCDCHARS.
*
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
EBC2BCD  EQU      %
         LD,R12   R4                DON'T CLOBBER R4,R5
         LI,R6    0                 DO IT IN R6, USING R7 AS SCRATCH
         LI,R2    0                 COUNT THOSE CHARACTERS
EBC2BCD1 EQU      %
         LI,R1    63                BIGGEST BCD CHARACTER
         LB,R8    R12               GRAB NEXT EBCDIC CHARACTER
         CB,R8    OCODE,R1          SEARCH TABLE
         BE       EBC2BCD2          I FOUND A MATCH
         BDR,R1   %-2               NO MATCH -> CONTINUE SEARCH
         CB,R8    OCODE             LAST CHANCE
         BE       EBC2BCD2          PHEW
         M:WRITE  M:LO,(BUF,BADBCD),(SIZE,24)
         M:EXIT
EBC2BCD2 EQU      %
         STB,R1   R7                BCD CHARACTER -> R7
         SLS,R7   2                 BITS 0->5
         CI,R2    5            IS THIS THE LAST CHARACTER?
         BE       EBC2BCD3     YES
         SLD,R6   6                 NO -> MOVE INTO R6
         SLD,R12  8                 SHIFT EBCDIC CHARACTERS
         AI,R2    1                 KEEP COUNTING CHARACTERS
         B        EBC2BCD1
EBC2BCD3 EQU      %
         SLD,R6   2                 MOVE LAST CHARACTER
         STD,R6   BCDCHARS     PUT IT AWAY
         B        *R15         RETURN
BADBCD   TEXT     ' ILLEGAL OPTION CARD.  '
         BOUND    8
BCDCHARS RES      2                 RESULT STORED HERE
*
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                  MDRS
*
*        THIS ROUTINE IS ENTERED WHEN LOADING MDR'S AND CHECKS
*        LABEL FIELD #1 FOR SUBSYSTEM APPLICABILITY.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
MDRS     EQU       %                MDR LOAD
         AI,R6     3                MOVE TO WORD #5
         LD,R4     IMAGE,R6         LABEL FIELD #1
         LW,R8     R4
         LW,R9     MS24B            =X'FFFFFF00' SELECTIVE MASK
         CS,R8     MDRLAB           =X'91418500' FOR MD65XX
         BNE       TAPERD           NOT MDR, READ NEXT RECORD
         MTW,0     RSIP             RECORD SEARCH IN PROGRESS?
         BEZ       CKLAST           NO - SEE IF DONE
         LI,R8     0                YES - RESET SEARCH
         STW,R8    RSIP             IN PROGRESS INDICATOR
CKLAST   SLD,R4    -28              RIGHT JUSTIFY LS CHARACTER
         AND,R5    H3F              =X'3F' OCTAL MASK
         CI,R5     X'25'            DOES IT EQUAL OCTAL 'ON'
         BE        CLENUP           ALL MDR'S HAVE BEEN LOADED
         AI,R6     3                WORD #8, FOR COMPATIBILITY
         B         OBJ15            GO BUILD LMN
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                   BIN
*
*        THIS ROUTINE EXAMINES A BINARY RECORD AND DETERMINES IF
*        IT IS A PREFACE OF DATA RECORD.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
BIN      EQU       %                BINARY CARD IMAGE
         AI,R6     1                WORD #1
         LD,R4     IMAGE,R6         CARD TYPE
         LH,R8     R4               RIGHT JUSTIFY TYPE CODE
         CW,R8     H82D1            =X'FFFF82D1' OCTAL 'PREFACE
         BNE       DATA             NO, GO PROCESS DATA
         AI,R6     27               POINT TO NEXT RCW
         B         RCW
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                  DATA
*
*        THIS ROUTINE EXAMINES A BINARY DATA CARD FOR THE WORD
*        'MPCBOT' TO DETERMINE IF THIS RECORD IS DATA OR DECK
*        IDENTIFICATION.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
DATA     EQU       %                LOAD MODULE DATA
         SLD,R4    10               ALIGN TO BYTE BOUNDARY
         LB,R8     R4               GET DATA COUNT
         AND,R8    H3F              OCTAL MASK
         STW,R8    WRDCNT           NO. OF WORDS THIS CARD
         LW,R7     R6               GET CURRENT WORD POINTER
         AI,R7     27               SET LIMIT
         STW,R7    LAST             SAVE IT FOR TEST
         LW,R7     R6               RETRIEVE POINTER
         AI,R7     1                BEGIN AT WORD#2
BOTCHK   LD,R4     IMAGE,R7         GET A WORD
         CW,R4     MPCBOT           =X'9274D29B' OCTAL 'MPCBOT'
         BE        FOUNDIT          IT'S BOT, THIS IS DECK IDENT
         AI,R7     1                NOT BOT, INCREMENT POINTER
         CW,R7     LAST             LAST WORD TESTED?
         BL        BOTCHK           NO, CHECK THE REST
         AI,R6     5                MOVE TO WORD #6
         B         DLOOP            NO BOT, THIS IS DATA
FOUNDIT  LW,R8     R6               GET CURRENT WORD POINTER
         AI,R8     5                POINT TO WORD #6
         AW,R8     WRDCNT           ADD IN THE WORD COUNT
         CW,R8     R7               (((R6)+5)+(WRDCNT))::(R7)
         BL        LASTFEW          IF LESS, MUST PROCESS DATA
         B         DKIDENT          IT'S JUST DECK IDENT
LASTFEW  MTW,1     DKIDFND          SET DECK IDENT FOUND FLAG
         B         DKIDENT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                 DLOOP
*
*        THIS ROUTINE PROCESSES THE DATA OF A BINARY DATA CARD
*        AND ENTERS IT INTO THE PROGRAM TABLE.
*
* * * * * * * * * * * * * * * * *  * * * * * * * * * * * * * * *
DLOOP    EQU       %                PROCESS DATA CARD
         LI,R7     0
         LCW,R14   WRDCNT           NO. OF ITERATIONS
LOOP     MTW,0     MDRFLG           LOADING MDR'S?
         BEZ       ASCII            NO, STANDARD FORMAT
         MTW,0     CNT62            FIRST 62 WORDS PROCESSED?
         BNEZ      ASCII            YES, STANDARD FORMAT
         LD,R4     IMAGE,R6
         BAL,R15   OCTAL            CONVERT OCTAL DATA
         DATA      0                RESULT RETURNED HERE
*        -         -                PROGRAM RETURNS HERE
         LW,R4     %-1              GET RESULT
         B         SAVE
ASCII    LD,R4     IMAGE,R6
         BAL,R15   A92BYTE          CONVERT TO BYTE FORMAT
         DATA      0                RESULT RETURNED HERE
*        -         -                PROGRAM RETURNS HERE
         LW,R4     %-1
SAVE     STW,R4    *PCNTR
         MTW,1     PCNTR
         AI,R7     1                NO. WORDS PROCESSED
         AI,R6     1                SOURCE POINTER
         BIR,R14   LOOP             CONTINUE
         MTW,0     DKIDFND          ID PLUS DATA, SAME CARD?
         BEZ       AROUND           NO, JUST DATA
         MTW,-1    DKIDFND          RESET DECK ID FOUND
         B         ADJUST
AROUND   LW,R8     D22              MAX DECIMAL WORD COUNT
         SW,R8     R7               (22 WORDS - #WORDS PROCESSED)
         AW,R6     R8               PLUS (R6) = NEXT WORD (RCW)
         B         RCW
* * * * * * * * * * * * * * * * *  * * * * * * * * * * * * * * *
*
*                               DKIDENT
*
*        THIS ROUTINE PROCESSES THE DECK IDENTIFICATION CARD AND
*        SAVES ROS AND R/W MEMORY ADDRESS DATA IN THE FILE TABLE.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
DKIDENT  EQU       %                DECK IDENTIFIER
         AI,R7     -5               R7 POINTS TO 'MPCBOT'
         LD,R4     IMAGE,R7         GET WORD FROM MPCBOT-5
         SLD,R4    2                ALIGN TO WORD BOUND
         LH,R8     R4               RIGHT JUSTIFY
         STW,R8    *FILEDAT         R/W MEM ADDRESS
         MTW,1     FILEDAT
         AI,R7     1                POINT TO MPCBOT-4
         LD,R4     IMAGE,R7
         SLD,R4    2                ALIGN TO HALF WORD BOUND
         LH,R8     R4               RIGHT JUSTIFY
         STW,R8    *FILEDAT         MPC ROS ADDRESS
         MTW,1     FILEDAT
         SLD,R4    2
         AND,R4    HFFFF            =X'0000FFFF'
         STW,R4    *FILEDAT         MPC R/W MEM ADDRESS
         MTW,1     FILEDAT
         MTW,0     DKIDFND          ID PLUS DATA, SAME CARD?
         BEZ       ADJUST           NO, JUST ID
         AI,R6     5                POINT TO WORD #6
         B         DLOOP            GO PROCESS DATA
ADJUST   MTW,-1    PCNTR
         LW,R4     *PCNTR           GET LAST WORD STORED
         CW,R4     OVL1             IS IT SEQ LABEL?
         BNE       %+2
         MTW,-2    PCNTR            DELETE SEQ DATA
         LW,R4     PCNTR            GET LAST VALID LOCATION
         STW,R4    *FILEDAT         END ADDRESS
         MTW,1     FILEDAT          NEXT ENTRY
         MTW,1     PCNTR            NEXT AVAILABLE LOCATION
         B         TAPERD
OCTAL    EQU       %                36 BIT OCTAL TO 32 BIT HEX
         SLD,R4    2                HALFWORD ALIGN
         LW,R8     LHALF            =X'FFFF0000'
         AND,R8    R4               MASK IN LEFT HALFWORD
         SLD,R4    2                ALIGN LOWER HALF
         AND,R4    HFFFF            =X'0000FFFF'
         OR,R8     R4               MERGE
         STW,R8    *15              SAVE IN CALL + 1
         AI,R15    1                SET UP RETURN
         MTW,1     CNTR62           INCREMENT WORD COUNTER
         LW,R8     CNTR62           CHECK NO. PROCESSED
         CI,R8     62               ALL DONE?
         BL        *15              NOT YET, RETURN
         LI,R8     0
         STW,R8    CNTR62           RESET WORD COUNTER
         MTW,1     CNT62            SET 62 DONE FLAG
         B         *15              RETURN
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                A92BYTE
*
*        THIS ROUTINE IS CALLED BY DLOOP TO CONVERT 9 BIT ASCII
*        FORMATTED DATA INTO BYTE FORMATTED DATA.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
A92BYTE  EQU       %                CONVERT 9 BIT ASCII TO BYTE FMT
         LCI       0                SAVE REGISTERS
         STM,R0    REGSAVE
         LI,R3     0                BYTE INDEX
NEXT     LI,R13    0                BIT COUNTER
         LI,R8     0                ACCUMULATOR
         SLD,R4    1
         AI,R13    1                BYPASS BIT ZERO
SHFT     SLD,R4    1                SHIFT A BIT
         BEV       AZERO            IT'S A ZERO?
         SLS,R8    1                IT'S A ONE, SHIFT
         AI,R8     1                THEN ADD
         B         %+2
AZERO    SLS,R8    1                ZERO, JUST SHIFT
         AI,R13    1                INCREMENT BIT COUNTER
         CI,R13    9                BYTE COMPLETE?
         BL        SHFT             NOT YET, SHIFT AGAIN
         STB,R8    *15,R3           YES, STORE IT IN CALL+1
         AI,R3     1                INCREMENT BYTE INDEX
         CI,R3     4                LAST BYTE STORED?
         BL        NEXT             NO - DO THE NEXT
         LCI       0
         LM,R0     REGSAVE          RESTORE REGISTERS
         AI,R15    1                INCREMENT RETURN
         B         *15              RETURN
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                NXTFILE
*
*        THIS ROUTINE DETERMINES IF THE FIRST OR LAST RECORD OF
*        THE SUBSYSTEM FILE HAS BEEN LOCATED.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
NXTFILE  EQU       %                FILE CHECKING
         MTW,0     MATCH            HAS FILE BEEN LOCATED?
         BEZ       SPFILE           NO - GO GET NEXT FILE
         B         CLENUP           ALL F/W AND ITR'S ARE LOADED
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                 SPFILE
*
*        THIS ROUTINE SPACES ONE FILE FORWARD - RECORD SEARCH
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SPFILE   EQU       %                SPACE FILE FORWARD
         M:PFIL   M:EI,EOF
         B         TAPERD
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                                 BLKFMT
*
*        THIS ROUTINE REFORMATS ONE RECORD BLOCK OF 36 BIT DATA
*        INTO USEABLE 32 BIT DATA.  BLOCK SIZE IS A MAXIMUM OF
*        360 32 BIT MACHINE WORDS.  THE REFORMATTED DATA
*        OCCUPIES 320 DOUBLEWORD LOCATIONS WITH BITS 00-31 IN THE
*        EVEN LOCATION AND BITS 32-35 IN BIT POSITIONS 00-03 OF
*        THE ODD LOCATION.  THIS FORMAT FACILITATES MANIPULATION
*        OF THE DATA WORDS.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
BLKFMT   EQU       %
         LCI       0
         STM,R0    REGSAVE
         LI,R6     0
         LI,R7     0
         LI,R12    0
         LW,R8     TBUF,R6
MORE     LI,R4     0
         LI,R5     0
         LI,R13    0
         CI,R12    32
         BE        NEWORD
SHIFT    SLS,R8    1
         BEV       ZERO
         SLD,R4    1
         AI,R5     1
         B         %+2
ZERO     SLD,R4    1
         AI,R12    1
         AI,R13    1
         CI,R12    32
         BE        NEWORD
FRAME    CI,R13    36
         BL        SHIFT
         SLD,R4    28
         STD,R4    IMAGE,R7
         AI,R7     1
         CI,R7     320
         BGE       DONE
         B         MORE
NEWORD   LI,R12    0
         AI,R6     1
         LW,R8     TBUF,R6
         B         FRAME
DONE     LCI       0
         LM,R0     REGSAVE
         B         *15
*
*
CLENUP   EQU       %                HOUSEKEEPING
*                                   TEMP CODE FOR DEBUG
         M:REW    M:EI
         LI,R0     0
         STW,R0    MATCH
         STW,R0   FWSW
DUMP     LCW,R13   NUMFILE
         LI,R6     0
         STW,R6    INDEX
SEQ      LW,R6     INDEX
         LCI       6
         LM,R7     FILETAB,R6
         STW,R7    WORD0
         STW,R7    PBUF
         STW,R8    WORD1
         STW,R9    WORD2
         STW,R10   WORD3
         STW,R11   WORD4
         STW,R12   WORD5
         AI,R6     6
         STW,R6    INDEX
         SPACE    3
         CW,R7    FIRMWNAM          FIRM WARE LOAD
         BE       SEQ1              YES
         BIR,R13  SEQ               NO-KEEP LOOKING
CANTFIND LW,R8     FIRMWNAM         JAM NAME INTO ERR MSG
         STW,R8    ERR1+7
         M:WRITE   M:LO,(BUF,ERR1),(SIZE,39)
         M:WRITE   M:LO,(BUF,XXXMSG),(SIZE,14)
         M:XXX                      ABORT THE SYSGEN
*
ERR1     TEXT      '****** MPC LOAD NOT FOUND:  XXXX ******'
XXXMSG   TEXT      'SYSGEN ABORTED'
SEQ1     M:WEOF   M:LO              TOP THE PAGE
         M:WRITE  M:LO,(BUF,HD1),(SIZE,60)
         M:WRITE  M:LO,(BUF,HD2),(SIZE,63)
         LW,R5     WORD1
         BAL,R15   CONVRT
         STW,R8    PBUF+2
         STW,R9    PBUF+3
         LW,R5     WORD2
         BAL,R15   CONVRT
         STW,R8    PBUF+5
         STW,R9    PBUF+6
         LW,R5     WORD3
         BAL,R15   CONVRT
         STW,R8    PBUF+8
         STW,R9    PBUF+9
         LW,R5     WORD4
         BAL,R15   CONVRT
         STW,R8    PBUF+11
         STW,R9    PBUF+12
         LW,R5     WORD5
         BAL,R15   CONVRT
         STW,R8    PBUF+14
         STW,R9    PBUF+15
         LW,R8     BLANK
         STW,R8    PBUF+1
         STW,R8    PBUF+4
         STW,R8    PBUF+7
         STW,R8    PBUF+10
         STW,R8    PBUF+13
         M:WRITE  M:LO,(BUF,PBUF),(SIZE,64)
         M:WRITE  M:LO,(BUF,BLANK),(SIZE,4)
         LI,R9     0
         LW,R8     WORD5
         SW,R8     WORD1
         AI,R8     1
         SLD,R8    -3
         STW,R8    TIMES
         LB,R8     R9
         AND,R8    HE0
         SLS,R8    -5
         STW,R8    LASTLN
         LW,R6     WORD1
         STW,R6    LOC
         LI,R6     0
         LCW,R14   TIMES
         LI,R1     0
         LW,R5     LOC
         AW,R5     R6
         BAL,R15   CONVRT
         STW,R9    ADRS
NXTWRD   LW,R5     *LOC,R6
         BAL,R15   CONVRT
         STW,R8    PRINT,R1
         AI,R1     1
         STW,R9    PRINT,R1
         AI,R1     1
         LW,R8     BLANK
         STW,R8    PRINT,R1
         AI,R1     1
         CI,R1     24
         BGE       NXT8
         AI,R6     1
         B         NXTWRD
NXT8,PRNT M:WRITE M:LO,(BUF,ADRS),(SIZE,104)
         LI,R1     0
         AI,R6     1
         LW,R5     LOC
         AW,R5     R6
         BAL,R15   CONVRT
         STW,R9    ADRS
         BIR,R14   NXTWRD
         LW,R8     LASTLN
         CI,R8     0
         BE        NXTPROG
         LCW,R14   LASTLN
         LI,R1     0
         LW,R5     LOC
         AW,R5     R6
         BAL,R15   CONVRT
         STW,R9    ADRS
NXTWRD1  LW,R5     *LOC,R6
         BAL,R15   CONVRT
         STW,R8    PRINT,R1
         AI,R1     1
         STW,R9    PRINT,R1
         AI,R1     1
         LW,R8     BLANK
         STW,R8    PRINT,R1
         AI,R1     1
         AI,R6     1
         BIR,R14   NXTWRD1
LSTCHK   CI,R1     24
         BE        PRNT1
         LW,R8     BLANK
         STW,R8    PRINT,R1
         AI,R1     1
         B         LSTCHK
*
*
CONVRT   EQU       %                CONVERT HEX TO EBCDIC
         LI,R3     0
GO       SLD,R4    4
         AND,R4    HF               =X'0F'
         LB,R2     CODE,R4
         STB,R2    R8,R3
         AI,R3     1
         CI,R3     8
         BL        GO
         B         *15
         PAGE
PRNT1    CAL1,1   PRNT
NXTPROG  EQU      %
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* PUT A THREE WORD BUFFER AHEAD OF THE MPC LOAD
* WORD 1- NUMBER OF BYTES IN ROS LOAD
* WORD 2- NUMBER OF BYTES IN R/W LOAD
* WORD 3- DISPLACE IN SIGMA/560 WORDS TO R/W LOAD
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         LW,R6    INDEX             INDEX INTO FILETAB
         AI,R6    -6                BACK ONE SET
         LW,R7    FILETAB+1,R6      ROS START ADRESS
         AI,R7    -3                THREE WORD BUFFER AHEAD OF LOAD
         STW,R7   BUF               START OF MPC LOAD BUFFER
*
         LW,R7    FILETAB+5,R6      LAST ADDRESS OF LOAD
         SW,R7    FILETAB+1,R6
         AI,R7    4                 WORD SIZE OF MPC LOAD
         SLS,R7   2                 BYTES IN MPC RECORD
*
         AI,R7    7
         AND,R7   =X'FFFFFFF8'
         STW,R7   SIZE
         SLS,R7   -3                BOUND UP TO DOUBLE WORDS
         STH,R7   HEAD+3            FILL IN DATA SIZE IN HEAD RECORD
         STH,R7   TREE+5            FILL IN DATA SIZE IN TREE RECORD
         STW,R7   CONDICSZ          NUMBER OF BYTES IN CONTROL DIC
*
         LW,R7    FILETAB+2,R6      DISPLACEMENT TO R/W
         SLS,R7   2                 BYTE SIZE OF ROS LOAD
         AI,R7    -1                NO NEED TO TRANSMIT LAST BYTE
         LW,R8    FILETAB+1,R6      ADDRESS OF MPC LOAD
         LI,R5    -3                THREE WORDS BACK
         STW,R7   *R8,R5            BYTES OF ROS
*
         LW,R7    FILETAB+5,R6      LAST ADDRESS OF LOAD
         SW,R7    FILETAB+1,R6      FIST ADDRESS OF LOAD
         SW,R7    FILETAB+2,R6      DISPLACEMENT TO R/W
         SLS,R7   2
         AI,R7    3                 BYTES OF R/W
         LI,R5    -2
         STW,R7   *R8,R5            BYTES OF R/W
*
         LW,R7    FILETAB+2,R6      DISPLACMENT TO R/W
         LI,R5    -1
         STW,R7   *R8,R5            R/W DISPLACEMENT
*
,,EOVLP  M:OPEN   M:EO,(FILE,'MPC9210'),KEYED,DIRECT,OUT,SAVE
         M:WRITE  M:EO,(BUF,HEAD),(SIZE,48),(KEY,HEADK),ONEWKEY,WAIT
         M:WRITE  M:EO,(BUF,TREE-1),(SIZE,48),(KEY,TREEK),ONEWKEY,WAIT
         MTB,1    TREE              MAKE ROOM FOR TYPE BYTE
         LB,R1    TREE              SIZE OF NAME
         LI,R2    0                 TYPE BYTE FOR RFDFSTK
         STB,R2   TREE,R1
         M:WRITE  M:EO,(BUF,RFDFSTK),(SIZE,RFDFSZ),;
                  (KEY,TREE),ONEWKEY,WAIT
         LI,R2    1                 TYPE BYTE FOR EXPREESION STACK
         STB,R2   TREE,R1
         M:WRITE  M:EO,(BUF,EXPRSTK),(SIZE,EXPRSZ),;
                  (KEY,TREE),ONEWKEY,WAIT
         LI,R2    2                 CONTROL DIC CONTROL BYTE
         STB,R2   TREE,R1           INTO NAME
         M:WRITE  M:EO,(BUF,CONTDIC),(SIZE,*CONDICSZ),;
                  (KEY,TREE),ONEWKEY,WAIT
         LI,R2    3                 DATA TYPE BYTE
         STB,R2   TREE,R1           INTO NAME
         M:WRITE  M:EO,(BUF,*BUF),(SIZE,*SIZE),;
                  (KEY,TREE),ONEWKEY,WAIT
         M:CLOSE  M:EO,SAVE
         B        RESTART           SEE IF ANY MORE FIRMWARE TO LOAD
EXIT     M:CLOSE  M:EI,REM
         M:CLOSE  F:EO,SAVE
         M:WEOF   M:LO              TOP THE PAGE
         CAL1,8   LDTRC
LDTRC    DATA     X'03000000'
         DATA     0                 RETURN INFO
         PAGE
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*                  DATA, CONSTANTS, AND BUFFERS
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
FIRMWNAM TEXT      'NAME'           NAME OF MPC LOAD NEEDED
BUF      DATA     0                 BUFFER ADDRESS OF MPC LOAD
SIZE     DATA     0                 BYTE SIZE OF MPC LOAD
HEAD     DATA     X'8100FF30'
         DATA     X'40008000'
         DATA     X'00004000'
         DATA     X'00004000'
         DATA     0
         DATA,2   RFDFSZ**-2,X'C'
         DATA     ,,,,,
*
         DATA     X'C'
TREE     TEXTC    'MPC9210'
         DATA     ,,
         DATA     X'00004000'
         DATA,2   RFDFSZ**-2,0
         DATA     0
         DATA,2   EXPRSZ**-2,0
         DATA     ,
*
RFDFSTK  DATA     X'03060000'
         DATA     ,
         DATA      X'06100000'
         DATA     X'20000'
         DATA     X'01000000'
RFDFNAM  TEXTC     'MPC9210:'
RFDFSZ   EQU      BA(%)-BA(RFDFSTK)
*
EXPRSTK  DATA     X'04032202'
         DATA     3
         DATA     ,
EXPRSZ   EQU      BA(%)-BA(EXPRSTK)
*
*
MFIRMSZ  EQU      X'B83'            MAX MPC LOAD SIZE IN DOUBLE WORDS
CONTDIC  EQU      %
I        DO       MFIRMSZ
         LIST     I=1
         DATA,1   X'EE'             ABS CONTROL DIC VALUE
         FIN
         LIST     1
         BOUND    4
CONDICSZ DATA     0                 BYTE SIZE OF CONTROL DICTIONARY
HEADK    TEXTC    'HEAD'
TREEK    TEXTC    'TREE'
         PAGE
CNTR62   DATA      0
CNT62    DATA      0
DKIDFND  DATA      0
D22      DATA      22
FILEDAT  DATA      0
HF       DATA      X'0F'
HFFFF    DATA      X'FFFF'
HF0      DATA      X'F0'
HOLTH    DATA      X'20'
H3F      DATA      X'3F'
H82D1    DATA      X'FFFF82D1'
LABEL    DATA      X'532C8124'      DSS191 AND X'9339C600' FOR MTP601
         DATA     X'10000000'
LAST     DATA      0
LDEV     DATA      X'80'
LHALF    DATA      X'FFFF0000'
MATCH    DATA      0
FWSW     DATA     0                 0 -> FIRMWARE NOT YET BEING LOADED
TBLINDX  DATA      0                FILESPEC ROW BEING PROCESSED
LASTRCW  DATA      1                RECORD SIZE OF LAST CONTROL WD
MDREQ    DATA      0
MDRFLG   DATA      0
MDRLAB   DATA      X'91418500'      DSS191 AND X'924CC600' FOR MMT6XX
MPCBOT   DATA      X'9274D29B'
MS24B    DATA      X'FFFFFF00'
OBJEC    DATA      X'4264A155'
OVL1     DATA      X'36630A10'
PCNTR    DATA      0
RSIP     DATA      0
SUFX     DATA      X'10'
WRDCNT   DATA      0
NUMFILE  DATA      0
BLANK    DATA      X'40404040'
CODE     TEXT      '0123456789ABCDEF'
OCODE    DATA      X'F0F1F2F3'
         DATA      X'F4F5F6F7'
         DATA      X'F8F94B7B'
         DATA      X'7C7A6E6F'
         DATA      X'40C1C2C3'
         DATA      X'C4C5C6C7'
         DATA      X'C8C9504B'
         DATA      X'4B4D4C4B'
         DATA      X'6AD1D2D3'
         DATA      X'D4D5D6D7'
         DATA      X'D8D9605B'
         DATA      X'5C5D5E7D'
         DATA      X'4E61E2E3'
         DATA      X'E4E5E6E7'
         DATA      X'E8E96D6B'
         DATA      X'6C7E7F5A'
REGSAVE  RES       16
PBUF     RES       16
         RES       4
INDEX    DATA      0
WORD0    DATA      0
WORD1    DATA      0
WORD2    DATA      0
WORD3    DATA      0
WORD4    DATA      0
WORD5    DATA      0
HE0      DATA      X'E0'
LASTLN   DATA      0
TIMES    DATA      0
LOC      DATA      0
TOF      DATA      X'D1000000'
HD1      TEXT      '         START      R/W MEM     '
         TEXT      'MPC ROS     MPC R/W      END'
HD2      TEXT      'LABEL   ADDRESS     ADDRESS     '
         TEXT      'ADDRESS     ADDRESS     ADDRESS'
ADRS     DATA      0
         DATA      X'40404040'
PRINT    RES       27
         BOUND     8
SPACE    RES       4
TBUF     RES       360
         BOUND    8
INCBUF   RES,1    80                READ DATA CARDS HERE
         BOUND     8
IMAGE    RES       640
FILETAB  RES       1000
PROGRM   RES       8000
         END       START

