IDENT 1CL,ALC
PERIPH
BASE MIXED
SST
SYSCOM
*COMMENT 1CL - CPP FIRMWARE LOADER.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
TITLE 1CL - CPP FIRMWARE LOADER.
SPACE 4
*** 1CL - CPP FIRMWARE LOADER.
*
* S. L. BETH. 86/07/25.
SPACE 4
*** 1CL IS LOADED INTO A CPP BY *BCL* TO LOAD FIRMWARE TO
* CPP CONTROLLERS. 1CL THEN LOADS THE FIRMWARE FROM THE CM
* BUFFER THAT *BCL* HAS SET UP.
SPACE 4
*** CALL.
*
*
*T IR 18/ *1CL*,1/,5/ CP,36/
*T MB 12/ CH,12/ RL,12/ DSTO,24/ CMA
*
* CH CHANNEL TO AUTOLOAD.
* RL FIRMWARE RECORD LENGTH.
* DSTO DEADSTART OPTIONS.
* CMA CM ADDRESS OF FIRMWARE RECORD.
*
* MB = 12/7777,48/0 WHEN LOAD COMPLETE.
SPACE 4
*** OPERATOR MESSAGES.
*
* LINE 2 OF DEADSTART CONTROL POINT -
*
* *TO CONTROLLER.* = THE FIRMWARE RECORD LISTED IN THE LINE 1
* MESSAGE AT THE DEADSTART CONTROL POINT IS BEING AUTOLOADED TO
* THE CHANNEL AND EQUIPMENT TYPE LISTED IN THE LINE 1 MESSAGE.
* IF THE DEADSTART STOPS WITH THIS MESSAGE AND THE LINE 1
* MESSAGE LISTED ABOVE DISPLAYED, A CONTROLLER OR CHANNEL
* MALFUNCTION OR INCORRECT EQPDECK EQUIPMENT DEFINITION HAS
* CAUSED THE AUTOLOAD PROGRAM TO HANG.
*
* *AUTOLOAD FAILURE, STXXXX.* = FOLLOWING THE AUTOLOADING OF
* THE RECORD LISTED IN THE LINE 1 MESSAGE AT THE DEADSTART
* CONTROL POINT TO THE CHANNEL AND EQUIPMENT TYPE LISTED IN THE
* LINE 1 MESSAGE, CONTROLLER STATUS (STXXXX) INDICATED THAT A
* CHANNEL PARITY ERROR OR FIRMWARE CHECKSUM ERROR OCCURED FOR
* THE AUTOLOAD. A STATUS OF *ST0000* INDICATES THAT THE
* CHANNEL WAS DISCONNECTED WITHOUT STATUS BEING SENT. WHEN
* THIS MESSAGE IS DISPLAYED, DEADSTART STOPS UNTIL THE *GO*
* COMMAND IS ENTERED BY THE OPERATOR. WHEN THE *GO*
* COMMAND IS ENTERED, THE AUTOLOAD IS RETRIED. IF SEVERAL
* RETRIES CONTINUE TO PRODUCE THIS MESSAGE AND THE LINE 1
* MESSAGE LISTED ABOVE, A SOLID HARDWARE FAILURE OR BAD
* FIRMWARE RECORD ON THE DEADSTART TAPE IS INDICATED.
*
* * FUNCTION XXXX TIMEOUT.* = FUNCTION XXXX WAS NOT
* ACCEPTED BY THE CONTROLLER, NOTIFY THE SITE CE.
SPACE 4
*CALL COMPMAC
*CALL COMSDSL
*CALL COMSPIM
*CALL COMPCHM
OPMESS SPACE 4,10
** OPMESS - SEND OPERATOR MESSAGE.
*
* OPMESS MADD,LINE
*
* MADD = ADDRESS OF MESSAGE.
* LINE = 1 FOR A LINE ONE MESSAGE.
* = 2 FOR A LINE TWO MESSAGE.
OPMESS MACRO MADD,LINE
LDC 200*DSCP+MS_LINE_W
CWM MADD,TR
ENDM
SPACE 4
**** DIRECT LOCATION ASSIGNMENTS.
CN EQU 20 - 24 CM WORD BUFFER (5 LOCATIONS)
FN EQU 30 - 34 CM WORD BUFFER (5 LOCATIONS)
NC EQU 35 NUMBER OF CONTROL POINTS
TP EQU 43 TEMP
RL EQU 44 RECORD LENGTH
DS EQU 45 DEADSTART OPTIONS
CA EQU 46 - 47 CURRENT CENTRAL ADDRESS (2 LOCATIONS)
****
SPACE 4
* ASSEMBLY CONSTANTS.
BUF EQU TPBA TAPE BLOCK BUFFER
FWBF EQU BUF FIRMWARE BUFFER
FWBFL EQU 1000 FIRMWARE BUFFER LENGTH (CM WORDS)
FCCN EQU 0 CONNECT FUNCTION
FCOC EQU 10 OPERATION COMPLETE FUNCTION CODE
FCGR EQU 11 GRENADE FUNCTION CODE
FCGS EQU 12 GENERAL STATUS FUNCTION CODE
FCLC EQU 71 LOAD CONTROL MODULE CONTROLWARE FROM PP
FCAL EQU 414 AUTOLOAD FUNCTION CODE
TITLE MAIN PROGRAM.
1CL SPACE 4
** 1CL - MAIN PROGRAM.
ORG PPFW
ALC SPACE 4,20
** ALC - AUTOLOAD CONTROLLER.
*
* EXIT CONTROLLER AUTOLOADED WITH FIRMWARE.
* CONTROLLER GRENADED IF DEADSTART OPTION SPECIFIED.
* WAITS FOR OPERATOR GO IF AN AUTOLOAD FAILURE OCCURS.
*
* CALLS C2D, FCN, MCI, OFR, PRS, STS, WOG.
*
* MACROS DCHAN, OPMESS, RCHAN.
ALC RJM PRS PRESET PROGRAM
RJM MCI MODIFY CHANNEL INSTRUCTIONS
LDD T4 RESERVE CHANNEL
RCHAN
DCN CH INSURE CORRECT CHANNEL STATE
ALC1 OPMESS MSGA,2
LDC 1S15 MASTER CLEAR THE CHANNEL ADAPTOR
RJM FCN
LDC FCAL ISSUE AUTOLOAD FUNCTION
RJM FCN
RJM OFR LOAD CONTROLWARE
RJM STS
ZJN ALC2 IF AUTOLOAD SUCCESSFUL
SHN -6 PUT STATUS IN MESSAGE
RJM C2D
STM MSGB+12
LDD FN
RJM C2D
STM MSGB+13
LDC MSGB DISPLAY AUTOLOAD FAILURE MESSAGE
RJM WOG
UJN ALC1 RETRY AUTOLOAD
ALC2 LDD DS CHECK DEADSTART OPTIONS
LPN 1
ZJN ALC3 IF *GRENADE* NOT SPECIFIED
LDN FCGR ISSUE GRENADE FUNCTION
RJM FCN
ALC3 LDN FCOC ISSUE OPERATION COMPLETE
RJM FCN
LDD T4 RELEASE CHANNEL
DCHAN
LCN 0 SET LOAD COMPLETE
STD CM
LDD MA
CWD CM
MONITOR DPPM
LJM PPR EXIT
FCN SPACE 4,15
** FCN - ISSUE FUNCTION TO CONTROLLER.
*
* ENTRY (A) = FUNCTION CODE.
*
* EXIT (A) = 0 IF GENERAL STATUS FUNCTION TIMED OUT.
*
* USES FN.
*
* CALLS C2D.
*
* MACROS OPMESS.
FCN SUBR ENTRY/EXIT
STD FN
FCN1 FAN CH
FCN2 IJM FCNX,CH IF FUNCTION ACCEPTED
ADD ON
NJN FCN2 IF TIMEOUT NOT SATISFIED
DCN CH
LDD FN CHECK FUNCTION
LMN FCGS
ZJN FCNX IF GENERAL STATUS REQUEST
SHN -6
RJM C2D
STM FCNB
LDD FN CONVERT FUNCTION FOR MESSAGE
RJM C2D
STM FCNB+1
OPMESS FCNA,2 DISPLAY TIMEOUT MESSAGE
LDD FN
UJN FCN1 RETRY
FCNA DATA 10H FUNCTION
FCNB DATA C*0000 TIMEOUT.*
MCI SPACE 4,10
** MCI - MODIFY CHANNEL INSTRUCTIONS.
*
* ENTRY (T4) = CHANNEL NUMBER.
*
* USES T1, T2, T3.
MCI1 STD T2 SET INSTRUCTION ADDRESS
LDI T2
SCN 37
LMD T3 MODIFY INSTRUCTION
STI T2
AOD T1 ADVANCE LIST ADDRESS
MCI2 LDI T1
NJN MCI1 IF NOT END OF LIST
MCI SUBR ENTRY/EXIT
LDD T4
LPN 37 REMOVE CONCURRENT FLAG
STD T3
LDC CTCH SET CHANNEL TABLE ADDRESS
STD T1
UJN MCI2 ENTER LOOP
OFR SPACE 4,20
** OFR - OUTPUT FIRMWARE RECORD.
*
* ENTRY (CA - CA+1) = CENTRAL MEMORY ADDRESS OF FIRMWARE
* RECORD.
* (RL) = WORD COUNT OF FIRMWARE RECORD.
* CONTROLLER FUNCTIONED FOR AUTOLOAD.
*
* EXIT FIRMWARE RECORD TRANSFERRED FROM CENTRAL MEMORY TO
* CONTROLLER.
* CHANNEL INACTIVE.
*
* USES T1, T2, T5, T6.
OFR3 FJM *,CH WAIT FOR LAST WORD ACCEPT
DCN CH
OFR SUBR ENTRY/EXIT
LDD CA SET CENTRAL MEMORY ADDRESS OF RECORD
STD T5
LDD CA+1
STD T6
OFRA ACN CH PREPARE CHANNEL FOR OUTPUT
* PSN (IF 819 DRIVER LOAD)
LDD RL RECORD WORD COUNT
OFR1 ZJN OFR3 IF END OF RECORD
STD T2 SAVE REMAINING WORD COUNT
STD T1 SET BLOCK WORD COUNT
ADC -FWBFL-1
MJN OFR2 IF REMAINING DATA FITS IN BUFFER
LDC FWBFL SET BLOCK COUNT TO BUFFER SIZE
STD T1
OFR2 LDD T5 SET CENTRAL BUFFER ADDRESS
SHN 14
LMD T6
CRM FWBF,T1 READ BLOCK FROM CENTRAL MEMORY
STD T6 SAVE NEXT CENTRAL MEMORY BUFFER ADDRESS
SHN -14
STD T5
LDD T1 OUTPUT BLOCK TO CONTROLLER
SHN 2
ADD T1
OAM FWBF,CH
LDD T2 DECREMENT REMAINING RECORD WORD COUNT
SBD T1
UJN OFR1 PROCESS NEXT BLOCK
STS SPACE 4,10
** STS - STATUS CONTROLLER.
*
* EXIT (A) = (FN) = GENERAL STATUS.
* (A) = 775777 IF INCOMPLETE STATUS.
* (FN) = 5777 IF INCOMPLETE STATUS.
*
* CALLS FCN.
STS SUBR ENTRY/EXIT
LDN FCGS
RJM FCN
ZJN STS1 IF FUNCTION TIMED OUT
ACN CH
STS1 LDC -2000 ERROR STATUS
STSA IAN CH
* IAN CH+40 INPUT STATUS
STD FN
UJN STSX RETURN
WOG SPACE 4,10
** WOG - WAIT FOR OPERATOR *GO.*.
*
* ENTRY (A) = ADDRESS OF MESSAGE TO BE WRITTEN TO MS2W.
*
* EXIT (A) = 0.
* OPERATOR ENTERED *GO.* COMMAND.
*
* USES T1, CM - CM+4.
*
* MACROS PAUSE.
WOG SUBR ENTRY/EXIT
STM WOGA SET MESSAGE ADDRESS
LDD NC
SHN 7 READ SENSE SWITCH WORD
ADN SNSW
STD T1 SAVE ADDRESS
CRD CM
LDD CM+3 SET PAUSE BIT
SCN 1
LMN 1
STD CM+3
LDD T1
CWD CM
ADN MS2W-SNSW WRITE MESSAGE TO MS2W
CWM *,TR
WOGA EQU *-1 MESSAGE ADDRESS
WOG1 PAUSE NE
LDD T1 CHECK PAUSE BIT
CRD CM
LDD CM+3
LPN 1
ZJN WOGX IF PAUSE BIT CLEAR
UJN WOG1 LOOP
SPACE 4,10
** CONSOLE MESSAGES.
MSGA DATA C*TO CONTROLLER.*
MSGB DATA C*AUTOLOAD FAILURE, ST0000.*
SPACE 4,10
** COMMON DECKS.
*CALL COMPC2D
TCHS SPACE 4,10
** CHANNEL TABLE.
CHTB CH
PRS SPACE 4,10
** PRS - PRESET PROGRAM.
*
* EXIT (NC) = NUMBER OF CONTROL POINTS.
* (RL) = FIRMWARE RECORD LENGTH.
* (DS) = DEADSTART OPTIONS.
* (T4) = CHANNEL.
* (CA - CA+1) = CMA OF FIRMWARE RECORD.
*
* USES DS, NC, RL, TP, T4, CA - CA+1.
PRS SUBR ENTRY/EXIT
LDD MA READ LOAD PARAMETERS
CRD TP
LDD TP SET CHANNEL
STD T4
LDK NCPL SET NUMBER OF CONTROL POINTS
CRD CM
LDD CM+1
STD NC
UJN PRSX RETURN
END