         PCC      0
         TITLE    'CSES9  -  SIGMA 9 SPECIFIC CODE'
         DEF      CSES9:
CSES9:   EQU      %
RAWORKS  SET      1                 JUST IN CASE THEY FIX IT ????
RAWORKS  SET      0                 BECAUSE IT DOESN'T WORK
         SYSTEM   UTS
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
         PAGE
*    REFS AND DEFS
         SPACE
         REF      CSE%BEST%END%STOP
         REF      CSE%BEST%END%ABORT%STEP
         REF      CSE%MFIX%ENTRY2
         REF      CSE%T4C%FIX%MAP
         DO1      RAWORKS
         REF      CSE%RA%TST
         SPACE
         REF      CSED%CF
         REF      CSED%RTRY%CNT
         SPACE
*   DEFS FOR BRANCH TABLE
         REF      CSE%7
         SPACE
         DEF      CSE%1:9,CSE%3:9,CSE%5:9
         DEF      CSE%7:9,CSE%A:9,CSE%B:9,CSE%C:9
         DEF      CSE%D:9,CSE%E:9,CSE%F:9
         SPACE
CSE%1:9  EQU      CSE%PPOLR         PROCESSOR POLLING
* CSE%2:9 IS DEF'D IN CSECOM
CSE%3:9  EQU      CSE%PLOG
* CSE%4:9 IS DEF'D IN CSECOM
CSE%5:9  EQU      CSE%PDEL
* CSE%6:9 IS DEF'D IN CSECOM
CSE%7:9  EQU      CSE%MFIX%ENTRY
* CSE%8:9 IS DEF'D IN CSECOM
CSE%A:9  EQU      CSE%T4C%FIX
CSE%B:9  EQU      DUMMY             ENTRY NOT USED
CSE%C:9  EQU      DUMMY             ENTRY NOT USED
CSE%D:9  EQU      DUMMY             ENTRY NOT USED
CSE%E:9  EQU      DUMMY             ENTRY NOT USED
CSE%F:9  EQU      DUMMY             ENTRY NOT USED
         REF      CSEP%WHY%T4C
         REF      Y01
         PAGE
*   THIS ROUTINE CONTAINS ALL THE SIGMA 9 SPECIFIC CODE
*   FOR THE HARDWARE FAULT HANDLERS
         SPACE
CSE%PPOLR  EQU  %                   PROCESSOR POLLING
         B        *R15              NOT USED ON SIGMA 9
         SPACE
CSE%MFIX%ENTRY    EQU    %
         SPACE
*   ENTER WITH BAL,R14
*        R2 - ADDRESS OF MEMORY CELL WITH BAD PARITY
*        R1 - ADDRESS OF MPOLR ENTRY WORD ZERO
*        CANNOT USE R0,R4,R8
         SPACE
         LCI      8                 PICK UP MSW 0 (AGAIN)
         LMS,R11  0,R2              IN ORDER TO CHECK
         CW,R11   Y01               FOR POWER FAIL BIT AFTER RESETTING
         BAZ      CSE%CALC%REAL%ADR OK TO CONTINUE
         BAL,R14  CSE%MFIX%ENTRY2   COMMON CODE WITH 560 TO QUIT
*
CSE%CALC%REAL%ADR  EQU  %
*        RETURN ADDRESS IN R11, REAL ADDRESS IS CALCULATED
*        FROM INTERLEAVING INFO IN MSW'S
         SPACE
         LW,R10   3,R1              PICK UP MSW2 (INTER. ADDR)
         LI,R7    X'4001'           ASSUME 2-WAY INTERL
         LW,R13   2,R1              PICK UP MSW1
         LCF      R13               PICK UP INTERL. INFO
         BCR,X'C'     *R14          B/ NOT INTERLEAVED, RETURN
         BCS,X'4'     CSIN1         B/ 2 WAY INTER
         LI,R7    X'8001'           SET 4-WAY BITS
         BAL,R13  CSIN2             DO FIRST BIT PAIR
         LI,R7    X'4002'           SET SECOND BIT PAIR
CSIN1    BAL,R13  CSIN2
         B        *R14              ALL DONE, RETURN
CSIN2    CW,R10   R7
         BAZ      *R13              B/ MUST BE 0 0
CSIN3    EOR,R10  R7
         CW,R10   R7
         BAZ      CSIN3             B/ MUST BE 1 1 (PUT BACK)
         B        *R13              MUST BE 0 1 OR 1 0
         SPACE
CSE%PLOG EQU      %
CSE%PDEL EQU      %
         B        *R15
         SPACE
         SPACE
CSE%T4C%FIX  EQU  %
         LC       CSED%CF
         BCS,X'4' CSE%T4C%FIX%MAP   MAP ERROR GO RELOAD MAP AND ACCESS CODES
         LI,R11   CSEP%WHY%T4C      IN CASE RA TEST FAILS
         MTW,-1   CSED%RTRY%CNT
         DO       RAWORKS
         BGZ      CSE%RA%TST        RETRY IF RA NOT SET
         ELSE
         BGZ      CSEASTEP          GO ABORT USERS STEP
         FIN
         BAL,R12  CSE%BEST%END%STOP RETRIES FAILED
         B        *R15
CSEASTEP  BAL,R12 CSE%BEST%END%ABORT%STEP
         B        *R15
         SPACE
DUMMY    EQU      %
         SCREECH  X'23'             .23 BAD CSEBRANCH ENTRY
         END

