IDENT 1XD,CM3D
TITLE 1XD - NOS XMD (9853) DRIVER.
CIPPU ,S
MEMSEL 8
BASE M
SST
*COMMENT 1XD - CM3/XMD3 (9853) DRIVER.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
SPACE 4,10
*** 1XD - CM3/XMD3 (9853) DRIVER.
*
* P. D. HAAS. 88/02/26.
SPACE 4,10
*** *1XD* IS THE DRIVER FOR THE XMD (9853) DISK STORAGE SUBSYSTEM.
*
* THE XMD DISK DRIVES ARE SUPPORTED AS BUFFERED I/O
* DEVICES. REQUESTS TO BE PROCESSED BY *1XD* ARE POSTED
* BY *CPUMTR* IN THE BUFFERED I/O TABLES IN *CMR*.
* *1XD* INTERLOCKS UNITS, DELINKS BUFFERS, AND COMPLETES
* SAID REQUESTS BY ISSUING APPROPRIATE *BIOM* FUNCTIONS.
*
* EACH COPY OF *1XD* WILL SUPPORT ONE CONCURRENT CHANNEL
* CONFIGURED WITH THE INTELLIGENT PERIPHERAL INTERFACE (IPI)
* AND IS THE SOLE DRIVER FOR ALL XMD DISKS ON THAT CHANNEL.
* *1XD* MUST BE LOADED INTO A CONCURRENT PP, IN THE SAME
* BANK AS THE CHANNEL IT IS TO SERVICE.
*
* EACH COPY OF THE DRIVER CAN SERVICE UP TO SIXTEEN XMD
* UNITS IN ANY CONFIGURATION MIX OF CONTROL MODULES AND
* DRIVES COUPLED TO EITHER PORT OF THE IPI ADAPTOR.
*
* *1XD* SCANS THROUGH THE *PUT* ENTRIES IN A CIRCULAR FASHION
* LOOKING FOR REQUESTS TO PROCESS. ONCE A REQUEST IS FOUND,
* *1XD* USES THE PHYSICAL DISK AND UEM ADDRESSES IN THE
* CORRESPONDING *CBT* ENTRY TO DETERMINE THE ACTION TO BE
* TAKEN. *1XD* WILL ATTEMPT TO PROCESS CONSECUTIVE REQUESTS
* ON THE CURRENT UNIT UNTIL THE END OF THE UNIT I/O QUEUE,
* OR A CONSECUTIVE REQUEST WAS NOT FOUND. AT THIS POINT
* *1XD* WILL RESUME ITS SEARCH THROUGH THE *PUT* WITH THE
* *PUT* ENTRY IMMEDIATELY FOLLOWING THE ONE JUST PROCESSED.
SPACE 4,10
*** ORGANIZATION OF THE 9853 (MEASUREMENTS IN DECIMAL).
*
* EQUIPMENT TYPE *DN*
*
* UNITS/LOGICAL DEVICE 1
*
* PHYSICAL ORGANIZATION:
*
* WORDS/PHYSICAL SECTOR 256
* PHYSICAL SECTORS/TRACK 21
* PHYSICAL TRACKS/CYLINDER 19
* CYLINDERS/DEVICE 1409
* WORDS/DEVICE 143,861,760
*
* LOGICAL ORGANIZATION:
*
* WORDS/LOGICAL SECTOR 64
* LOGICAL SECTORS/PHYSICAL SECTOR 4
* LOGICAL SECTORS/LOGICAL TRACK 1120
* LOGICAL TRACKS/DEVICE 2007
*
* MAXIMUM SUSTAINED DATA RATE 312 K WORDS/SECOND
SPACE 4,10
*** CALL.
*
*T 18/ DRN, 6/ CP, 6/ CO, 18/, 7/ 1, 5/ CH
*
* DRN DRIVER NAME.
* CP CONTROL POINT NUMBER (MUST BE SYSTEM CP).
* CO CHANNEL TABLE ORDINAL (SET BY *CPUMTR*).
* CH CHANNEL NUMBER BEING SERVICED BY THIS PP.
SPACE 4,10
*** DAYFILE MESSAGES.
*
* DRN - UNAUTHORIZED CALL.
*
* THE DRIVER (NAMED *DRN*) WILL ISSUE THIS MESSAGE AND ABORT
* IF NOT ASSIGNED TO THE SYSTEM CONTROL POINT.
SPACE 4,10
*** ERRLOG MESSAGES.
*
* EQORD,TKNNNN, MEDIA DEFECT ENCOUNTERED.
*
* A MEDIA DEFECT HAS BEEN ENCOUNTERED ON EQUIPMENT WITH EST
* ORDINAL ORD, LOGICAL TRACK NNNN. A REQUEST HAS BEEN ISSUED
* TO AUTOMATICALLY FLAW THIS TRACK WHEN IT IS DROPPED.
*
*
* CHCC MH426-DXX,CMN.
*
* CONTROL MODULE N ON CHANNEL CC IS RUNNING MICROCODE REVISION
* LEVEL XX.
*
*
* DNEEE, UNN,PS=XXXXXX.
*
* UNIT NN OF THE 9853 DEVICE WITH EST ORDINAL EEE HAS THE PACK
* SERIAL NUMBER XXXXXX.
SPACE 4,10
*** OPERATOR MESSAGES.
*
* EQORD, DIAGNOSTICS RUNNING.
*
* EQORD, SPIN UP PENDING.
*
* CM3 BEING RESET ON CCHNN.
*
* CM3 RESET FAILURE ON CCHNN.
*
* MR ERROR.
SPACE 4,10
*** DISK ERROR PROCESSING.
*
* THE DRIVER MAINTAINS A COUNTER OF THE NUMBER OF RETRIES
* NECESSARY TO SUCCESSFULLY PROCESS A REQUEST. IF THE
* ERROR COUNT IS NON-ZERO WHEN A REQUEST IS COMPLETED, THE
* DRIVER WILL LOG A BML MESSAGE AND INCREMENT THE RECOVERED
* ERROR COUNT IN THE MST.
*
* IF THE ERROR COUNT REACHES *MERC* BEFORE THE REQUEST IS
* SUCCESSFULLY COMPLETED, THE DRIVER WILL SET AN ERROR CODE
* IN THE *CBT*, LOG A FATAL ERROR IN THE BML, AND INCREMENT
* THE UNRECOVERED ERROR COUNT IN THE MST.
SPACE 4,10
*** CONFIGURATION NOTES.
*
* IN A DUAL ACCESS ENVIRONMENT, THE SAME EQUIPMENT NUMBER MUST
* BE DIALED INTO THE PORT IN USE ON EACH CONTROL MODULE.
SPACE 4,10
*** SPECIAL PROGRAMMING NOTES.
*
* THE FOLLOWING IS A LIST OF SPECIAL NOTES THAT SHOULD BE
* READ AND UNDERSTOOD BEFORE ANY MODIFICATIONS ARE MADE TO
* THIS PROGRAM.
*
*
* 1) WHERE POSSIBLE, *CMR* POINTERS HAVE BEEN PLUGGED BY THE
* PRESET ROUTINE TO IMPROVE THE EXECUTION SPEED OF THE
* PROGRAM AND TO MINIMIZE THE AMOUNT OF CODE.
*
* 2) THIS PROGRAM EXCHANGES *CPUMTR* WITHOUT WAITING FOR
* THE REQUEST TO COMPLETE. ROUTINE *CMC* SHOULD BE CALLED
* IF THE *MONITOR* MACRO IS TO BE USED WHILE THERE IS A
* POSSIBILITY OF AN OUTSTANDING MONITOR REQUEST.
*
* 3) THE DEVICE STATE TABLE IS BUILT AT LOCATION *EXR* IN
* PP RESIDENT, THEREFORE IT IS NOT POSSIBLE TO USE THE
* *EXR* AND *SMS* ROUTINES.
SPACE 4,10
** COMMON DECKS.
*CALL COMPMAC
RICHI$ EQU 1 SELECT DEFERRED INSTRUCTION MODIFICATION
LCHI$ EQU 1 SELECT *CONL* FOR CHANNEL ADDRESS TABLE
*CALL COMPCHI
*CALL COMSCPS
QUAL$S SET 0 REMOVE QUALIFICATION OF COMSDFS CONSTANTS
*CALL COMSDFS
*CALL COMSEVT
LIST X
*CALL COMSHIO
LIST *
QUAL IOU
*CALL COMSIOU
QUAL *
*CALL COMSLSD
*CALL COMSMSC
*CALL COMSMSP
*CALL COMSPIM
*CALL COMS1DS
SPACE 4,10
** INTERFACE SPECIFICATIONS.
IF -MIC,DM,2
DM MICRO 1,2,*DN* DEFAULT DEVICE MNEMONIC
DN MICRO 1,3,*1XD* DEFAULT DRIVER NAME
.1 SET 0
.A ECHO ,TY=(DN),MI=(RM0124)
.B IFC EQ,*TY*"DM"*
.1 SET 1
BMID EQU MI BML ERROR MESSAGE ID
STOPDUP
.B ENDIF
.A ENDD
IFEQ .1,0,1
ERR UNKNOWN DEVICE TYPE - "DM"
CYUN EQU CYUN"DM" CYLINDERS / UNIT
PSBF EQU PSBF"DM" PHYSICAL SECTORS / CONTROL BUFFER
PTCY EQU PTCY"DM" PHYSICAL TRACKS / CYLINDER
PSPT EQU PSPT"DM" PHYSICAL SECTORS / PHYSICAL TRACK
CFLP EQU CFS"DM" LOGICAL - PHYSICAL CONVERSION FACTOR
LSCY EQU PSPT*PTCY*LSPS"DM" LOGICAL SECTORS / CYLINDER
LSLT EQU SL"DM"+GS"DM" LOGICAL SECTORS / LOGICAL TRACK
LSPT EQU LSPT"DM" LOGICAL SECTORS / PHYSICAL TRACK
MCLT EQU MCLT"DM" MAINTENANCE CYLINDER LOGICAL TRACK
TITLE CONSTANTS AND DEFINITIONS.
SPACE 4,10
**** DIRECT CELL ALLOCATION.
NR EQU 15 - 21 NEXT REQUEST
WB EQU 22 - 26 CM WORD BUFFER
* THE NEXT FIVE LOCATIONS ARE ORDER DEPENDENT.
PB EQU 27 PREVIOUS CONTROL BUFFER ORDINAL
CB EQU 30 CURRENT CONTROL BUFFER ORDINAL
NB EQU 31 NEXT CONTROL BUFFER ORDINAL
UA EQU 32 - 33 UEM ADDRESS / 100
EO EQU 34 EST ORDINAL
DN EQU 35 DRIVE NUMBER
RC EQU 36 REQUEST COUNT
CN EQU 37 CONTROLLER NUMBER
MS EQU 40 MAJOR STATUS (RESPONSE PACKET)
RT EQU 41 STATUS RESPONSE TYPE
TO EQU 42 COMMAND TIMEOUT
SF EQU 43 DEVICE SELECTED FLAG
UC EQU 44 UNIT ACTIVITY COUNT
ERRNZ SF+1-UC CODE DEPENDS ON VALUE
RW EQU 45 READ / WRITE FLAG
PA EQU 46 PROCESSOR ADDRESS
DI EQU 47 DEVICE INDEX
CR EQU 57 CHANNEL RESERVED STATUS
RF EQU 60 RESET IN PROGRESS FLAG
LF EQU 61 LAST FUNCTION
TA EQU 62 DEVICE STATE TABLE ADDRESS
CW EQU 63 - 67 CM WORD BUFFER
****
SPACE 4,10
** IPI ADAPTOR FUNCTION CODES.
F0000 EQU 0#0000 MASTER CLEAR
F0200 EQU 0#0200 READ CONTROL REGISTER
F0300 EQU 0#0300 WRITE CONTROL REGISTER
F0600 EQU 0#0600 READ ERROR REGISTER
F0700 EQU 0#0700 READ OPERATIONAL STATUS
F0800 EQU 0#0800 DMA TERMINATE
F0A00 EQU 0#0A00 READ *T* REGISTER
F0B00 EQU 0#0B00 WRITE *T* PRIME REGISTER
F0C00 EQU 0#0C00 DMA READ FROM ADAPTOR
F0D00 EQU 0#0D00 DMA WRITE TO ADAPTOR
F0E00 EQU 0#0E00 CLEAR *T* REGISTERS
F0062 EQU 0#0062 PORT A SELECT
F0862 EQU 0#0862 PORT B SELECT
F7E42 EQU 0#7E42 CHANNEL TRANSFER RATE
SPACE 4,10
** IPI CHANNEL FUNCTION CODES.
F00F1 EQU 0#00F1 READ ERROR REGISTER
* BUS CONTROL FUNCTIONS.
F0029 EQU 0#0029 SELECT CONTROLLER (SET SELECT OUT)
F005B EQU 0#005B DEFINE INFORMATION TRANSFER (SET SYNC OUT)
F0071 EQU 0#0071 DESELECT CONTROLLER (CLEAR SELECT OUT)
F0711 EQU 0#0711 CLEAR MASTER OUT
F0715 EQU 0#0715 ENABLE INTERRUPTS (SET MASTER OUT)
F8025 EQU 0#8025 REQUEST TRANSFER MODE (SET MASTER OUT)
F8039 EQU 0#8039 MASTER STATUS (CLEAR MASTER OUT)
F8215 EQU 0#8215 RESET LOGICAL INTERFACE (SET MASTER OUT)
F8415 EQU 0#8415 RESET SLAVE (SET MASTER OUT)
F9213 EQU 0#9213 MASTER RESET SLAVES (SET SYNC OUT)
* DATA TRANSFER FUNCTIONS.
F0081 EQU 0#0081 READ INTERLOCKED
F0181 EQU 0#0181 WRITE INTERLOCKED
F0281 EQU 0#0281 READ STREAMING
F0381 EQU 0#0381 WRITE STREAMING
SPACE 4,10
** COMMAND / RESPONSE PACKET DEFINITIONS.
PLN EQU 0 PACKET LENGTH
CRN EQU 1 COMMAND REFERENCE NUMBER
OPC EQU 2 OPERATION CODE
CUN EQU 3 CONTROLLER + UNIT NUMBER
FCP EQU 4 FIRST COMMAND PARAMETER
MST EQU 4 MAJOR STATUS
* MAJOR STATUS RESPONSE TYPES.
CMCT EQU 1 COMMAND COMPLETE
ASRT EQU 4 ASYNCHRONOUS RESPONSE
XFNT EQU 5 TRANSFER NOTIFICATION
* MAJOR STATUS CODES.
CMCS EQU 0#12 COMMAND COMPLETE (CONDITIONAL SUCCESS)
CMSS EQU 0#18 COMMAND COMPLETE (SUCCESSFUL)
ASRS EQU 0#40 ASYNCHRONOUS RESPONSE
XFNS EQU 0#50 TRANSFER NOTIFICATION
BCPL EQU 06 BASIC COMMAND PACKET LENGTH
BRPL EQU 10 BASIC RESPONSE PACKET LENGTH
IOPL EQU 20 I/O COMMAND PACKET LENGTH
CPBFL EQU 32 COMMAND PACKET BUFFER LENGTH
RPBFL EQU 77 RESPONSE PACKET BUFFER LENGTH
SPACE 4,10
** COMMAND PACKET OPERATION CODES.
C0200 EQU 0#0200 REPORT ATTRIBUTES
C0209 EQU 0#0209 LOAD ATTRIBUTES
C020A EQU 0#020A SAVE ATTRIBUTES
C0301 EQU 0#0301 REPORT ADDRESSEE STATUS
C0401 EQU 0#0401 RELEASE RESERVE
C0402 EQU 0#0402 PRIORITY RESERVE
C0700 EQU 0#0700 SET OPERATING MODE
C0800 EQU 0#0800 ABORT COMMAND
C1005 EQU 0#1005 BLOCK READ
C2005 EQU 0#2005 BLOCK WRITE
C8100 EQU 0#8100 DRIVE DIAGNOSTICS
SPACE 4,10
** COMMAND PACKET PARAMETER ID-S.
P01D1 EQU 0#01D1 PERFORMANCE LOG
P0254 EQU 0#0254 DRIVE RESET
P02D2 EQU 0#02D2 MASTER TERMINATE
P02D3 EQU 0#02D3 EXTENT RESPONSE
P0351 EQU 0#0351 DISK MODES
P036C EQU 0#036C REQUEST ATTRIBUTE
P0551 EQU 0#0551 DISK DATA BLOCK SIZE
P0931 EQU 0#0931 COMMAND EXTENT
P0951 EQU 0#0951 TRANSFER SIZE OVERRIDE
SPACE 4,10
** SUBSTATUS PARAMETER ID CODES.
ID16 EQU 0#16 MACHINE EXCEPTION FOR CONTROLLER
ID17 EQU 0#17 COMMAND EXCEPTION FOR CONTROLLER
ID19 EQU 0#19 CONDITIONAL SUCCESS FOR CONTROLLER
ID24 EQU 0#24 INTERVENTION REQUIRED FOR DRIVE
ID26 EQU 0#26 MACHINE EXCEPTION FOR DRIVE
ID32 EQU 0#32 RESPONSE EXTENT (COMMON)
SPACE 4,10
** INFORMATION TRANSFER DEFINITIONS.
CIOT EQU 0 COMMAND - INFORMATION OUT
RIIN EQU 1 RESPONSE - INFORMATION IN
DAOT EQU 2 DATA - INFORMATION OUT
DAIN EQU 3 DATA - INFORMATION IN
SPACE 4,10
** MAINTENANCE REGISTER REQUEST CODE SYMBOLS.
MR EQU /IOU/MR MAINTENANCE CHANNEL
IOUC EQU /IOU/IOUC+/IOU/MRRD READ CONNECT CODE
RMRF EQU /IOU/MRRD-/IOU/MRRD READ REGISTER
WMRF EQU /IOU/MRWT-/IOU/MRRD WRITE REGISTER
RFMR EQU RMRF*10000+/IOU/FMCR READ FAULT MASK REGISTER
RCSR EQU RMRF*10000+/IOU/C0CR READ CHANNEL STATUS REGISTER
WFMR EQU WMRF*10000+/IOU/FMCR WRITE FAULT MASK REGISTER
SPACE 4,10
** FAULT ANALYSIS CODES.
ECPE EQU 1 CHANNEL PARITY ERROR (CHPE)
ECIE EQU 2 IPI CHANNEL ERROR
ECER EQU 4 CHANNEL DETECTED ERROR (CHFE)
ECCM EQU 5 CHANNEL DETECTED CM ERROR
ECHF EQU 7 CHANNEL HUNG FULL
ETIT EQU 10 INTERRUPT TIMEOUT (FTOE)
ETFN EQU 11 CHANNEL FUNCTION TIMEOUT
EDPE EQU 14 DATA PARITY ERROR (PARE)
EDNR EQU 20 DEVICE NOT READY (NRDE)
EIDT EQU 24 INCOMPLETE DATA TRANSFER (IDTE)
ERSS EQU 30 RESERVED SUBSTATUS (DSTE)
EDFM EQU 31 DEFECT MANAGEMENT ERROR
EMME EQU 32 MESSAGE/MICROCODE EXCEPTION
ETSL EQU 33 SELECT TIMEOUT
ESUF EQU 34 SPIN-UP FAILURE (DSTE)
ESDF EQU 35 SPIN-DOWN FAILURE
ETTC EQU 36 TRANSFER COMPLETE TIMEOUT
EIVR EQU 37 INTERVENTION REQUIRED
EAPR EQU 40 ALTERNATE PORT EXCEPTION (DSTE)
EMEX EQU 41 MACHINE EXCEPTION ERROR
ECEX EQU 42 COMMAND EXCEPTION ERROR
EIOS EQU 44 I/O INITIATION ERROR (DSTE)
ERPE EQU 45 REGISTER PARITY ERROR
ERDS EQU 46 REPORT DRIVE STATUS ERROR
ECMA EQU 50 COMMAND ABORTED ERROR (DSTE)
ECCS EQU 51 CONDITIONAL SUCCESS
ECIC EQU 52 COMMAND INCOMPLETE
EUST EQU 53 TRANSFER UNSUCCESSFUL
EDTF EQU 54 DIAGNOSTIC FAULT (DDFE)
EDRS EQU 55 DRIVE RESET FAILURE
ECNR EQU 60 SLAVE IN DID NOT DROP (RAME)
ELCA EQU 61 LOAD CONTROLLER ATTRIBUTES FAILURE
ESRE EQU 62 SELECTIVE RESET ERROR
ERDA EQU 63 REPORT DEVICE ATTRIBUTES ERROR
EBAE EQU 64 BUS ACKNOWLEDGE ERROR (CHFE)
ECOT EQU 65 CONTROLLER OVER TEMPERATURE
EDRE EQU 70 DRIVE RESERVE ERROR (DRVE)
ECRE EQU 74 CONTROLLER RESET ERROR (RAME)
ECMD EQU 75 CONTROL MODULE DEAD
SPACE 4,10
** DEVICE STATE TABLE DEFINITIONS.
LOC 0
PUTO BSS 1 *PUT* ORDINAL
PNUN BSS 1 PORT/EQUIPMENT/UNIT NUMBERS (3/P,3/E,6/U)
ADDR BSS 1 PROCESSOR ADDRESS
RADD BSS 1 RETURN ADDRESS
ATTN BSS 1 ATTENTION RETURN
EEST BSS 1 EXPECTED EXECUTION STATUS
RWST BSS 1 READ / WRITE STATUS
RQLN BSS 1 REQUEST QUEUE LENGTH
CBCT BSS 1 CUMULATIVE BUFFER COUNT
CYLN BSS 1 CYLINDER ON SEEK
TKSN BSS 1 TRACK + SECTOR ON SEEK
ERCT BSS 1 ERROR COUNT
SREQ BSS 1 SPECIAL REQUEST
* IPPS - I/O PREPROCESSING STATUS.
* BIT 15 = DRIVE DIAGNOSTICS IN PROGRESS.
* BIT 14 = *SET DRIVE ATTRIBUTES* REQUIRED.
* BIT 13 = *BREAK OPPOSITE RESERVE* REQUIRED.
* BITS 11-0 = CBT ORDINAL FOR CURRENT I/O REQUEST.
IPPS BSS 1 I/O PREPROCESSING STATUS
LCMD BSS 1 LAST COMMAND OP CODE
ESAD BSS 1 ERROR STEP ADDRESS
ENAD BSS 1 ERROR NEXT ADDRESS
RPST BSS 1 RESPONSE PACKET STATUS
IOST BSS 1 READ/WRITE STATUS
ERAD BSS 1 ERROR RETURN ADDRESS
FTOC BSS 2 FUNCTION TIMEOUT CLOCK VALUE
DSTBE BSS 0 LENGTH OF STATE TABLE ENTRY
LOC 0
SPACE 4,15
**** ASSEMBLY CONSTANTS.
CH EQU 16 CHANNEL NUMBER
NRAP EQU 2 NUMBER OF IPI ADAPTOR PORTS
MXCN EQU 10 MAXIMUM NUMBER OF CONTROLLERS / PORT
MXDC EQU 10 MAXIMUM NUMBER OF DRIVES / CONTROLLER
MXND EQU 10*2 MAXIMUM NUMBER OF UNITS / DRIVER
DSTB EQU EXR START OF DEVICE STATE TABLES
DSTBL EQU DSTB+DSTBE*MXND LWA+1 OF DEVICE STATE TABLES
* CSTB - CONTROLLER STATUS BLOCK.
* ONE ENTRY PER CONTROLLER NUMBER PER PORT.
*
* BIT 15 SLAVE RESET IN PROGRESS
* BIT 14 LOGICAL RESET PENDING
* BITS 0-11 DEVICE INDEX OF FIRST DRIVE ON CONTROLLER
CSTB EQU DSTBL CONTROLLER STATUS BLOCK
CSTBS EQU 10*2 LENGTH OF CONTROLLER STATUS BLOCK
OCMD MAX PPFW,CSTB+CSTBS DRIVER ORIGIN
MNCS EQU 1 MINIMUM NUMBER OF CYLINDERS / STREAM
MXCS EQU 2 MAXIMUM NUMBER OF CYLINDERS / STREAM
MNSS EQU MNCS*PSPT*PTCY MINIMUM SECTORS / STREAM
MXSS EQU MXCS*PSPT*PTCY MAXIMUM SECTORS / STREAM
MNBS EQU MNSS/PSBF-1 MINIMUM NUMBER OF BUFFERS / STREAM
MXBS EQU MXSS/PSBF-1 MAXIMUM NUMBER OF BUFFERS / STREAM
DRFM EQU 1000 DIRECTION FLAG MASK
ILFM EQU 4000 INTERLOCK FLAG MASK
CSRC EQU 4 CHANNEL SWITCH RETRY COUNT
MERC EQU CSRC*2 ERROR PROCESSING RETRY COUNT
* LAYOUT OF ERROR DATA BUFFERS.
BEGIN BSSN 0 REAL TIME ERROR DATA
EXST BSSN 1 ENDING STATUS
BSSN 2 RESERVED
LSCC BSSN 1 LAST SLAVE COMMAND
LCFN BSSN 1 LAST CHANNEL FUNCTION
CREG BSSN 4 CHANNEL REGISTER DATA
BSSN 3 RESERVED
TREG BSSN 3 CONTENTS OF *T* REGISTER
RTEDL EQU *
EMBF BSSN 0 ERROR MESSAGE BUFFER
BSSN 3*5 BML MESSAGE PREFIX AND HEADER
CODE BSSN 1 INITIAL FAULT CODE
FCS1 BSSN 1 FAULT CODE - ERROR STEP 1
FCS2 BSSN 1 FAULT CODE - ERROR STEP 2
FCS3 BSSN 1 FAULT CODE - ERROR STEP 3
FALT BSSN 1 FINAL FAULT CODE
BSSN 1 RESERVED
RBCT BSSN 1 RESIDUAL BYTE COUNT
STCT BSSN 1 SECTORS TRANSFERED COUNT
ICYL BSSN 1 CYLINDER ON INITIAL SEEK
ITAS BSSN 1 TRACK + SECTOR ON INITIAL SEEK
.3 SET *-EMBF+4
EMBFS EQU .3/5
EMBF1 EQU EMBFS*5+EMBF
.1 SET RTEDL*4
.2 SET .1-.1/3*3+2
.3 SET .1/3+.2/3+4
EMBF2 EQU .3/5*5+EMBF1
.1 SET RPBFL*4
.2 SET .1-.1/3*3+2
.3 SET .1/3+.2/3+4
EMBFL EQU .3/5*5+EMBF2
END BSSN
EDBFL EQU RTEDL+EMBFL
****
TITLE MACROS.
SPACE 4,10
** MACRO DEFINITIONS.
TBLM SPACE 4,10
** TBLM - CREATE TABLE ENTRY MACRO.
*
*NAM TBLM
*
* ENTRY NAM = TABLE NAME.
*
* EXIT NAM_E MACRO DEFINED.
PURGMAC TBLM
MACRO TBLM,NAM
PURGMAC NAM_E
NAM_E MACRO ADDR
LOCAL A
MACREF NAM_E
NOREF A
A EQU ADDR
T_NAM RMT
CONL A
RMT
TBLM ENDM
CBTE SPACE 4,10
** CBTE - CONTROL BUFFER TABLE ENTRY.
*
* THIS MACRO GENERATES AN ENTRY IN REMOTE LIST *TCBT*
* THAT CONTAINS THE ADDRESS OF AN INSTRUCTION WHICH
* REQUIRES THE FWA OF THE CONTROL BUFFER TABLE.
*
* CBTE ADDR
*
* ENTRY (ADDR) = ADDRESS OF INSTRUCTION.
*
* EXIT ADDRESS IS ADDED TO THE REMOTE BLOCK *TCBT*.
CBT TBLM
CCTE SPACE 4,10
** CCTE - CHANNEL CONTROL TABLE ENTRY.
*
* THIS MACRO GENERATES AN ENTRY IN REMOTE LIST *TCCT*
* THAT CONTAINS THE ADDRESS OF AN INSTRUCTION WHICH
* REQUIRES THE FWA OF THE CHANNEL CONTROL TABLE.
*
* CCTE ADDR
*
* ENTRY (ADDR) = ADDRESS OF INSTRUCTION.
*
* EXIT ADDRESS IS ADDED TO THE REMOTE BLOCK *TCCT*.
CCT TBLM
CHTE SPACE 4,10
** CHTE - CHANNEL TABLE ENTRY.
*
* THIS MACRO GENERATES AN ENTRY IN REMOTE LIST *TCHT*
* THAT CONTAINS THE ADDRESS OF AN INSTRUCTION WHICH
* REQUIRES THE FWA OF THE CHANNEL TABLE.
*
* CHTE ADDR
*
* ENTRY (ADDR) = ADDRESS OF INSTRUCTION.
*
* EXIT ADDRESS IS ADDED TO THE REMOTE BLOCK *TCHT*.
CHT TBLM
EMBE SPACE 4,10
** EMBE - ERROR MESSAGE TABLE ENTRY.
*
* THIS MACRO GENERATES AN ENTRY IN REMOTE LIST *TEMB*
* THAT CONTAINS THE ADDRESS OF AN INSTRUCTION WHICH
* REQUIRES THE FWA OF THE ERROR MESSAGE TABLE.
*
* EMBE ADDR
*
* ENTRY (ADDR) = ADDRESS OF INSTRUCTION.
*
* EXIT ADDRESS IS ADDED TO THE REMOTE BLOCK *TEMB*.
EMB TBLM
EXPE SPACE 4,10
** EXPE - EXCHANGE PACKAGE ADDRESS ENTRY.
*
* THIS MACRO GENERATES AN ENTRY IN REMOTE LIST *TEXP*
* THAT CONTAINS THE ADDRESS OF AN INSTRUCTION WHICH
* REQUIRES THE FWA OF THE PP EXCHANGE PACKAGE.
*
* EXPE ADDR
*
* ENTRY (ADDR) = ADDRESS OF INSTRUCTION.
*
* EXIT ADDRESS IS ADDED TO THE REMOTE BLOCK *TEXP*.
EXP TBLM
PUTE SPACE 4,10
** PUTE - PHYSICAL UNIT TABLE ENTRY.
*
* THIS MACRO GENERATES AN ENTRY IN REMOTE LIST *TPUT*
* THAT CONTAINS THE ADDRESS OF AN INSTRUCTION WHICH
* REQUIRES THE FWA OF THE PHYSICAL UNIT TABLE.
*
* PUTE ADDR
*
* ENTRY (ADDR) = ADDRESS OF INSTRUCTION.
*
* EXIT ADDRESS IS ADDED TO THE REMOTE BLOCK *TPUT*.
PUT TBLM
MONITOR SPACE 4,10
** MONITOR - REQUEST MONITOR FUNCTION.
*
* MONITOR F
*
* ENTRY F = MONITOR FUNCTION.
* (CM+1 - CM+4) = PARAMETERS.
*
* CALLS IMF.
PURGMAC MONITOR
MONITOR MACRO F
MACREF MONITOR
LDK F
RJM IMF
ENDM
WAIT SPACE 4,10
** WAIT - DO NOTHING FOR SPECIFIED TIME.
*
* WAIT N
*
* N = MICROSECOND COUNT.
*
* EXIT (A) = 0.
*
* USES T0.
PURGMAC WAIT
WAIT MACRO N
MACREF WAIT
NOREF .2
BASE D
.2 SET N 1
IFEQ N,64,2
LDD HN
SKIP 4
IFEQ N,512,2
LDD TH
SKIP 1
LDK .2
BASE *
SBN 1
STD T0
NJN *-2
ENDM
TITLE MAIN PROGRAM.
XMD SPACE 4,10
** XMD - MAIN PROGRAM.
ORG OCMD
RICHI BEGIN CHANNEL INSTRUCTION MODIFICATION
CM3D LJM PRS PRESET DRIVER
XMD EQU *-1
LDM XMD PRESERVE RETURN ADDRESS
STM ADDR,DI
XMD1 RJM DCM DESELECT CONTROLLER
XMD2 LDD TA
LMC DSTBL (ADJUSTED BY *IST*)
XMDA EQU *-1
NJN XMD5 IF NOT END OF DEVICE STATE TABLE
RJM CCR
ZJN XMD7 IF CHANNEL DOWN
LCN 0
RJM IOM REFRESH OPERATOR MESSAGE
XMD4 LDC DSTB
STD TA RESTART STATE TABLE SCAN
XMD5 LDD TA
STD DI SET DEVICE INDEX
ADN DSTBE
STD TA ADVANCE TABLE ADDRESS
RJM CFR
UJN XMD2 CHECK NEXT DEVICE
XMD7 UJN *+2 FIRST PASS
XMDB EQU XMD7
UJN XMD8 DROP PP ON SECOND PASS
SOM XMDB
LDC CMP8 CHANGE PATH THRU *CFR*
STM CFRA
UJN XMD4 LOOP THRU DEVICE STATE TABLE
XMD8 MONITOR DPPM DROP PP
LJM PPR EXIT TO PPR
MSG1 DATA C* "DN" - UNAUTHORIZED CALL.*
TITLE READ / WRITE PROCESSING.
PIO SPACE 4,10
** PIO - READ / WRITE PROCESSING.
PIO BSS 0
LDML PIOB,RW SETUP SEEK COMMAND
STML CPBF+OPC
LDD CN MERGE CONTROLLER + DRIVE NUMBERS
SHN 10
LMD DN SET FACILITY ADDRESS
STM CPBF+CUN
LDC P0931 COMMAND EXTENT PARAMETER
STM CPBF+FCP
LDN 0 UPPER SECTOR COUNT
STM CPBF+FCP+1
* SET UP COMMAND PARAMETERS.
* NOTE THAT PARAMETERS CPBF+FCP+2 - CPBF+FCP+4 HAVE ALREADY
* BEEN SET BY SUBROUTINE *IIO*.
LDC P0951 TRANSFER SIZE OVERRIDE PARAMETER
STM CPBF+FCP+5
LDC 40000 CHANGE BURST SIZE
STML CPBF+FCP+11
STML CPBF+FCP+7 CHANGE INTERRUPT SIZE
SHN 0-20
STM CPBF+FCP+10 SET LEADING DIGITS
STM CPBF+FCP+6
LDN 40D SEEK TIMEOUT = 40 SECONDS
STD TO
LDN IOPL+12 WRITE COMMAND BLOCK
RJM WCB
* WAIT UNTIL CONTROLLER RETURNS TRANSFER NOTIFICATION.
PIO1 LDD CB SET I/O IN PROGRESS
STM IPPS,DI
LDN XFNT PROCESS ATTENTION
RJM ATT
ZJN PIO2 IF EXPECTED STATUS
LCN EIOS
RJM ERR PROCESS ERROR
PIO2 LDN 1 SET CHANNEL ACTIVE FOR *CPD*
RJM SCD
LDM IPPS,DI RESTORE CURRENT BUFFER ORDINAL
PIO3 STD CB
LDDL T7 CHECK ENDING STATUS
LPN 0#30
NJN PIO1 IF PAUSE / TIME DEPENDENT OPERATION
* INITIATE DATA TRANSFER.
LDN DAIN DEFINE TRANSFER DIRECTION
SBD RW
ERRNZ DAOT+1-DAIN CODE DEPENDS ON VALUE
RJM BCS
LDML PIOD,RW SET DMA MODE
RJM FCN
RJM WTR WRITE *T* REGISTER
LDD CB
RJM SFR SEARCH FOR CONSECUTIVE REQUEST
* WAIT UNTIL ONE BURST DMA TRANSFER COMPLETE.
LDN 2 TIMEOUT = 2 SECONDS
RJM STO
RJM CTC CHECK TRANSFER COMPLETE
* LDN 0
STD T1 CLEAR RESIDUAL BYTE COUNT
LDD NB
ZJN PIO5 IF NO MORE CONSECUTIVE REQUESTS
LDN 0#A
PIO5 LMN 0#A CHECK ENDING STATUS
RJM GSS
RJM EIO ENTER BUFFER IN I/O REQUEST QUEUE
LDD NB
NJP PIO3 IF CONSECUTIVE REQUEST PRESENT
* COMPLETE READ / WRITE OPERATIONS.
* LDN 0 CLEAR CHANNEL ACTIVE FOR *CPD*
RJM SCD
LDN 40D TIMEOUT = 40 SECONDS
RJM STO
LDN CMSS WAIT ON INTERRUPT
RJM ATT
NJN PIO7 IF ERROR
LDDL MS
LMN CMCS
NJN PIO6 IF NOT CONDITIONAL SUCCESS
LDML RPBF+5
LPC 377
LMN ID19
NJN PIO7 IF RESPONSE NOT DUE TO MASTER TERMINATE
LDML RPBF
SBN 17
PJN PIO7 IF RESPONSE TOO LONG
LDML RPBF+7
SHN 21-10
PJN PIO7 IF NOT MASTER TERMINATE
PIO6 LJM CMP COMPLETE PROCESSING
PIO7 LCN EIOS
RJM ERR PROCESS ERROR
PIOB BSS 0 COMMAND CODES
CONL C1005
CONL C2005
PIOD BSS 0 DATA TRANSFER FUNCTIONS
CONL F0281
CONL F0381
TITLE LIST DEVICE ATTRIBUTE.
LDA SPACE 4,10
** LDA - LIST DEVICE ATTRIBUTE IN DAYFILE.
LDA BSS 0
LDC C0200 SETUP REPORT ATTRIBUTES COMMAND
STM CPBF+OPC
LDD CN MERGE CONTROLLER + UNIT NUMBERS
SHN 10
LMD DN SET FACILITY ADDRESS
STM CPBF+CUN
LDC P036C REQUEST ATTRIBUTE PARAMETER
STM CPBF+FCP
LDC 0#4050 RETURN ATTRIBUTE ID 50 IN RESPONSE
STML CPBF+FCP+1
LDN 2 TIMEOUT = 2 SECONDS
STD TO
LDN BCPL+4 WRITE COMMAND BLOCK
RJM WCB
* WAIT UNTIL CONTROLLER HAS RETURNED INTERRUPT.
LDN CMSS WAIT ON INTERRUPT
RJM ATT
ZJN LDA1 IF COMMAND COMPLETE
LCN ERDA
RJM ERR PROCESS ERROR
LDA1 LDD RW CHECK REQUEST INDEX
SBN LDIF-ECAF
ZJN LDA2 IF FOR DRIVE SERIAL NUMBER
* GENERATE MICROCODE REVISION ERRLOG MESSAGE.
LDD CN SET CONTROL MODULE NUMBER IN BML MESSAGE
STD NR+3
ADC 2RM0 CONVERT FOR ERRLOG MESSAGE
STM LDAB+6
LDC LDAB+4 LOCATION FOR REVISION LEVEL
STD T3
SBN LDAB+4-LDAA SET MESSAGE ADDRESS
STML MAD1
LDM RPBF+6+0#1B/2 CONVERT REVISION LEVEL
RJM CHD
RJM IDM ISSUE MESSAGE TO ERRLOG
* GENERATE MICROCODE REVISION BML MESSAGE.
LDD MA MOVE MICROCODE REVISION LEVEL
CWM LDAB,ON
SBN 1 COPY TO BML MESSAGE
CRD WB
LDD IR+4 SET CHANNEL NUMBER
STD NR+2
LDN HI0104-HI0100
LJM LDA4 COMPLETE BML MESSAGE
* GENERATE PACK SERIAL NUMBER ERRLOG MESSAGE.
LDA2 LDN 0
STD T2
LDC LDAE+2 SET ADDRESS FOR CONVERSION
STD T3
SBN -LDAD+LDAE+2 DEFINE MESSAGE ADDRESS
STML MAD1
* CONVERT RIGHTMOST 6 DIGITS OF 8 DIGIT PACK SERIAL NUMBER.
LDA3 LDML RPBF+FCP+1+0#1E,T2
SHN -10
ZJN LDA3.1 IF SERIAL NUMBER NOT PRESENT
SBN 60 CONVERT ASCII TO DISPLAY CODE
LDA3.1 ADN 1R0
SHN 6
STD T0 UPPER CHARACTER OF WORD
LDML RPBF+FCP+1+0#1E,T2
LPN 77
ZJN LDA3.2 IF SERIAL NUMBER NOT PRESENT
SBN 60 CONVERT ASCII TO DISPLAY CODE
LDA3.2 ADN 1R0
LMD T0
STI T3 LOWER CHARACTER OF WORD
AOD T2
AOD T3
LMC LDAE+2+3
NJN LDA3 IF MORE CHARACTERS TO CONVERT
LDM PNUN,DI
LPN 77 PUT UNIT NUMBER IN BML MESSAGE
STD NR+3
RJM C2D CONVERT FOR ERRLOG MESSAGE
STM LDAD+11
LDD EO CONVERT EST ORDINAL
SHN -3
RJM C2D
STM LDAD+6 INSERT IN ERRLOG MESSAGE
LDD EO
LPN 7 CONVERT LOWER DIGIT
SHN 6
ADC 2R0, ADD TO ERRLOG MESSAGE
STM LDAD+7
RJM IDM ISSUE MESSAGE TO ERRLOG
* GENERATE PACK SERIAL NUMBER BML MESSAGE.
LDD MA MOVE DRIVE SERIAL NUMBER
CWM LDAE,ON
SBN 1 COPY TO BML MESSAGE
CRD WB
LDD EO INSERT EST ORDINAL
STD WB
LDC 2R"DM" SET DEVICE MNEMONIC
STD NR+2
LDN 0 CLEAR UNUSED FIELD
STD WB+1
LDA4 ADD HN INSERT SYMPTOM CODE
ERRNZ HI0100-100 CODE DEPENDS ON VALUE
STD NR+1
LDC DM0401 DEFINE MESSAGE ID
STD NR
LDN ZERL CLEAR HEADER WORD
CRD CM
LDN 3 WORD COUNT OF MESSAGE
STD CM+3
ADK MLDY-3 DIRECT MESSAGE TO BML
STD CM+4
LDC SBUF SET MESSAGE ADDRESS
STML MAD1
LDD MA MOVE MESSAGE DATA
CWM CM,TR
ERRNZ CM+5-NR CODE DEPENDS ON VALUE
SBN 3
ERRNZ NR+5-WB CODE DEPENDS ON VALUE
CRM SBUF,TR
ERRNG SBUFL-3*5 CODE DEPENDS ON VALUE
LDN 0
STD RW ISSUE BML MESSAGE
RJM IDM
LJM CSR CLEAR SPECIAL REQUEST FLAG
LDAA CON 0,0,0,4,ELDY MICROCODE REVSION ERRLOG MESSAGE
DATA 4HCH**
LDAB DATA 10H MH426-D**
DATA C+,CM0.+
LDAD CON 0,0,0,4,ELDY PACK SERIAL NUMBER ERRLOG MESSAGE
DATA 10H"DM"***, U**
LDAE DATA C+,PS=******.+
TITLE DIAGNOSTIC PROCESSING.
RND SPACE 4,10
** RND - RUN DIAGNOSTICS.
RND SUBR ENTRY/EXIT
LDM ENAD,DI
NJN RNDX IF DRIVE DISABLED (SLAVE RESET FAILURE)
LDC C8100 SETUP DRIVE DIAGNOSTIC COMMAND
STML CPBF+OPC
LDD CN MERGE CONTROLLER + DRIVE NUMBERS
SHN 10
LMD DN SET FACILITY ADDRESS
STM CPBF+CUN
LDN 60D TIMEOUT VALUE = 1 MINUTE
STD TO
LDN BCPL WRITE COMMAND BLOCK
RJM WCB
LDML IPPS,DI FLAG DIAGNOSTICS INITIATED
LPC -1S15
LMC 1S15
STML IPPS,DI
* WAIT UNTIL CONTROLLER HAS RETURNED INTERRUPT.
LDN CMSS PROCESS ATTENTION
RJM ATT
ZJN RND1 IF DIAGNOSTICS COMPLETED SUCCESSFULLY
LDN 0 CLEAR ERROR STEP ADDRESS
STM ESAD,DI
LCN EDTF
RJM ERR PROCESS ERROR
RND1 LDML IPPS,DI CLEAR DIAGNOSTICS FLAG
LPC -1S15
STML IPPS,DI
UJP RNDX RETURN
TITLE SELECTIVE RESET PROCESSING.
SRS SPACE 4,20
** SRS - SELECTIVE RESET PROCESSING.
*
* ENTRY (A) = 6/FLAG,12/RADD.
* (FLAG) = 0 FOR SLAVE RESET.
* (FLAG) = 1 FOR LOGICAL RESET.
* (RADD) = RETURN ADDRESS.
* (CN) = CONTROLLER NUMBER.
* (ADDR,DI) = 0 FOR ALL DRIVES ON CONTROL MODULE.
*
* EXIT TO *ERR* IF ERROR.
* TO *CMP9* FOR NON-CONTROLLING DRIVES ON SLAVE RESET.
*
* USES PA, RF, RW, T1, T5.
*
* CALLS ATT, C2D, IOM, LND, RIF, SCA, SRP, STO, XMD.
SRS BSS 0 ENTRY
STM ERAD,DI SET RETURN ADDRESS
SHN -14
STD RW SAVE RESET OPTION
STM RWST,DI
SRS2 LDC 0 CHECK RESET ACTIVITY
SRSA EQU *-1
ZJN SRS4 IF NONE IN PROGRESS
SRS3 RJM XMD RETURN TO MAIN LOOP
UJN SRS2 CHECK RESET IN PROGRESS
SRS4 LDD DI
STM SRSA SET LOCAL RESET IN PROGRESS
LDN 0
SRS5 RJM LND LOCATE NEXT DRIVE
ZJN SRS7 IF NO MORE DRIVES ON CONTROLLER
LDM SRSE,RW
STM ADDR,T7 SET DRIVE PROCESSING ADDRESS
STM SRSC
LDN 1
UJN SRS5 CHECK FOR NEXT DRIVE
SRS7 LDM PNUN,DI
SHN -6 CONTROLLER BLOCK INDEX
STD T5
LDD RW
LMN 1
SHN 17-0 BIT 15 SET IF SLAVE RESET
STDL T1
LDML CSTB,T5 SET / CLEAR SLAVE RESET IN PROGRESS FLAG
LPC -1S15
LMDL T1
STML CSTB,T5
RJM RIF RESET SLAVE / LOGICAL INTERFACE
LDN 60D RESET TIMEOUT = 1 MINUTE
RJM STO
LDD CN CONVERT CONTROL MODULE NUMBER
RJM C2D
SHN 6 INSERT IN MESSAGE
LMN 1R
STM SRSH+1 INSERT IN FAILURE MESSAGE
STM SRSG+1
LDD RW
NJN SRS7.1 IF LOGICAL RESET
LDC SRSG ACTIVATE OPERATOR MESSAGE
STM IOMA
LCN 1
RJM IOM
SRS7.1 LDN ASRT WAIT ON ASYNC INTERRUPT
RJM ATT
NJN SRS8 IF ERROR
* SEARCH RESPONSE PACKET FOR MACHINE EXCEPTION PARAMETER.
LDN ID16 LOOK FOR MACHINE EXCEPTION
RJM SRP
MJN SRS8 IF PARAMETER NOT FOUND
LDML RPBF+6,T3
LPC 0#FEE0 CHECK OPERATIONAL + READY TRANSITION
LMC 0#6000
ZJN SRS9 IF CONTROLLER RESET SUCCESSFUL
SRS8 LCN ESRE
RJM ERR PROCESS ERROR
SRS9 RJM SCA SET CONTROLLER ATTRIBUTES
* LDN 0 CLEAR RESET INTERLOCK
STM SRSA
STD RF CLEAR RESET IN PROGRESS FLAG
RJM IOM CLEAR OPERATOR MESSAGE
LDM PNUN,DI
SHN -6 CONTROLLER BLOCK INDEX
STD T5
LDML CSTB,T5 ENABLE CONTROLLER ACTIVITY
LPC -1S14-1S15
STML CSTB,T5
* SLAVE RESET - WAIT FOR ASYNC INTERRUPT ON CONTROLLING UNIT.
* IF THE DRIVE INTERRUPT FOR THE CONTROLLING UNIT IS RECEIVED
* BEFORE THE CONTROLLER INTERRUPT, *IHD* WILL CLEAR *SRSC*
* AND THROW AWAY THE INTERRUPT.
SRS10 LDC 0 CHECK RESET COMPLETION
* LDC (NONZERO) (SLAVE RESET - MAY BE CLEARED BY *IHD*)
SRSC EQU *-1
ZJN SRS11 IF CONTROLLING DRIVE COMPLETE
LDC 7*60D TIMEOUT = 7 MINUTES
RJM STO
LDN ASRT WAIT ON ASYNC INTERRUPT
RJM ATT (RETURN TO *SRS11* IF INTERRUPT TIMEOUT)
* COMPLETE RESET PROCESSING.
SRS11 LDN 0 REENABLE ACCESS TO CONTROLLING DEVICE
STM ADDR,DI
STM ATTN,DI
RJM IOM CLEAR OPERATOR MESSAGE
LDM ERAD,DI
STD PA
LJM 0,PA RETURN TO CALLER
* SLAVE RESET - WAIT FOR ASYNC INTERRUPTS ON OTHER UNITS.
* ENTRY TO THIS CODE IS FORCED BY CODE AT *SRS5*.
* IF A DRIVE INTERRUPT FOR A NONCONTROLLING UNIT IS RECEIVED
* BEFORE ENTRY AT *SRS12*, *VIS* WILL CLEAR *ADDR* FOR THE
* DRIVE AND THROW AWAY THE INTERRUPT.
SRS12 LDC 8D*60D TIMEOUT = 8 MINUTES
RJM STO
LDN ASRT WAIT FOR ASYNC INTERRUPT
RJM ATT (RETURN TO *SRS13* IF INTERRUPT TIMEOUT)
SRS13 LDN 0
RJM IOM CLEAR OPERATOR MESSAGE
LJM CMP9 REENABLE ACCESS TO DRIVE
SRSE BSS 0 DRIVE PROCESSING ADDRESSES
CON SRS12 SLAVE RESET
CON 0 LOGICAL RESET
SRSG DATA C*CM3 BEING RESET ON CCHNN.*
SRSH DATA C*CM3 RESET FAILURE ON CCHNN.*
TITLE INTERRUPT DRIVEN SUBROUTINES.
BOR SPACE 4,20
** BOR - BREAK OPPOSITE RESERVE.
*
* EXECUTE A DRIVE RESET FOR THE SPECIFIED DRIVE. THIS IS DONE
* FOR EACH DRIVE AT DRIVER INITIALIZATION TIME TO BREAK ANY
* DRIVE RESERVES WHICH MAY BE HELD BY THE OPPOSITE ACCESS.
* ALSO CLEAR CONTROLLER OVER TEMPERATURE STATUS IN MST WORD
* *BDLL*.
*
* ENTRY (CN) = CONTROLLER NUMBER.
* (DN) = DRIVE NUMBER.
*
* EXIT TO *CMP*.
*
* USES CM+2, T7.
*
* CALLS EDR, UBP.
BOR BSS 0 ENTRY
LDN 0 CLEAR CONTROLLER OVER TEMPERATURE FLAG
STD CM+2
LDC 63*100 LOW ORDER BIT TO CHANGE TIMES 100
STD T7
LDC BDLL*100+1 6/WORD, 6/BITS TO CHANGE
RJM UBP UPDATE *BDLL* PARAMETER
RJM EDR EXECUTE DRIVE RESET
LDML IPPS,DI CLEAR *BREAK OPPOSITE RESERVE* FLAG
LPC -1S13
STML IPPS,DI
LJM CMP COMPLETE REQUEST
EDR SPACE 4,15
** EDR - EXECUTE DRIVE (POWER ON) RESET.
*
* ENTRY (CN) = CONTROLLER NUMBER.
* (DN) = DRIVE NUMBER.
*
* EXIT (A) = 0 IF COMMAND COMPLETED.
* TO CALLER VIA *RTC*.
*
* ERROR TO *ERR* IF NOT COMMAND COMPLETED.
*
* USES TO.
*
* CALLS ATT, WCB.
EDR CON 0
LDM EDR SET RETURN ADDRESS
STM RADD,DI
LDC C0800 SETUP ABORT COMMAND
STM CPBF+OPC
LDD CN CONTROLLER NUMBER
SHN 10
LMD DN APPEND FACILITY ADDRESS
STM CPBF+CUN
LDC P0254 PARAMETER ID = DRIVE RESET
STM CPBF+FCP
LDC 0#400 SELECT POWER ON RESET
STM CPBF+FCP+1
LDN 30D TIMEOUT = 30 SECONDS
STD TO
LDN BCPL+3 WRITE COMMAND BLOCK
RJM WCB
LDN CMSS WAIT ON INTERRUPT
RJM ATT
ZJP RTC IF COMMAND COMPLETE
LCN EDRS
RJM ERR PROCESS ERROR
GDS SPACE 4,15
** GDS - GET DRIVE STATUS.
*
* ENTRY (CN) = CONTROLLER NUMBER.
* (DN) = DRIVE NUMBER.
*
* EXIT (A) = DRIVE CONDITION FLAGS.
* TO CALLER VIA *RTC*.
*
* ERROR TO *ERR* IF COMMAND COMPLETE NOT RECEIVED.
*
* USES TO.
*
* CALLS ATT, WCB.
GDS CON 0
LDM GDS SET RETURN ADDRESS
STM RADD,DI
LDC C0301 SETUP REPORT STATUS COMMAND
STML CPBF+OPC
LDD CN CONTROLLER NUMBER
SHN 10
LMD DN FORM FACILITY ADDRESS
STM CPBF+CUN
LDN 2 TIMEOUT = 2 SECONDS
STD TO
LDN BCPL WRITE COMMAND BLOCK
RJM WCB
LDN CMSS WAIT ON INTERRUPT
RJM ATT
ZJN GDS2 IF COMMAND COMPLETE
LCN ERDS
RJM ERR PROCESS ERROR
GDS2 LDML RPBF+6 RETURN DRIVE CONDITION TO CALLER
* LJM RTC
RTC SPACE 4,10
** RTC - RETURN TO CALLER.
*
* USES PA.
RTC STD T0 SAVE 12 BITS OF *A* REGISTER
LMD T0
LMM RADD,DI SET RETURN ADDRESS
STD PA
LMD PA RESTORE *A* REGISTER
LMD T0
LJM 0,PA RETURN TO CALLER
SCA SPACE 4,15
** SCA - SET CONTROLLER ATTRIBUTES.
*
* ENTRY (CN) = CONTROLLER NUMBER.
*
* EXIT (A) = 0 IF COMMAND COMPLETED.
* TO CALLER VIA *RTC*.
*
* ERROR TO *ERR* IF NOT COMMAND COMPLETED.
*
* USES TO.
*
* CALLS ATT, WCB.
SCA CON 0
LDM SCA SET RETURN ADDRESS
STM RADD,DI
LDC C0209 SETUP LOAD ATTRIBUTES COMMAND
STM CPBF+OPC
LDD CN CONTROLLER NUMBER
SHN 10
LMC 0#FF APPEND FACILITY ADDRESS
STM CPBF+CUN
LDC P01D1 DISABLE PERFORMANCE LOG
STM CPBF+FCP
ADK P02D2-P01D1 ENABLE MASTER TERMINATE
STM CPBF+FCP+1
ADK P02D3-P02D2 DISABLE EXTENT RESPONSE
STM CPBF+FCP+3
LDC 0#100 SET PARAMETERS
STM CPBF+FCP+2
STM CPBF+FCP+4
LDN 2 TIMEOUT = 2 SECONDS
STD TO
LDN BCPL+11 WRITE COMMAND BLOCK
RJM WCB
LDN CMSS WAIT ON INTERRUPT
RJM ATT
ZJP RTC IF COMMAND COMPLETE
LCN ELCA
RJM ERR PROCESS ERROR
SDA SPACE 4,20
** SDA - SET DRIVE ATTRIBUTES.
*
* SET THE FACILITY BUSY TIMEOUT FOR THE SPECIFIED DRIVE TO
* 15 SECONDS. THIS IS DONE TO PREVENT ERRORS WHEN ANOTHER
* CONTROL MODULE ACCESSES A DRIVE TO PERFORM SWEEP CYCLING,
* OR WHEN A DRIVE IS TIED UP RUNNING DIAGNOSTICS AFTER A
* SLAVE RESET FROM THE OTHER ACCESS.
*
* ENTRY (CN) = CONTROLLER NUMBER.
* (DN) = DRIVE NUMBER.
*
* EXIT TO *CMP* IF COMMAND COMPLETED.
*
* ERROR TO *ERR* IF ERROR.
*
* USES TO.
*
* CALLS ATT, WCB.
SDA BSS 0 ENTRY
* REPORT DEVICE ATTRIBUTES.
LDC C0200 SETUP REPORT ATTRIBUTES COMMAND
STML CPBF+OPC
LDD CN SET FACILITY ADDRESS
SHN 10
LMD DN
STM CPBF+CUN
LDC P036C REQUEST ATTRIBUTE PARAMETER
STML CPBF+FCP
LDC 0#406F REQUEST ATTRIBUTE 6F
STML CPBF+FCP+1
LDN 40D TIMEOUT = 40 SECONDS
STD TO
LDN BCPL+4 WRITE COMMAND BLOCK
RJM WCB
LDN CMSS WAIT FOR INTERRUPT
RJM ATT
NJP SDA2 IF ERROR
* SET FACILITY BUSY TIMEOUT TO 15 SECONDS.
LDML RPBF+25 CHECK CURRENT TIMEOUT VALUE
LMC 0#E4
NJN SDA1 IF TIMEOUT VALUE NOT CORRECT
LDML RPBF+26
LMC 0#E1C0
ZJP SDA4 IF TIMEOUT VALUE ALREADY CORRECT
SDA1 LDC 0#E4 SET TIMEOUT VALUE TO 15 SECONDS
STML RPBF+25
LDC 0#E1C0
STML RPBF+26
* LOAD DEVICE ATTRIBUTES.
LDC C0209 SETUP LOAD ATTRIBUTES COMMAND
STML CPBF+OPC
LDD CN SET FACILITY ADDRESS
SHN 10
LMD DN
STM CPBF+CUN
LDN 40D TIMEOUT = 40 SECONDS
STD TO
LDN BCPL+50 WRITE COMMAND BLOCK
RJM WCB
LDN CMSS WAIT FOR INTERRUPT
RJM ATT
ZJN SDA3 IF COMMAND COMPLETE
SDA2 LCN ERDA
RJM ERR PROCESS ERROR
* SAVE NEW ATTRIBUTES IN EEPROM.
SDA3 LDC C020A SETUP SAVE ATTRIBUTES COMMAND
STML CPBF+OPC
LDD CN SET FACILITY ADDRESS
SHN 10
LMC 0#FF
STM CPBF+CUN
LDN 40D TIMEOUT = 40 SECONDS
STD TO
LDN BCPL WRITE COMMAND BLOCK
RJM WCB
LDN CMSS WAIT FOR INTERRUPT
RJM ATT
NJN SDA2 IF ERROR
SDA4 LDML IPPS,DI CLEAR *SET DRIVE ATTRIBUTES* FLAG
LPC -1S14
STML IPPS,DI
LJM CMP COMPLETE REQUEST
TITLE SUBROUTINES.
ACE SPACE 4,10
** ACE - ANALYZE CHANNEL ERROR.
*
* ENTRY (RBUF) = CHANNEL STATUS REGISTER.
*
* EXIT (A) = 0 IF NO CHANNEL ERROR.
* = CHANNEL ERROR FAULT CODE.
ACE3 LDN ECCM SET CHANNEL DETECTED CM ERROR
ACE SUBR ENTRY/EXIT
LDM RBUF+5
LPN 2
ZJN ACEX IF NO CHANNEL ERROR
LDM RBUF
LPN 76
NJN ACE3 IF ERROR IN MEMORY
LDM RBUF+1
SHN -5
ZJN ACE2 IF NOT PARITY / IPI CHANNEL ERROR
LPN 2
ZJN ACE1 IF NOT PARITY ERROR
LDN ECPE&ECIE
ACE1 LMN ECIE&ECER FAULT ANALYSIS CODE
ACE2 LMN ECER
UJN ACEX RETURN
AME SPACE 4,10
** AME - ATTEMPT MONITOR EXCHANGE.
*
* EXIT (A) = 0.
*
* USES CW - CW+4.
*
* MACROS EXPE.
AME SUBR ENTRY/EXIT
EXPE *
AME1 LDC 6 CHECK FOR (MA) NON-ZERO
CRD CW
LDD CW+1
ADD CW
NJN AME1 IF EXCHANGE PACKAGE NOT READY
EXPE *
AME2 LDC 0 SET (B0) NON-ZERO
CWM AMEA,ON
SBN 1 EXCHANGE MONITOR
MXN 0
CRD CW
LDD CW+4
ZJN AMEX IF EXCHANGE TAKEN
LDN 28D
SBN 1
NJN *-1 IF NOT 20 MICROSECONDS ELAPSED
UJN AME2 RETRY EXCHANGE
AMEA VFD 24/0 (P)
VFD 18/0 (A0)
VFD 18/0 (B0)
ATT SPACE 4,10
** ATT - PROCESS ATTENTION.
*
* ENTRY (A) = EXPECTED STATUS RESPONSE TYPE.
* (DI) = DEVICE STATUS BLOCK ADDRESS.
*
* EXIT VIA ROUTINE *ECI*.
*
* ERROR TO *ERR* IF INTERRUPT TIMEOUT.
* TO *SRS11* IF TIMEOUT OF SLAVE RESET INTERRUPT FOR
* CONTROLLING DRIVE.
* TO *SRS13* IF TIMEOUT OF SLAVE RESET INTERRUPT FOR
* NON-CONTROLLING DRIVE.
*
* USES T5.
*
* CALLS CTO, IOM, XMD.
ATT CON 0 ENTRY
STM EEST,DI
LDM ATT SAVE RETURN ADDRESS
STM ATTN,DI
ATT1 RJM XMD RETURN TO MAIN LOOP
ATT2 RJM CTO CHECK FOR TIMEOUT
PJP ATT5 IF TIMEOUT
LDM PNUN,DI CHECK FOR SLAVE RESET
SHN -6
STD T5
LDML CSTB,T5
SHN 21-17
PJN ATT2.1 IF NO SLAVE RESET IN PROGRESS
LDC SRSG *CM3 BEING RESET ON CCHNN.*
STM IOMA
LCN 1
UJN ATT4 ISSUE OPERATOR MESSAGE
ATT2.1 LDM ATTN,DI CHECK INTERRUPT RETURN ADDRESS
LMC SRS13
ZJN ATT3 IF WAITING FOR ASYNCH AFTER RESET
LMC SRS11&SRS13
ZJN ATT3 IF WAITING FOR ASYNCH AFTER RESET
UJN ATT1 RETURN TO MAIN LOOP
ATT3 LDC SPDA SPIN UP PENDING MESSAGE
ATT4 RJM IOM ISSUE OPERATOR MESSAGE
UJP ATT1 RETURN TO MAIN LOOP
ATT5 LDM ATTN,DI
LMC SRS13
ZJP SRS13 IF WAITING FOR SLAVE RESET INTERRUPT
LMC SRS11&SRS13
ZJP SRS11 IF WAITING FOR SLAVE RESET INTERRUPT
LDN 0 CLEAR INTERRUPT AND REENTRY ADDRESSES
STM ATTN,DI
STM ADDR,DI
LDN ETIT
RJM ERR PROCESS ERROR
SPDA DATA C* EQ000, SPIN UP PENDING.*
CCO SPACE 4,20
** CCO - CHECK FOR CONTROLLER OVER TEMPERATURE.
*
* THIS ROUTINE SEARCHES THE RESPONSE PACKET FOR STATUS
* INDICATING AN OVER TEMPERATURE CONDITION. IF THERE IS
* AN OVER TEMPERATURE CONDITION, AN ERROR IS OPTIONALLY
* LOGGED TO THE BML, A BIT INDICATING OVER TEMPERATURE IS
* SET IN *BDLL*, AND AN OPERATOR ACTION MESSAGE IS GENERATED.
*
* ENTRY (A) = 0 IF BML MESSAGE SHOULD NOT BE ISSUED.
*
* USES CM+1 - CM+4, T7.
*
* CALLS IDM, SRP, UBP.
*
* MACROS MONITOR.
CCO SUBR ENTRY/EXIT
STD T7
LDN ID16
RJM SRP SEARCH RESPONSE PACKET
MJN CCOX IF PARAMETER 16 NOT FOUND
LDML RPBF+6,T3
SHN 21-11
PJN CCOX IF NOT CONTROLLER OVER TEMPERATURE
LDM EDBF+FALT
STM CCOA SAVE VALUES FROM CURRENT MESSAGE
LDM EDBF+FCS2
STM CCOA+1
LDM MSGL+1
STM CCOA+2
LDN ECOT
STM EDBF+FALT FINAL FAULT CODE
LDD T7
ZJN CCO1 IF NOT ISSUING MESSAGE TO BML
* HPA DOES NOT DISPLAY THE DATA WITH SYMPTOM 0111 WHEN THE
* ERROR IS RECOVERABLE, SO TWO MESSAGES ARE ISSUED TO THE BML.
LCN 0
STM EDBF+FCS2 SET NO STATUS FOR *HPA*
LDN 5
STM MSGL+1 MESSAGE LENGTH
LDD HN
ERRNZ HD0100-100 CODE DEPENDS ON VALUE
RJM IDM ISSUE INITIAL BML MESSAGE
LDN 3
STM MSGL+1 MESSAGE LENGTH
LDC HD0111
RJM IDM ISSUE FINAL BML MESSAGE
LDM CCOA
STM EDBF+FALT RESTORE VALUES IN MESSAGE
LDM CCOA+1
STM EDBF+FCS2
LDM CCOA+2
STM MSGL+1
* SET OVER TEMPERATURE BIT IN *BDLL*.
CCO1 LDN 1 NEW VALUE
STD CM+2
LDC 63*100 LOW ORDER BIT TO CHANGE TIMES 100
STD T7
LDC BDLL*100+1 6/WORD, 6/BITS TO CHANGE
RJM UBP UPDATE *BDLL* PARAMETER
LDN EEVS
STD CM+1 ENTER EVENT
LDN 0
STD CM+3
LDN CEDE *CHECK E,E DISPLAY* EVENT
STD CM+4
MONITOR EATM
UJP CCOX RETURN
CCOA BSS 3 SAVE AREA FOR VALUES FROM CURRENT MESSAGE
CCR SPACE 4,15
** CCR - CHECK FOR CHANNEL REQUEST.
*
* ENTRY (UC) = UNIT ACTIVITY COUNT.
* (IR+4) = CHANNEL NUMBER.
*
* EXIT (A) = 0 IF CHANNEL DOWN.
*
* USES CM - CM+4.
*
* CALLS DCR, RCT, SRF.
*
* MACROS DELAY, MONITOR.
CCR3 RJM SRF SET DRIVER RELOAD FLAG
CCR4 LDD CR
CCR SUBR PRS3 ENTRY/EXIT
RJM RCT READ CHANNEL TABLE
SHN 21-5
MJN CCR3 IF CHANNEL GLOBALLY DOWN
LPN 40
ZJN CCR4 IF CHANNEL NOT REQUESTED
STM CHRQ DISABLE NEW ACTIVITY
LDD UC
NJN CCRX IF CURRENT ACTIVITY
RJM DCR DROP CHANNEL RESERVATION
* LDN 0
STM CHRQ ENABLE NEW ACTIVITY
CCR1 LDD CR
NJN CCRX IF CHANNEL RESERVED
* ENTERED HERE FROM *PRS*.
CCR2 DELAY WAIT AWHILE
LDD IR+4
STD CM+1 ATTEMPT TO RESERVE CHANNEL
MONITOR CCHM
LDD CM+2 SET RESERVATION STATUS
STD CR
RJM RCT READ CHANNEL TABLE
LPN 40
ZJN CCR1 IF CHANNEL NOT DOWN
LJM CCR3 SET DRIVER RELOAD FLAG
CDA SPACE 4,10
** CDA - CONVERT PHYSICAL TO LOGICAL DISK ADDRESS.
*
* ENTRY (T4) = CYLINDER NUMBER.
* (T5) = PHYSICAL TRACK + SECTOR.
*
* EXIT (T6) = LOGICAL TRACK.
* (T7) = LOGICAL SECTOR.
*
* USES T3, T4, T5.
* MULTIPLY THE CYLINDER VALUE BY THE NUMBER OF LOGICAL
* SECTORS PER CYLINDER.
CDA2 LDK LSCY
RAD T7 ADVANCE LOGICAL SECTOR COUNT
SHN -14
RAD T3
CDA3 SOD T4
PJN CDA2 IF NOT END OF CONVERSION
* DIVIDE THE ACCUMULATED LOGICAL SECTOR COUNT BY THE
* SUM OF (LOGICAL + GAP) SECTORS PER LOGICAL TRACK.
CDA4 AOD T6 ADVANCE LOGICAL TRACK NUMBER
LDK -LSLT
RAD T7
PJN CDA4 IF NO UNDERFLOW
AOD T7
SOD T3
PJN CDA4 IF DIVISION INCOMPLETE
CDA SUBR ENTRY/EXIT
LDD T5
SHN 14 EXTRACT PHYSICAL TRACK
STD T5
SHN CFLP-14 CONVERT PHYSICAL TO LOGICAL SECTOR
STD T7
LDN 0 CLEAR SECTOR COUNT ACCUMULATOR
STD T3
LDC 4000-1 INITIALIZE LOGICAL TRACK CALCULATION
STD T6
* MULTIPLY THE TRACK VALUE BY THE NUMBER OF LOGICAL
* SECTORS PER PHYSICAL TRACK.
CDA1 SOD T5
MJN CDA3 IF END OF CONVERSION
LDK LSPT
RAD T7 ADVANCE LOGICAL SECTOR COUNT
SHN -14
RAD T3
UJN CDA1 LOOP ON CONVERSION
CEA SPACE 4,15
** CEA - CLEAR *ENABLE CONTROLLER ACTIVITY* REQUEST.
*
* ENTRY (EO) = EST ORDINAL FOR DEVICE.
* (IR+4) = CHANNEL NUMBER.
*
* EXIT CHANNEL ENABLE BIT CLEARED IN *MST* WORD *BDLL*.
* SPECIAL REQUEST BIT CLEARED IF BOTH CHANNELS ENABLED.
*
* USES CM - CM+4, T1 - T1+4, T7.
*
* CALLS CPF, UBP.
*
* MACROS SFA.
CEA SUBR ENTRY/EXIT
SFA EST,EO
ADK EQDE
CRD T1 READ *EQDE* WORD
LDD T1+1
LMD IR+4
LPN 77
ZJN CEA1 IF THIS IS THE FIRST CHANNEL
LDN 1
CEA1 ADN 49D
SHN 6 LOW ORDER BIT TO CHANGE TIMES 100
STD T7
LDN 0 NEW VALUE
STD CM+2
LDC BDLL*100+1 6/WORD, 6/BITS TO CHANGE
RJM UBP CLEAR ENABLE CHANNEL BIT IN *BDLL*
LDD T1+4
SHN 3
ADN BDLL
CRD CM
LDD CM
LPN 6
NJN CEAX IF OTHER CHANNEL STILL NOT ENABLED
LDN ECAF CLEAR SPECIAL REQUEST IN *PUT*
RJM CPF
UJN CEAX RETURN
CFR SPACE 4,10
** CFR - CHECK *PUT* FOR REQUEST.
*
* ENTRY (DI) = DEVICE STATUS BLOCK ADDRESS.
*
* ERROR TO *ERR*.
*
* USES CM+3.
*
* CALLS CMP8, ECI, IDU, IIO, ISR.
CFR5 LDD CB INITIATE I/O
RJM IIO
ZJN CFRX IF I/O NOT ENABLED ON THIS ACCESS
RJM IDU INTERLOCK DISK UNIT
NJN CFRX IF INTERLOCK NOT AVAILABLE
LDM ENAD,DI
ZJN CFR6 IF CONTROLLER FUNCTIONAL
LDN ECMD
RJM ERR PROCESS ERROR
* EXIT TO PROCESSOR AS APPLICABLE WITH -
* (PO) = *PUT* ORDINAL.
* (CB) = *CBT* ORDINAL.
* (EO) = EST ORDINAL.
* (RW) = READ / WRITE FLAG.
* (CN) = CONTROLLER NUMBER.
* (DN) = DRIVE NUMBER.
* (WB - WB+4) = *UNCT* WORD OF *PUT* ENTRY.
CFR6 LJM 0,PA EXIT TO PROCESSOR
CFR SUBR ENTRY/EXIT
RJM ECI EXAMINE CONTROLLER INTERRUPTS
* RJM CMP8 (TERMINATION PROCESSING)
CFRA EQU *-1
NJN CFRX IF RESET OR ERROR IN PROGRESS
LDML IPPS,DI CHECK FOR INTERNAL SPECIAL REQUESTS
SHN 6-15
LPC 300
ZJN CFR1 IF ALL INTERNAL SPECIAL REQUESTS PROCESSED
STD CM+3 SET INTERNAL SPECIAL REQUESTS
CFR1 LDD CM+3 CHECK FOR SPECIAL REQUEST
NJN CFR2 IF SPECIAL REQUEST PRESENT
ADD WB+3
ZJN CFRX IF NO I/O REQUEST
CFR2 LDD CM+4
ZJN CFR3 IF UNIT NOT INTERLOCKED
LMD OA
NJN CFRX IF UNIT INTERLOCKED BY OTHER DRIVER
CFR3 LDD CM+3 CHECK FOR SPECIAL REQUEST
ZJP CFR5 IF NO SPECIAL REQUEST
RJM ISR IDENTIFY AND PROCESS SPECIAL REQUEST
UJP CFR1 CHECK FOR ANOTHER REQUEST
CMC SPACE 4,10
** CMC - CHECK MONITOR COMPLETE.
*
* EXIT (A) = (CW) = 0.
*
* USES CW - CW+4.
*
* CALLS AME.
*
* MACROS DELAY.
CMC SUBR ENTRY/EXIT
CMC1 LDD OA
CRD CW
LDD CW
ZJN CMCX IF NO REQUEST WAITING FOR RESPONSE
SHN 21-13
PJN CMC2 IF NOT TO RETRY REQUEST
SHN 13-21
LPC 177 CLEAR FLAGS
STD CW
LDD OA UPDATE OUTPUT REGISTER
CWD CW
RJM AME REISSUE REQUEST
CMC2 DELAY
UJN CMC1 RECHECK OUTPUT REGISTER
CMP SPACE 4,15
** CMP - COMPLETE PROCESSING.
*
* ENTRY (SF) = DEVICE SELECTED STATUS.
* (UC) = UNIT ACTIVITY COUNT.
* (RW) = READ / WRITE STATUS.
*
* EXIT TO *XMD2*.
* (UC) = UNIT ACTIVITY COUNT DECREMENTED.
*
* USES UC, WB+3, WB+4.
*
* CALLS CMC, DCM, IDM, IMR.
CMP LDM ERCT,DI
ZJN CMP4 IF NO ERRORS
LDN 3
STM MSGL+1 SET BASIC MESSAGE LENGTH
CMP1 AOM ERCT,DI
LDC HD0111 ISSUE FINAL BML MESSAGE
RJM IDM
CMP2 LDN 0 FORCE CLEAR OF ERROR COUNT / ERROR FLAG
STM CMPA
CMP4 RJM DCM DESELECT CONTROLLER
* INCLUDE *PROBE* DATA IN FINAL *BIOM* REQUEST.
LDD RW SET DATA TRANSFER DIRECTION
SHN 13-0
LMM CBCT,DI APPEND CUMULATIVE BUFFER COUNT
STD WB+4
LDM RQLN,DI
CMP5 ZJN CMP6 IF UNIT NOT INTERLOCKED
STD WB+3
LDN DCBS DELINK BUFFERS / RELEASE UNIT INTERLOCK
RJM IMR
RJM CMC CHECK FOR MONITOR COMPLETE
* LDN 0 CLEAR UNIT INTERLOCKED
STM RQLN,DI
SOD UC ADJUST UNIT ACTIVITY COUNT
CMP6 LDC 1
CMPA EQU *-1
NJN CMP7 IF ERCT/ERFL SHOULD NOT BE CLEARED
STM ERCT,DI CLEAR ERROR COUNT
AOM CMPA
LDM ERFL CHECK ERROR PROCESSING
LMD DI
NJN CMP7 IF NOT ON THIS UNIT
STM ERFL
CMP7 RJM CMC CHECK FOR MONITOR COMPLETE
* LDN 0
STM ADDR,DI CLEAR REQUEST IN PROGRESS
STM ATTN,DI
STM SREQ,DI
STM CBCT,DI
STM ESAD,DI ENABLE NEXT PASS THROUGH ERROR PROCESSOR
LDML IPPS,DI CLEAR I/O IN PROGRESS
LPC 170000
STML IPPS,DI
LJM XMD2 RETURN
* TERMINATION PROCESSING.
CMP8 CON 0
CMP9 LDN 0 CLEAR *PROBE* DATA
STD WB+4
LDM RQLN,DI SET REQUEST QUEUE EMPTY
SCN 77
UJP CMP5 RELEASE UNIT INTERLOCK
CPF SPACE 4,10
** CPF - CLEAR *PUT* FLAG IN *PILL*.
*
* ENTRY (A) = 6/N, 6/B.
* N = NUMBER OF BITS - 1 TO CLEAR.
* B = LOW ORDER BIT NUMBER TO CLEAR.
*
* USES T6, T7, CM+1 - CM+4.
*
* MACROS MONITOR, PUTE.
CPF SUBR ENTRY/EXIT
SHN 6
STD T7 SET BIT NUMBER
SHN -14
ADC PILL*100+1 WORD OFFSET + FIELD WIDTH
STD T6
LDN 0 NEW VALUE
STD CM+2
LDD MA
CWD T6 STORE MESSAGE BUFFER PARAMETERS
LDN 1
STD CM+1 PARAMETER WORD COUNT
LDI DI
ERRNZ PUTO CODE DEPENDS ON VALUE
SHN PUTLS
PUTE *
ADC 0 SET BASE *PUT* ENTRY ADDRESS
STD CM+4
SHN -14
STD CM+3
MONITOR UTEM CLEAR *PUT* FLAG
UJN CPFX RETURN
CSR SPACE 4,10
** CSR - CLEAR SPECIAL REQUEST.
*
* ENTRY (DI) = DEVICE STATUS BLOCK ADDRESS.
*
* EXIT TO *CMP*.
*
* CALLS CPF.
CSR BSS 0 ENTRY
LDM SREQ,DI
ZJN CSR1 IF NO SPECIAL REQUEST IN PROGRESS
LPN 77
SBN ECAF+ISRB-ISRA
PJN CSR1 IF INTERNAL SPECIAL REQUEST
LDM SREQ,DI
RJM CPF CLEAR *PUT* FLAG
CSR1 LJM CMP COMPLETE PROCESSING
CTO SPACE 4,10
** CTO - CHECK TIMEOUT.
*
* EXIT (A) .LT. 0 IF NOT TIMEOUT.
*
* USES CM - CM+4.
CTO SUBR ENTRY/EXIT
LDC RTCL FETCH CURRENT CLOCK VALUE
CRD CM
LDD CM CHECK ELAPSED TIME
SBM FTOC,DI
NJN CTOX IF TIMEOUT PASSED OR NOT REACHED
LDD CM+1
SBM FTOC+1,DI
UJN CTOX RETURN
DCR SPACE 4,10
** DCR - DROP CHANNEL RESERVATION.
*
* ENTRY (CR) = 1 IF CHANNEL RESERVED.
* (IR+4) = CHANNEL NUMBER.
*
* EXIT (A) = (CR) = 0.
*
* USES CM - CM+4.
*
* MACROS MONITOR.
DCR SUBR ENTRY/EXIT
LDD CR
ZJN DCRX IF CHANNEL NOT RESERVED
LDD IR+4
STD CM+1 DROP CHANNEL
MONITOR DCHM
* LDN 0 SET CHANNEL NOT RESERVED
STD CR
UJN DCRX RETURN
ECA SPACE 4,20
** ECA - ENABLE CONTROLLER ACTIVITY.
*
* THIS SPECIAL REQUEST CLEARS THE CONTROLLER DEAD FLAGS IN
* THE CONTROLLER STATE TABLE, AND IN THE DEVICE STATE TABLE
* ENTRIES FOR ALL DEVICES ON THIS CONTROLLER. THIS FUNCTION IS
* ISSUED BY *1MV* WHEN THE STATE OF A 9853 DRIVE IS CHANGED
* TO *ON* OR *IDLE*.
*
* ENTRY (EO) = EST ORDINAL.
* (IR+4) = CHANNEL NUMBER.
*
* EXIT TO *CMP7* WHEN FUNCTION COMPLETE.
*
* CALLS CEA, LND.
ECA BSS 0 ENTRY
LDN 0 LOCATE FIRST DRIVE
ECA1 RJM LND LOCATE DRIVE
ZJN ECA2 IF NO MORE DRIVES ON CONTROLLER
LDN 0 CLEAR CONTROLLER DEAD FLAG
STM ENAD,T7
LDN 1 LOCATE NEXT DRIVE
UJN ECA1 LOCATE DRIVE
ECA2 LDM CSTB,T5 ENABLE CONTROLLER ACTIVITY
STM CSTB,T5 (CLEAR BITS 15 - 12)
RJM CEA CLEAR ENABLE ACTIVITY REQUEST
LJM CMP7 COMPLETE FUNCTION
EIO SPACE 4,10
** EIO - ENTER I/O REQUEST QUEUE.
*
* ENTRY (RW) = READ / WRITE STATUS.
* (CB) = CURRENT BUFFER ORDINAL.
*
* USES WB+3, CM - CM+4.
*
* CALLS IMR, SLB.
EIO2 LDD OA
CRD CM CHECK OUTPUT REGISTER
LDD CM
NJN EIOX IF MONITOR REQUEST IN PROGRESS
EIO3 LDN DCBS
RJM IMR INITIATE MONITOR REQUEST
* LDN 0
SBD WB+3 ADJUST QUEUE ENTRY COUNT
RAM RQLN,DI
EIO SUBR ENTRY/EXIT
LDD RW
NJN EIO1 IF WRITE OPERATION
LDD CB
RJM SLB SET LINKAGE BITS
EIO1 AOM CBCT,DI
AOM RQLN,DI ADVANCE ENTRY COUNT
LPN 77
SBM EIOA,RW
MJN EIOX IF QUEUE NOT FULL
ADN 1
STD WB+3 NUMBER OF BUFFERS TO DELINK
SBN 14
MJN EIO2 IF NOT TIME TO FORCE DELINK
UJN EIO3 DELINK BUFFERS
EIOA BSS 0 DELINKING CRITERIA
CON 1
CON 10
ERR SPACE 4,45
** ERR - PROCESS ERRORS.
*
* ERROR PROCESSING FLOW IS CONTROLLED BY THE RETRY COUNT, ERCT.
* EXAMPLE FLOW THROUGH RECOVERY FOR DRIVE ERROR -
*
* ERCT,DI COMMENT
* ------- ------------------------------------------------------
* 0 ENTER, LOGICAL RESET
* 1 ISSUE BML MESSAGE, EXIT
* 1 ENTER, LOGICAL RESET, DRIVE RESET
* 2 ISSUE BML MESSAGE, EXIT
* 2 ENTER, SLAVE RESET
* 3 ISSUE BML MESSAGE, EXIT
* 3 ENTER, LOGICAL RESET
* 4 ISSUE BML MESSAGE, SET SUSPECT STATE, EXIT
*
* THE REQUEST IS NOW CHANNEL SPECIFIC, AND IF DUAL ACCESS IS
* DEFINED, WILL BE FOR THE OTHER CHANNEL.
*
* 4 ENTER, LOGICAL RESET
* 5 ISSUE BML MESSAGE, EXIT
* 5 ENTER, LOGICAL RESET, DRIVE RESET
* 6 ISSUE BML MESSAGE, EXIT
* 6 ENTER, LOGICAL RESET
* 7 ISSUE BML MESSAGE, RUN DRIVE DIAGNOSTICS, EXIT
* 7 ENTER, LOGICAL RESET
* 8 SET MISCELLANEOUS AND ISSUE THE FINAL BML MESSAGE.
*
* NOTE - IF THE REQUEST STARTS OUT AS A CHANNEL-SPECIFIC
* REQUEST (E.G. A *1MV* I/O REQUEST), ALL RETRIES WILL
* BE DONE ON THIS CHANNEL.
*
* ENTRY (A) = FAULT ANALYSIS CODE.
* (RF) = RESET IN PROGRESS STATUS.
*
* EXIT TO *CMP*.
* (RF) = 0.
*
* USES DI, PA, RF, RW, WB+3, CM+1 - CM+3, CW - CW+4, T1 - T5.
*
* CALLS ACE, CCO, DCM, EDR, ICR, IDM, IMR, LDP, LND, RCR, RMR,
* RND, RTR, SCD, SEC, SMC, SRP, STF, UHD.
*
* MACROS CBTE, MONITOR, SFA.
ERR CON 0 ENTRY
PJN ERR1 IF NO RESPONSE PACKET
LMC 767777
ERR1 STD T4 SAVE FAULT CODE
SHN 0-14
STD T3
LDM RQLN,DI
SCN 77
NJN ERR1.4 IF DEVICE INTERLOCKED
* IF DEVICE NOT INTERLOCKED, THIS MAY BE AN ERROR ENCOUNTERED
* WHEN READING A RESPONSE PACKET FOR AN UNSOLICITED ASYNC
* INTERRUPT. IN THIS CASE, FIND ANY DEVICE ON THIS CONTROL
* MODULE WHICH IS INTERLOCKED, AND PROCESS THE ERROR AS IF IT
* WAS FROM THAT DEVICE. IF NO DEVICE ON THIS CONTROL MODULE
* IS INTERLOCKED, RESET THE CHANNEL AND DISCARD THE ERROR,
* REENTERING *ECI* AT *ECI3*.
LDN 0 LOCATE FIRST DRIVE
ERR1.1 RJM LND
ZJN ERR1.2 IF NO MORE DEVICES
LDM RQLN,T7 CHECK NEXT DEVICE
SCN 77
NJN ERR1.3 IF DEVICE INTERLOCKED
LDN 1
UJN ERR1.1 LOCATE NEXT DEVICE
ERR1.2 RJM RCR RESET CHANNEL REGISTERS
LJM ECI3 DISCARD ERROR AND LOOK FOR I/O REQUEST
ERR1.3 LDD T7 SET DEVICE PARAMETERS
STD DI
RJM LDP
ERR1.4 LDD T3
STM RPST,DI SET RESPONSE PACKET STATUS
LDM SRSA
ZJN ERR3 IF NO RESET IN PROGRESS
LMD DI
ERR2 ZJN ERR2.1 IF THIS UNIT CONTROLLING RESET
RJM RCR RESET CHANNEL REGISTERS
LDN 0 CLEAR BUFFER COUNTS
STM CBCT,DI
LDC 4000
STM RQLN,DI
LJM CMP RELEASE DRIVE INTERLOCK
ERR2.1 STM SRSA CLEAR RESET INTERLOCK
ERR3 LDM ESAD,DI
ZJN ERR4 IF NEW PASS THRU PROCESSOR
STD PA
LJM 0,PA CONTINUE
*ERR4 LDN 0 CLEAR CHANNEL ACTIVE
ERR4 RJM SCD
LDC 0 CHECK ERROR FLAG
ERFL EQU *-1
ZJN ERR5 IF NO ERROR IN PROGRESS
LMD DI
NJN ERR2 IF ERROR ON DIFFERENT DEVICE
ERR5 LDD DI
STM ERFL SET ERROR IN PROGRESS
LDC ERR79
STM ESAD,DI INITIAL ERROR STEP ADDRESS
LDM RWST,DI
STM IOST,DI SAVE READ/WRITE STATUS
* GENERATE BML ERROR MESSAGE.
LCN 0 SET NO STATUS FOR *HPA*
STM EDBF+FCS2
LDD T4 INSERT INITIAL FAULT CODE
STML EDBF+CODE
STML EDBF+FALT PRESET FINAL FAULT CODE
LDM CBCT,DI
SHN LSLBS-CFLP SECTORS TRANSFERED COUNT
STML EDBF+STCT
LDM CYLN,DI SET SEEK ADDRESS - CYLINDER
STML EDBF+ICYL
LDM TKSN,DI SEEK ADDRESS - TRACK AND SECTOR
STML EDBF+ITAS
LDML LCMD,DI SET LAST COMMAND
STML EDBF+LSCC
LDML GSSA EXECUTION (ENDING) STATUS
STML EDBF+EXST
LDM ERR RETAIN ENTRY ADDRESS
STML EDBF+FALT+1
ERR6 LDDL LF SAVE LAST CHANNEL FUNCTION
STML EDBF+LCFN
SCF. ERR6,MR ACQUIRE MAINTENANCE CHANNEL ACCESS
LDN ZERL
CRML RBUF,ON CLEAR BUFFER IN CASE OF ERROR
SBN 1
CRML RBUF+4,ON
RJM RMR READ CHANNEL STATUS REGISTER
DCN. MR+40
CCF. *+2,MR CLEAR MAINTENANCE CHANNEL FLAG
LDN 0
STD T2 INITIALIZE INDEX
STML EDBF+TREG
STML EDBF+TREG+1 CLEAR *T* REGISTER BUFFER
STML EDBF+TREG+2
RJM ACE ANALYZE CHANNEL ERROR
DCN CH+40
STML EDBF+FCS1 SAVE CHANNEL STATUS
LDC EDBF+CREG
STDL T5 SET ERROR BUFFER ADDRESS
ERR7 LDM RBUF,T2
SHN 10 PACK 8-BIT DATA
LMM RBUF+1,T2
STIL T5
AODL T5 ADVANCE ADDRESS
LDN 2
RAD T2 INCREMENT INDEX
LMN RBUFL
NJN ERR7 IF MORE REGISTER DATA
LDM IPPS,DI
ZJN ERR8 IF NOT I/O REQUEST
RJM RTR READ *T* REGISTER
ERR8 LDK RTEDL
STD T4 SET LENGTH OF DATA
LDC EDBF
STDL T2 SOURCE DATA ADDRESS
ADK EMBF1
RJM UHD UNPACK HEX DATA
ADN EMBFS
STM MSGL+1 MESSAGE LENGTH INCLUDING NON-HEX DATA
LDM RPST,DI
ZJN ERR13 IF NO RESPONSE PACKET PRESENT
LDC RPBF
STDL T2 SET SOURCE DATA ADDRESS
LDI T2
ADN 3 CALCULATE STATUS BLOCK LENGTH
SHN -1
STD T4
LDC EDBF+EMBF2 CONVERT STATUS TO 12 BIT DATA
RJM UHD
RAM MSGL+1 APPEND TO MESSAGE
LDN 0
STM EDBF+FCS2 INDICATE STATUS PRESENT FOR *HPA*
* CONVERT MAJOR STATUS TO INDEX.
LDDL MS UNPACK BUS A FLAGS
SHN -10
STD T2
LDD MS BUS B SUBSTATUS FLAGS
LPN 7
SHN 10 COMBINE FLAGS IN ORDER
RAD T2
ERR13 ZJP ERR71 IF NO SUBSTATUS
LCN 0
STD T3
ERR14 AOD T3 ADVANCE INDEX
LDD T2
SHN 21-0 CONVERT FLAG POSITION TO INDEX
STD T2
PJN ERR14 IF BIT NOT SET
LDM ERRB,T3
STD PA SET PROCESSOR ADDRESS
LDD T3
LJM 0,PA EXIT TO PROCESSOR
* RESERVED SUBSTATUS (PID = X0 AND X1).
ERR20 LDN ERSS
LJM ERR70 SET FINAL FAULT CODE
* DEFECT MANAGEMENT (PID = X2).
ERR24 LDN EDFM
LJM ERR70 SET FINAL FAULT CODE
* MESSAGE / MICROCODE EXCEPTION (PID = X3).
ERR26 LDN EMME
LJM ERR70 SET FINAL FAULT CODE
* INTERVENTION REQUIRED (PID = X4).
*ERR30 LDN 4 SEARCH FOR SUBSTATUS
ERR30 RJM SMC
PJN ERR32 IF SUBSTATUS FOUND
ERR31 LDN EIVR
UJN ERR39 SET FINAL FAULT CODE
ERR32 SHN 21-11
PJN ERR31 IF NOT FACILITY BUSY
LJM ERR51 PROCESS FACILITY BUSY ERROR
* ALTERNATE PORT EXCEPTION (PID = X5).
ERR38 LDN EAPR
ERR39 LJM ERR70 SET FINAL FAULT CODE
* MACHINE EXCEPTION (PID = X6).
ERR40 LDN ID26 SEARCH FOR DRIVE SUBSTATUS
RJM SRP
ZJN ERR42 IF SUBSTATUS FOUND
ERR41 LDN EMEX
STM EDBF+FALT SET FINAL FAULT CODE
LDN 0 DO NOT ISSUE BML MESSAGE
RJM CCO CHECK FOR CONTROLLER OVER TEMPERATURE
LJM ERR71 COMPLETE ERROR PROCESSING
ERR42 LDML RPBF+5,T3 CHECK LENGTH OF PARAMETER
SHN -10
SBN 0#0A+1
MJN ERR41 IF NO EXTENDED SUBSTATUS
LDM RPBF+12,T3
LPN 77 EXAMINE COMMAND ENDING STATUS
SBN 0#11
ZJN ERR43 IF ECC ERROR
SBN 0#13-0#11
ZJN ERR43 IF MISSING SYNC
SBN 0#19-0#13
NJN ERR41 IF NOT SECTOR NOT FOUND ERROR
ERR43 LDN ID32 SEARCH FOR RESPONSE EXTENT
RJM SRP
NJN ERR41 IF NOT MEDIA ERROR
LDM ERCT,DI
LMN 1
NJN ERR45 IF NOT SECOND RETRY
LDM RPBF+10,T3
STD T4 SET CYLINDER IN ERROR
LDML RPBF+11,T3
STD T0 REPACK TRACK + SECTOR
LPN 77
STD T5 PHYSICAL SECTOR
LMD T0
SHN 6-10 APPEND PHYSICAL TRACK
RAD T5
RJM STF INSERT TRACK FLAW IN MST
ERR45 LDN EDPE
LJM ERR70 SET FINAL FAULT CODE
* COMMAND EXCEPTION (PID = X7).
ERR48 LDN ID17 SEARCH FOR SUBSTATUS
RJM SRP
ZJN ERR50 IF SUBSTATUS FOUND
ERR49 LDN ECEX
UJN ERR54 SET FINAL FAULT CODE
ERR50 LDML RPBF+5,T3 CHECK LENGTH OF PARAMETER
SHN -10
SBN 5+1
MJN ERR49 IF NO EXTENDED SUBSTATUS
LDML RPBF+10,T3
SHN 21-13
PJN ERR49 IF NOT RESERVED TO ALTERNATE ACCESS
ERR51 LDN EDRE
ERR54 UJN ERR70 SET FINAL FAULT CODE
* COMMAND ABORTED (PID = X8).
ERR58 LDN ECMA
UJN ERR70 SET FINAL FAULT CODE
* COMMAND CONDITIONALLY SUCCESSFUL (PID = X9).
ERR60 LDN ECCS SET FINAL FAULT CODE
STML EDBF+FALT
LDM IOST,DI RESTORE READ/WRITE STATUS
STD RW
AOM ERCT,DI INCREMENT ERROR COUNT
LDD HN
ERRNZ HD0100-100 CODE DEPENDS ON VALUE
RJM IDM ISSUE MESSAGE
LJM CMP COMPLETE REQUEST
* COMMAND INCOMPLETE (PID = XA).
ERR64 LDN ECIC
* UJN ERR70 SET FINAL FAULT CODE
* COMPLETE ERROR PROCESSING.
ERR70 STML EDBF+FALT SET FINAL FAULT CODE
ERR71 LDML IPPS,DI
SHN -17
NJP ERR76 IF ERROR FROM DIAGNOSTICS
LDM ENAD,DI
NJP ERR82 IF DRIVE DISABLED (SLAVE RESET FAILURE)
RJM RCR RESET CHANNEL REGISTERS
LDC ERR72
STM ADDR,DI SET RETURN ADDRESS
* ALLOW ACTIVITY ON OTHER DRIVES TO COMPLETE BEFORE ISSUING
* CONTROLLER RESET.
ERR72 LDN 0 LOCATE FIRST DRIVE
RJM LND
ERR73 LDM ADDR,T7
ZJN ERR74 IF NO ACTIVITY ON DEVICE
LDD T7
LMD DI
ZJN ERR74 IF ERROR PROCESSING FOR THIS DRIVE
LDD T7 LOAD DEVICE PARAMETERS
STD DI
RJM LDP
LDM ADDR,DI
STD T2
LJM 0,T2 CONTINUE PROCESSING ON ACTIVE DRIVE
ERR74 LDN 1 LOCATE NEXT DRIVE
RJM LND
NJN ERR73 IF ANOTHER DRIVE PRESENT
RJM ICR ISSUE CONTROLLER RESET
* UJN ERR81 (IF RESET SUCCESSFUL)
NJN ERR82 IF LOGICAL RESET FAILED
ERR76 LDM EDBF+CODE
UJN ERR83 PROCESS SLAVE RESET FAILURE
* REENTER HERE IF ERROR WHILE ATTEMPTING HARDWARE RECOVERY.
ERR79 RJM RCR RESET CHANNEL REGISTERS
UJN ERR82 SET RECOVERY FAULT CODE
ERR81 LDM ERCT,DI CHECK RETRY COUNT
SBN 1
ZJN ERR81.1 IF DRIVE RESET IN ORDER
SBN MERC-CSRC
NJN ERR82 IF NOT TIME FOR DRIVE RESET
ERR81.1 RJM EDR EXECUTE DRIVE RESET
ERR82 LDN 0
ERR83 STM EDBF+FCS3 SET RECOVERY FAULT CODE
LDN 0
STD RF CLEAR RESET IN PROGRESS FLAG
LDM IOST,DI
STM RWST,DI RESTORE READ/WRITE STATUS
STD RW
LDM EDBF+FCS3
ZJN ERR85 IF NOT HARDWARE RECOVERY ERROR
ERR84 RJM SEC SET ERROR CODE
AOM MISC MARK ERROR UNRECOVERED
LJM CMP1 COMPLETE PROCESSING
ERR85 LDM ERCT,DI CHECK ERROR COUNT
SBN MERC-1
PJN ERR84 IF ERROR LIMIT
AOM ERCT,DI
LDD HN
ERRNZ HD0100-100 CODE DEPENDS ON VALUE
RJM IDM ISSUE MESSAGE
LDM ERCT,DI
SBN MERC-1
NJN ERR86 IF NOT TIME TO RUN DRIVE DIAGNOSTICS
RJM RND RUN DRIVE DIAGNOSTICS
ERR86 LDM RQLN,DI
LPN 77 EXTRACT REQUEST QUEUE COUNT
STD WB+3
LMM RQLN,DI CLEAR BUFFER COUNT
STM RQLN,DI
LDM SREQ,DI
NJN ERR87 IF NOT I/O PROCESSING
LDM ERCT,DI
LMN CSRC
ZJN ERR89 IF TIME FOR CHANNEL SWAP
LMN 1&CSRC
NJN ERR87 IF NOT FIRST RETRY
LDD WB+3
ZJN ERR87 IF NO PROCESSED BUFFERS
LDN IDSS
RJM IMR INHIBIT DATA STREAMING
ERR87 RJM DCM DESELECT CONTROL MODULE
LJM CMP7 RETRY REQUEST
ERR89 LDD CB
ZJN ERR89.1 IF NO I/O BUFFER
SHN CBTLS
CBTE *
ADC HSLK GET CHANNEL SELECT STATUS
CRD T1
LDD T1
SHN 0-12
LMN 1
ZJP ERR87 IF REQUEST ALREADY CHANNEL-SPECIFIC
ERR89.1 LDD EO
STD CM+1 SET EST ORDINAL
SFA EST
ADK EQDE FETCH *EQDE* WORD OF EST ENTRY
CRD CW
LDD CW CHECK DEVICE STATUS
LPN 2
NJN ERR90 IF DEVICE *OFF* OR *DOWN*
LDD IR+4
STD CM+3 INSERT CHANNEL NUMBER
LDN SSES
STD CM+2 SET SUSPECT STATE ON DEVICE
MONITOR SEQM
ERR90 RJM SEC SET ERROR CODE IN *CBT*
LJM CMP2 COMPLETE PROCESSING
ERRB BSS 0 SUBSTATUS PROCESSORS
CON ERR20 RESERVED
CON ERR20 RESERVED
CON ERR24 DEFECT MANAGEMENT
CON ERR26 MESSAGE / MICROCODE EXCEPTION
CON ERR30 INTERVENTION REQUIRED
CON ERR38 ALTERNATE PORT EXCEPTION
CON ERR40 MACHINE EXCEPTION
CON ERR48 COMMAND EXCEPTION
CON ERR58 COMMAND ABORTED
CON ERR60 COMMAND CONDITIONALLY SUCCESSFUL
CON ERR64 COMMAND INCOMPLETE
ICR SPACE 4,10
** ICR - ISSUE CONTROLLER RESET.
*
* ENTRY (RF) .NE. 0 IF PREVIOUS RESET FAILED.
*
* EXIT (A) = 0 IF SLAVE RESET FAILED.
* (A) = 1 IF LOGICAL RESET FAILED.
* TO *ERR81* IF RESET SUCCESSFUL.
*
* CALLS SRS.
ICR4 LDM RWST,DI
ZJN ICRX IF SLAVE RESET FAILED
LDM ERCT,DI
SBN CSRC-2
ZJN ICR2 IF TIME TO TRY SLAVE RESET
ICR SUBR ENTRY/EXIT
LDD RF
NJN ICR4 IF PREVIOUS RESET FAILED
LDM ERCT,DI
SBN CSRC-2
NJN ICR1 IF NOT TIME TO TRY SLAVE RESET
* DO NOT PERFORM SLAVE RESET IF CHANNEL ERROR, MEDIA ERROR,
* RESET ERROR OR CONTROLLER DEAD.
LDML EDBF+FALT
SBN ETIT
ZJN ICR2 IF INTERRUPT TIMEOUT
SBN EDPE+1-ETIT
MJN ICR1 IF CHANNEL / MEDIA ERROR
SBN ECRE-EDPE-1
MJN ICR2 IF NOT RESET ERROR / CONTROLLER DEAD
* PERFORM LOGICAL RESET.
ICR1 LDC 1S12+ERR81 ISSUE LOGICAL RESET
UJN ICR3 RESET CONTROL MODULE
* PERFORM SLAVE RESET.
ICR2 LDN 0 FORCE LOGGING OF ERROR RESPONSE
STM ESAD,DI
LDC ERR81 ISSUE SLAVE RESET
ICR3 LJM SRS RESET CONTROL MODULE
IDM SPACE 4,20
** IDM - ISSUE DAYFILE MESSAGE.
*
* ENTRY (A) = BML MESSAGE SYMPTOM CODE.
* (RW) = READ / WRITE FLAG.
* (EO) = EST ORDINAL.
* (CN) = CONTROLLER NUMBER.
* (DN) = DRIVE NUMBER.
* (MISC) = 1 IF UNRECOVERED ERROR.
*
* EXIT (A) = (MISC) = 0.
*
* USES T2, T3, CM - CM+4, WB - WB+4.
*
* CALLS IMB, UEC.
IDM SUBR ENTRY/EXIT
LMC D"DN"*400
STM BMLM+1 INSERT SYMPTOM CODE IN MESSAGE
LDM PNUN,DI
LPC 777 INSERT CONTROLLER AND UNIT NUMBERS
STM UNIT
LMM PNUN,DI SET PORT NUMBER
SHN -3
STM PORT
LDD EO INCLUDE EST ORDINAL
STM ESTO
LDM ERCT,DI SET RETRY COUNT
SHN 5
LMD RW MERGE READ / WRITE FLAG
SHN 1
RAM MISC APPEND TO RECOVERED/UNRECOVERED STATUS
LDML MAD1
RJM IMB ISSUE MESSAGE TO BUFFER
RJM UEC UPDATE MST ERROR COUNT
LDC MSGP
STML MAD1 RESTORE BML ERROR MESSAGE ADDRESS
LDN 0
STM MISC CLEAR UNRECOVERED ERROR STATUS
* LDN 0
LJM IDMX RETURN
MAD1 CONL MSGP MESSAGE ADDRESS (MAY BE SET BY CALLER)
IDU SPACE 4,15
** IDU - INTERLOCK DISK UNIT.
*
* ENTRY (CB) = *CBT* ORDINAL IF I/O REQUEST.
* (EO) = EST ORDINAL.
*
* EXIT (A) = 0 IF UNIT INTERLOCKED.
*
* USES T2, CM - CM+4, T7 - T7+4.
*
* CALLS SUI.
*
* MACROS CBTE, SFA.
IDU6 RJM SUI SET UNIT INTERLOCK
IDU SUBR ENTRY/EXIT
LDM RQLN,DI
SHN 0-13 CHECK UNIT RESERVED
LMN 1
ZJN IDUX IF UNIT INTERLOCKED
LDC 0
CHRQ EQU *-1
NJN IDUX IF CHANNEL REQUESTED
STM LCMD,DI
SFA EST,EO CALCULATE EST ADDRESS
ADK EQDE
CRD CM READ *EQDE* WORD
* CHECK EST ENTRY FOR CHANNEL DOWN.
LDD CM+1 EXTRACT CHANNEL
LMD IR+4
LPN 77
ZJN IDU1 IF PATH SERVICED BY THIS DRIVER
LDN 1
IDU1 ADN CM+1 SET CHANNEL BYTE ADDRESS
STD T2
LDI T2 CHECK CHANNEL STATE
SHN -11
LMN 4
IDU2 ZJN IDU6 IF CHANNEL UP AND AVAILABLE
SCN 1
IDU3 NJN IDUX IF CHANNEL DOWN OR NOT ENABLED
LDD CB
ZJP IDU6 IF NOT I/O REQUEST
SHN CBTLS
CBTE *
ADC PAD4 GET CHANNEL FROM CBT ENTRY
CRD T7
ADN HSLK-PAD4 GET CHANNEL SELECT STATUS
CRD CM
LDD CM CHECK ERROR FLAGS
SHN 0-12
ZJN IDU4 IF NOT CHANNEL SPECIFIC REQUEST
LDD T7
SHN -6 CHECK CHANNEL
LMD IR+4
ZJN IDU2 IF REQUEST FOR THIS DRIVER
IDU4 LDN 1
UJN IDU3 RETURN
IIO SPACE 4,15
** IIO - INITIATE I/O.
*
* ENTRY (A) = (CB) = *CBT* ORDINAL.
*
* EXIT (A) = 0 IF I/O DISABLED ON THIS CHANNEL.
* (RW) = READ / WRITE STATUS.
* (PA) = PROCESSOR ADDRESS.
* (NR - NR+4) = PHYSICAL ADDRESS OF REQUEST.
*
* USES PA, RW, NR - NR+4, T1 - T7.
*
* CALLS PEF.
*
* MACROS CBTE.
IIO4 STD PA
SCN 77 SET I/O DISABLED STATUS
IIO SUBR ENTRY/EXIT
SHN CBTLS
CBTE *
ADC PAD1 FETCH SEEK PARAMETERS FROM *CBT*
CRD NR
ADN PAD4-PAD1 GET CHANNEL FROM CBT ENTRY
CRD T1
ADN HSLK-PAD4 GET CHANNEL SELECT STATUS
CRD T2
SBN HSLK-IOLK GET READ / WRITE FLAG
CRD T3
LDD T2 CHECK ERROR FLAGS
SHN 0-12
ZJN IIO1 IF NO FLAGS
SHN -1
STD RW PROCESS ERROR FLAGS
RJM PEF
NJN IIO4 IF I/O PREPROCESSING INDICATED
IIO1 LDD NR+1
STM CPBF+FCP+3 SET CYLINDER IN COMMAND PACKET
STM CYLN,DI
ADN 2
SBK CYUN
PJN IIO2 IF WITHIN LAST TWO CYLINDERS OF DEVICE
LDK MXSS MAXIMUM SECTOR COUNT TO STREAM
UJN IIO3 SET SECTOR COUNT
IIO2 LDK MNSS MINIMUM SECTOR COUNT TO STREAM
IIO3 STML CPBF+FCP+2 SECTOR COUNT / STREAM LIMIT
LDD NR+2
STM TKSN,DI TRACK + SECTOR
SCN 77
SHN 2
LMD NR+2 SEPARATE INTO 8 BIT FIELDS
SCN 77
LMD NR+2 SET IN COMMAND PACKET
STML CPBF+FCP+4
LDD T3
SHN 22-11 EXTRACT WRITE DATA FLAG
LPN 1
STM RWST,DI SET READ / WRITE STATUS
STD RW
LDC PIO
LJM IIO4 SET PROCESSOR ADDRESS
IMF SPACE 4,10
** IMF - ISSUE MONITOR FUNCTION.
*
* ENTRY (A) = FUNCTION.
*
* EXIT (A) = 0.
*
* USES CM.
*
* CALLS CMC, FTN.
IMF1 RJM CMC WAIT MONITOR COMPLETE
LDD CM
RJM FTN ISSUE MONITOR FUNCTION
IMF SUBR ENTRY/EXIT
STD CM
UJN IMF1 CHECK OUTPUT REGISTER
IMR SPACE 4,15
** IMR - INITIATE MONITOR REQUEST.
*
* ENTRY (A) = *BIOM* SUBFUNCTION.
* (WB+3 - WB+4) = *BIOM* PARAMETERS.
*
* EXIT (A) = 0.
*
* USES WB - WB+2.
*
* CALLS AME, CMC.
IMR2 RJM AME ATTEMPT MONITOR EXCHANGE
* LDN 0
IMR SUBR ENTRY/EXIT
STD WB+1
LDI DI SET *PUT* ORDINAL
ERRNZ PUTO CODE DEPENDS ON VALUE
STD WB+2
LDN BIOM SET MONITOR FUNCTION
STD WB
RJM CMC CHECK MONITOR COMPLETE
LDD OA
CWD WB
UJN IMR2 ATTEMPT EXCHANGE
IOM SPACE 4,10
** IOM - ISSUE OPERATOR MESSAGE.
*
* ENTRY (A) = ADDRESS OF MESSAGE.
* = 0 TO CLEAR MESSAGE.
* = - TO REFRESH MESSAGE.
* (EO) = EST ORDINAL.
*
* USES T1.
*
* CALLS C2D.
IOM2 LDD CP SYSTEM CP ADDRESS
ADN MS2W
CWD T1 CLEAR THE MESSAGE
IOM3 LDM IOMA
NJN IOM1 IF MESSAGE PRESENT
IOM SUBR ENTRY/EXIT
STD T1
MJN IOM3 IF MESSAGE REFRESH
STM IOMA
ZJN IOM2 IF CLEAR MESSAGE CALL
LDD EO
RJM C2D CONVERT EST ORDINAL
STM 2,T1
LDD EO
SHN -6 SET ORDINAL IN MESSAGE
ADC 2RQ0
STM 1,T1
IOM1 LDD CP SYSTEM CP ADDRESS
ADN MS2W
CWM **,TR STORE OPERATOR MESSAGE
IOMA EQU *-1
UJN IOMX RETURN
ISR SPACE 4,25
** ISR - IDENTIFY AND PROCESS SPECIAL REQUEST.
*
* ENTRY (CM+3) = SPECIAL REQUEST FLAGS.
* (DI) = DEVICE STATUS BLOCK ADDRESS.
* (EO) = EST ORDINAL.
*
* EXIT (CM+3) UPDATED - BITS FOR *ECAF* AND/OR *LMLF* CLEARED
* IF REQUEST IS FOR THE ALTERNATE CHANNEL.
* TO *XMD2* IF UNIT INTERLOCK NOT OBTAINED.
* TO *ERR* IF CONTROLLER FAILURE.
* TO *ECA* IF ENABLE CONTROLLER ACTIVITY AND *BDLL*
* BIT NOT CLEAR.
* TO SPECIAL REQUEST PROCESSOR (ADDRESS IN TABLE *ISRA*)
* IF SPECIAL REQUEST FOUND WITH -
* (RW) = INDEX FOR SPECIAL REQUEST.
*
* USES CM, CM+3, PA, RW, T1 - T7.
*
* CALLS CPF, IDU.
*
* MACROS SFA.
ISR SUBR ENTRY/EXIT
* CHECK FOR *ENABLE CONTROLLER ACTIVITY* (*ECAF*) REQUEST.
* IF REQUEST IS FOR OTHER CHANNEL, LOOK FOR DIFFERENT REQUEST.
* IF ALREADY ENABLED ON BOTH CHANNELS, EXIT TO *CSR*.
LDD CM+3
SHN 21-ECAF+ECAF/12D*12D
PJN ISR3 IF *ECAF* REQUEST NOT SET
SFA EST,EO CHECK EST ENTRY
ADK EQDE
CRD T1
LDD T1+4
SHN 3
ADK BDLL CHECK WHICH CHANNEL TO ENABLE
CRD T4
LDD T4
SHN -1
LPN 3
STD T4
ZJN ISR3 IF ALREADY ENABLED ON BOTH CHANNELS
SBN 3
PJN ISR1 IF NEITHER CHANNEL IS ALREADY ENABLED
LDM T1,T4
LMD IR+4
LPN 77
NJN ISR2 IF THIS CHANNEL ALREADY ENABLED
ISR1 LJM ECA ENABLE CONTROLLER ACTIVITY
ISR2 LDD CM+3 LOOK FOR A DIFFERENT REQUEST TO PROCESS
SCN 1
ERRNZ ECAF-12D CODE DEPENDS ON VALUE
STD CM+3
* CHECK FOR *LIST FIRMWARE REVISION* (*LMLF*) REQUEST.
* IF REQUEST IS FOR OTHER CHANNEL, LOOK FOR DIFFERENT REQUEST.
ISR3 LDD CM+3
SHN 21-LMLF+LMLF/12D*12D
PJN ISR4 IF *LMLF* REQUEST NOT SET
LPN 77 ISOLATE CHANNEL NUMBER
LMD IR+4
ZJN ISR6 IF REQUEST FOR THIS DRIVER
LDD CM+3 LOOK FOR A DIFFERENT REQUEST TO PROCESS
LPN 37
ERRNZ LMLF-17D CODE DEPENDS ON VALUE
STD CM+3
* SEARCH FOR OTHER SPECIAL REQUEST.
ISR4 LDD CM+3 ISOLATE SPECIAL REQUEST FLAGS
STD T0
ZJP ISRX IF NO SPECIAL REQUEST TO PROCESS
LDN ECAF-1
STD RW
ISR5 AOD RW ADVANCE INDEX
LDD T0
SHN 21-0 CHECK NEXT FLAG
STD T0
PJN ISR5 IF NOT SET
LDD RW
UJN ISR7 SET SPECIAL REQUEST FLAG
* PROCESS SPECIAL REQUEST.
ISR6 LDC 6S6+LMLF BITS - 1 TO CLEAR / STARTING BIT
ISR7 STM SREQ,DI SET SPECIAL REQUEST FLAG
LPN 77
SBN ECAF CALCULATE INDEX
STD RW
STM RWST,DI SAVE INDEX
LDML ISRA,RW
STDL PA SET PROCESSOR ADDRESS
RJM IDU INTERLOCK DISK UNIT
MJN ISR8 IF CHANNEL DOWN OR NOT ENABLED
NJN ISR9 IF INTERLOCK NOT AVAILABLE
LDM ENAD,DI
NJN ISR10 IF CONTROLLER FAILURE
LJM 0,PA EXIT TO SPECIAL REQUEST
* CHANNEL DOWN OR NOT ENABLED.
ISR8 LDM SREQ,DI
LMC 6S6+LMLF
NJN ISR9 IF NOT LIST MICROCODE REVISION
LDC 6S6+LMLF BITS - 1 TO CLEAR / STARTING BIT
RJM CPF CLEAR SPECIAL REQUEST BIT IN *PUT*
* INTERLOCK NOT AVAILABLE.
ISR9 LDN 0
STM SREQ,DI
LJM XMD2 RETURN TO MAIN LOOP
* CONTROLLER FAILURE.
ISR10 LDN ECMD
RJM ERR PROCESS ERROR
ISRA BSS 0 SPECIAL REQUEST PROCESSORS
CON CSR CLEAR FLAG (ENABLE CONTROLLER ACTIVITY)
CON CSR CLEAR FLAG (RESERVED)
CON CSR CLEAR FLAG (RESERVED)
CON LDA LIST DRIVE SERIAL NUMBER
CON CSR CLEAR FLAG (RESERVED)
CON LDA LIST MICROCODE REVISION LEVEL
ISRB BSS 0 INTERNAL SPECIAL REQUEST PROCESSORS
CON BOR BREAK OPPOSITE RESERVE (INTERNAL REQUEST)
CON SDA SET DRIVE ATTRIBUTES (INTERNAL REQUEST)
LDP SPACE 4,20
** LDP - LOAD DEVICE PARAMETERS.
*
* ENTRY (DI) = DEVICE STATUS BLOCK ADDRESS.
*
* EXIT (A) = (EO) = EST ORDINAL.
* (CB) = *CBT* ORDINAL.
* (CN) = CONTROLLER NUMBER.
* (DN) = DRIVE NUMBER.
* (EO) = EST ORDINAL.
* (PA) = REQUEST IN PROGRESS ADDRESS.
* (RW) = READ / WRITE FLAG.
* (CM - CM+4) = *PILL* WORD OF *PUT* ENTRY.
* (WB - WB+4) = *UNCT* WORD OF *PUT* ENTRY.
*
* USES CB, CN, DN, EO, PA, RW, CM - CM+4, WB - WB+4.
*
* MACROS PUTE.
LDP SUBR ENTRY/EXIT
LDI DI
ERRNZ PUTO CODE DEPENDS ON VALUE
SHN PUTLS
PUTE *
ADC PILL GET INTERLOCK STATUS
CRD CM
SBN PILL-UNCT FETCH UNIT CONTROL WORD
CRD WB
LDD WB GET CONTROLLER AND UNIT NUMBERS
LPC 777
SHN 21-5 EXTRACT CONTROLLER NUMBER
STD CN
SHN 5-21 ISOLATE DRIVE NUMBER
STD DN
LDD WB+3 *CBT* ORDINAL
STD CB
LDM RWST,DI RESTORE READ / WRITE STATUS
STD RW
LDM ADDR,DI CURRENT PROCESSING ADDRESS
STD PA
LDD WB+1 SET EST ORDINAL
STD EO
UJN LDPX RETURN
LND SPACE 4,10
** LND - LOCATE NEXT DRIVE (ON SPECIFIED CONTROLLER).
*
* ENTRY (A) = 0 TO LOCATE FIRST DRIVE OF STRING.
* (DI) = DEVICE STATE TABLE ADDRESS.
* (T5) = CONTROLLER STATUS BLOCK INDEX, IF (A) = 0.
* (T7) = CURRENT DEVICE STATE TABLE ADDRESS.
*
* EXIT (A) = (T7) = STATE TABLE ADDRESS OF NEXT DRIVE.
* (A) = 0 IF NO MORE DRIVES (ON CONTROLLER).
* (T5) = CONTROLLER STATUS BLOCK INDEX.
*
* USES T5, T7.
LND2 LDM PNUN,DI EXTRACT CONTROLLER BLOCK INDEX
SHN -6
STD T5
LDM CSTB,T5 ADDRESS OF FIRST DRIVE IN STRING
STD T7
LND3 LDM PNUN,T7 FORM *CSTB* INDEX
SHN -6
LMD T5
NJN LND1 IF NOT SPECIFIED CONTROLLER
LDD T7
LND SUBR ENTRY/EXIT
ZJN LND2 IF INITIAL CALL
LND1 LDN DSTBE
RAD T7 ADVANCE DEVICE STATE TABLE ADDRESS
LMM XMDA
NJN LND3 IF NOT END OF BLOCK
* LDN 0
UJN LNDX RETURN
LSD SPACE 4,15
** LSD - LOCATE SELECTED DRIVE IN *DSTB*.
*
* ENTRY (T4) = DRIVE NUMBER.
*
* EXIT (A) = 0 IF UNKNOWN DRIVE ON SPECIFIED CONTROLLER.
* = DEVICE STATE TABLE ADDRESS FOR DRIVE.
*
* CALLS LND.
LSD1 LDN 0 LOCATE FIRST DRIVE
LSD2 RJM LND
ZJN LSDX IF END OF DRIVE STRING
LDM PNUN,T7
LPN 77 CHECK DRIVE NUMBER
LMD T4
NJN LSD2 IF NOT SPECIFIED DRIVE
LDM ADDR,T7
ZJN LSDX IF DRIVE NOT ACTIVE
LDD T7
LSD SUBR ENTRY/EXIT
LDD T4
SBN 10
MJN LSD1 IF VALID DRIVE NUMBER
LDN 0
UJN LSDX RETURN
PEF SPACE 4,15
** PEF - PROCESS ERROR FLAGS.
*
* ENTRY (RW) = ERROR INDEX.
* (CB) = *CBT* ORDINAL.
* (T1) = BYTE 0 OF *PAD4* WORD OF CBT ENTRY.
* (T2) = BYTE 0 OF *HSLK* WORD OF CBT ENTRY.
* (NR - NR+4) = *PAD1* WORD OF *CBT* ENTRY.
*
* EXIT (A) = 0 IF OK TO INITIATE I/O.
* TO PROCESSOR IF I/O INITIATED.
*
* CALLS IDU, IIO.
PEF7 LDN 0 INDICATE I/O IN ORDER
PEF SUBR ENTRY/EXIT
LDD T1
SHN -6 CHECK CHANNEL NUMBER
LMD IR+4
PEF1 NJN PEFX IF I/O DISABLED ON THIS ACCESS
LDD RW
ZJN PEFX IF *1MV* DEVICE VERIFICATION
LDML ERCT,DI
NJN PEF7 IF I/O INITIATED
RJM IDU INTERLOCK DISK UNIT
NJN PEFX IF INTERLOCK NOT AVAILABLE
LDN CSRC
STM ERCT,DI SET INITIAL ERROR COUNT
LDM ENAD,DI
NJN PEF7 IF CONTROLLER DEAD
LDD CB INITIATE I/O
RJM IIO
LJM 0,PA EXIT TO PROCESSOR
RCS SPACE 4,10
** RCS - REMOVE CHANNEL FROM SYSTEM USE.
*
* ENTRY (A) = EST ORDINAL IF CHANNEL TO BE DOWNED ON DEVICE.
* = 0 IF CHANNEL TO BE GLOBALLY DOWNED.
*
* USES CM - CM+4.
*
* MACROS DELAY, EXECUTE, MONITOR.
RCS SUBR ENTRY/EXIT
LMC 4000
STM RCSA+4 SET DRIVER CALL FLAG, EST ORDINAL
LDD MA
CWM RCSA,ON STORE *1DS* CALL IN MESSAGE BUFFER
RCS1 LDN 0
STD CM+1 SET NON-PRIORITY REQUEST
EXECUTE 1DS,=
MONITOR RPPM REQUEST PP
LDD CM+1
NJN RCSX IF *1DS* STARTED
DELAY
UJN RCS1 RETRY CALL
RCSA VFD 18/3L1DS,6/,12/DWNF,12/0,12/4000
RCT SPACE 4,10
** RCT - READ CHANNEL TABLE.
*
* EXIT (A) = CHANNEL TABLE STATUS BYTE.
*
* USES NR - NR+4.
*
* MACROS CHTE.
RCT SUBR ENTRY/EXIT
CHTE *
LDC 0 READ CHANNEL TABLE ENTRY
CRD NR
RCTA LDD NR+0
UJN RCTX RETURN
RLB SPACE 4,15
** RLB - READ LINKAGE BITS.
*
* ENTRY (A) = (T6) = ADDRESS FOR LINKAGE IN (CM - CM+4).
* (PB) = CONTROL BUFFER ORDINAL.
* (T1) = DATA BUFFER ADDRESS.
* (T2) = CONTROL BUFFER WORD NUMBER.
* (CM - CM+4) = *PAD* WORD OF *CBT* ENTRY.
*
* EXIT SECTOR LINKAGE SET IN *CBT* ENTRY.
*
* USES T1, T6.
*
* MACROS CBTE.
RLB1 LDN 10+4 ADVANCE BUFFER ADDRESS
RADL T1
LDIL T1 EXTRACT LINKAGE FROM BUFFER
RLB2 SHN -14
SHN 10 POSITION FOR *CBT* ENTRY
STI T6
LDML 4,T1 EXTRACT LINKAGE FROM BUFFER
SHN -14
SHN 4 POSITION FOR *CBT* ENTRY
RAI T6
LDML 10,T1 EXTRACT LINKAGE FROM BUFFER
SHN -14
* SHN 0 POSITION FOR *CBT* ENTRY
RAI T6
AOD T6 ADVANCE *CBT* WORD ADDRESS
LMN CM+5
NJN RLB1 IF MORE LINKAGE
LDD PB
SHN CBTLS
CBTE *
ADC 0 FWA OF *CBT*
ADD T2
CWD CM UPDATE CONTROL BUFFER ENTRY
RLB SUBR ENTRY/EXIT
* LDD T6
UJN RLB2 MOVE SECTOR LINKAGE
RMR SPACE 4,10
** RMR - READ CHANNEL STATUS REGISTER.
*
* EXIT (A) = 0 IF NO CHANNEL ERROR.
* (RBUF) = REGISTER CONTENTS.
*
* CALLS WMC.
RMR SUBR ENTRY/EXIT
FNC. IOUC,MR
ACN. MR ACTIVATE MAINTENANCE CHANNEL
LDN 0
OAN. MR OUTPUT NULL PARAMETER
CON LDCI
IAN CH (FORCE CHANNEL TABLE ENTRY)
ORG *-1
CON RCSR+CH TRANSMIT REGISTER NUMBER
OAN. MR
RJM WMC WAIT CHANNEL EMPTY
DCN. MR+40
NJN RMRX IF CHANNEL HUNG FULL
ACN. MR
LDN RBUFL READ CHANNEL STATUS REGISTER
IAM. RBUF,MR
UJN RMRX RETURN
SCD SPACE 4,15
** SCD - STORE *CPD* DATA.
*
* ENTRY (A) = 0 TO INDICATE CHANNEL INACTIVE.
* = 1 TO INDICATE CHANNEL ACTIVE.
* (UC) = UNIT ACTIVITY COUNT.
*
* EXIT (T7) = 0.
*
* USES T5, T6, CM - CM+2.
*
* MACROS CCTE.
SCD SUBR ENTRY/EXIT
STD T5
LDN ZERL CLEAR UNUSED BYTES
CRD T6
LDD UC INSERT UNIT COUNT
STD T6
CCTE *
LDC CREQ STORE *CPD* DATA
CWD T5
UJN SCDX RETURN
SEC SPACE 4,15
** SEC - SET ERROR CODE.
*
* ENTRY (EO) = EST ORDINAL.
*
* EXIT TO *CSR* IF PROCESSING SPECIAL REQUEST.
*
* USES T5, UC, CW - CW+4, WB+3 - WB+4.
*
* CALLS DCM, IMR, IOM, LDP, RCS, SES.
*
* MACROS CBTE.
SEC5 LDN 1 BUFFER COUNT TO BE DELINKED
STD WB+3
* THE *SETS* MONITOR REQUEST IS USED TO MOVE THE I/O REQUEST
* TO AN ALTERNATE CHANNEL. THE I/O BUFFER IS ONLY DELINKED
* IF THE REQUEST IS CHANNEL SPECIFIC.
LDN SETS INSERT CODE IN *CBT*
RJM IMR
* LDN 0 SET INTERLOCK RELEASED (FOR *CMP*)
STM RQLN,DI
SOD UC DECREMENT UNIT ACTIVITY COUNT
SEC SUBR ENTRY/EXIT
LDN 0
RJM IOM
RJM DCM ENSURE CONTROLLER DESELECTED
RJM LDP
LDML IPPS,DI CHECK DIAGNOSTIC FLAG
SHN -17
ZJN SEC1 IF NOT ERROR FROM DIAGNOSTIC
LDD CB
SHN CBTLS CONVERT CBT ORDINAL
CBTE *
ADC HSLK FETCH ERROR STATUS
CRD CW
LDD CW CHECK PREVIOUS ERROR
LPN 77
NJN SEC2 IF PREVIOUS ERROR
SEC1 LDML EDBF+FALT
SHN -2 CREATE INDEX FROM FAULT CODE
STD T5
LDM TMSE,T5
SEC2 STD WB+4 SET MASS STORAGE ERROR CODE
LDML IPPS,DI CLEAR *RND*, *SDA* AND *BOR* FLAGS
LPC -1S15-1S14-1S13
STML IPPS,DI
LDD WB+4 CHECK ERROR CODE
LMN NRDE
ZJN SEC3 IF NOT-READY CONDITION
LDN STDE&STNR
SEC3 LMN STNR
RJM SES SET ERROR STATUS IN MST
LDD CB
ZJN SEC4 IF SPECIAL REQUEST OR NO BUFFER
LDM SREQ,DI
ZJP SEC5 IF I/O PROCESSING
SEC4 LDD EO DOWN CHANNEL ON THIS DEVICE
RJM RCS
AOM MISC MARK ERROR UNRECOVERED
LJM CSR CLEAR SPECIAL REQUEST
SFR SPACE 4,15
** SFR - SEARCH FOR CONSECUTIVE REQUEST.
*
* ENTRY (A) = CURRENT *CBT* ORDINAL.
*
* EXIT (A) = (NB) = 0 IF NO CONSECUTIVE REQUEST FOUND.
* = *CBT* ORDINAL OF NEXT REQUEST.
* (NR - NR+4) = PHYSICAL ADDRESS OF NEXT REQUEST.
*
* USES NB, CM - CM+4, NR - NR+4, T1 - T6.
*
* MACROS CBTE.
SFR SUBR ENTRY/EXIT
SHN CBTLS
CBTE *
ADC PAD1 FETCH SEEK PARAMETERS FROM *CBT*
CRD CM
ADN IOLK-PAD1 (T1) = I/O LINK-UP FLAGS
CRD T1
LDD T1 CHECK STREAMING ENABLED
LPN 40
NJN SFR1 IF DATA STREAMING DISABLED
LDM CYLN,DI
ADN 2
SBK CYUN
PJN SFR0 IF WITHIN LAST TWO CYLINDERS OF DEVICE
LDK MXBS MAXIMUM BUFFER COUNT TO STREAM
UJN SFR0.1 CHECK BUFFER COUNT
SFR0 LDK MNBS MINIMUM BUFFER COUNT TO STREAM
SFR0.1 SBM CBCT,DI
ZJN SFR2 IF TIME TO CURTAIL STREAMING
LDD T1+2
STD NB
ZJN SFRX IF NO REQUEST AVAILABLE
SHN CBTLS
CBTE *
ADC PAD1 PHYSICAL ADDRESS OF NEXT REQUEST
CRD NR
ADN IOLK-PAD1 I/O LINK-UP WORD OF NEXT REQUEST
CRD T2
LDD T2 COMPARE LINK-UP FLAGS
LMD T1
LPC DRFM+ILFM
ZJN SFR4 IF SAME DIRECTION AND INTERLOCKED
SFR1 LDN 0
SFR2 STD NB
SFR3 UJP SFRX RETURN
SFR4 LDD NR+1 CHECK SEEK PARAMETERS
SBD CM+1
ZJN SFR5 IF SAME CYLINDER
SBN 1
NJN SFR1 IF NOT NEXT CYLINDER
LDD CM+2
SBK PTCY*100
UJN SFR6 CHECK NEXT TRACK / SECTOR
SFR5 LDD CM+2 CHECK NEXT SECTOR
ADN PSBFDN
LMD NR+2
ZJN SFR7 IF NEXT SECTOR ON SAME TRACK
LDD CM+2
SFR6 ADD HN SET NEXT TRACK
SBK PSPT-PSBF
LMD NR+2
NJN SFR1 IF NOT NEXT SECTOR ON CONSECUTIVE TRACKS
SFR7 LDD NB
UJN SFR3 RETURN
SLB SPACE 4,15
** SLB - SET LINKAGE BITS.
*
* ENTRY (A) = *CBT* ORDINAL.
* (RW) = READ / WRITE STATUS.
*
* EXIT LINKAGE BITS SET IN *CBT* ENTRY / UEM BUFFER.
*
* USES PB, CM - CM+4, T1 - T6, UA - UA+1.
*
* CALLS RLB, SUA, WLB.
*
* MACROS CBTE.
SLB SUBR ENTRY/EXIT
STD PB
RJM SUA SET UEM ADDRESS
LDN PAD1
STD T2
SRD T3
LDN 5 UEM WORD COUNT
STD T5
LDM SLBB,RW SET PROCESSOR ADDRESS
STM SLBA
SLB1 LRD UA LOAD *R* REGISTER
LDD PB
SHN CBTLS READ CONTROL BUFFER WORD
CBTE *
ADC 0 FWA OF *CBT*
ADD T2
CRD CM
LDC SBUF-4 SET BUFFER ADDRESS
STDL T1
LDC 1S17 READ START OF BUFFER SEGMENT
CRML SBUF,T5
LDN CM+3 SET *CBT* ENTRY ADDRESS
STD T6
RJM 0 MOVE LINKAGE BITS
SLBA EQU *-1
LDN 10 ADVANCE *R* REGISTER IMAGE
RAD UA+1
SHN -14
RAD UA
AOD T2 ADVANCE CONTROL BUFFER WORD
LMN PAD4+1
NJN SLB1 IF NOT COMPLETE
LRD T3
UJP SLBX RETURN
SLBB CON RLB READ LINKAGE BITS
CON WLB WRITE LINKAGE BITS
SMC SPACE 4,10
** SMC - SEARCH FOR MAJOR CATEGORY SUBSTATUS.
*
* ENTRY (A) = MAJOR STATUS CATEGORY.
*
* EXIT (A) = FIRST TWO OCTETS OF SUBSTATUS.
* .LT. 0 IF SUBSTATUS NOT PRESENT.
* (T4) = SUBSTATUS PARAMETER ID CODE.
*
* CALLS SRP.
SMC1 LDML RPBF+6,T3 RETURN FIRST BYTE OF SUBSTATUS
SMC SUBR ENTRY/EXIT
LMN 0#10
STD T4 SEARCH FOR CONTROLLER SUBSTATUS
RJM SRP
ZJN SMC1 IF SUBSTATUS FOUND
LDN 0#20-0#10
RAD T4 SEARCH FOR DRIVE SUBSTATUS
RJM SRP
ZJN SMC1 IF SUBSTATUS FOUND
* LCN 0
UJN SMCX RETURN
SRF SPACE 4,10
** SRF - SET DRIVER RELOAD FLAG.
*
* EXIT (A) = 0.
*
* USES CM - CM+4.
*
* CALLS DCR.
*
* MACROS MONITOR.
SRF SUBR ENTRY/EXIT
RJM DCR DROP CHANNEL RESERVATION
* LDN 0
STD CM+2 CLEAR UNUSED BYTE
CHTE *
LDC CTALL*2 ADDRESS OF CHANNEL CONTROLWARE TABLE ENTRY
STD CM+4
SHN -14
STD CM+3
LDN 1 SET NUMBER OF REQUESTS
STD CM+1
LDD MA STORE REQUEST IN MESSAGE BUFFER
CWM SRFA,CM+1
MONITOR UTEM SET RELOAD FLAG
* LDN 0
UJN SRFX RETURN
SRFA VFD 1/0,5/0,6/1,6/,42/1
SRP SPACE 4,10
** SRP - SEARCH RESPONSE PACKET.
*
* ENTRY (A) = PARAMETER ID TO SEARCH FOR.
*
* EXIT (A) = 0 IF ID FOUND.
* .LT. 0 IF ID NOT FOUND.
* (T3) = *RPBF* INDEX - 5 OF PARAMETER BLOCK.
*
* USES T1, T2.
SRP1 LDML RPBF+5,T3 EXTRACT PARAMETER BLOCK LENGTH
SHN -10-1
ADN 1 CONVERT OCTET COUNT TO BYTE COUNT
STD T0
RAD T3 ADVANCE BUFFER INDEX
LDD T2
SBD T0
SRP2 MJN SRPX IF END OF RESPONSE PACKET
STD T2
LDM RPBF+5,T3 CHECK NEXT PARAMETER BLOCK
LMD T1
LPC 377
NJN SRP1 IF NOT REQUESTED ID
SRP SUBR ENTRY/EXIT
STD T1
LDN 0 INITIALIZE INDEX
STD T3
LDM RPBF+PLN PACKET LENGTH
ADN 1
SHN -1 CONVERT TO PP WORD COUNT
SBN 5
UJN SRP2 CHECK MINIMUM PACKET LENGTH
STF SPACE 4,15
** STF - SET TRACK FLAW, IF TRACK WITHIN USER AREA.
*
* ENTRY (CB) = CURRENT *CBT* ORDINAL.
* (EO) = EST ORDINAL.
* (T3+1) = CYLINDER NUMBER.
* (T3+2) = PHYSICAL TRACK + SECTOR.
*
* USES CM+1 - CM+3.
*
* CALLS CDA, C2D, IDM.
*
* MACROS MONITOR.
STF SUBR ENTRY/EXIT
LDD EO
SHN -3 CONVERT EST ORDINAL
RJM C2D
STM STFB+1 SET ORDINAL IN MESSAGE
LDD EO
STD CM+1
LPN 7
SHN 6 CONVERT LOW ORDER DIGIT
ADC 2R0,
STM STFB+2
RJM CDA CONVERT DISK ADDRESS
LDD T6 SET TRACK TO FLAW
STD CM+2
SBK MCLT
PJN STFX IF TRACK NOT WITHIN USER AREA
LDD T6
RJM C2D SET TRACK NUMBER IN MESSAGE
STM STFB+5
LDD T6
SHN -6
RJM C2D SET TRACK NUMBER IN MESSAGE
STM STFB+4
LDK SFTS INSERT SUBFUNCTION
STD CM+3
MONITOR SMDM SET TRACK FLAW REQUEST IN MST
LDD CM+1
NJN STF2 IF THIS FLAW ALREADY REQUESTED
LDC STFA
STML MAD1 ISSUE ERROR LOG MESSAGE
RJM IDM
STF2 LJM STFX RETURN
STFA VFD 24/0 RESERVED
VFD 12/1 ERRLOG ALERT FLAG
VFD 12/STFAL MESSAGE LENGTH
VFD 12/ELDY ERRLOG DAYFILE
STFB DATA C*EQXXX,TKNNNN, MEDIA DEFECT ENCOUNTERED.*
.1 SET *-STFA+4
STFAL EQU .1/5
STO SPACE 4,10
** STO - SET TIMEOUT.
*
* ENTRY (A) = TIMEOUT VALUE (IN SECONDS).
*
* USES T6, CM - CM+4.
STO SUBR ENTRY/EXIT
STD T6
LDC RTCL FETCH CURRENT TIME
CRD CM
LDD T6
ADD CM+1 SET TIME LIMIT
STM FTOC+1,DI
SHN -14
ADD CM
STM FTOC,DI
UJN STOX RETURN
SUA SPACE 4,10
** SUA - SET UEM ADDRESS.
*
* ENTRY (A) = *CBT* ORDINAL.
*
* EXIT (UA - UA+1) = UEM ADDRESS / 100.
*
* USES CM - CM+4.
*
* MACROS CBTE.
SUA SUBR ENTRY/EXIT
SHN CBTLS
CBTE *
ADC IOLK READ *CBT* ENTRY
CRD CM
LDD CM+4 EXTRACT RELATIVE UEM ADDRESS
ADC 0
SUAA EQU *-1
SHN -6
STD UA+1 SET ABSOLUTE ADDRESS / 100
LDD CM+3
ADC 0
SUAB EQU *-1
SHN 6
RAD UA+1
SHN -14
STD UA
UJN SUAX RETURN
SUI SPACE 4,15
** SUI - SET UNIT INTERLOCK.
*
* ENTRY (DI) = DEVICE STATUS BLOCK INDEX.
*
* EXIT (A) = 0 IF *PUT* ENTRY INTERLOCKED.
* (UC) = UNIT ACTIVITY COUNT INCREMENTED.
* (CM+1) = *BIOM* STATUS.
*
* USES CM+1, CM+2, UC.
*
* MACROS MONITOR.
SUI1 AOD UC ADVANCE UNIT ASSIGNED COUNT
LDC 4000
SUI2 STM RQLN,DI SET UNIT INTERLOCKED
LDN 0
SUI SUBR ENTRY/EXIT
LDM RQLN,DI
SCN 77
NJN SUI2 IF UNIT ALREADY INTERLOCKED
LDI DI SET *PUT* ORDINAL
ERRNZ PUTO CODE DEPENDS ON VALUE
STD CM+2
LDN SUIS SET SUBFUNCTION
STD CM+1
MONITOR BIOM INTERLOCK DEVICE
LDD CM+1
ZJN SUI1 IF INTERLOCK ACQUIRED
LDN 1
UJN SUIX RETURN
TMSE SPACE 4,10
** TMSE - TABLE OF MASS STORAGE ERROR CODES.
*
* INDEXED BY FAULT CODE / 4.
TMSE BSS 0
LOC 0
CON CHPE CHANNEL PARITY
CON CHFE CHANNEL FAILURE
CON FTOE FUNCTION TIMEOUT
CON PARE DATA PARITY (MEDIA)
CON NRDE DEVICE NOT READY
CON IDTE DATA TRANSFER
CON DSTE DEVICE STATUS
CON DSTE DEVICE STATUS
CON DSTE DEVICE STATUS
CON DSTE DEVICE STATUS
CON DSTE DEVICE STATUS
CON DDFE DIAGNOSTIC FAILURE
CON RAME CONTROLLER MEMORY
CON CHFE CHANNEL FAILURE
CON DRVE DRIVE RESERVE
CON RAME CONTROLLER MEMORY
LOC *O
TMSK SPACE 4,10
** TMSK - TABLE OF UNIT MASKS.
*
* INDEXED BY UNIT NUMBER.
TMSK BSS 0
LOC 0
CON 001
CON 002
CON 004
CON 010
CON 020
CON 040
CON 100
CON 200
LOC *O
UBP SPACE 4,20
** UBP - UPDATE *BDLL* PARAMETER.
*
* THIS ROUTINE CHANGES A BIT/FIELD IN WORD *BDLL* OF THE MST.
*
* ENTRY (A) = 6/WORD, 6/BITS TO CHANGE.
* (EO) = EST ORDINAL.
* (CM+2) = NEW VALUE.
* (T7) = LOW ORDER BIT TO CHANGE TIMES 100.
*
* USES T6, CM - CM+4.
*
* MACROS MONITOR, SFA.
UBP SUBR ENTRY/EXIT
STD T6
LDD MA
CWD T6 STORE MESSAGE BUFFER PARAMETERS
SFA EST,EO CALCULATE EST ADDRESS
ADK EQDE
CRD CM
LDD CM+4
SHN 3
STD CM+4 SET BASE *MST* ENTRY ADDRESS
SHN -14
STD CM+3
LDN 1
STD CM+1 PARAMETER WORD COUNT
MONITOR UTEM
UJN UBPX RETURN
UEC SPACE 4,15
** UEC - UPDATE MST ERROR COUNT.
*
* ENTRY (EO) = EST ORDINAL.
* (BMLM+1) = BML MESSAGE SYMPTOM CODE.
* (MISC - BIT 0) = 1 IF UNRECOVERED ERROR.
*
* USES CM+1 - CM+3.
*
* MACROS MONITOR.
UEC SUBR ENTRY/EXIT
LDM BMLM+1
LMC D"DN"*400+HD0111
NJN UECX IF NOT COMPLETION MESSAGE
LDD EO
STD CM+1 SET EST ORDINAL
LDM MISC
LPN 1 SET BYTE NUMBER
ADN 3
STD CM+2
LDN ICTS INCREMENT ERROR COUNT
STD CM+3
MONITOR SMDM
UJN UECX RETURN
UHD SPACE 4,15
** UHD - UNPACK HEX DATA.
*
* ENTRY (A) = DESTINATION DATA ADDRESS.
* (T2) = SOURCE DATA ADDRESS.
* (T4) = BYTE COUNT OF HEX DATA.
*
* EXIT (A) = CM WORD COUNT OF 12 BIT DATA.
*
* USES T2, T3, T4, T5.
*
* CALLS DV5.
UHD3 AODL T3 SET END OF 12 BIT DATA
STML UHDA
LDN ZERL ENSURE ZERO FILL TO CM WORD BOUNDARY
CRM *,ON
UHDA EQU *-1
LDDL T3 SET BYTE COUNT OF 12 BIT DATA
SBDL T5
RJM DV5 CONVERT TO CM WORD COUNT
UHD SUBR ENTRY/EXIT
STDL T3
STDL T5 PRESERVE DESTINATION BUFFER ADDRESS
UHD1 LDIL T2
SHN 16
STI T3 UNPACK N+3RD BYTE
SHN -6
SCN 77
STM 1,T3
AODL T3
SOD T4
UHD2 ZJN UHD3 IF END OF HEX DATA
AODL T2
LDIL T2
SHN -10
RAI T3 UNPACK N+4TH BYTE
AODL T3
LDIL T2
SHN 4
SCN 17
STI T3
SOD T4
ZJN UHD2 IF END OF HEX DATA
AODL T2
LDIL T2
STM 1,T3
SHN -14
RAI T3 UNPACK N+5TH BYTE
AODL T3
SOD T4
ZJN UHD2 IF END OF HEX DATA
AODL T2
AODL T3
UJP UHD1 CONTINUE UNPACK
VIS SPACE 4,15
** VIS - VERIFY INTERRUPT SOURCE.
*
* ENTRY (A) .LT. 0 IF ASYNC INTERRUPT.
* (DI) = DEVICE STATUS BLOCK ADDRESS.
* (PA) = REQUEST IN PROGRESS ADDRESS.
*
* EXIT (A) = 0 IF INTERRUPT FOR INACTIVE DRIVE.
* = RETURN ADDRESS TO PROCESSOR.
*
* USES DI, T4.
*
* CALLS LDP.
VIS3 LDM ATTN,DI PROCESS ASYNC INTERRUPT
ZJN VIS3.1 IF NOT WAITING FOR INTERRUPT
LDM EEST,DI
LMN ASRT
ZJN VIS6 IF WAITING FOR ASYNC INTERRUPT
VIS3.1 LDM ADDR,DI
LMC SRS12
NJN VIS3.2 IF NOT NONCONTROLLING DRIVE ON SLAVE RESET
STM ADDR,DI CLEAR REENTRY ADDRESS
VIS3.2 LDN 0
UJN VISX DISCARD UNSOLICITED ASYNC INTERRUPT
VIS4 LDD T4 CHANGE ADDRESS TO CORRECT DEVICE
STD DI
RJM LDP LOAD DEVICE PARAMETERS
VIS5 LDM RQLN,DI
SCN 77
ZJN VISX IF UNIT NOT INTERLOCKED
VIS6 LDD PA
LMC ATT2
NJN VIS2 IF NOT SOLICITED INTERRUPT
LDM ATTN,DI
VIS SUBR ENTRY/EXIT
MJP VIS3 IF ASYNC INTERRUPT
LDM RPBF+CRN CHECK COMMAND NUMBER
LMD DI
ZJN VIS5 IF INTERRUPT FROM CURRENT DEVICE
LDC DSTB
STD T4
VIS1 LDM RPBF+CRN COMPARE COMMAND NUMBER
LMD T4
ZJN VIS4 IF DEVICE FOUND
LDN DSTBE
RAD T4 ADVANCE TABLE ADDRESS
LMM XMDA
NJN VIS1 IF NOT END OF DEVICE STATE TABLE
VIS2 LDN 0
UJN VISX RETURN
WLB SPACE 4,10
** WLB - WRITE LINKAGE BITS.
*
* ENTRY (A) = (T6) = ADDRESS FOR LINKAGE IN (CM - CM+4).
* (T1) = DATA BUFFER ADDRESS.
* (T5) = NUMBER OF WORDS TO WRITE.
* (CM - CM+4) = *PAD* WORD OF *CBT* ENTRY.
*
* EXIT SECTOR LINKAGE SET IN DATA BUFFER.
*
* USES T1, T6.
WLB1 LDN 10+4 ADVANCE BUFFER ADDRESS
RADL T1
LDI T6 EXTRACT LINKAGE FROM *CBT* ENTRY
SHN -10
* LPN 17
SHN 14 POSITION FOR DATA BUFFER
LMI T1
STIL T1
WLB2 LDI T6 EXTRACT LINKAGE FROM *CBT* ENTRY
SHN -4
LPN 17
SHN 14 POSITION FOR DATA BUFFER
LMM 4,T1
STML 4,T1
LDI T6 EXTRACT LINKAGE FROM *CBT* ENTRY
* SHN 0
LPN 17
SHN 14 POSITION FOR DATA BUFFER
LMM 10,T1
STML 10,T1
AOD T6 ADVANCE *CBT* WORD ADDRESS
LMN CM+5
NJN WLB1 IF MORE LINKAGE
LDC 1S17
CWML SBUF,T5 UPDATE DATA BUFFER
WLB SUBR ENTRY/EXIT
* LDD T6
UJN WLB2 MOVE SECTOR LINKAGE
WMC SPACE 4,10
** WMC - WAIT MAINTENANCE CHANNEL EMPTY.
*
* EXIT (A) = 0 IF CHANNEL EMPTY.
* .NE. 0 IF CHANNEL HUNG FULL.
WMC3 LDN 0 INDICATE CHANNEL EMPTY
WMC SUBR ENTRY/EXIT
LDD TH
WMC1 EJM. WMC3,MR IF TRANSMISSION COMPLETE
SBN 1
NJN WMC1 IF NOT TIMED OUT
WMC2 DCN. MR+40
CCF. *+2,MR CLEAR CHANNEL FLAG
LDD CP
ADN MS2W STORE CP MESSAGE
CWM WMCA,TR
UJN WMCX RETURN
WMCA DATA C*MR ERROR.*
WTC SPACE 4,10
** WTC - WAIT TRANSMISSION COMPLETE.
*
* ERROR TO *ERR*.
*
* USES T1.
*
* CALLS CFE.
WTC3 LDD T1 CHECK FOR I/O ERROR
RJM CFE
DCN CH+40 DEACTIVATE CHANNEL
WTC SUBR ENTRY/EXIT
STD T1
LDN 5 SET TIMEOUT = 5*262 MILLISECONDS
STD T0
WTC1 LDN 0
WTC2 EJM WTC3,CH IF LAST BYTE TAKEN OFF CHANNEL
SBN 1
NJN WTC2 IF NOT TIMED OUT
SOD T0
NJN WTC1 IF NOT TIMEOUT
LDN ECHF
RJM ERR PROCESS CHANNEL ERROR
TITLE CHANNEL SUBROUTINES.
BCS SPACE 4,10
** BCS - DEFINE INFORMATION TRANSFER.
*
* ENTRY (A) = BUS *A* BITS 7 AND 6.
*
* ERROR TO *ERR*.
*
* CALLS FCN, RSR.
BCS2 LDDL LF FETCH LAST FUNCTION
LMN 0#32
RJM FCN DROP SYNC OUT (NO PARITY CHECK)
LDN 77
RJM RSR READ SLAVE RESPONSE
BCS SUBR ENTRY/EXIT
SHN 17-1
ADC F005B SET SYNC OUT
RJM FCN
LDN 77 READ SLAVE RESPONSE
RJM RSR
LPC 377
ZJN BCS2 IF BUS ACKNOWLEDGE CORRECT
LDN EBAE
RJM ERR PROCESS ERROR
CFE SPACE 4,10
** CFE - CHECK FOR I/O ERROR.
*
* ENTRY (A) = RESIDUAL WORD COUNT.
*
* EXIT (A) = 0.
*
* ERROR TO *ERR*.
CFE5 NJN CFE3 IF INCOMPLETE DATA TRANSFER
CFE SUBR ENTRY/EXIT
CFM CFE5,CH IF CHANNEL ERROR FLAG CLEAR
CFE1 LDN ECIE
CFE2 RJM ERR PROCESS CHANNEL ERROR
CFE3 LDN EIDT
UJN CFE2 PROCESS ERROR
CTC SPACE 4,10
** CTC - CHECK TRANSFER COMPLETE.
*
* EXIT (A) = 0.
*
* ERROR TO *ERR*.
*
* CALLS CTO.
CTC SUBR ENTRY/EXIT
CTC1 LDC F0700
RJM FCN REQUEST OPERATIONAL STATUS
ACN CH
IAN CH READ STATUS
SFM CFE1,CH IF CHANNEL ERROR FLAG SET
LPC 176001
ZJN CTCX IF TRANSFER COMPLETE
SCN 1
NJN CTC4 IF REGISTER PARITY ERROR
RJM CTO CHECK ELAPSED TIME
MJN CTC1 IF NOT TIMEOUT
LDN ETTC
CTC3 RJM ERR PROCESS ERROR
CTC4 LDN ERPE
UJN CTC3 PROCESS ERROR
DCM SPACE 4,10
** DCM - DESELECT CONTROL MODULE.
*
* ENTRY (SF) = 0 IF CONTROLLER NOT SELECTED.
*
* EXIT (A) = (SF) = 0.
*
* USES SF.
*
* ERROR TO *ERR*.
*
* CALLS FCN.
DCM2 IAN CH+40 READ CONTROLLER RESPONSE
LDN 0
STD SF CLEAR SELECT FLAG
DCM SUBR ENTRY/EXIT
LDD SF
ZJN DCMX IF CONTROLLER NOT SELECTED
LDC F0071
RJM FCN CLEAR SELECT OUT
LDC 2000
ACN CH
DCM1 FJM DCM2,CH IF SLAVE IN DROPPED
SBN 1
NJN DCM1 IF NOT TIMED OUT
LDM ESAD,DI
NJN DCM2 IF ERROR PROCESSING
LDN ECNR
RJM ERR PROCESS ERROR
DTM SPACE 4,10
** DTM - DETERMINE TRANSFER MODE.
*
* ENTRY (A) = CONTROLLER NUMBER.
*
* EXIT (A) = CONTROLLER NUMBER + TRANSFER MODE CHANGE.
*
* USES T4.
*
* CALLS FCN, RSR.
DTM SUBR ENTRY/EXIT
SHN 14
STDL T4 SET CONTROLLER NUMBER IN RESPONSE
LMC F8025
RJM FCN REQUEST TRANSFER MODE (SET MASTER OUT)
LDN 77
RJM RSR READ SLAVE RESPONSE
LPN 0#10
LMN 0#10 COMPLEMENT TRANSFER MODE
SHN 13-4
RADL T4 APPEND TRANSFER MODE TO RESPONSE
LDDL LF
LMC 0#54 DROP MASTER OUT
RJM FCN
LDN 77 READ SLAVE RESPONSE
RJM RSR
LDDL T4
UJP DTMX RETURN
ECI SPACE 4,20
** ECI - EXAMINE CONTROLLER INTERRUPTS.
*
* ENTRY (DI) = DEVICE STATUS BLOCK ADDRESS.
*
* EXIT (A) .NE. 0, IF RESET OR ERROR IN PROGRESS.
* (PA) = 0 IF NO REQUEST IN PROGRESS.
* (CM - CM+4) = *PILL* WORD OF *PUT* ENTRY.
* (WB - WB+4) = *UNCT* WORD OF *PUT* ENTRY.
* TO (ATTN) IF INTERRUPT RECEIVED.
* TO *SRS* IF LOGICAL RESET NOT YET PERFORMED.
*
* USES PA, T5.
*
* CALLS FCN, GIS, IHD, LDP, SAP, SUI.
ECI SUBR ENTRY/EXIT
ECI1 RJM SAP SELECT ADAPTOR PORT
LDC F0715 ENABLE INTERRUPTS
RJM FCN
RJM LDP LOAD DEVICE PARAMETERS
RJM GIS GET INTERRUPT STATUS
LPML TMSK,CN
ZJN ECI3 IF NO INTERRUPT FROM THIS CONTROLLER
* CHECK THAT INTERRUPT BELONGS TO CURRENT DRIVE.
RJM IHD
ZJN ECI3 IF RESPONSE FROM INACTIVE DRIVE
* LDM ATTN,DI
STD PA SET RETURN ADDRESS
LDN 0
STM ATTN,DI DEACTIVATE RETURN
STM ADDR,DI CLEAR REENTRY ADDRESS
* RETURN TO CALLER WITH STATUS FROM RESPONSE PACKET.
LDM EEST,DI EXPECTED RESPONSE TYPE
LMD RT
ZJN ECI2 IF EXPECTED RESPONSE
LMD RT
LMD MS
ZJN ECI2 IF EXPECTED STATUS
LMK CMCS&CMSS
ECI2 LJM 0,PA RETURN TO CALLER
ECI3 LDD PA
NJN ECI2 IF REQUEST IN PROGRESS
LDM ERFL
ZJN ECI4 IF DRIVER NOT IN ERROR PROCESSING
LMD DI
NJN ECI7 IF ERROR ON DIFFERENT DEVICE
ECI4 LDM SRSA
NJN ECI7 IF RESET IN PROGRESS
LDM PNUN,DI
SHN -6 SET CONTROLLER BLOCK INDEX
STD T5
LDML CSTB,T5 CHECK CONTROLLER STATUS
SHN -16
ZJN ECI7 IF AVAILABLE
SHN -1
ZJN ECI8 IF NOT SLAVE RESET FAILURE
LDM ENAD,DI
NJN ECI6 IF DRIVE ALREADY DISABLED
LDC SRSH
STM IOMA SET ERROR MESSAGE
STM ENAD,DI DISABLE DRIVE
ECI6 LDN 0
ECI7 LJM ECIX RETURN
* AT DRIVER INITIATION, PERFORM LOGICAL RESET ON CONTROLLING
* DRIVE OF EACH CONTROL MODULE. NO ACTIVITY ON OTHER DRIVES
* ON THE CONTROL MODULE WILL BE ALLOWED UNTIL THE RESET IS
* COMPLETE.
ECI8 LDM CSTB,T5 CHECK CONTROLLING DRIVE INDEX
LMD DI
NJN ECI7 IF NOT THIS DRIVE
RJM SUI SET UNIT INTERLOCK
NJN ECI7 IF DEVICE ASSIGNED ELSEWHERE
LDC 1S12+CMP
LJM SRS INITIATE LOGICAL RESET
FCN SPACE 4,10
** FCN - ISSUE FUNCTION.
*
* ENTRY (A) = FUNCTION CODE.
*
* EXIT (A) .NE. 0.
* (LF) = FUNCTION CODE.
*
* USES LF.
*
* ERROR TO *ERR*.
FCN2 DCN CH+40 LEAVE CHANNEL INACTIVE
FCN SUBR ENTRY/EXIT
DCN CH+40
STDL LF
FAN CH ISSUE FUNCTION
LDN 20D
FCN1 IJM FCNX,CH IF FUNCTION ACCEPTED
SBN 1
NJN FCN1 IF NOT TIMED OUT
LDM ESAD,DI
NJN FCN2 IF ERROR IN PROGRESS
LDN ETFN
RJM ERR PROCESS ERROR
GIS SPACE 4,10
** GIS - GET INTERRUPT STATUS.
*
* EXIT (A) = (GISA) = INTERRUPT STATUS.
*
* CALLS FCN, RSR.
GIS2 IAN CH READ INTERRUPT STATUS
GIS3 STML GISA
LDC F0711 NEGATE MASTER OUT
RJM FCN
LDN 20D READ SLAVE RESPONSE
RJM RSR
LDML GISA RETURN WITH (A) = STATUS
GIS SUBR ENTRY/EXIT
LDN 20D
ACN CH+40
GIS1 FJM GIS2,CH IF SLAVE IN
SBN 1
NJN GIS1 IF NOT TIMED OUT
* LDN 0
UJP GIS3 SET NULL STATUS
GISA CON 0
GSS SPACE 4,15
** GSS - GET SLAVE STATUS.
*
* ENTRY (A) = 0 IF STATUS W/O MASTER TERMINATE.
* = MASTER TERMINATE OPTION.
* (T1) = RESIDUAL BYTE COUNT.
*
* EXIT (A) = (T7) = SLAVE STATUS IF TRANSFER SUCCESSFUL.
* (GSSA) = SLAVE STATUS AS READ FROM CONTROLLER.
*
* ERROR TO *ERR* IF STATUS ERROR.
*
* USES T7.
*
* CALLS FCN, RRP, RSR.
GSS5 LDML GSSA ENDING STATUS
STDL T7
GSS SUBR ENTRY/EXIT
SHN 10
ADC F8039 INDICATE TRANSFER SUCCESSFUL
RJM FCN
LDC 2000 READ SLAVE RESPONSE
RJM RSR
STML GSSA
SFM GSS3,CH IF ERROR FLAG SET
SHN 21-7
PJN GSS1 IF TRANSFER NOT SUCCESSFUL
LDD T1
ZJN GSS5 IF ALL WORDS TRANSFERRED
LDN EIDT
UJN GSS4 PROCESS ERROR
GSS1 SHN 10
LPC 117
LMN 3
NJN GSS2 IF NOT COMMAND REJECT
* IF CONTROLLER OVER TEMPERATURE OCCURS BEFORE THE COMMAND IS
* ISSUED, A COMMAND REJECT ERROR COULD OCCUR. A LOGICAL RESET
* WOULD CAUSE THE OVER TEMPERATURE STATUS TO BE LOST.
RJM RRP READ RESPONSE PACKET
LCN EUST
UJN GSS4 PROCESS ERROR
GSS2 LDN EUST
UJN GSS4 PROCESS ERROR
GSS3 LDN ECIE
GSS4 RJM ERR PROCESS ERROR
GSSA CON 0 ENDING STATUS
IHD SPACE 4,15
** IHD - INTERRUPT HANDLER.
*
* ENTRY (DI) = *DSTB* ADDRESS.
* (DN) = DRIVE NUMBER.
*
* EXIT (A) = EXIT CONDITION FROM ROUTINE *VIS*.
* = 0 IF INTERRUPT FOR INACTIVE DRIVE.
* = RETURN ADDRESS TO PROCESSOR.
* (MS) = MAJOR STATUS FROM RESPONSE PACKET.
* (RT) = RESPONSE TYPE FROM STATUS BLOCK.
*
* USES DI, MS, RT, T4.
*
* CALLS CCO, DCM, LDP, LSD, RRP, SCM, VIS.
IHD4 LCN 0 INDICATE ASYNC INTERRUPT
IHD5 RJM VIS VERIFY INTERRUPT SOURCE
IHD SUBR ENTRY/EXIT
RJM SCM SELECT CONTROL MODULE
RJM RRP READ RESPONSE PACKET
LDML RPBF+MST
STDL MS SAVE MAJOR STATUS
SHN -4
LPN 17 EXTRACT RESPONSE TYPE
STD RT
LMN XFNT
ZJN IHD5 IF TRANSFER NOTIFICATION
RJM DCM DESELECT CONTROL MODULE
LDD RT CHECK RESPONSE TYPE
LMN ASRT
NJN IHD5 IF NOT ASYNC (UNSOLICITED) RESPONSE
LDM RPBF+CUN
LPC 377
STD T4 SAVE DRIVE NUMBER
LMC 0#FF
NJN IHD1 IF NOT RESPONSE FROM CONTROLLER
LDN 1 ISSUE BML MESSAGE IF OVER TEMPERATURE
RJM CCO CHECK FOR CONTROLLER OVER TEMPERATURE
LDM SRSA
ZJN IHD3 IF RESET NOT IN PROGRESS
STD DI SET DEVICE INDEX
RJM LDP
IHD0 LJM IHD4 PROCESS ASYNC INTERRUPT
* ON SLAVE RESET, IF DRIVE INTERRUPT FOR THE CONTROLLING DRIVE
* IS RECEIVED BEFORE THE CONTROLLER INTERRUPT, CLEAR *SRSC*
* AND DISCARD DRIVE INTERRUPT.
IHD1 LDD T4 CHECK FACILITY ADDRESS
LMD DN
ZJN IHD2 IF INTERRUPT FROM CURRENT DRIVE
RJM LSD LOCATE SELECTED DRIVE
ZJN IHD3 IF DRIVE UNKNOWN ON THIS CONTROLLER
STD DI SET DEVICE INDEX
RJM LDP
IHD2 LDM SRSA CHECK RESET IN PROGRESS
LMD DI
NJN IHD0 IF NOT DRIVE CONTROLLING RESET
STM SRSC INDICATE DRIVE INTERRUPT RECEIVED
IHD3 LJM XMD2 RETURN TO MAIN LOOP
RCR SPACE 4,10
** RCR - RESET CHANNEL REGISTERS.
*
* ENTRY (CR) = CHANNEL RESERVATION STATUS.
*
* EXIT (SF) = 0 (DEVICE NOT SELECTED).
*
* CALLS FCN.
*
* MACROS WAIT.
RCR SUBR ENTRY/EXIT
LDD CR
ZJN RCRX IF CHANNEL NOT RESERVED
LDN F0000
RJM FCN MASTER CLEAR THE ADAPTOR
WAIT 100
* LDN 0 SET DEVICE NOT SELECTED
STD SF
ADK F0000-0 ENSURE NO SEQUENCE ERROR
RJM FCN
LDC F7E42 FIX CHANNEL TRANSFER RATE AT 10 MB
RJM FCN
UJN RCRX RETURN
RIF SPACE 4,15
** RIF - RESET INTERFACE.
*
* ENTRY (RW) = 0 TO RESET SLAVE INTERFACE.
* (RW) = 1 TO RESET LOGICAL INTERFACE.
* (CN) = CONTROLLER NUMBER.
*
* EXIT (RF) = 1.
*
* USES RF.
*
* CALLS FCN, RCR, SAP.
*
* MACROS WAIT.
RIF SUBR ENTRY/EXIT
AOD RF FLAG RESET IN PROGRESS
RJM RCR RESET CHANNEL REGISTERS
RJM SAP SELECT ADAPTOR PORT
LDD CN
SHN 14 FORM RESET FUNCTION
LMML RIFA,RW
RJM FCN ISSUE LOGICAL RESET
WAIT 20
LDDL LF
LMN 2 SET SYNC OUT
RJM FCN
WAIT 10
LDDL LF NEGATE SYNC OUT
SCN 2
RJM FCN
LDDL LF CLEAR MASTER OUT
SCN 4
RJM FCN
UJP RIFX RETURN
RIFA BSS 0 RESET FUNCTION CODES
CONL F8415
CONL F8215
RRP SPACE 4,10
** RRP - READ RESPONSE PACKET.
*
* USES T1.
*
* CALLS BCS, FCN, GSS.
RRP5 LDN 0 GET ENDING STATUS
RJM GSS
RRP SUBR ENTRY/EXIT
LDN RIIN
RJM BCS INITIATE BUS EXCHANGE (RESPONSE IN)
LDC F0281
RJM FCN READ STREAMING
ACN CH
LDN RPBFL TRANSFER RESPONSE PACKET
IAM RPBF,CH
STD T0 SAVE RESIDUE
SBN RPBFL-4
PJN RRP2 IF INVALID PACKET LENGTH
LDM RPBF+PLN
ADN 3 CONVERT OCTET COUNT TO BYTE COUNT
SHN -1
RAD T0
RRP2 LDK RPBFL COMPARE LENGTH WITH DATA READ
SBD T0
STD T1 SET RESIDUAL BYTE COUNT
LDC 50000D
RRP3 IJM RRP5,CH IF SLAVE IN
SBN 1
NJN RRP3 IF NOT TIMED OUT
LCN ECNR
RJM ERR PROCESS ERROR
RSR SPACE 4,10
** RSR - READ SLAVE RESPONSE.
*
* ENTRY (A) = TIMEOUT VALUE (MICROSECONDS).
*
* EXIT (A) = SLAVE RESPONSE.
*
* ERROR TO *ERR* IF SLAVE NOT RESPONDING.
RSR4 IAN CH READ SLAVE RESPONSE
RSR SUBR ENTRY/EXIT
ACN CH
RSR1 FJM RSR4,CH IF SLAVE IN DROPPED
SBN 1
NJN RSR1 IF NOT TIMED OUT
LDN ECNR
RJM ERR PROCESS ERROR
RTR SPACE 4,10
** RTR - READ *T* REGISTER.
RTR2 ACN CH ACTIVATE CHANNEL
LDN 3
IAM EDBF+TREG,CH INPUT REGISTER CONTENTS
RTR SUBR ENTRY/EXIT
FNC F0A00,CH
RTR1 IJM RTR2,CH IF FUNCTION ACCEPTED
SBN 77
PJN RTR1 IF NOT TIMED OUT
DCN CH+40
UJN RTRX RETURN
SAP SPACE 4,10
** SAP - SELECT ADAPTOR PORT.
*
* CALLS FCN.
SAP SUBR ENTRY/EXIT
LDM PNUN,DI
SHN 0-11 ISOLATE PORT NUMBER
SHN 13-0
ERRNZ F0062+4000-F0862 CODE DEPENDS ON VALUE
ADC F0062
RJM FCN
UJN SAPX RETURN
SCM SPACE 4,10
** SCM - SELECT CONTROL MODULE.
*
* ENTRY (SF) = 1 IF DEVICE PREVIOUSLY SELECTED.
* (CN) = CONTROLLER (CM3) NUMBER.
*
* EXIT (A) = (SF) = 1 = DEVICE SELECTED.
*
* ERROR TO *ERR* IF SELECT REJECT.
*
* CALLS DTM, FCN, RSR, SAP.
SCM3 AOD SF SET DEVICE SELECTED
SCM SUBR ENTRY/EXIT
LDD SF
NJN SCMX IF DEVICE PREVIOUSLY SELECTED
STM GSSA
RJM SAP SELECT ADAPTOR PORT
LDD CN
RJM DTM DETERMINE TRANSFER MODE
LMN F0029
RJM FCN SET SELECT OUT
LDN 77
RJM RSR READ SLAVE RESPONSE
LPML TMSK,CN
NJN SCM3 IF CORRECT CONTROLLER
LDN ETSL
RJM ERR PROCESS ERROR
WCB SPACE 4,15
** WCB - WRITE COMMAND BLOCK (PACKET).
*
* ENTRY (A) = COMMAND BLOCK LENGTH.
* (DI) = DEVICE STATE TABLE ADDRESS.
* (TO) = TIMEOUT VALUE.
*
* ERROR TO *ERR*.
*
* USES T1.
*
* CALLS BCS, DCM, FCN, GSS, SCM, STO.
WCB3 LDN 0 GET STATUS
RJM GSS
RJM DCM DESELECT CONTROL MODULE
LDD TO
RJM STO SET TIMEOUT
WCB SUBR ENTRY/EXIT
STM CPBF+PLN
LDD DI SET COMMAND REFERENCE NUMBER
STM CPBF+CRN
RJM SCM SELECT CONTROL MODULE
LDN CIOT
RJM BCS INITIATE BUS EXCHANGE (COMMAND OUT)
LDML CPBF+OPC
STML LCMD,DI SAVE LAST COMMAND
LDC F0381
RJM FCN WRITE STREAMING
ACN CH
LDM CPBF+PLN CONVERT OCTET COUNT TO BYTE COUNT
ADN 3
SHN -1 TRANSFER COMMAND PACKET
OAM CPBF,CH
STD T1 SAVE RESIDUAL BYTE COUNT
LDC 50000D
WCB2 IJM WCB3,CH IF SLAVE IN
SBN 1
NJN WCB2 IF NOT TIMED OUT
LDN ECNR
RJM ERR PROCESS ERROR
WTR SPACE 4,10
** WTR - WRITE *T* PRIME REGISTER.
*
* ENTRY (CB) = *CBT* ORDINAL.
* (RW) = READ / WRITE STATUS.
*
* CALLS FCN, STO, SLB, SUA, WTC.
WTR SUBR ENTRY/EXIT
LDD RW
ZJN WTR1 IF READ REQUEST
LDD CB
RJM SLB SET LINKAGE BITS
WTR1 LDD CB
RJM SUA GET UEM BUFFER ADDRESS
LDD UA+1
SHN 11 FORMAT ADDRESS
SCN 7
STML WTRA+2 SET ABSOLUTE ADDRESS
LDD UA
SHN 14 COMPLETE BUFFER ADDRESS
LMD UA+1
SHN 11-20 INSERT IN REGISTER IMAGE
STM WTRA+1
LDML WTRB,RW ISSUE DMA FUNCTION
RJM FCN
LDN 3 SET BLOCK LENGTH
ACN CH
OAM WTRA,CH OUTPUT BUFFER PARAMETERS
RJM WTC
LDN 3 SET REQUEST TIMEOUT
RJM STO
UJP WTRX RETURN
WTRA BSS 0 *T* REGISTER BUFFER
CONL 40000 BYTE LENGTH OF I/O TRANSFER
CONL 0,0 UEM ADDRESS OF BUFFER
WTRB BSS 0 DMA I/O FUNCTIONS
CONL F0C00
CONL F0D00
TITLE MISCELLANEOUS.
SPACE 4,10
* COMMON DECKS.
*CALL COMPCHD
*CALL COMPC2D
RND$ EQU 0 DEFINE ROUNDING FOR *COMPDV5*
*CALL COMPDV5
M8K$ EQU 1 USE LONG INSTRUCTIONS
*CALL COMPIMB
QUAL SES
QUAL$ EQU 0 DONT FURTHER QUALIFY *SES*
T5 EQU EO
*CALL COMPSES
QUAL *
SES EQU /SES/SES
SPACE 4,10
* BUFFERS.
RPBF BSS 0 RESPONSE PACKET BUFFER
CPBF EQU RPBF+1 COMMAND PACKET BUFFER
RBUF EQU RPBF+RPBFL REGISTER BUFFER
RBUFL EQU 2*4
SBUF EQU RBUF+RBUFL SCRATCH BUFFER
SBUFL EQU 3*5
SPACE 4,10
EDBF EQU 20000-400-RTEDL ERROR DATA BUFFER
ERRNG 400-EDBFL+RTEDL CODE DEPENDS ON VALUE
ERRPL SBUF+SBUFL-EDBF BUFFER OVERLAP
MSGP EQU EDBF+EMBF MESSAGE PREFIX
MSGL EQU MSGP+2 MESSAGE LENGTH
MSGT EQU MSGL+2 MESSAGE TYPE
BMLM EQU MSGT+1 BML MESSAGE HEADER
MSID EQU BMLM MESSAGE ID
UNIT EQU MSID+3 UNIT NUMBER
PORT EQU UNIT+1 PORT NUMBER
ESTO EQU PORT+1 EST ORDINAL
MISC EQU ESTO+1 RETRY COUNT / WRITE + RECOVERY FLAGS
MFID EQU MISC+2 MAINFRAME ID
TITLE INSTRUCTION MODIFICATION TABLES.
TCHA SPACE 4,10
** TABLE OF CHANNEL INSTRUCTIONS ADDRESSES.
TCHA CHTB
CON 0 END OF TABLE
RSTC RESTORE CHANNEL INSTRUCTIONS
TCBT SPACE 4,10
** TABLE OF INSTRUCTIONS REQUIRING FWA OF *CBT*.
TCBT BSS 0
TCBT HERE
CON 0 TERMINATE TABLE
TCCT SPACE 4,10
** TABLE OF INSTRUCTIONS REQUIRING ADDRESS OF *CCT* ENTRY.
TCCT BSS 0
TCCT HERE
CON 0 TERMINATE TABLE
TCHT SPACE 4,10
** TABLE OF INSTRUCTIONS REQUIRING FWA OF CHANNEL TABLE.
TCHT BSS 0
TCHT HERE
CON 0 TERMINATE TABLE
TEMB SPACE 4,10
** TABLE OF INSTRUCTIONS REQUIRING FWA OF *EMB*.
TEMB BSS 0
QUAL COMPIMB
TEMB HERE
QUAL *
CON 0 TERMINATE TABLE
TEXP SPACE 4,10
** TABLE OF INSTRUCTIONS REQUIRING FWA OF PP EXCHANGE PACKAGE.
TEXP BSS 0
TEXP HERE
CON 0 TERMINATE TABLE
TPUT SPACE 4,10
** TABLE OF INSTRUCTIONS REQUIRING FWA OF *PUT*.
TPUT BSS 0
TPUT HERE
CON 0 TERMINATE TABLE
TITLE PRESET.
PRS SPACE 4,20
** PRS - PRESET DRIVER FOR PROCESSING.
*
* EXIT (UC) = 0.
* TO *MRS*.
* TO *XMD8* IF CHANNEL DOWN OR NO DEVICES FOR DRIVER.
*
* CALLS CCP, CCR2, IST, MCI, SCT, SPA, STA.
PRS BSS 0 ENTRY
RJM CCP CHECK CALLING PROGRAM
* LDN 0
STD UC SET NO UNITS RESERVED
LDC EDBF
ERRPL ENDD-EDBF CODE DEPENDS ON VALUE
STDL T4
RJM MCI MODIFY CHANNEL INSTRUCTIONS
* LDN 0
STD CR SET CHANNEL NOT RESERVED
* PRESET BML ERROR MESSAGE BUFFER.
PRS1 STI T4
AODL T4 ADVANCE BUFFER ADDRESS
SHN 0-15
ZJN PRS1 IF NOT END OF BUFFER
LDN MLDY
STM MSGT
LDC BMID ERROR MESSAGE ID
STM MSID
RJM SPA SET PP EXCHANGE PACKAGE ADDRESSES
RJM SCT SET CHANNEL TABLE ADDRESSES
LDK BIOL
CRD CM READ BUFFERED I/O POINTERS
LDD CM+1
SHN 14
LMD CM+2
ADN CCTP READ *CCT* POINTER
CRD T4
ADN CBTP-CCTP READ *CBT* POINTER
CRD WB
SBN -PUTP+CBTP READ *PUT* POINTER
CRD T2
LDD T2+3 SET ADDRESS OF *PUT*
LPN 77
RAM ISTA
LDD T2+4
RAM ISTA+1
AOD T2 SET NUMBER OF *PUT* ENTRIES
STD RC
LDC T5*20000+TPUT SET *PUT* ADDRESSES
RJM STA
LDD IR+2 ADJUST CHANNEL CONTROL TABLE POINTER
SHN CCTLS-6
RAD CM
SHN -14
RAD T7
LDC T7*20000+TCCT SET *CCT* ADDRESSES
RJM STA
.WB3 EQU WB+3
LDC .WB3*20000+TCBT SET *CBT* ADDRESSES
RJM STA
LDN EMBP FETCH *EMB* POINTER
CRD CM
.CM1 EQU CM+1
LDC .CM1*20000+TEMB SET *EMB* ADDRESSES
RJM STA
LDK UEML
CRD CM READ UEM POINTERS
LDD CM
PRSA SHN 11
* SHN 11+EMSC
SCN 77
STM SUAA SET FWA OF UEM
LDD CM
PRSB SHN -3
* SHN EMSC-3
STM SUAB
LDK MMFL FETCH MACHINE ID
CRD CM
LDD CM SET MAINFRAME ID FOR BML MESSAGES
STM MFID
RJM IST INITIALIZE DEVICE STATE TABLE
ZJN PRS4 IF NO DEVICES FOR THIS DRIVER
LJM CCR2 RESERVE CHANNEL (RETURN TO *PRS3*)
PRS3 NJP MRS IF CHANNEL NOT DOWN
PRS4 LJM XMD8 DROP CPP
TITLE PRESET SUBROUTINES.
CCP SPACE 4,10
** CCP - CHECK CALLING PROGRAM.
*
* EXIT (A) = 0.
*
* USES CM - CM+4.
*
* CALLS DFM.
*
* MACROS MONITOR.
CCP SUBR ENTRY/EXIT
LDK NCPL
CRD CM GET NUMBER OF CONTROL POINTS
AOD CM+1
SHN 7
LMD CP
ZJN CCPX IF DRIVER AT SYSTEM CP
LDC MSG1
RJM DFM ISSUE DAYFILE MESSAGE
MONITOR ABTM
LJM PPR EXIT TO PP RESIDENT
IST SPACE 4,15
** IST - INITIALIZE DEVICE STATE TABLE.
*
* ENTRY (RC) = NUMBER OF *PUT* ENTRIES.
*
* EXIT (A) = 0 IF NO DEVICES FOR THIS DRIVER.
* (DI) = DEVICE INDEX FOR FIRST DEVICE, IF PRESENT.
* DEVICE PARAMETERS SET FOR FIRST DEVICE, IF PRESENT.
*
* USES DI, TA, T5, CM - CM+4, WB - WB+4.
*
* CALLS LDP.
*
* MACROS SFA.
IST7 LDD DI DEFINE END OF DEVICES
STM XMDA
LMC DSTB SET EXIT CONDITION
ZJN ISTX IF NO DEVICES FOR THIS DRIVER
LDC DSTB SET DEVICE INDEX FOR FIRST DEVICE
STD DI
STD TA
RJM LDP LOAD DEVICE PARAMETERS
IST SUBR ENTRY/EXIT
LDC OCMD-1
STD DI
IST1 LDN 0 CLEAR DEVICE STATE TABLE
STI DI
SOD DI
LMC DSTB
NJN IST1 IF MORE TO CLEAR
* LDN 0
STD T5 INITIALIZE *PUT* ORDINAL
IST2 AOD T5
LMD RC
ZJN IST7 IF END OF PHYSICAL UNIT TABLE
LDD T5
SHN PUTLS READ *PUT* ENTRY
ISTA ADC UNCT+** GET UNIT CONTROL WORD
CRD WB
SFA EST,WB+1 FETCH EST ENTRY
ADK EQDE
CRD CM
LDN CM INITIALIZE CHANNEL BYTE ADDRESS
STD CM
IST3 AOD CM ADVANCE PATH DESCRIPTOR ADDRESS
LMN CM+3
ZJN IST2 IF TWO POSSIBLE CHANNELS CHECKED
LDI CM
ZJN IST3 IF NULL ACCESS
LMD IR+4
LPN 77
NJN IST3 IF NOT THIS DRIVERS CHANNEL
LDD T5 SET *PUT* ORDINAL IN STATE TABLE
STI DI
ERRNZ PUTO CODE DEPENDS ON VALUE
LDC 1S14+1S13 SET INTERNAL SPECIAL REQUEST FLAGS
STML IPPS,DI
LDI CM
LPC 200 SET PORT NUMBER
SHN 11-7
STM PNUN,DI
LDD WB GET CONTROLLER AND UNIT NUMBERS
LPC 777
RAM PNUN,DI APPEND TO PORT NUMBER
SHN -6
STD WB+4 SET *CSTB* INDEX
LDM CSTB,WB+4
NJN IST5 IF CONTROLLER IDENTIFIED
LDD DI
LMC 1S14 RESET FLAG + FIRST *PUT* ORDINAL
STML CSTB,WB+4
IST5 LDN DSTBE
RAD DI ADVANCE STATE TABLE ADDRESS
LMC DSTBL
NJP IST2 IF DEVICE TABLE NOT FULL
LJM IST7 SET INITIAL STATE TABLE ADDRESS
MCI SPACE 4,10
** MCI - MODIFY CHANNEL INSTRUCTIONS.
*
* ENTRY (IR+4) = CONCURRENT CHANNEL NUMBER.
*
* EXIT (A) = 0.
*
* USES T1, T2, T3.
*
* CALLS C2D.
MCI1 LDD T3
SBN CH
RAIL T2 MODIFY CHANNEL INSTRUCTION
AOD T1
MCI2 LDML TCHA,T1 EXTRACT CHANNEL NUMBER
STDL T2
NJN MCI1 IF MORE INSTRUCTIONS TO MODIFY
MCI SUBR ENTRY/EXIT
LDD IR+4
LPN 37 EXTRACT CHANNEL NUMBER
STD T3
RJM C2D CONVERT FOR OPERATOR MESSAGES
STM SRSH+14
STM SRSG+13
LDN 0 INITIALIZE REMOTE TABLE INDEX
STD T1
UJN MCI2 ENTER LOOP
MRS SPACE 4,10
** MRS - MASTER RESET SLAVES.
*
* EXIT TO *XMD4*.
*
* USES T1.
*
* CALLS FCN, RCR.
*
* MACROS WAIT.
MRS BSS 0 ENTRY
RJM RCR MASTER CLEAR CHANNEL
LDN 1
STD T1
SHN 13-0 POSITION PORT NUMBER
MRS2 LMC F0062
RJM FCN SELECT ADAPTOR PORT
LDC F9213
RJM FCN ISSUE MASTER RESET
WAIT 10
LDDL LF LAST FUNCTION
SCN 2
RJM FCN CLEAR SYNC OUT
SOD T1
ZJN MRS2 IF ANOTHER PORT TO PROCESS
LJM XMD4 ENTER MAIN LOOP
SCT SPACE 4,10
** SCT - SET CHANNEL TABLE ENTRY ADDRESSES.
*
* ENTRY (IR+4) = CHANNEL NUMBER.
*
* USES T1, T2, CM - CM+4.
*
* CALLS C2D, STA.
SCT SUBR ENTRY/EXIT
LDD IR+4
STD T1 SET CHANNEL NUMBER
STM RCSA+3
RAM BMLM+2
RJM C2D CONVERT FOR ERROR MESSAGE
STM LDAA+6
LCN 0 WORD OFFSET
STD T2
SCT1 AOD T2 INCREMENT WORD OFFSET
LCN 5
RAD T1
PJN SCT1 IF CHANNEL NOT IN THIS WORD
ADN 5
STD T1
RAM RCTA SET BYTE OFFSET
LDD T1
SHN 1 BYTE OFFSET * 2
ADD T1 BYTE OFFSET * 3
SHN 2 BYTE OFFSET * 12
SBN 59D (BYTE OFFSET * 12) - 59
LMC -0 59 - (BYTE OFFSET * 12)
SBN 2
SHN 6
STM SRFA+1 SET DRIVER FLAG BIT POSITION
LDK CHTP
CRD CM
LDD T2 SET ADDRESS OF WORD IN CHANNEL TABLE
RAD CM+3
SHN -14
RAD CM+2
.CM2 EQU CM+2
LDC .CM2*20000+TCHT SET CHANNEL TABLE ADDRESSES
RJM STA
LJM SCTX RETURN
SPA SPACE 4,10
** SPA - SET PP EXCHANGE PACKAGE ADDRESSES.
*
* USES T1 - T5, CM - CM+4.
*
* CALLS STA.
SPA SUBR ENTRY/EXIT
LDN PXPP
CRD CM FETCH FWA OF PP EXCHANGE PACKAGE AREA
ADN 1
CRM AMEA,ON SET FIRST WORD OF PP EXCHANGE PACKAGE
ADN PPCP-PXPP-2
CRD T1 READ PP COMMUNICATION AREA POINTER
LDD IA
STM AMEA+4 SET (B0) NON-ZERO FOR EXCHANGE TEST
SBD T1+4
SHN -3 (A) = CPP NUMBER
SBN 24
SHN 6
STM BMLM+2 INSERT CPP NUMBER IN BML MESSAGE
SHN -6
ADN 24-2
STD T1 CPP NUMBER - 2
SHN 4
ADD T1 (CPP NUMBER - 2) * 21B
RAD CM+4
SHN -14
RAD CM+3
.CM3 EQU CM+3
LDC .CM3*20000+TEXP SET EXCHANGE PACKAGE ADDRESSES
RJM STA
LJM SPAX RETURN
STA SPACE 4,10
** STA - SET TABLE ADDRESSES.
*
* ENTRY (A) = 5/ TP, 13/ TA
* TP = TABLE POINTER.
* TA = INSTRUCTION TABLE ADDRESS.
*
* EXIT (A) = 0.
*
* USES T1, T2, T3.
STA1 STDL T2 SET INSTRUCTION ADDRESS
LDM 1,T1
RAM 1,T2 SET LOWER 12 BITS OF ADDRESS
SHN -14
ADI T1 SET UPPER 6 BITS OF ADDRESS
LPN 37
RAI T2
AODL T3 ADVANCE INSTRUCTION LIST
STA2 LDIL T3
NJN STA1 IF NOT END OF TABLE
STA SUBR ENTRY/EXIT
STDL T3
SHN -15 SET POINTER ADDRESS
STD T1
LDDL T3 SET INSTRUCTION TABLE ADDRESS
LPC 17777
STDL T3
UJN STA2 ENTER LOOP
ENDD BSS 0 END OF DRIVER
OVERFLOW OCMD,20000
END