IDENT 1XY,MXY
1XY TITLE 1XY - 7165/895 (CCC) DMA DRIVER.
PERIPH
BASE MIXED
SST OSTE,OSTP
*COMMENT 1XY - 7165/895 (CCC) DMA DRIVER.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
1XY SPACE 4,15
*** 1XY - 7165/895 (CCC) DMA DRIVER.
*
* G. S. ANDERSON. 04/30/84.
* R. M. DANISCH. 02/01/86.
* S. L. BETH. 08/01/86.
1XY SPACE 4,15
*** *1XY* IS THE CYBER CHANNEL COUPLER (CCC) DMA DRIVER FOR THE
* 7165/895 DISK STORAGE SUBSYSTEM.
*
* THE 7165/895 DISK DRIVES ARE SUPPORTED AS BUFFERED I/O
* DEVICES. THE REQUESTS THAT ARE PROCESSED BY *1XY* ARE
* POSTED BY *CPUMTR* IN THE BUFFERED I/O TABLES IN *CMR*.
* *1XY* INTERLOCKS THE UNITS, LINKS THE REQUESTS, AND COMPLETES
* THE REQUESTS BY ISSUING APPROPRIATE *BIOM* REQUESTS.
*
* *1XY* SCANS THROUGH THE *PUT* ENTRIES IN A CIRCULAR FASHION
* LOOKING FOR REQUESTS TO PROCESS. ONCE A REQUEST IS FOUND
* AND LINKED *1XY* USES THE PHYSICAL DISK AND UEM ADDRESSES IN
* THE CORRESPONDING *CBT* ENTRY TO DETERMINE THE ACTION TO BE
* TAKEN. *1XY* WILL ATTEMPT TO PROCESS CONSECUTIVE SECTOR
* REQUESTS ON THE CURRENT UNIT UNTIL THE END OF THE CYLINDER
* OR A CONSECUTIVE SECTOR REQUEST WAS NOT FOUND. AT THIS
* POINT *1XY* WILL RESUME ITS SEARCH THROUGH THE *PUT* WITH THE
* *PUT* ENTRY IMMEDIATELY FOLLOWING THE ONE JUST PROCESSED.
SPACE 4,10
** MESSAGES.
*
* * 1XY - UNAUTHORIZED CALL.*
* ISSUED TO THE SYSTEM DAYFILE IF *1XY* WAS NOT CALLED FROM
* THE SYSTEM.
*
* * 1XY CHANNEL XX NOT RESPONDING.*
* ISSUED TO INDICATE THE SELECTED CHANNEL DOES NOT RESPOND
* TO BASIC CHANNEL FUNCTIONS.
SPACE 4,10
*** ERRLOG MESSAGES.
*
* *EQXXX,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.
*
* * CCHXX,MA464-DYY.*
*
* FIRMWARE THAT IS LOADED IN THE *CCC*.
* XX = CONCURRENT CHANNEL NUMBER.
* YY = LEVEL FOR FIRMWARE.
*
* *DCXXX, UYY,PS=ZZZZZZ.*
*
* PACK SERIAL NUMBER IDENTIFICATION.
* XXX = EST ORDINAL.
* YY = UNIT NUMBER.
* ZZZZZZ = SERIAL NUMBER FOR HDA.
*
* * CCHXX, DCYYY, FORMAT FAILURE.*
* * HUNG BUSY - GS = ZZZZ.*
*
* CHANNEL HUNG BUSY DURING FORMAT OPERATION.
* XX = CHANNEL NUMBER.
* YYY = EST ORDINAL.
* ZZZZ = THE GENERAL STATUS.
SPACE 4,10
*** ORGANIZATION OF 7165/895 (MEASUREMENTS IN DECIMAL).
*
* EQUIPMENT TYPE *DC*
*
* PHYSICAL ORGANIZATION:
*
* CM WORDS/PHYSICAL SECTOR 2048
* PHYSICAL SECTORS/PHYSICAL TRACK 3
* PHYSICAL TRACKS/CYLINDER 15
* CYLINDERS/DEVICE 885 * N (0<N<3)
* CM WORDS/DEVICE 79,749,120 * N
*
* LOGICAL ORGANIZATION:
*
* CM WORDS/LOGICAL SECTOR 64
* LOGICAL SECTORS/PHYSICAL SECTOR 32
* LOGICAL SECTORS/LOGICAL TRACK 704 * N
* LOGICAL TRACKS/CYLINDER 2
* LOGICAL TRACKS/DEVICE 1770
*
* MAXIMUM DATA RATE 400.00 K CM WORDS/SECOND
EJECT
*** 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) *1XM*, *1XY* AND *1HP* ARE VERY SIMILAR IN DESIGN. MOST
* FIXES APPLIED TO ONE OF THESE DRIVERS WILL ALSO APPLY TO
* THE OTHERS.
*
* 2) 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.
*
* 3) BECAUSE *1XY* ISSUES ALL *BIOM* COMPLETION REQUESTS
* WITHOUT WAITING FOR FUNCTION COMPLETION, THE *MONITOR*
* MACRO HAS BEEN REDEFINED TO ENSURE THERE IS NO PENDING
* MONITOR REQUEST AT THE TIME ANOTHER IS ABOUT TO BE
* ISSUED.
EJECT
* COMMON DECKS.
*CALL COMPMAC
RICHI$ EQU 1 SELECT DEFERRED INSTRUCTION MODIFICATION
*CALL COMPCHI
*CALL COMPIOU
*CALL COMSCPS
*CALL COMSDFS
LIST X
*CALL COMSHIO
LIST *
*CALL COMSLSD
*CALL COMSMSC
LIST X
*CALL COMSMSP
LIST *
*CALL COMSMST
*CALL COMSPIM
*CALL COMS1DS
TITLE CONSTANTS, DEFINITIONS, AND MACROS.
1XY SPACE 4,10
**** DIRECT CELL ASSIGNMENTS.
BS EQU 15 BLOCK SIZE FOR DATA TRANSFER
RS EQU 16 ERROR RECOVERY STATUS
ER EQU 17 ERROR RECOVERY IN PROGRESS
CC EQU 20 COMPLETION COUNT
S1 EQU 21 SCRATCH
EC EQU 22 ERROR CODE
RW EQU 23 READ/WRITE FLAG
IL EQU 24 *PUT* INTERLOCK FLAG
SR EQU 25 - 31 SCRATCH (5 CELLS)
WB EQU SR - SR+4 FOR *COMP1MD* COMPATIBILITY
PR EQU 32 *PUT* REQUEST PROCESSING ACTIVE
CN EQU 33 - 37 SCRATCH (5 CELLS)
SC EQU 40 UNUSED
FU EQU 41 - 42 UEM FWA (2 CELLS)
UA EQU 43 - 44 UEM ADDRESS (2 CELLS)
EP EQU 45 ERROR ON PREVIOUS SECTOR
CS EQU 46 CHANNEL STATUS
NB EQU 47 NEXT BUFFER ORDINAL
PB EQU 50 PREVIOUS BUFFER ORDINAL
CB EQU 51 CURRENT BUFFER ORDINAL
TB EQU 52 TOTAL CBT COUNT
GS EQU 53 GENERAL STATUS
* EQU 54 CHANNEL NUMBER (FROM INPUT REGISTER)
TI EQU 57 *TPOR* INDEX
CA EQU 60 - 64 CURRENT PHYSICAL ADDRESS (5 CELLS)
RC EQU 65 RETRY COUNT
PO EQU 66 CURRENT *PUT* ORDINAL
S2 EQU 67 SCRATCH
1XY SPACE 4,10
** DRIVER FUNCTION CODES.
FCSK EQU 1 SEEK 1 TO 1 INTERLACE
FCRD EQU 4 READ
FCWR EQU 5 WRITE
FCOC EQU 10 OPERATION COMPLETE
FCGS EQU 12 GENERAL STATUS
FCCO EQU 14 CONTINUE
FCFP EQU 16 FORMAT PACK
FCDS EQU 23 DETAILED STATUS
FCRU EQU 31 READ UTILITY SECTOR
FCRP EQU 34 READ PACK SERIAL NUMBER
FCAL EQU 414 AUTOLOAD
1XY SPACE 4,10
** 170 DMA ADAPTER FUNCTIONS.
FCMC EQU 100000+1S17 MASTER CLEAR ADAPTER
FCCT EQU 101000+1S17 CLEAR T REGISTERS
FCDI EQU 102000+1S17 DMA INPUT
FCDO EQU 103000+1S17 DMA OUTPUT
FCCD EQU 104000+1S17 CLEAR DMA MODE
FCDT EQU 106000+1S17 DISABLE TEST MODE
FCET EQU 107000+1S17 ENABLE TEST MODE
FCRC EQU 110000+1S17 READ CONTROL REGISTERS
FCWC EQU 111000+1S17 WRITE CONTROL REGISTERS
FCRE EQU 112000+1S17 READ ERROR STATUS REGISTER
FCRO EQU 114000+1S17 READ OPERATIONAL STATUS REGISTER
FCRT EQU 116000+1S17 READ T REGISTER
FCWT EQU 117000+1S17 WRITE T PRIME REGISTER
* 170 DMA OPERATIONAL STATUS.
OSOF EQU 4000 OUTPUT BUFFER FULL
OSIF EQU 2000 INPUT BUFFER FULL
OSID EQU 1000 INPUT DATA AVAILABLE
OSFT EQU 0400 FAST TRANSFER MODE
OSEC EQU 0200 EXTERNAL CLOCK PRESENT
OSTM EQU 0100 TEST MODE
OSZC EQU 0040 PP WORD COUNT EQUAL ZERO
OSDO EQU 0020 DMA OUTPUT
OSDI EQU 0010 DMA INPUT
OSTH EQU 0004 DMA TRANSFER HALTED
OSTE EQU 0002 T PRIME REGISTER EMPTY
OSTP EQU 0001 TRANSFER IN PROGRESS
SPACE 4,15
** DETAILED STATUS CONSTANTS.
SB0 EQU 0 SENSE BYTE 0
SB7 EQU 4 SENSE BYTE 7 STATUS WORD OFFSET
DCF EQU 1 DEVICE CHECK FORMAT
FM6 EQU 6 FORMAT 6 MESSAGE
SPACE 4,15
** ASSEMBLY CONSTANTS.
BFRL EQU 10 *EMB* FLUSH RETRY LIMIT
CH EQU 0 MASS STORAGE CHANNEL
FCSKL EQU 4 SEEK PARAMETER WORD COUNT
FPBL EQU 22 FORMAT PACK PARAMETER BLOCK LENGTH
HLEN EQU 4*5 LENGTH OF SECTOR HEADER
MAXU EQU 64D MAXIMUM NUMBER OF UNITS PER CHANNEL
MFRL EQU 10 MONITOR FUNCTION RETRY LIMIT
MMXN EQU 10D MAXIMUM NUMBER OF EXCHANGE RETRIES
PCRL EQU 10 PP CALL RETRY LIMIT
PSLT EQU 26 PHYSICAL SECTORS PER LOGICAL TRACK
PSPT EQU 3 PHYSICAL SECTORS PER PHYSICAL TRACK
SSIZ EQU 1000 SECTOR SIZE FLAG FOR SEEK
TPORE EQU 1 LENGTH OF *TPOR* ENTRY
****
SPACE 4,20
** MACROS.
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
CON 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
CCBA SPACE 4,15
** CCBA - COMPUTE *CBT* ENTRY ADDRESS.
*
* THIS MACRO SETS (A) TO THE REQUESTED *CBT* ENTRY ADDRESS.
*
* CCBA W,A
*
* *W* - OPTIONAL WORD OFFSET TO BE ADDED TO ADDRESS.
* *A* - IF NON-BLANK, BUFFER ORDINAL IS IN ACCUMULATOR.
*
* ENTRY (A) = BUFFER ORDINAL IF *A* PARAMETER IS NON-BLANK.
* (CB) = CURRENT BUFFER ORDINAL.
*
* EXIT (A) = *CBT* ENTRY ADDRESS + WORD OFFSET.
PURGMAC CCBA
CCBA MACRO W,A
MACREF CCBA
IFC EQ,$A$$,1
LDD CB
SHN CBTLS
CBTE *
ADC W
CCBA ENDM
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
CPTA SPACE 4,10
** CPTA - COMPUTE *PUT* ENTRY ADDRESS.
*
* THIS MACRO SETS (A) TO THE REQUESTED *PUT* ENTRY ADDRESS.
*
* CPTA W,A
*
* *W* - OPTIONAL WORD OFFSET TO BE ADDED TO ADDRESS.
* *A* - IF NON-BLANK, *PUT* ORDINAL IS IN ACCUMULATOR.
*
* ENTRY (A) = *PUT* ORDINAL IF *A* PARAMETER IS NON-BLANK.
* (PO) = *PUT* ORDINAL.
*
* EXIT (A) = *PUT* ENTRY ADDRESS + WORD OFFSET.
PURGMAC CPTA
CPTA MACRO W,A
MACREF CPTA
IFC EQ,$A$$,1
LDD PO
SHN PUTLS
PUTE *
ADC W
CPTA ENDM
CSHN SPACE 4,10
** CSHN - GENERATE CALCULATED SHIFT INSTRUCTION.
*
* CSHN A
*
* *A* = MNEMONIC DEFINING BIT POSITION.
*
* ENTRY .M = SHIFT COUNT FROM PREVIOUS CALL.
*
* EXIT .M = SHIFT COUNT TO REALIGN ACCUMULATOR.
* .N = SHIFT TO MOVE *A* TO SIGN POSITION.
PURGMAC CSHN
CSHN MACRO A
.N SET .M+21-A+A/12D*12D
.M SET .M+22-.N
IFGT .N,21,1
.N SET .N-22
SHN .N
CSHN ENDM
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
MONITOR SPACE 4,15
** MONITOR - ISSUE MONITOR FUNCTION.
*
* THIS MACRO PROVIDES FUNCTIONALITY IDENTICAL TO THAT OF THE
* *MONITOR* MACRO DEFINED IN *COMPMAC*, WHILE ENSURING ANY
* PENDING *BIOM* MONITOR FUNCTION IS COMPLETED BEFORE THE NEXT
* MONITOR FUNCTION IS ISSUED.
*
* MONITOR F
*
* *F* - MONITOR FUNCTION CODE.
*
* EXIT (A) = 0.
* (CM - CM+4) = COMPLETED PP OUTPUT REGISTER IMAGE.
*
* CALLS IMF.
PURGMAC MONITOR
MONITOR MACRO F
MACREF MONITOR
LDK F
RJM IMF
MONITOR ENDM
1XY SPACE 4
RICHI REDEFINE CHANNEL INSTRUCTIONS
TITLE MAIN PROGRAM.
** MXY - 895 DMA DRIVER.
ORG PPFW
MXY RJM PRS PRESET
MXY SPACE 4
** MST - MASTER MAIN PROGRAM.
MST RJM CCR CHECK FOR CHANNEL REQUESTED/DOWN
MJN MST1 IF CHANNEL GLOBALLY DOWN
RJM SUQ SCAN UNIT QUEUE
ZJN MST IF NO ELIGIBLE ENTRY FOUND
RJM ISF ISSUE SEEK FUNCTION
NJN MST IF UNIT NOT ON CYLINDER
RJM PDT PERFORM DATA TRANSFER
UJN MST LOOP
MST1 RJM DCH RELEASE CHANNEL
MONITOR DPPM DROP PP
LJM PPR ENTER IDLE LOOP
TPOR SPACE 4,10
** TPOR - TABLE OF *PUT* ORDINALS.
*
* THIS TABLE CONTAINS THE ORDINALS OF THE *PUT* ENTRIES FOR ALL
* UNITS ACCESSED BY THIS DRIVER-S CHANNEL.
*
* ENTRY = 1 WORD.
*
*T 11/ PUT ,1/I
* PUT *PUT* ORDINAL OF DEVICE.
* I EST CHANNEL BYTE INDEX.
*
* TABLE IS TERMINATED BY A ZERO BYTE.
TPOR BSSZ TPORE*MAXU
CON 0 TERMINATE *TPOR* TABLE
CCR SPACE 4,20
** CCR - CHECK FOR CHANNEL REQUESTED OR DOWN.
*
* THIS ROUTINE CHECKS TO SEE IF THE CHANNEL TO WHICH THIS PP IS
* DEDICATED IS BEING REQUESTED BY ANOTHER PP OR IS GLOBALLY
* DOWN. IF THE CHANNEL IS REQUESTED BY ANOTHER PP, IT WILL BE
* RELEASED AND WILL BE REQUESTED AGAIN FOLLOWING A ONE SECOND
* DELAY. IF THE CHANNEL IS GLOBALLY DOWN, THE DRIVER DROP FLAG
* WILL BE SET IN THE CONTROLWARE TABLE AND THE CHANNEL WILL BE
* RELEASED.
*
* EXIT (A) .LT. 0 IF CHANNEL IS GLOBALLY DOWN.
*
* USES CM - CM+4.
*
* CALLS DCH, FNC, RCH, SCD.
*
* MACROS DELAY.
CCR4 RJM SCD SET DRIVER DROP FLAG
LCN 0 SET DROPOUT REPLY
CCR SUBR ENTRY/EXIT
LDC ** READ CHANNEL TABLE
CCRA EQU *-1 (CM ADDRESS OF ENTRY)
CRD CM
LDD CM+** CHECK REQUESTED FLAG
CCRB EQU *-1 (BYTE ADDRESS OF ENTRY)
SHN 21-5
MJN CCR4 IF CHANNEL IS GLOBALLY DOWN
SHN 22+5-13
PJN CCRX IF CHANNEL NOT REQUESTED
RJM DCH RELEASE CHANNEL
CCR1 DELAY
RJM RCH REQUEST CHANNEL
ZJN CCR1 IF CHANNEL NOT ASSIGNED
DCN CH+40 INSURE CHANNEL IN CORRECT STATE
LDC FCCT CLEAR THE T REGISTER
RJM FNN
MJN CCR3 IF ERROR ON CHANNEL ACCESS
LDC FCWC WRITE ADAPTER CONTROL REGISTER
RJM FNC
MJN CCR3 IF ERROR ON CHANNEL ACCESS
LDC 20400 60 BIT CM WORD ACCESS AND NO ERROR CLEAR
OAN CH
CCR2 SBN 1
ZJN CCR3 IF TIMEOUT ON CONTROL REGISTER WRITE
FJM CCR2,CH IF DATA NOT ACCEPTED
CCR2.1 DCN CH+40
LJM CCRX RETURN
* PREVENT ANY I/O FROM BEING PERFORMED ON THIS CHANNEL. THE
* UNIT QUEUES MUST CONTINUE TO BE SERVICED BY THIS DRIVER TO
* ENSURE THAT CHANNEL SPECIFIC REQUESTS ARE PROCESSED.
* ALTHOUGH THIS DRIVER WILL BE FREE TO SELECT I/O REQUESTS, ANY
* ATTEMPT TO ISSUE A CHANNEL FUNCTION WILL RESULT IN A *CHANNEL
* FAILURE* ERROR. THE ERROR PROCESSOR WILL SET THE SUSPECT
* FLAG, CAUSING *1MV* TO PERFORM A HARDWARE VERIFICATION. THE
* EXPECTED RESULT OF THIS VERIFICATION IS THAT *1MV* WILL DOWN
* THE CHANNEL ON THE DEVICE.
CCR3 LDC UJNI+FNC5.1-FNCC
ERRNG FNC5.1-FNCC CODE DEPENDS ON VALUE
ERRPL FNC5.1-FNCC-40 CODE DEPENDS ON VALUE
STM FNCC
LDC UJNI+FNN5.1-FNNA
ERRNG FNN5.1-FNNA CODE DEPENDS ON VALUE
ERRPL FNN5.1-FNNA-40 CODE DEPENDS ON VALUE
STM FNNA
UJN CCR2.1 RETURN
CCS SPACE 4,15
** CCS - CHECK FOR CONSECUTIVE SECTOR REQUEST.
*
* THIS ROUTINE CHECKS THE NEXT BUFFER IN THE I/O QUEUE TO
* DETERMINE IF IT IS CONSECUTIVE WITH THE REQUEST CURRENTLY
* BEING PROCESSED.
*
* ENTRY (CB) = CURRENT BUFFER ORDINAL.
* (NB) = NEXT BUFFER ORDINAL IF CONSECUTIVE REQUEST
* ALREADY FOUND.
* (RW) = READ/WRITE FLAG.
* (TB) = TOTAL BUFFER COUNT.
*
* EXIT (NB) = NEXT BUFFER ORDINAL.
* = 0 IF CONSECUTIVE TRANSFER NOT POSSIBLE.
* (TB) = TOTAL BUFFER COUNT.
*
* USES NB, TB, CM - CM+4, CN - CN+4, TO - TO+4.
*
* MACROS CCBA.
CCS3 LDN 0 INDICATE NO CONSECUTIVE REQUEST
STD NB
CCS SUBR ENTRY/EXIT
LDD NB
NJN CCSX IF NEXT REQUEST ALREADY FOUND
CCBA PAD4 READ CURRENT *CBT* ENTRY
CRD CM
ADK IOLK-PAD4
CRD CN
LDD CN+2 NEXT BUFFER ORDINAL
ZJN CCSX IF THIS BUFFER IS LAST IN QUEUE
STD NB STORE NEW CURRENT BUFFER ORDINAL
CCBA PAD1,A GET DISK ADDRESS FOR THIS BUFFER
CRD CN
ADK IOLK-PAD1 GET WRITE FLAG
CRD T0
LDD T0
SHN 0-11
LPN 1
LMD RW
NJN CCS3 IF TRANSFER NOT IN SAME DIRECTION
LDD CM+1
LMD CN+1
CCS1 NJN CCS3 IF NO CYLINDER MATCH
LDD CM+2
ADN 1
LMD CN+2
ZJN CCS2 IF CONSECUTIVE SECTOR NOT ON SAME TRACK
LDD CM+2
ADD HN
SCN 77
LMD CN+2
NJN CCS1 IF NOT FIRST SECTOR OF CONSECUTIVE TRACK
LDD CM+2
LPN 77
LMN PSPT-1
NJN CCS1 IF CONSECUTIVE REQUEST
CCS2 AOD TB INCREMENT TOTAL BUFFER COUNT
LJM CCSX RETURN
CDS SPACE 4,20
** CDS - CRACK DETAILED STATUS.
*
* THIS ROUTINE DETERMINES WHAT ERROR CODE TO SET BY EXAMINING
* DETAILED STATUS.
*
* ENTRY (GS) = GENERAL STATUS.
* (RW) = READ/WRITE FLAG.
*
* USES EC, RS, T1.
*
* CALLS FNC, GDS, GGS.
CDS SUBR ENTRY/EXIT
RJM GDS GET DETAILED STATUS
MJN CDSX IF ERROR
LDD GS
SHN 21-10
PJN CDS1 IF ERROR NOT RECOVERABLE BY SUBSYSTEM
LDM CDSA,RW PREPARE FOR *CONTINUE* SEQUENCE
STD T1
LDC LDNI+FCCO
STI T1
LCN 1 INDICATE CONTROLLER RECOVERY IN PROGRESS
STD RS
UJN CDS1.1 SET STATUS ERROR CODE
CDS1 SHN 10-13+22
MJN CDS2 IF ABNORMAL TERMINATION
LDD EC
NJN CDSX IF ERROR CODE ALREADY SET
CDS1.1 UJN CDS4 SET STATUS ERROR CODE
* CHECK FOR *NOT READY* CONDITION.
CDS2 SHN 13-4
PJN CDS3 IF NOT *NOT READY*
LDM DST+SB0
SHN 0-12
LPN 1
LMN 1
ZJN CDS5 IF DRIVE NOT READY
* CHECK FOR STATISTICAL MESSAGE. THIS IS NOT A TRUE ERROR
* CONDITION.
LDM DST+SB7
LPN 17
LMN FM6
ZJN CDS5.1 IF FORMAT 6 MESSAGE
* CHECK FOR MEDIA ERROR.
CDS3 LDM DST
LPC 210
LMC 210
ZJN CDS6 IF MEDIA ERROR
LDM DST+21
SHN 21-6
MJN CDS8 IF CHANNEL PARITY ERROR ON OUTPUT
SHN 6-2
MJN CDS9 IF DATA TRANSFER ERROR
SHN 2-21+22
LPN 50
NJN CDS10 IF ADAPTOR MEMORY PARITY ERROR
CDS4 LDK DSTE&NRDE
CDS5 LMK NRDE&STAE
CDS5.1 LMK STAE&PARE
CDS6 LMK PARE
CDS7 STD EC
LJM CDSX RETURN
CDS8 LDN CHPE SET *CHANNEL PARITY* ERROR CODE
UJN CDS7 SET ERROR CODE
CDS9 LDN IDTE SET *DATA TRANSFER* ERROR CODE
UJN CDS7 SET ERROR CODE
CDS10 LDN RAME SET *CONTROLLER MEMORY* ERROR CODE
UJN CDS7 SET ERROR CODE
CDSA BSS 0
CON RIOA
CON WIOA
CRL SPACE 4,15
** CRL - CHECK FOR ERROR RETRY LIMIT REACHED.
*
* ENTRY (EC) = ERROR CODE.
* (ER) = *RECOVERY IN PROGRESS* FLAG.
* (RC) = RETRY COUNT.
* (T5) = EST ORDINAL.
*
* EXIT (A) .GE. 0 IF RETRY LIMIT REACHED.
* .LT. 0 IF NOT AT RETRY LIMIT.
* (RC) INCREMENTED.
* MESSAGE ISSUED TO *MS2W* OF SYSTEM CONTROL POINT FOR
* B-DISPLAY PRESENTATION IF HALF WAY TO RETRY LIMIT.
*
* USES RC.
CRL SUBR ENTRY/EXIT
LDD ER
LMC SHNI+1
STM CRLA
AOD RC INCREMENT RETRY COUNT
LDM TREC,EC
SHN -1
SBD RC
PJN CRL1 IF TOO EARLY TO NOTIFY OPERATOR
LDD T5 STORE EST ORDINAL IN MESSAGE
SHN -3
RJM C2D
STM CRLB+1
LDD T5
LPN 7
SHN 6
ADC 2R0
STM CRLB+2
LDM TMNE,EC STORE ERROR MNEMONIC IN MESSAGE
STM CRLB+3
LDD CP
ADK MS2W
CWM CRLB,TR
CRL1 LDD RC
* IF *RECOVERY IN PROGRESS* IS NOT SET, THE RETRY COUNT IS
* SHIFTED SO THAT THE LIMIT CHECK IS MADE AGAINST N/2 (WHERE N
* IS THE RETRY LIMIT FOR THE ERROR TYPE IN CELL *EC*). THIS
* CAUSES HALF OF THE RETRY ATTEMPTS TO BE PERFORMED ON EACH
* CHANNEL, IF AN ALTERNATE ACCESS IS AVAILABLE. IF NO
* ALTERNATE ACCESS IS AVAILABLE, ALL RETRIES WILL BE PERFORMED
* ON THIS CHANNEL.
SHN 0
* SHN 1 (RECOVERY NOT IN PROGRESS)
CRLA EQU *-1
SBM TREC,EC
SBN 2
UJP CRLX RETURN
CRLB DATA C*EQ000 XX ERROR RETRY UNDERWAY.*
CRQ SPACE 4,20
** CRQ - CHECK REQUEST QUEUE.
*
* THIS ROUTINE ATTEMPTS TO CALL *CPUMTR* TO COMPLETE REQUESTS
* IN THE UNIT QUEUE THAT HAVE ALREADY BEEN PROCESSED.
*
* ENTRY (CC) = COMPLETION REQUEST COUNT.
* (PO) = *PUT* ORDINAL.
*
* EXIT (A) .EQ. 0 IF NO REQUESTS PRESENT.
* .NE. 0 IF *CPUMTR* IS STILL BUSY WITH PREVIOUS
* FUNCTION OR AN EXCHANGE WAS JUST ISSUED
* FOR THE CURRENT FUNCTION.
*
* USES CC, CN - CN+4, T0 - T4.
CRQ SUBR ENTRY/EXIT
LDC ** READ XP
CRQA EQU *-1 FWA OF XP
CRD T0
LDD OA READ OUTPUT REGISTER
CRD CN
LDD T0+4 (B0)
NJN CRQ1 IF MISSED EXCHANGE
STD CN+3
LDD CN
SHN 21-13
MJN CRQ1 IF REISSUE REQUIRED
NJN CRQX IF FUNCTION NOW BEING PROCESSED
LDD CC
ZJN CRQX IF NO PENDING COMPLETION REQUESTS
LDC **
CRQE EQU *-1
CRD T0
LDD T0
ADD T0+1
NJN CRQX IF FUNCTION IN PROGRESS
LDN DCBS SET *BIOM* SUBFUNCTION
STD CN+1
LDD PO
STD CN+2
CRQ1 LDD CC
RAD CN+3
LDN 0
STD CC
LDK BIOM
STD CN
LDD OA
CWD CN
LDC **
CRQB EQU *-1 ADDRESS OF EXCHANGE PACKAGE
CWM CRQD,ON WRITE FIRST WORD
SBN 1 SET EXCHANGE ADDRESS
MXN 0 EXCHANGE CPU
CRQC EQU *-1 CPU NUMBER
UJP CRQX RETURN
CRQD VFD 24/0 (P)
VFD 18/0 (A0)
VFD 18/0 (B0)
DCH SPACE 4,15
** DCH - RELEASE CHANNEL.
*
* THIS ROUTINE RELEASES THE CHANNEL IF IT IS CURRENTLY
* RESERVED.
*
* ENTRY (CS) = CHANNEL RESERVATION STATUS.
* (IR+4) = CHANNEL NUMBER.
*
* EXIT (A) = (CS) = 0.
*
* USES CM+1, CS.
*
* MACROS MONITOR.
DCH SUBR ENTRY/EXIT
LDD CS
LPN 1
ZJN DCHX IF CHANNEL NOT RESERVED
LDD IR+4 RELEASE CHANNEL
STD CM+1
MONITOR DCHM
SOD CS CLEAR CHANNEL RESERVATION FLAG
UJN DCHX RETURN
ERR SPACE 4,20
** ERR - PROCESS ERROR.
*
* THIS ROUTINE IS CALLED TO PERFORM ALL ERROR PROCESSING.
*
* ENTRY (EC) = 0 IF THIS IS THE FIRST RETRY OF A RECOVERY
* SEQUENCE AND THE CALLER DID NOT SET THE ERROR
* CODE.
* = ERROR CODE IF NOT THE FIRST RETRY OF A RECOVERY
* SEQUENCE AND NOT A CALLER SPECIFIED ERROR CODE.
* = COMPLEMENT OF ERROR CODE IF SPECIFIED BY THE
* CALLER.
* (RC) = RETRY COUNT.
*
* EXIT (EC) = 0.
* (RC) = 0.
* TO *MST*.
*
* USES EC, RC, RS, T1.
*
* CALLS CDS, CRL, CRQ, FNN, GGS, IBM, IIC, ISF, PDT,
* PFR, PRE, RLC, SAS, SSF, TEP.
ERR SUBR ENTRY
ERR1 RJM PRE PRESET ERROR PROCESSOR
NJP ERR11 IF INTERLOCK/VERIFICATION FAILURE
LDC FCCD CLEAR DMA MODE
RJM FNN
MJN ERR1.1 IF ERROR ENCOUNTERED
DCN CH+40
RJM GGS GET GENERAL STATUS
MJN ERR1.1 IF GENERAL STATUS UNAVAILABLE
RJM SAS SAVE ADAPTER STATUS
MJN ERR1.1 IF ERROR ENCOUNTERED
RJM CDS CHECK DETAILED STATUS
ERR1.1 LDD RC
ZJN ERR1.2 IF FIRST RETRY
LDD ER
ZJN ERR2 IF NOT RECOVERY IN PROGRESS
AOM ERRA
LMN 2
NJN ERR2 IF NOT FIRST *ERR* CALL
ERR1.2 LDD GS
STM BMLGS
ERR2 LCN 0
LMD EC
STD EC
SHN 21-13
MJN ERR2 IF COMPLEMENTED ERROR CODE
LDD TH FORCE IMMEDIATE COMPLETION
ERRNZ SHNI-1000 CODE DEPENDS ON VALUE
STM IICA
RJM IIC ISSUE I/O COMPLETION REQUEST
ERR4.1 RJM CRQ ENSURE COMPLETION OF PENDING REQUEST
NJN ERR4.1 IF FUNCTION STILL PENDING
RJM IBM ISSUE BML MESSAGE IF NECESSARY
AOD RS INCREMENT RECOVERY STATUS
SHN 21-13
MJN ERR10 IF *CCC* ERROR RECOVERY IN PROGRESS
* SET THE SUSPECT FLAG IF APPROPRIATE FOR THIS ERROR TYPE.
LDK STAE
LMD EC
ZJN ERR7 IF STATISTICAL DATA (NOT AN ERROR)
RJM SSF SET SUSPECT FLAG (IF APPROPRIATE)
RJM CRL CHECK FOR RETRY LIMIT REACHED
MJN ERR7 IF RETRY LIMIT NOT REACHED
SOD RC ADJUST FINAL RETRY COUNT
ERR6 AOD RS SET RECOVERY STATUS
UJN ERR11 TERMINATE ERROR PROCESSING
* CHECK FOR CONTROLWARE RELOAD.
ERR7 RJM RHR RELEASE HARDWARE RESERVE
RJM RLC LOAD CONTROLWARE IF NECESSARY
* RETRY I/O SEQUENCE.
ERR9 RJM ISF ISSUE SEEK FUNCTION
ZJN ERR10 IF ON CYLINDER AND NO ERROR
LDD GS
LMN 2
ZJN ERR9 IF POSITIONER BUSY
UJP ERR1 RESTART ERROR PROCESSING
ERR10 RJM PFR PREPARE FOR RETRY ATTEMPT
RJM PDT PERFORM READ/WRITE OPERATION
* CONTROL RETURNS TO THIS POINT ONLY IF THE ERROR WAS
* RECOVERED.
ERR11 AOD RS SET RECOVERY STATUS
SHN 6
RAD RC ADJUST FOR CONTROLLER RECOVERY
* TERMINATE ERROR PROCESSING. INSTRUCTIONS MODIFIED FOR ERROR
* PROCESSING WILL BE RESTORED TO THEIR ORIGINAL VALUES, VARIOUS
* DATA CELLS WILL BE RESTORED TO THEIR INITIAL STATES, ETC.
RJM TEP TERMINATE ERROR PROCESSING
LJM MST EXIT ERROR PROCESSOR
ERRA CON 0 RECOVERY IN PROGRESS PASS COUNTER
TEPF SPACE 4,30
** TEPF - TABLE OF ERROR PROCESSING FLAGS.
*
* THIS TABLE CONTAINS INFORMATION RELATED TO EACH ERROR TYPE.
* EACH ENTRY HAS THE FOLLOWING FORMAT -
* VFD 2/ERROR COUNT INCREMENT, BML MESSAGE INDICATOR
* 0 DO NOT INCREMENT ERROR COUNTS AND DO
* NOT ISSUE BML MESSAGE.
* 1 INCREMENT ERROR COUNTS AND ISSUE BML
* MESSAGE.
* 2 INCREMENT ERROR COUNTS AND ISSUE BML
* MESSAGE IF UNRECOVERED ERROR.
* VFD 2/UNUSED (ZERO)
* VFD 1/SUSPECT FLAG
* 0 DO NOT SET SUSPECT FLAG.
* 1 SET SUSPECT FLAG.
* VFD 7/UNUSED (ZERO)
LIST G
TEPF EQU *-1
ECHO 1,EC=("DREC")
VFD 2/IEC._EC,2/0,1/SUS._EC,7/0
LIST *
TMNE SPACE 4,10
** TMNE - TABLE OF ERROR CODE MNEMONICS.
LIST G
TMNE EQU *-1
ECHO 1,ERRCODE=("DREC")
CON EMN._ERRCODE "TXT._ERRCODE" ERROR
LIST *
TREC SPACE 4,10
** TREC - TABLE OF RETRY COUNTS.
LIST G
TREC EQU *-1
ECHO 1,ERRCODE=("DREC")
CON RTC._ERRCODE "TXT._ERRCODE" ERROR
LIST *
TSYM SPACE 4,10
** TSYM - TABLE OF BML SYMPTOM CODES.
LIST G
TSYM EQU *-1
ECHO 1,ERRCODE=("DREC")
CON SYM._ERRCODE "TXT._ERRCODE" ERROR
LIST *
FNC SPACE 4,10
** FNC - FUNCTION CHANNEL.
*
* ENTRY (A) = FUNCTION CODE.
*
* EXIT (A) .LT. 0 IF CHANNEL ACTIVE UPON ENTRY OR FUNCTION
* TIMEOUT. (EC) = COMPLEMENT OF ERROR CODE.
* .EQ. 0 IF NO ERROR, CHANNEL ACTIVE.
*
* USES EC.
FNC6 ACN CH ACTIVATE CHANNEL
LDN 0 SET REPLY STATUS
FNC SUBR ENTRY/EXIT
PJN FNC0 IF CONTROLLER FUNCTION
LPC 177777
STML FNCB
UJN FNC0.1 CONTINUE
FNC0 STM FNCA SAVE FUNCTION CODE
FNC0.1 AJM FNC5,CH IF CHANNEL IS STILL ACTIVE
* UJN FNC5.1 (CHANNEL INITIALIZATION ERROR)
FNCC EQU *-2
FAN CH FUNCTION CHANNEL
* THE DRIVER MUST WAIT AT LEAST 300 MS BEFORE TIMING OUT THE
* FUNCTION.
FNC1 ADD ON
IJM FNC6,CH IF FUNCTION ACCEPTED
NJN FNC1 IF NOT TIMEOUT YET
LCN FTOE
FNC3 STD EC
EJM FNC4,CH IF CHANNEL IS EMPTY
LDN 1 SAVE LAST FUNCTION ISSUED
IAM FNCA,CH
FNC4 LCN 0 SET ERROR REPLY STATUS
DCN CH+40
UJN FNCX RETURN
FNC5 LCN CHFE SET *CHANNEL FAILURE* ERROR CODE
UJN FNC3 INPUT DATA/FUNCTION FROM CHANNEL
FNC5.1 LCN CHFE SET *CHANNEL FAILURE* ERROR CODE
STD EC
UJN FNCX RETURN
FNCA CON -0 CURRENT FUNCTION
FNCB CON -0 CURRENT ADAPTER FUNCTION
FNN SPACE 4,10
** FNN - FUNCTION CHANNEL NO ACTIVATE.
*
* ENTRY (A) = FUNCTION CODE.
*
* EXIT (A) .LT. 0 IF CHANNEL ACTIVE UPON ENTRY OR FUNCTION
* TIMEOUT. (EC) = COMPLEMENT OF ERROR CODE.
* .GE. 0 IF NO ERROR.
*
* USES EC.
FNN6 LDN 0 SET REPLY STATUS
FNN SUBR ENTRY/EXIT
PJN FNN0 IF CONTROLLER FUNCTION
LPC 177777
STML FNCB
UJN FNN0.1 CONTINUE
FNN0 STM FNCA SAVE FUNCTION CODE
FNN0.1 AJM FNN5,CH IF CHANNEL IS STILL ACTIVE
* UJN FNN5.1 (CHANNEL INITIALIZATION ERROR)
FNNA EQU *-2
FAN CH FUNCTION CHANNEL
* THE DRIVER MUST WAIT AT LEAST 300 MS BEFORE TIMING OUT THE
* FUNCTION.
FNN1 ADD ON
IJM FNN6,CH IF FUNCTION ACCEPTED
NJN FNN1 IF NOT TIMEOUT YET
LCN FTOE SET COMPLEMENT OF *FTOE* ERROR CODE
FNN3 STD EC
EJM FNN4,CH IF CHANNEL IS EMPTY
LDN 1 SAVE LAST FUNCTION ISSUED
IAM FNCA,CH
FNN4 LCN 0 SET ERROR REPLY STATUS
DCN CH+40
UJN FNNX RETURN
FNN5 LCN CHFE SET *CHANNEL FAILURE* ERROR CODE
UJN FNN3 INPUT DATA/FUNCTION FROM CHANNEL
FNN5.1 LCN CHFE SET *CHANNEL FAILURE* ERROR CODE
STD EC
UJN FNNX RETURN
GDS SPACE 4,15
** GDS - GET DETAILED STATUS.
*
* THIS ROUTINE OBTAINS THE DETAILED STATUS FROM THE CONTROLLER.
*
* EXIT (A) .EQ. 0 IF STATUS OBTAINED.
* .LT. 0 IF STATUS NOT OBTAINED.
* (EC) = COMPLEMENT OF ERROR CODE IF STATUS NOT
* OBTAINED.
*
* USES EC, T1.
*
* CALLS FNC.
GDS2 LCN IDTE SET *INCOMPLETE DATA TRANSFER* ERROR CODE
GDS3 STD EC
GDS4 LDN MXSL-1 INVALIDATE DETAILED STATUS
STD T1
GDS5 LCN 0
STM DST,T1
SOD T1
PJN GDS5 IF MORE BYTES
GDS6 DCN CH+40
GDS SUBR ENTRY/EXIT
LDN FCDS ISSUE DETAILED STATUS FUNCTION
RJM FNC
MJN GDS4 IF ERROR
LDN MXSL
IAM DST,CH INPUT DETAILED STATUS
NJN GDS2 IF INCOMPLETE DATA TRANSFER
SFM GDS1,CH IF CHANNEL PARITY ERROR
UJN GDS6 RETURN
GDS1 LCN CHPE SET *CHANNEL PARITY* ERROR CODE
UJN GDS3 SET ERROR CODE
GGS SPACE 4,20
** GGS - GET GENERAL STATUS.
*
* THIS ROUTINE OBTAINS GENERAL STATUS FROM THE CONTROLLER.
*
* EXIT (A) .EQ. 0 IF GENERAL STATUS OBTAINED. (GS) = STATUS.
* .LT. 0 IF STATUS NOT OBTAINED. (GS) = 7777.
* (EC) = COMPLEMENT OF *IDET* ERROR CODE IF INCOMPLETE
* DATA TRANSFER OCCURRED.
* = COMPLEMENT OF *CHPE* ERROR CODE IF CHANNEL
* PARITY ERROR OCCURRED.
*
* USES EC, GS.
*
* CALLS FNC.
GGS1 LCN CHPE SET *CHANNEL PARITY* ERROR CODE
UJN GGS3 SET ERROR CODE
GGS2 LCN IDTE SET *INCOMPLETE DATA TRANSFER* ERROR CODE
GGS3 STD EC
GGS4 LCN 0 INVALIDATE GENERAL STATUS
STD GS
GGS5 DCN CH+40
GGS SUBR ENTRY/EXIT
LDN FCGS ISSUE GENERAL STATUS FUNCTION
RJM FNC
MJN GGS4 IF FUNCTION TIMEOUT
LDN 1 INPUT STATUS
IAM GS,CH
NJN GGS2 IF INCOMPLETE TRANSFER
SFM GGS1,CH IF CHANNEL PARITY ERROR
LDD GS
UJN GGS5 RETURN
IBM SPACE 4,25
** IBM - ISSUE BML MESSAGE.
*
* THIS ROUTINE BUILDS A BML MESSAGE AND CALLS ROUTINE *IMB* TO
* ISSUE THE MESSAGE TO THE BML.
*
* ENTRY (CA - CA+3) = SEEK PARAMETERS.
* (EC) = ERROR CODE.
* (ER) = RECOVERY IN PROGRESS FLAG.
* (RC) = RETRY COUNT.
* (RS) = RECOVERY STATUS.
* 777X INITIAL RETRY.
* 0 RECOVERED BY CONTROLLER.
* 1 RECOVERED BY DRIVER.
* 2 UNRESOLVED.
* 3 UNRECOVERED.
* (RW) = READ/WRITE FLAG.
* (T5) = EST ORDINAL.
* (BMLGS) = GENERAL STATUS.
* (DST - DST+23) = DETAILED STATUS IF APPLICABLE.
*
* EXIT (RC) INCREMENTED IF FIRST RETRY.
*
* USES RC, T1, CM+1 - CM+3.
*
* CALLS IMB.
*
* MACROS MONITOR.
IBM SUBR ENTRY/EXIT
LDM TEPF,EC
SHN 0-12
ZJN IBMX IF NO BML MESSAGE/ERROR COUNT INCREMENT
LDD RS
LMN 2
ZJN IBMX IF UNRESOLVED ERROR
SHN 21-13
PJN IBM1 IF FINAL RETRY
LDD RC
NJN IBMX IF NOT INITIAL RETRY
AOD RC INCREMENT RETRY COUNT
UJN IBM3 CONTINUE
IBM1 SHN 13-1
PJN IBM2 IF UNRECOVERED
LDN 2
SBD RC
MJN IBM2 IF NOT RECOVERED ON FIRST RETRY
LDK STAE
LMD EC
ZJN IBM3 IF ERROR NOT TO BE COUNTED
* INCREMENT ERROR COUNTER.
IBM2 LDD T5 SET EST ORDINAL
STD CM+1
LDD RS SET BYTE NUMBER
SHN -1
ADN 3
STD CM+2
LDK ICTS SET SUBFUNCTION
STD CM+3
MONITOR SMDM
IBM3 LDD RS SET RECOVERED/UNRECOVERED FLAG
ADN 5
SHN -3
LPN 1
STD T1
LDC /COMSDFS/D1XY*400 STORE SYMPTOM CODE
LMM TSYM,EC
STM BMLSC
LMK /COMSDFS/HS0040+/COMSDFS/D1XY*400
NJN IBM4 IF NOT A MEDIA ERROR
LDD RW
ERRNZ /COMSDFS/HS0041-/COMSDFS/HS0040-1 ERROR
RAM BMLSC
IBM4 LDD RC STORE RETRY COUNT
SHN 6-1
ADD RW ADD READ/WRITE FLAG
SHN 1
ADD T1 ADD RECOVERY STATUS
STM BMLRC
LDD CA UNIT NUMBER
LPN 77
STM BMLUN
LDD T5 EST ORDINAL
STM BMLEO
LDD EC ERROR CODE
STM BMLEC
LDD CA+1 CYLINDER
STM BMLCY
LDD CA+2 TRACK AND SECTOR
SHN 6
LMD CA+3
STM BMLTS
LDC BML ISSUE *BML* MESSAGE
RJM IMB ISSUE MESSAGE TO BUFFER
UJP IBMX RETURN
BML SPACE 4,10
* BINARY MAINTENANCE LOG MESSAGE.
BML BSS 0
HDR1 VFD 36/0 RESERVED
VFD 12/BMS1LC LENGTH OF MESSAGE
VFD 12/MLDY MESSAGE TYPE
VFD 12//COMSDFS/RM0115 MESSAGE ID
BMLSC VFD 4//COMSDFS/D1XY DRIVER TYPE
VFD 1/0 RESERVED
VFD 7/0 SYMPTOM CODE
BMLPP VFD 6/ PP NUMBER
VFD 6/ CHANNEL NUMBER
BMLUN VFD 6/0 EQUIPMENT NUMBER
VFD 6/ UNIT NUMBER
VFD 12/0 RESERVED
BMLEO VFD 12/ EST ORDINAL
BMLRC VFD 6/ RETRY COUNT
VFD 4/0 RESERVED
VFD 1/0 READ OPERATION
* VFD 1/1 WRITE OPERATION
VFD 1/0 RECOVERED ERROR
* VFD 1/1 UNRECOVERED ERROR
BMLCR VFD 6/ CHANNEL USED FOR RECOVERY
VFD 6/0 RESERVED
BMLMF VFD 12/ MAINFRAME ID
VFD 12/0 RESERVED
HDR1L EQU *-HDR1 HEADER LENGTH (PP WORDS)
HDR1LC EQU HDR1L/5 HEADER LENGTH (CM WORDS)
BMLEC VFD 12/ ERROR CODE
BMLCY VFD 12/ CYLINDER
BMLTS VFD 12/ TRACK AND SECTOR
BMLLF VFD 12/ LAST FUNCTION
BMLGS VFD 12/ GENERAL STATUS
* DETAILED STATUS.
DST BSS MXSL
* ADAPTER STATUS.
BMLAS VFD 6/ UPPER BITS OF FUNCTION CODE
VFD 18/ OPERATIONAL STATUS REGISTER
VFD 18/ ADAPTER CONTROL REGISTER
VFD 18/ ERROR STATUS REGISTER
* DRIVER TRACE DATA.
BMLTD VFD 12/0 LAST CALL TO *ERR*
VFD 12/0 LAST CALL TO *FNC*
VFD 12/0 LAST CALL TO *FNN*
VFD 24/0
BMS1L EQU *-BML LENGTH OF MESSAGE (PP WORDS)
.A SET BMS1L+4
BMS1LC EQU .A/5 LENGTH OF MESSAGE (CM WORDS)
IFI SPACE 4,30
** IFI - INITIALIZE FOR I/O.
*
* THIS ROUTINE IS CALLED BY THE READ AND WRITE PROCESSORS TO
* PREPARE FOR THE READ OR WRITE OPERATION.
*
* ENTRY (CB) = BUFFER ORDINAL.
* (FU - FU+1) = FIRST WORD ADDRESS OF UEM.
* (RW) = READ/WRITE FLAG.
*
* EXIT (UA - UA+1) = UEM ADDRESS.
*
* USES CM - CM+4, UA - UA+1.
*
* MACROS CCBA.
IFI SUBR ENTRY/EXIT
* SET UEM ADDRESS.
CCBA IOLK
CRD CM
LDD CM+4
ADD FU+1
SHN -6
STD UA+1
LDD CM+3
ADD FU
SHN 6
RAD UA+1
SHN -14
STD UA
UJP IFIX RETURN
IIC SPACE 4,10
** IIC - ISSUE I/O COMPLETION REQUEST.
*
* ENTRY (CC) = COMPLETION COUNT.
* (PB) = PREVIOUS BUFFER ORDINAL, IF ANY.
*
* EXIT (PB) = 0.
*
* USES CC, PB, S1.
*
* CALLS CRQ.
IIC SUBR ENTRY/EXIT
LDD PB
ZJN IIC1 IF NO PREVIOUS BUFFER ORDINAL
AOD CC INCREMENT COMPLETION COUNT
LDN 0 CLEAR PREVIOUS BUFFER ORDINAL
STD PB
IIC1 LDD CC
SHN **
IICA EQU *-1
ZJN IICX IF NOT AT THRESHOLD
LDK MMXN SET EXCHANGE RETRY LIMIT
STD S1
IIC2 RJM CRQ ISSUE COMPLETION REQUEST
ZJN IICX IF NO PENDING REQUEST
SOD S1
PJN IIC2 IF NOT AT EXCHANGE RETRY LIMIT
UJN IICX RETURN
IICB BSS 0
CON SHNI+77-0
CON SHNI+77-1
IMF SPACE 4,10
** IMF - ISSUE MONITOR FUNCTION.
*
* ENTRY (A) = MONITOR FUNCTION CODE.
*
* EXIT (A) = 0.
* (CM - CM+4) = COMPLETED PP OUTPUT REGISTER IMAGE.
*
* USES S1.
*
* CALLS CRQ, FTN.
IMF SUBR ENTRY/EXIT
STD S1 SAVE MONITOR FUNCTION CODE
IMF1 RJM CRQ CHECK FOR FUNCTION REISSUE REQUIRED
NJN IMF1 IF PREVIOUS FUNCTION NOT YET COMPLETE
LDD S1
RJM FTN ISSUE MONITOR FUNCTION
UJN IMFX RETURN
ISF SPACE 4,25
** ISF - ISSUE SEEK OPERATION.
*
* THIS ROUTINE ISSUES THE SEEK FUNCTION.
*
* ENTRY (CB) = BUFFER ORDINAL.
* (CS) = CHANNEL RESERVATION STATUS.
*
* EXIT (A) .EQ. 0 IF UNIT ON-CYLINDER.
* .NE. 0 IF DRIVE RESERVED TO OTHER CONTROLLER, OR
* POSITIONER BUSY.
* (CS) = BIT 3 SET IF CONTROLLER HARDWARE RESERVE IS
* HELD. BIT 3 IS CLEAR IF *OPERATION COMPLETE*
* FUNCTION WAS ISSUED.
* (CA - CA+2) = PHYSICAL ADDRESS OF SECTOR.
* TO *ERR* IF ERROR.
*
* USES CS, EC, CA - CA+4.
*
* CALLS ERR, FNC, GGS, RHR.
*
* MACROS CCBA.
ISF SUBR ENTRY/EXIT
CCBA PAD1 GET PHYSICAL ADDRESS FROM CBT ENTRY
CRD CA
LDD CA+2 SET HEAD NUMBER
SHN 14
LMD TH SET SECTOR SIZE FIELD
ERRNZ SSIZ-1000 CODE DEPENDS ON VALUE
STD CA+2
SHN -14 SET SECTOR NUMBER
STD CA+3
LDN FCSK ISSUE SEEK FUNCTION
RJM FNC
MJN ISF3 IF FUNCTION TIMEOUT
LDN FCSKL OUTPUT SEEK PARAMETERS
OAM CA,CH
ZJN ISF1 IF ALL DATA WAS TAKEN
LCN IDTE SET *INCOMPLETE DATA TRANSFER* ERROR CODE
UJN ISF2 PROCESS ERROR
ISF1 EJM ISF4,CH IF LAST BYTE TRANSFERRED
SBN 1
NJN ISF1 IF NOT TIMEOUT
LCN CHFE SET *CHANNEL FAILURE* ERROR CODE
ISF2 STD EC
ISF3 RJM ERR PROCESS ERROR
ISF4 DCN CH+40
RJM GGS GET GENERAL STATUS
MJN ISF3 IF STATUS WAS NOT OBTAINED
ZJN ISF5 IF NO ERROR AND ON-CYLINDER
SHN 21-13
MJN ISF3 IF ABNORMAL TERMINATION
SHN 21-3-21+13
MJN ISF6 IF DRIVE RESERVED TO OPPOSITE ACCESS
ISF5 LDD CS SET HARDWARE RESERVE FLAG
SCN 10
LMN 10
STD CS
LDD GS
ZJN ISF6 IF ON-CYLINDER
SHN 21-1
PJN ISF3 IF NOT BUSY STATUS
RJM RHR RELEASE HARDWARE RESERVES
NJN ISF3 IF ERROR
LDN 1 SET EXIT STATUS
ISF6 LJM ISFX RETURN
MCA SPACE 4,10
** MCA - MASTER CLEAR ADAPTER.
*
* EXIT (A) .EQ. 0, IF MASTER CLEAR SUCCESSFUL.
* .LT. 0, IF MASTER CLEAR FAILED.
*
* USES T1.
*
* CALLS FNC, FNN, GGS.
*
* MACROS DELAY.
MCA SUBR ENTRY/EXIT
LDN 1
STD T1
DCN CH+40 INSURE CHANNEL IN CORRECT STATE
MCA1 LDC FCMC MASTER CLEAR THE CHANNEL ADAPTER
RJM FNN
MJN MCA3 IF ERROR ON CHANNEL ACCESS
LDC FCWC WRITE ADAPTER CONTROL REGISTER
RJM FNC
MJN MCA3 IF ERROR ON CHANNEL ACCESS
LDC 20400 60 BIT CM WORD ACCESS AND NO ERROR CLEAR
OAN CH
MCA2 SBN 2
MJN MCA3 IF TIMEOUT ON CONTROL REGISTER WRITE
FJM MCA2,CH IF DATA NOT ACCEPTED
DCN CH+40
DELAY
RJM GGS GET GENERAL STATUS
ZJN MCAX IF STATUS OK
SOD T1
PJN MCA1 IF NEED TO TRY AGAIN
MCA3 DCN CH+40
UJP MCAX RETURN WITH ERROR INDICATION
OVI SPACE 4,25
** OVI - OBTAIN AND VERIFY *PUT* INTERLOCK.
*
* THIS ROUTINE ATTEMPTS TO OBTAIN THE *PUT* INTERLOCK AND IF
* SUCCESSFUL, VERIFIES THAT THE BUFFER FOR WHICH THE SEEK WAS
* ISSUED IS STILL CURRENT IN THE QUEUE.
*
* ENTRY (CA+1 - CA+3) = ADDRESS USED FOR SEEK.
* (CB) = BUFFER ORDINAL.
* (ER) = RECOVERY IN PROGRESS FLAG.
* (IL) = NONZERO IF THE *PUT* INTERLOCK IS ALREADY HELD.
* (PO) = *PUT* ORDINAL.
* (PR) = SPECIAL *PUT* REQUEST PROCESSING FLAG.
*
* EXIT (A) = 0 IF *PUT* ENTRY IS INTERLOCKED AND BUFFER IS
* STILL CURRENT IN QUEUE.
* = NONZERO IF *PUT* ENTRY IS INTERLOCKED BY OTHER
* DRIVER OR THE BUFFER FOR WHICH THE SEEK WAS
* PERFORMED HAS ALREADY BEEN PROCESSED BY THE
* OTHER DRIVER.
* (IL) = 1 IF (A) = 0.
*
* USES IL, CM+1 - CM+2, CN - CN+4.
*
* CALLS RPI.
*
* MACROS CCBA, CPTA, MONITOR.
OVI2 LDN 0 INDICATE *PUT* INTERLOCKED AND BUFFER OK
OVI SUBR ENTRY/EXIT
LDD IL
NJN OVI2 IF THIS DRIVER ALREADY HAS *PUT* INTERLOCK
LDK SUIS
STD CM+1
LDD PO
STD CM+2
MONITOR BIOM ISSUE INTERLOCK REQUEST
LDD CM+1
NJN OVIX IF *PUT* IS INTERLOCKED BY OTHER DRIVER
AOD IL SET *PUT* INTERLOCK FLAG
LDC CREQ UPDATE *CCT* TABLE
OVIA EQU *-2 (*CCT* FWA SET BY *PRS*)
CWD IL
LDD ER
NJN OVI2 IF RECOVERY IN PROGRESS
LDD PR
NJN OVI2 IF SPECIAL PUT REQUEST PROCESSING
* VERIFY THAT THE BUFFER FOR WHICH THE SEEK WAS ISSUED IS STILL
* CURRENT IN THE QUEUE.
CPTA UNCT
CRD CN
LDD CN+3
LMD CB
NJN OVI1 IF CURRENT CBT ORDINAL CHANGED
CCBA HSLK GET *PUT* ORDINAL FROM CBT ENTRY
CRD CN
LDD CN+4
LMD PO
NJN OVI1 IF *PUT* ORDINALS DO NOT MATCH
CCBA PAD1 GET PHYSICAL ADDRESS FROM CBT ENTRY
CRD CN
LDD CN+1
LMD CA+1
NJN OVI1 IF NO CYLINDER MATCH
LDD CA+2 TRACK
LPN 77
SHN 6
LMD CA+3 SECTOR
LMD CN+2
ZJN OVI1.1 IF BUFFER OK
OVI1 RJM RPI RELEASE *PUT* INTERLOCK
LDN 1 INDICATE VERIFICATION FAILURE
OVI1.1 UJP OVIX RETURN
PDT SPACE 4,20
** PDT - PROCESS DATA TRANSFER.
*
* THIS ROUTINE PREPARES FOR AND STARTS THE DATA TRANSFER WHEN A
* REQUEST IS FOUND IN THE *PUT* AND THE SEEK HAS COMPLETED. IT
* WILL CALL THE PROPER ROUTINE FOR THE DIRECTION OF THE I/O.
* THIS ROUTINE WILL RETURN TO THE MAIN LOOP ONLY WHEN THE
* TRANSFER CANNOT CONTINUE ON THE CURRENT UNIT.
*
* ENTRY (EC) = ERROR CODE IF ERROR RECOVERY IS IN PROGRESS.
* (PO) = *PUT* ORDINAL.
* (RW) = READ/WRITE FLAG.
*
* USES NB, PB, TB, T1.
*
* CALLS ERR, FNN, OVI, RHR, RIO, RPI, WIO.
PDT SUBR ENTRY/EXIT
RJM OVI OBTAIN *PUT* INTERLOCK AND VERIFY BUFFER
NJN PDT1 IF UNABLE TO INTERLOCK *PUT*/WRONG BUFFER
STD NB CLEAR NEXT BUFFER ORDINAL
STD PB CLEAR PREVIOUS BUFFER ORDINAL
LDC FCCT CLEAR THE T REGISTERS
RJM FNN
MJN PDT2 IF ERROR ENCOUNTERED
LDM IICB,RW SET COMPLETION REQUEST THRESHOLD
STM IICA
LDM PDTA,RW STORE SUBROUTINE ADDRESS
STD T1
RJM 0,T1 ENTER DATA TRANSFER ROUTINE
* CONTROL RETURNS HERE AFTER THE DATA TRANSFER IS COMPLETED.
PDT1 RJM RHR RELEASE HARDWARE RESERVES
ZJN PDT3 IF NO ERROR
LDD EC
NJN PDT3 IF ERROR RECOVERY IS IN PROGRESS
PDT2 RJM ERR CALL ERROR PROCESSOR
PDT3 RJM RPI RELEASE *PUT* INTERLOCK
UJP PDTX RETURN
PDTA BSS 0 PROCESSOR ADDRESS TABLE
CON RIO
CON WIO
PFR SPACE 4,15
** PFR - PREPARE FOR RETRY ATTEMPT.
*
* THIS ROUTINE DOES WHATEVER IS NECESSARY TO PREPARE FOR THE
* NEXT RETRY ATTEMPT. ITS DUTIES INCLUDE PLUGGING INSTRUCTIONS
* TO FORCE RETURN TO THE ERROR PROCESSOR FOLLOWING RECOVERY.
*
* ENTRY (RW) = READ/WRITE FLAG.
*
* USES T1, T2.
PFR SUBR ENTRY/EXIT
LDD RW
SHN 1
STD T1
LDM PFRA,T1
STD T2
LDM PFRA+1,T1
STI T2
UJN PFRX RETURN
PFRA BSS 0
CON RIOC,UJNI+RIO12-RIOC
CON WIOC,UJNI+WIO8-WIOC
ERRNG RIO12-RIOC CODE DEPENDS ON VALUE
ERRNG WIO8-WIOC CODE DEPENDS ON VALUE
PRE SPACE 4,20
** PRE - PRESET ERROR PROCESSOR.
*
* THIS ROUTINE PERFORMS OPERATIONS NECESSARY TO PREPARE THE
* DRIVER FOR ERROR PROCESSOR EXECUTION.
*
* EXIT (A) = 0 IF ERROR PROCESSING SHOULD CONTINUE.
* (EC) = 1 IF ERROR ON PREVIOUS SECTOR.
* (PB) = PREVIOUS BUFFER ORDINAL.
* (RS) = RECOVERY STATUS.
* (T5) = EST ORDINAL.
* (TEPA) = 1 IF VERIFICATION/INTERLOCK REJECT.
*
* USES CB, EC, GS, PB, RS, T5, CM - CM+4.
*
* CALLS CRQ, FNN, OVI.
*
* MACROS CPTA.
PRE4 AOM TEPA SET VERIFICATION/INTERLOCK FAILURE FLAG
PRE SUBR ENTRY/EXIT
DCN CH+40 DISCONNECT CHANNEL
LDML FNCA SAVE CURRENT FUNCTION
STM BMLLF
SHN -6
SCN 77
STM BMLAS
LDML FNCB SAVE LAST ADAPTER FUNCTION
STM BMLTD+4
SHN -14
STM BMLTD+3
LDD EC SAVE CURRENT ERROR CODE
SHN 21-13
PJN PRE1 IF NOT COMPLEMENTED
LDD EC
LMC 7777
UJN PRE2 CONTINUE
PRE1 LDD EC
PRE2 SHN 6
RAM BMLTD+3
LDM ERR SAVE LAST CALL TO *ERR*
STM BMLTD
LDM FNC SAVE LAST CALL TO *FNC*
STM BMLTD+1
LDM FNN SAVE LAST CALL TO *FNN*
STM BMLTD+2
LCN 0 INITIALIZE RECOVERY STATUS
STD RS
STD GS PRESET GENERAL STATUS = 7777
RJM OVI GET *PUT* INTERLOCK (IF NOT ALREADY HELD)
NJP PRE4 IF INTERLOCK NOT OBTAINED
LDC LDNI+FCRD
STM RIOA
ADN FCWR-FCRD
STM WIOA
CPTA UNCT GET EST ORDINAL
CRD CM
LDD CM+1
STD T5
LDD EP
ZJN PRE3 IF NOT PREVIOUS SECTOR ERROR
LDD EC
LMC 7777-FTOE
NJN PRE3 IF NOT PREVIOUS SECTOR ERROR
LDN FTOE
STD EC
LDD PB RESET CURRENT BUFFER TO PREVIOUS
ZJN PRE3 IF NO PREVIOUS BUFFER
STD CB
LDN 0 CLEAR PREVIOUS BUFFER ORDINAL
STD PB
PRE3 RJM CRQ IDLE PENDING MONITOR FUNCTIONS
NJN PRE3 IF FUNCTION PENDING
STD EP CLEAR PREVIOUS SECTOR ERROR FLAG
LJM PREX RETURN
RCH SPACE 4,15
** RCH - REQUEST CHANNEL.
*
* ENTRY (IR+4) = CHANNEL NUMBER.
* (CS) = CHANNEL RESERVATION STATUS.
*
* EXIT (A) .NE. 0 IF CHANNEL ASSIGNED.
* .EQ. 0 IF CHANNEL NOT ASSIGNED.
*
* USES CM+1, CS.
*
* MACROS MONITOR.
RCH SUBR ENTRY/EXIT
LDD CS
LPN 1
NJN RCHX IF CHANNEL ALREADY ASSIGNED
LDD IR+4
STD CM+1
MONITOR CCHM
LDD CM+2
ZJN RCHX IF CHANNEL NOT ASSIGNED
SCF *+2,CH UNCONDITIONALLY SET CHANNEL FLAG
AOD CS SET CHANNEL RESERVED FLAG
UJN RCHX RETURN
RHR SPACE 4,10
** RHR - RELEASE HARDWARE RESERVES.
*
* ENTRY (CS) = CHANNEL STATUS.
*
* EXIT (A) = 0 IF NO ERROR.
*
* USES CS, S1.
*
* CALLS FNC.
RHR SUBR ENTRY/EXIT
LDD CS
LPN 10
ZJN RHRX IF CONTROLLER NOT RESERVED
LDN FCOC ISSUE *OPERATION COMPLETE* FUNCTION
RJM FNC
SHN 0-21 SAVE ERROR STATUS
STD S1
DCN CH+40
LCN 10 CLEAR CONTROLLER RESERVE FLAG
RAD CS
LDD S1 SET REPLY STATUS
UJN RHRX RETURN
RIO SPACE 4,40
** RIO - PERFORM READ I/O OPERATIONS.
*
* ENTRY (CB) = CURRENT BUFFER ORDINAL.
* (EP) = 0.
* (NB) = 0.
* (PB) = 0.
*
* EXIT (PB) = ORDINAL OF LAST BUFFER PROCESSED.
*
* USES CB, EC, EP, NB, PB, SR+2.
*
* CALLS ERR, FNC, FNN, GGS, IFI, WFT, WTC, WTR.
*
* MACROS CCBA.
RIO SUBR ENTRY/EXIT
RJM IFI INITIALIZE FOR I/O
RIO1 RJM WTR WRITE T PRIME REGISTER
MJN RIO5 IF ERROR WRITING T REGISTER
LDN FCRD ISSUE READ FUNCTION
* LDN FCCO (CONTROLLER ERROR RECOVERY IN PROGRESS)
RIOA EQU *-1
RJM FNN
PJN RIO2 IF NO ERROR
AOD EP SET PREVIOUS SECTOR ERROR FLAG
UJN RIO5 CALL ERROR PROCESSOR
RIO2 LDC FCDI+HLEN INITIATE DMA TRANSFER
RJM FNC
MJN RIO5 IF ERROR ON FUNCTION
RIO3 FJM RIO6,CH IF CHANNEL FULL
SBN 1
NJN RIO3 IF NOT TIMEOUT
LCN IDTE SET *INCOMPLETE DATA TRANSFER* ERROR CODE
RIO4 STD EC
RIO5 RJM ERR CALL ERROR PROCESSOR
RIO6 LDN HLEN INPUT HEADER DATA
IAM BUFF,CH
ZJN RIO8 IF DATA TRANSFER COMPLETE
SFM RIO7,CH IF CHANNEL PARITY ERROR
LCN IDTE SET *INCOMPLETE DATA TRANSFER* ERROR CODE
UJN RIO4 SET ERROR CODE
RIO7 LCN CHPE SET *CHANNEL PARITY* ERROR CODE
UJN RIO4 SET ERROR CODE
RIO8 DCN CH+40 INPUT TO PP COMPLETE
RJM WTC STORE LINKAGE BYTES
RJM WFT WAIT FOR TRANSFER COMPLETION
MJN RIO4 IF ERROR ENCOUNTERED
ZJN RIO12 IF NO CONSECUTIVE REQUEST
* UJN RIO12 (ERROR RECOVERY IN PROGRESS)
RIOC EQU *-1
LDN 0 CLEAR NEXT BUFFER ORDINAL
STD NB
LJM RIO1 PROCESS NEXT REQUEST
RIO12 RJM GGS GET GENERAL STATUS
ZJP RIOX IF NO ERROR
LDD PB BACKUP TO PREVIOUS BUFFER
STD CB
LDN 0 AVOID BUFFER COMPLETION
STD PB
LJM RIO5 CALL ERROR PROCESSOR
RLC SPACE 4,10
** RLC - RELOAD CCC CONTROLWARE IF NECESSARY.
*
* RLC WILL RELOAD CONTROLWARE BEFORE THE FINAL RETRY FOR EACH
* ACCESS, PROVIDED THAT THE ERROR CODE IS LESS THAN *NRVE*.
*
* EXIT (A) .EQ. 0 IF LOAD WAS SUCCESSFUL OR UNNECESSARY.
* .NE. 0 IF LOAD WAS ATTEMPTED AND FAILED.
*
* USES T1, CM - CM+4, CN - CN+4.
*
* CALLS FNC, GGS, MCA.
*
* MACROS DELAY, MONITOR.
RLC8 LDN 0 INDICATE NO ERROR
RLC9 DCN CH+40
RLC SUBR ENTRY/EXIT
LDD EC
SBK NRVE
PJN RLC8 IF NOT A CANDIDATE FOR CONTROLWARE RELOAD
LDM TREC,EC
SBD RC
ZJN RLC1 IF TIME FOR RELOAD ON SECONDARY ACCESS
SBD RC
NJN RLC2 IF NOT TIME FOR RELOAD ON PRIMARY ACCESS
RLC1 RJM MCA MASTER CLEAR ADAPTOR
* CHECK FOR SYSEDIT IN PROGRESS AND DELAY IF NECESSARY.
RLC2 LDK PLDP CHECK PERIPHERAL DIRECTORY POINTER
CRD CM
LDD CM
ADD CM+1
NJN RLC3 IF SYSEDIT NOT IN PROGRESS
DELAY
UJN RLC2 RECHECK SYSEDIT IN PROGRESS
* FIND CONTROLWARE.
RLC3 LDN ZERL
CRD CM
LDD MA PUT CONTROLWARE ID IN MESSAGE BUFFER
CWM RLCA,ON
MONITOR SCDM SEARCH CENTRAL DIRECTORY
LDD CM+3
SHN 14
LMD CM+4
CRD CM READ *PST* ENTRY
LDD CM+1
SHN 21-12
PJN RLC4 IF NOT CM RESIDENT
LDD CM+3 GET ADDRESS OF *RCL* ENTRY
SHN 14
LMD CM+4
ADN 1
CRD CN READ 5200 RECORD HEADER
ADN 1 SET FWA OF 5200 RECORD DATA
STD CM+4
SHN -14
STD CM+3
LCN 1 ADJUST WORD COUNT FOR HEADER
RAD CN+4
* LOAD CONTROLWARE.
LDK FCAL AUTOLOAD FUNCTION
RJM FNC ISSUE FUNCTION AND ACTIVATE CHANNEL
ZJN RLC5 IF NO ERROR ON FUNCTION
RLC4 UJP RLC9 RETURN WITH ERROR INDICATION
RLC5 LDD CN+4
RLC6 SBD HN
MJN RLC7 IF LESS THAN 100B WORDS LEFT
LDN 0
RLC7 ADD HN
STD T1
LDD CM+3
SHN 14
LMD CM+4
CRM BUFF,T1 READ BLOCK OF CONTROLWARE FROM CM
STD CM+4 UPDATE BLOCK ADDRESS
SHN -14
STD CM+3
LDD T1 SET BYTES TO TRANSFER
SHN 2
ADD T1
OAM BUFF,CH LOAD BLOCK OF CONTROLWARE TO CCC
FJM *,CH IF TRANSFER NOT COMPLETE
NJN RLC4 IF INCOMPLETE TRANSFER
LDD CN+4
SBD T1
STD CN+4
NJN RLC6 IF MORE WORDS TO TRANSFER
DCN CH+40
DELAY
RJM GGS GET GENERAL STATUS
UJP RLCX RETURN
RLCA VFD 42/0LMA464,18/0 CONTROLWARE NAME
RPI SPACE 4,10
** RPI - RELEASE *PUT* INTERLOCK.
*
* ENTRY (CC) = COMPLETION COUNT.
* (IL) = *PUT* INTERLOCK FLAG.
* (PB) = PREVIOUS BUFFER ORDINAL.
* (PO) = *PUT* ORDINAL.
* (RW) = READ/WRITE FLAG.
* (TB) = TOTAL BUFFER COUNT.
*
* USES CC, IL, PB, CM - CM+4.
*
* MACROS MONITOR.
RPI SUBR ENTRY/EXIT
LDD IL
ZJN RPIX IF *PUT* NOT INTERLOCKED
LDD PB
ZJN RPI1 IF NO PREVIOUS BUFFER
LDN 1 ACCOUNT FOR PREVIOUS BUFFER
RPI1 ADD CC
LMC 4000 SET *RELEASE INTERLOCK* FLAG
STD CM+3
LDD TB SET TOTAL BUFFER COUNT
STD CM+4
LDD PO
STD CM+2
LDN DCBS CLEAR UNIT INTERLOCK
STD CM+1
LDN 0 CLEAR COMPLETION COUNT BEFORE *CRQ* CALL
STD CC
MONITOR BIOM
* LDN 0
STD IL CLEAR *PUT* INTERLOCK FLAG
STD PB CLEAR PREVIOUS BUFFER ORDINAL
LDC CREQ UPDATE *CCT* TABLE
RPIA EQU *-2 (*CCT* FWA SET BY *PRS*)
CWD IL
UJP RPIX RETURN
RTM SPACE 4,25
** RTM - REQUEST TRACK FLAW IF MEDIA ERROR.
*
* THIS ROUTINE DETERMINES IF THE ERROR RESULTED FROM A MEDIA
* FAILURE. IF IT DID, *CPUMTR* WILL BE CALLED TO PLACE THE
* LOGICAL TRACK NUMBER IN THE MST SO *1MV* CAN PERFORM A MEDIA
* VERIFICATION WHEN THE TRACK IS RELEASED. AN ERROR LOG
* MESSAGE IS ISSUED INFORMING THE OPERATOR THAT A MEDIA FAILURE
* OCCURRED BUT THE TRACK HAS NOT YET BEEN FLAWED BY THE SYSTEM.
*
* ENTRY (CA - CA+3) = PHYSICAL ADDRESS.
* (CB) = BUFFER ORDINAL.
* (EC) = ERROR CODE.
* (T5) = EST ORDINAL.
*
* USES T1, CM - CM+4.
*
* CALLS C2D, IMB.
*
* MACROS MONITOR.
RTM SUBR ENTRY/EXIT
LDD EC
LMK PARE
NJN RTMX IF NOT MEDIA ERROR
LDD T5 CONVERT AND STORE EST ORDINAL IN MESSAGE
SHN -3
RJM C2D
STM RTMB+1
LDD T5
STD CM+1 STORE EST ORDINAL FOR *SMDM*
LPN 7
SHN 6
ADC 2R0,
STM RTMB+2
LDD CA+1
SHN 1
ADC 4000
STD CM+2
LDD CA+2 PHYSICAL TRACK
LPN 77
STD T1
SHN 1
ADD T1
ERRNZ PSPT-3 CODE DEPENDS ON VALUE
ADD CA+3
SBK PSLT
MJN RTM1 IF FIRST LOGICAL TRACK OF CYLINDER
AOD CM+2
RTM1 LDD CM+2 CONVERT AND STORE TRACK NUMBER IN MESSAGE
SHN -6 CONVERT UPPER 6 BITS
RJM C2D
STM RTMB+4 STORE RESULT IN DISPLAY BUFFER
LDD CM+2 CONVERT LOWER 6 BITS
LPN 77
RJM C2D
STM RTMB+5 STORE RESULT IN DISPLAY BUFFER
LDK SFTS SET SUBFUNCTION
STD CM+3
MONITOR SMDM
LDD CM+1
NJN RTM2 IF THIS TRACK FLAW ALREADY REQUESTED
LDC RTMA ISSUE ERROR LOG MESSAGE
RJM IMB
RTM2 UJP RTMX RETURN
RTMA VFD 24/0 RESERVED
VFD 12/1 ERRLOG ALERT FLAG
VFD 12/RTMAL MESSAGE LENGTH
VFD 12/ELDY ERRLOG DAYFILE
RTMB DATA C*EQXXX,TKNNNN, MEDIA DEFECT ENCOUNTERED.*
.1 SET *-RTMA+4
RTMAL EQU .1/5
SAS SPACE 4,10
** SAS - SAVE ADAPTER STATUS.
*
* EXIT (A) .LT. 0, IF ERRORS READING STATUS.
*
* USES T1, CM - CM+4.
*
* CALLS FNC.
SAS5 DCN CH+40
LCN 0 INDICATE ERRORS OCCURRED
SAS SUBR ENTRY/EXIT
LDN SASAL+1 SET UP READ LOOP
STD T1
SAS1 SOD T1
ZJN SAS4 IF END OF SAVE LOOP
LDML SASA-1,T1 FUNCTION FOR REGISTER READ
LMC 400000 INDICATE ADAPTER FUNCTION
RJM FNC
MJN SASX IF ERROR ENCOUNTERED
SAS2 FJM SAS3,CH IF DATA PRESENT
SBN 1
ZJN SAS5 IF END OF DELAY
UJN SAS2 LOOP WAITING FOR DATA
SAS3 IAN CH
STML CM-1,T1 SAVE REGISTER DATA
DCN CH+40
UJN SAS1 LOOP FOR NEXT REGISTER
SAS4 LDDL CM+2 SAVE 16 BIT DATA IN BML MESSAGE
STM BMLAS+4
SHN -14
STM BMLAS+3
LDDL CM+1
SHN 14
STM BMLAS+2
SHN -6
SCN 77
RAM BMLAS+3
LDDL CM
STM BMLAS+1
SHN -14
RAM BMLAS
LJM SASX RETURN
SASA CON 0 READ OPERATION STATUS
CON 0 READ CONTROL REGISTER
CON 0 READ ERROR STATUS REGISTER
SASAL EQU *-SASA
SCD SPACE 4,10
** SCD - SET DRIVER DROPPED FLAG.
*
* THIS ROUTINE SETS A FLAG IN THE CONTROLWARE TABLE INDICATING
* THAT THE DRIVER OF THIS CHANNEL HAS DROPPED.
*
* EXIT (A) = 0.
*
* USES CM+1 - CM+4.
*
* MACROS MONITOR.
SCD SUBR ENTRY/EXIT
LDD MA STORE *UTEM* PARAMETERS
CWM SCDB,ON
LDC **
SCDA EQU *-1 (CONTROLWARE TABLE ADDRESS)
STD CM+4
SHN -14
STD CM+3
LDN 1
STD CM+1
LDN 0
STD CM+2
MONITOR UTEM SET DRIVER DROP FLAG
UJN SCDX RETURN
SCDB VFD 1/0,5/0,6/1,6/,42/1
SSF SPACE 4,15
** SSF - SET SUSPECT FLAG.
*
* THIS ROUTINE SETS THE SUSPECT FLAG AND THE *E,M* DISPLAY
* ERROR CODE IN THE MST ENTRY VIA *SEQM* FUNCTIONS, PROVIDED
* THAT THE *SET SUSPECT* FLAG IS SET IN TABLE *TEPF* FOR THE
* PARTICULAR TYPE OF ERROR ENCOUNTERED.
*
* ENTRY (EC) = ERROR CODE.
* (RC) = RETRY COUNT.
* (T5) = EST ORDINAL.
*
* USES CM+1 - CM+3.
*
* CALLS RTM.
*
* MACROS MONITOR.
SSF SUBR ENTRY/EXIT
LDD ER
NJN SSFX IF RECOVERY IN PROGRESS
LDD EC
SBK NRVE
PJN SSF1 IF NO CONTROLWARE RELOAD
LDM TREC,EC
SHN -1
ADN 1
UJN SSF2 SEE IF TIME TO SET SUSPECT
SSF1 LDK SURT
SSF2 SBD RC
NJN SSFX IF NOT TIME TO SET SUSPECT FLAG
RJM RTM CHECK FOR MEDIA FAILURE
LDM TEPF,EC
SHN 21-7
PJN SSFX IF SUSPECT FLAG NOT TO BE SET
LDD T5 SET SUSPECT FLAG
STD CM+1
LDN SSES
STD CM+2
MONITOR SEQM
LDD T5 SET ERROR CODE IN MST
STD CM+1
LDN STDE
STD CM+2
LDN SERS
STD CM+3
MONITOR SMDM
UJP SSFX RETURN
SUQ SPACE 4,30
** SUQ - SCAN UNIT QUEUE.
*
* THIS ROUTINE SCANS THE *PUT* ENTRIES OF UNITS ACCESSED BY
* THIS CHANNEL UNTIL IT HAS SCANNED THE ENTIRE TABLE OR FINDS
* AN ENTRY ELIGIBLE FOR PROCESSING.
*
* ENTRY (TI) = CURRENT *TPOR* INDEX.
*
* EXIT (A) .EQ. 0 IF ENTIRE TABLE SCANNED AND NO ELIGIBLE
* ENTRY FOUND.
* .NE. 0 IF ENTRY SELECTED.
* (CB) = CURRENT BUFFER ORDINAL.
* (ER) = 1 IF ERROR RECOVERY IS IN PROGRESS.
* (PO) = ORDINAL OF SELECTED *PUT* ENTRY.
* (RC) = 0 IF ELIGIBLE ENTRY FOUND AND *RECOVERY IN
* PROGRESS* FLAG IS CLEAR.
* = N/2+1 WHERE N IS THE RETRY LIMIT FOR THE ERROR
* CODE SET IN *EC* IF *RECOVERY IN PROGRESS*
* FLAG IS SET.
* (RW) = READ/WRITE FLAG.
* TO *ERR* IF ERROR RECOVERY IS IN PROGRESS FOR
* SELECTED BUFFER.
* (TB) = TOTAL BUFFER COUNT.
*
* USES CB, EC, ER, PO, RC, RW, S1, TB, TI, CM - CM+4,
* CN - CN+4, T1 - T5.
*
* CALLS ERR, PSR.
*
* MACROS CCBA, CPTA, PSR, SFA.
SUQ8 RJM PSR PROCESS SPECIAL REQUESTS
SUQ7 LDD TI
LMN 1
SUQA EQU *-1
NJN SUQ1 IF NOT FINISHED WITH *PUT* SCAN
SUQ SUBR ENTRY/EXIT
SUQ1 AOD TI ADVANCE *TPOR* INDEX
ERRNZ TPORE-1 CODE IS VALUE DEPENDENT
LDM TPOR-1,TI
NJN SUQ2 IF NOT END OF *TPOR* TABLE
STD TI RESET INDEX
UJN SUQ1 CONTINUE
SUQ2 SHN 21 SET *PUT* ORDINAL
STD PO
SHN -21
STD S1 SET CHANNEL BYTE INDEX
CPTA UNCT READ *PUT* ENTRY
CRD CM
ADK PILL-UNCT
CRD CN
LDD CN+3
LPN 76
NJN SUQ8 IF SPECIAL REQUESTS PRESENT
LDD CM
SHN 21-13
MJN SUQ7 IF UNIT INTERLOCK SET
LDD CM+3
NJN SUQ3 IF REQUEST IN QUEUE
SUQ2.1 UJN SUQ7 PROCESS NEXT *PUT*
SUQ3 STD CB SAVE BUFFER ORDINAL
CCBA IOLK,A READ *CBT* ENTRY
CRD CN
ADK HSLK-IOLK
CRD T1
SFA EST,CM+1 READ EST ENTRY
ADK EQDE
CRD CM
LDM CM+1,S1
SHN -11
LPN 3
STD T2 SAVE CHANNEL STATE INDICATOR
LMN 3
NJN SUQ4 IF CHANNEL NOT DOWN
SUQ3.1 UJN SUQ2.1 PROCESS NEXT *PUT*
SUQ4 LDD T1
SHN 0-12
ZJN SUQ4.1 IF NOT CHANNEL SPECIFIC REQUEST
CCBA PAD4 GET CHANNEL FROM CBT ENTRY
CRD CM
LDD CM
SHN -6
LMD IR+4
STD T2
SUQ4.1 LDD T2
NJN SUQ3.1 IF THIS CHANNEL IN IDLE STATE
LDD CN SET/CLEAR READ/WRITE FLAG
SHN 0-11
LPN 1
STD RW
SHN 13-0
ADN 1
STD TB
LDD T1
SHN 0-13
STD ER SET/CLEAR RECOVERY IN PROGRESS FLAG
ZJN SUQ6 IF NOT ERROR RECOVERY
LDD T1 SAVE ERROR CODE
LPN 77
STD T1
LMC 7777 COMPLEMENT ERROR CODE
STD EC
LDM TREC,T1 SET RETRY COUNT = LIMIT/2+1
SHN -1
ADN 1
STD RC INITIALIZE RETRY COUNT
LDN 0 INITIALIZE PASS COUNTER
STM ERRA
RJM ERR CALL ERROR PROCESSOR
* LJM MST ERROR PROCESSOR RETURNS TO *MST*
SUQ6 LDD TI SET SCAN LIMIT
LMC LMNI
STM SUQA
LJM SUQX RETURN
TEP SPACE 4,30
** TEP - TERMINATE ERROR PROCESSING.
*
* THIS ROUTINE PERFORMS OPERATIONS NECESSARY TO RESTORE THE
* DRIVER TO ITS NORMAL STATE (NON-ERROR PROCESSING).
*
* ENTRY (EC) = ERROR CODE.
* (PO) = *PUT* ORDINAL.
* (RS) = RECOVERY STATUS.
* (RW) = READ/WRITE FLAG.
*
* EXIT (EC) = 0.
* (ER) = 0.
* (RC) = 0.
* (RS) = RECOVERY STATUS.
* 0 RECOVERED BY CONTROLLER.
* 1 RECOVERED BY DRIVER.
* 2 UNRESOLVED.
* 3 UNRECOVERED.
*
* USES EC, ER, IL, RC, RS, S2, T1, T2, CM - CM+4.
*
* CALLS IBM, RHR, RPI.
*
* MACROS MONITOR.
TEP4 LDN 0
STD EC CLEAR ERROR CODE
STD ER CLEAR RECOVERY IN PROGRESS FLAG
STD RC CLEAR RETRY COUNT
STM TEPA CLEAR VERIFICATION/INTERLOCK REJECT FLAG
TEP SUBR ENTRY/EXIT
LDD RW
SHN 1
STD T1
LDM TEPB,T1 RESTORE INSTRUCTIONS
STD T2
LDM TEPB+1,T1
STI T2
LDM TEPC,T1
STD T2
LDM TEPC+1,T1
STI T2
LDC **
TEPA EQU *-1
NJP TEP4 IF OTHER DRIVER IS HANDLING ERROR
LDD EC SAVE ERROR CODE IN CASE FUNCTION TIMEOUT
STD S2
RJM RHR RELEASE HARDWARE RESERVES
LDD S2 RESTORE ERROR CODE
STD EC
LDD RS
LMN 2
NJN TEP2 IF NOT UNRESOLVED ERROR
* ISSUING SUBFUNCTION *IOES* OF THE *BIOM* MONITOR FUNCTION
* CAUSES ONE OF THE FOLLOWING TO OCCUR -
* A. IF THE RECOVERY IN PROGRESS FLAG IS SET IN THE CBT
* ENTRY, THE REQUEST WILL BE TERMINATED WITH STATUS
* RETURNED TO THE PROGRAM THAT ISSUED THE REQUEST.
* IN THIS CASE IT IS THE RESPONSIBILITY OF THIS
* DRIVER TO ISSUE MESSAGES TO THE BML, ERROR LOG, JOB
* DAYFILE AND SYSTEM DAYFILE INDICATING AN
* UNRECOVERED ERROR OCCURRED.
* B. IF THE RECOVERY IN PROGRESS FLAG IS CLEAR AND AN
* ALTERNATE CHANNEL EXISTS (WITH AN ACTIVE DRIVER),
* THE REQUEST WILL BE MODIFIED TO FORCE CONTINUATION
* OF ERROR RECOVERY BY THE OTHER DRIVER.
* C. IF THE RECOVERY IN PROGRESS FLAG IS CLEAR BUT
* EITHER THERE IS NO ALTERNATE ACCESS PATH OR IT HAS
* BEEN DOWNED, THE REQUEST WILL BE MODIFIED TO FORCE
* CONTINUATION OF ERROR PROCESSING ON THIS CHANNEL.
LDN SETS SET SUBFUNCTION
STD CM+1
LDD PO SET *PUT* ORDINAL
STD CM+2
LDN 1
STD CM+3
LDD EC SET ERROR CODE
STD CM+4
MONITOR BIOM
STD IL CLEAR *PUT* INTERLOCK FLAG
LDD CM+1
ZJN TEP2 IF PROCESSING WILL RESUME ON OTHER CHANNEL
AOD RS SET UNRECOVERED STATUS
* ISSUE THE BML MESSAGE AND INCREMENT ERROR COUNTERS IF
* APPROPRIATE FOR THIS ERROR TYPE AND RESOLUTION OF THE ERROR
* HAS BEEN DETERMINED.
TEP2 LDD RS
LMN 2
ZJN TEP3 IF UNRESOLVED ERROR
RJM RPI RELEASE *PUT* INTERLOCK
TEP3 RJM IBM ISSUE BML MESSAGE
* CLEAR B-DISPLAY MESSAGE.
LDK ZERL
CRD CM
LDD CP
ADK MS2W
CWD CM
UJP TEP4 CONTINUE CLEARING AND RETURN
TEPB BSS 0
CON RIOC,ZJNI+RIO12-RIOC
CON WIOC,ZJNI+WIO8-WIOC
ERRNG RIO12-RIOC CODE DEPENDS ON VALUE
ERRNG WIO8-WIOC CODE DEPENDS ON VALUE
TEPC BSS 0
CON RIOA,LDNI+FCRD
CON WIOA,LDNI+FCWR
WFT SPACE 4,25
** WFT - WAIT FOR TRANSFER COMPLETE.
*
* ENTRY (RW) = READ/WRITE FLAG.
*
* EXIT (A) .LT. 0 IF ERROR ENCOUNTERED.
* .EQ. 0 IF NO CONSECUTIVE REQUEST FOUND.
* .GT. 0 IF CONSECUTIVE REQUEST FOUND.
*
* USES CB, PB, T1, CM - CM+4, CN - CN+4.
*
* CALLS CCS, FNC, FNN, IFI, IIC.
WFT10 LDC FCCD CLEAR DMA MODE
RJM FNN
MJN WFTX IF ERROR ENCOUNTERED
LDD NB
WFT SUBR ENTRY/EXIT
RJM IIC ISSUE I/O COMPLETION REQUEST IF NECESSARY
RJM CCS CHECK FOR CONSECUTIVE REQUEST
LDD CB ADVANCE BUFFER POINTERS
STD PB
LDD NB
STD CB
RJM IFI INITIALIZE FOR NEXT REQUEST
LDK RTCL
CRD CN
LDD NB
ZJN WFT1 IF NO CONSECUTIVE REQUEST
LDD RW
ZJN WFT1 IF READ OPERATION
LDN HLEN/5
STD T1 SET LENGTH OF HEADER
CCBA PAD1 READ HEADER INTO BUFFER
CRM BUFF,T1
WFT1 LDC RTCL CHECK TIMEOUT ON TRANSFER
CRD CM
LDD CM+4
SBD CN+4
PJN WFT2 IF NO UNDERFLOW
ADC 10000
WFT2 SBN 60
SHN 21-13 ALLOW FOR CLOCK ADJUSTMENT
PJN WFT4 IF TIMEOUT ON TRANSFER
LDC FCRO READ OPERATIONAL STATUS
RJM FNC
PJN WFT2.2 IF NO ERROR PROCESSING FUNCTION
WFT2.1 LMD EC
UJN WFT4.1 PROCESS THE ERROR
WFT2.2 LDC 1701
WFT3 EQU *-1
FJM WFT5,CH IF CHANNEL FULL
NJN WFT3 IF NOT TIMEOUT
WFT4 LDN CHFE INDICATE CHANNEL ERROR
WFT4.1 LJM WFT9 PROCESS THE ERROR
WFT5 IAN CH READ OPERATIONAL STATUS
STD CM+1
DCN CH+40
SHN 21-0
MJP WFT1 IF TRANSFER IN PROGRESS
WFT6 LDN CHPE
SFM WFT9,CH IF CHANNEL PARITY ERROR
LDC FCRT READ T REGISTER
RJM FNC
MJN WFT2.1 IF ERROR ENCOUNTERED
LDC 1701
WFT7 EQU *-1
FJM WFT8,CH IF DATA PRESENT
NJN WFT7 IF NOT END OF DELAY
LDN CHFE INDICATE CHANNEL ERROR
UJN WFT9 PROCESS THE ERROR
WFT8 LDN 3
IAM CM,CH
LDN CHPE
SFM WFT9,CH IF CHANNEL PARITY ERROR
DCN CH+40
LDML WTRA+2
ADC 40000 INCREMENT TRANSFER ADDRESS
STDL CM+4
SHN -20
ADML WTRA+1
STDL CM+3
LMDL CM+1
NJN WFT8.1 IF NOT THE CORRECT ADDRESS
LDDL CM+2
LMDL CM+4
NJN WFT8.1 IF NOT THE CORRECT ADDRESS
LDDL CM
ZJP WFT10 IF BYTE COUNT IS ZERO
WFT8.1 LDN IDTE INDICATE INCOMPLETE DATA TRANSFER
WFT9 STD CM SAVE ERROR CODE
LDD PB RESTORE CURRENT BUFFER ORDINAL
STD CB
LDN 0 AVOID COMPLETION OF CURRENT REQUEST
STD PB
LCN 0
LMD CM COMPLEMENT ERROR CODE
LJM WFTX RETURN
WIO SPACE 4,40
** WIO - PERFORM WRITE I/O OPERATIONS.
*
* ENTRY (CB) = CURRENT BUFFER ORDINAL.
* (EP) = 0.
* (PB) = 0.
*
* EXIT (PB) = ORDINAL OF LAST BUFFER PROCESSED.
*
* USES CB, EC, EP, NB, PB, T1.
*
* CALLS ERR, FNC, FNN, GGS, IFI, WFT, WTR.
*
* MACROS CCBA.
WIO SUBR ENTRY/EXIT
RJM IFI INITIALIZE FOR I/O
LDN HLEN/5
STD T1 SET LENGTH OF HEADER
CCBA PAD1 READ HEADER INTO BUFFER
CRM BUFF,T1
WIO1 RJM WTR WRITE T PRIME REGISTER
MJN WIO3 IF ERROR ENCOUNTERED
LDN FCWR ISSUE WRITE FUNCTION
* LDN FCCO (CONTROLLER ERROR RECOVERY IN PROGRESS)
WIOA EQU *-1
RJM FNN
PJN WIO2 IF NO ERROR
AOD EP SET PREVIOUS SECTOR ERROR FLAG
UJN WIO3 CALL ERROR PROCESSOR
WIO2 LDC FCDO+HLEN INITIATE THE DMA TRANSFER
RJM FNC
MJN WIO3 IF ERROR ENCOUNTERED
LDN HLEN OUTPUT HEADER DATA
OAM BUFF,CH
ZJN WIO4 IF NO DATA TRANSFER ERROR
LCN IDTE SET *INCOMPLETE DATA TRANSFER* ERROR CODE
STD EC
WIO3 RJM ERR CALL ERROR PROCESSOR
WIO4 DCN CH+40
RJM WFT WAIT TRANSFER TO COMPLETE
PJN WIO7 IF NO ERRORS ENCOUNTERED
STD EC SET ERROR CODE
WIO5 UJN WIO3 CALL ERROR PROCESSOR
WIO7 ZJN WIO8 IF NO CONSECUTIVE REQUEST
* UJN WIO8 (ERROR RECOVERY IN PROGRESS)
WIOC EQU *-1
LDN 0 CLEAR NEXT BUFFER ORDINAL
STD NB
LJM WIO1 PROCESS NEXT REQUEST
WIO8 RJM GGS GET GENERAL STATUS
ZJP WIOX IF NO ERROR
LDD PB BACK UP TO PREVIOUS BUFFER
STD CB
LDN 0 AVOID BUFFER COMPLETION
STD PB
UJN WIO5 CALL ERROR PROCESSOR
WTR SPACE 4,10
** WTR - WRITE *T* REGISTER.
*
* ENTRY (UA - UA+1) = UEM ADDRESS/100B TO TRANSFER TO/FROM.
*
* EXIT (A) .LT. 0, IF CHANNEL ERROR.
*
* CALLS FNC.
WTR SUBR ENTRY/EXIT
LDD UA+1
SHN 11
SCN 7
STML WTRA+2 FORM ABSOLUTE UEM ADDRESS
LDD UA
SHN 14
LMD UA+1
SHN 11-20 SET IN *T* REGISTER
STM WTRA+1
LDC FCWT ISSUE WRITE *T* REGISTER FUNCTION
RJM FNC
MJN WTRX IF ERROR ENCOUNTERED
LDN 3 SET BLOCK LENGTH
OAM WTRA,CH OUTPUT BUFFER PARAMETERS
NJN WTR5 IF TRANSFER NOT COMPLETE
WTR1 ADD ON
EJM WTR4,CH IF DATA ACCEPTED
NJN WTR1 IF TIMEOUT NOT COMPLETE
WTR2 DCN CH+40
LCN CHFE INDICATE *CHANNEL FAILURE* ERROR
WTR3 STD EC
WTR4 DCN CH+40
UJP WTRX RETURN
WTR5 LCN IDTE INDICATE *INCOMPLETE DATA TRANSFER* ERROR
UJN WTR3 PROCESS THE ERROR
WTRA BSS 0 *T* REGISTER BUFFER
CON 0000 BYTE LENGTH OF I/O TRANSFER
CON 0,0 UEM ADDRESS OF BUFFER
WTC SPACE 4,25
** WTC - WRITE CONTROL INFORMATION TO THE CBT.
*
* THIS ROUTINE WRITES THE LINKAGE BYTES AND SHORT PRU FLAGS
* IN THE CBT ENTRY.
*
* ENTRY (BUFF) = HEADER DATA.
* (UA - UA+1) = UEM ADDRESS.
*
* USES CM - CM+4, T1 - T4.
WTC SUBR ENTRY/EXIT
LDN 0
ERRNZ PAD1 CODE DEPENDS ON VALUE
STD T1
LDC BUFF+3-4
STD T2
* GET SHORT PRU FLAGS, VALID DATA FLAGS AND LINKAGE BYTES FROM
* SECTOR HEADER AND STORE THEM IN THE CBT ENTRY.
WTC1 LDN 4 ADVANCE SECTOR BUFFER ADDRESS
RAD T2
CCBA PAD1
ADD T1
CRD CM
STD T4
SHN -14
STD T3
LDI T2 STORE SHORT PRU AND VALID DATA FLAGS
STD CM+3
AOD T2
LDI T2 STORE LINKAGE BYTE
STD CM+4
LDD T3
SHN 14
LMD T4
CWD CM
AOD T1 INCREMENT WORD INDEX
LMN PAD4+1
NJN WTC1 IF NOT FINISHED
UJN WTCX RETURN
1XY SPACE 4,10
* COMMON DECKS.
*CALL COMPC2D
*CALL COMPIMB
TITLE SPECIAL REQUEST PROCESSORS.
CBD SPACE 4,15
** CBD - CONVERT BINARY CODED DECIMAL TO DISPLAY CODE.
*
* ENTRY (A) = 10/,8/ 2 BCD DIGITS.
* (CM+1) = ADDRESS IN ERRLOG MESSAGE WHERE RESULT IS
* TO BE STORED.
* (CM+2) = ADDRESS IN BML MESSAGE WHERE RESULT IS TO
* BE STORED.
*
* EXIT CONVERTED DIGITS ADDED TO ERRLOG AND BML MESSAGES.
* (CM+1) AND (CM+2) INCREMENTED.
*
* USES T0.
CBD SUBR ENTRY/EXIT
LPC 377 UNPACK DIGITS
SHN 16 SAVE HIGH ORDER DIGIT
STD T0
SCN 17
SHN -2 POSITION LOW ORDER DIGIT
LMD T0 MERGE HIGH ORDER DIGIT
SHN 6
ADC 2R00 CONVERT TO DISPLAY CODE
STI CM+1
STI CM+2
AOD CM+1
AOD CM+2
UJN CBDX EXIT
CDD SPACE 4,10
** CDD - CONVERT TWO DIGITS TO DECIMAL DISPLAY CODE.
*
* ENTRY (A) = NUMBER TO CONVERT.
*
* EXIT (A) = DISPLAY CODE VALUE.
*
* USES T0 - T1.
CDD2 ADN 10D+1R0
SHN 14 POSITION UNITS
ADD T0
SHN 6
CDD SUBR ENTRY/EXIT
STD T1 SAVE NUMBER
LDN 1R0 PRESET TENS
STD T0
CDD1 LDD T1 COUNT 10
SBN 10D
MJN CDD2 IF CONVERSION COMPLETE
STD T1
AOD T0
UJN CDD1 LOOP TO END OF CONVERSION
CSD SPACE 4,15
** CSD - CONVERT SIX BCD DIGITS TO DISPLAY CODE.
*
* ENTRY (CM) = ADDRESS OF BCD DIGITS.
* (CM+1) = STARTING ADDRESS IN ERRLOG MESSAGE WHERE
* RESULT IS TO BE STORED.
* (CM+2) = STARTING ADDRESS IN BML MESSAGE WHERE RESULT
* IS TO BE STORED.
*
* EXIT DIGITS ADDED TO ERRLOG AND BML MESSAGES.
* (CM - CM+2) EACH INCREMENTED TO POINT TO THE FIRST
* BYTE AFTER THE ADDED DIGITS.
*
* USES CM.
*
* CALLS CBD.
CSD SUBR ENTRY/EXIT
LDI CM CONVERT BCD DIGITS ONE AND TWO
SHN -4
RJM CBD
LDI CM CONVERT BCD DIGITS THREE AND FOUR
LPN 17
SHN 14
LMM 1,CM
SHN -10
RJM CBD
AOD CM
LDI CM CONVERT BCD DIGITS FIVE AND SIX
RJM CBD
AOD CM
UJN CSDX EXIT
FIP SPACE 4,10
*** FIP - FIRMWARE IDENTIFICATION PROCESSOR.
*
* ENTRY (IR+4) = CHANNEL.
*
* EXIT (A) .LT. 0 IF MASS STORAGE ERROR.
*
* CALLS CDD, DFM, GDS.
FIP SUBR ENTRY/EXIT
RJM GDS GET DETAILED STATUS
MJN FIPX IF ERROR
* ADD REVISION NUMBER TO ERRLOG AND BML MESSAGES.
LDM DST+20
SHN -6
LPN 17
RJM CDD
STM FIPA+6
STM FIPB+11
LDC FIPA+ERLN+400000 ISSUE ERRLOG MESSAGE
RJM DFM
LDC FIPBL SET BML MESSAGE LENGTH
STD CM+1
LDC FIPB+BMLN+400000 ISSUE BML MESSAGE
RJM DFM
LJM FIPX RETURN
FIPA DATA C*CH00 MA464-D00.*
FIPB CON DM0401 MESSAGE ID
CON HI0101 MESSAGE SYMPTOM
CON 0 CHANNEL (OCTAL)
CON 0
CON 0 RESERVED FOR CDC
DATA 10A MA464-DYY FIRMWARE REVISION LEVEL (DISPLAY CODE)
FIPBL EQU *-FIPB BML MESSAGE LENGTH
FLT SPACE 4,10
** FLT - FLAW LOGICAL TRACK.
*
* ENTRY (T5) = EST ORDINAL.
* (T6) = LOGICAL TRACK.
*
* EXIT LOGICAL TRACK FLAWED IF WITHIN TRT.
*
* USES CM+1 - CM+3.
*
* MACROS MONITOR.
FLT SUBR ENTRY/EXIT
LDD T6 CHECK IF TRACK WITHIN TRT
STD CM+2
ADC -NTDC NUMBER OF TRACKS
PJN FLTX IF BEYOND TRT
LDN STFS SELECT TRACK FLAW FUNCTION
STD CM+3
LDD T5 SET EQUIPMENT
STD CM+1
MONITOR STBM SET TRACK FLAW
UJN FLTX EXIT
F8D SPACE 4,10
** F8D - FORMAT 895 DEVICE.
*
* ENTRY (T5) = EST ORDINAL.
* (SR - SR+2) = FORMAT PARAMETER BLOCK.
*
* EXIT (A) .LT. 0, IF ERRORS OCCURRED.
*
* USES SR, SR+2, SR+3, T2, CM - CM+4.
*
* CALLS C2D, FNC, WNB.
F8D2 LDD T2
ZJN F8D2.1 IF NOT DISPLAYING THE FORMATTING MESSAGE
LDD CP UPDATE CYLINDER NUMBER IN MESSAGE
ADN MS2W+2
CWD CM
F8D2.1 LDK FCFP ISSUE FORMAT FUNCTION
RJM FNC
MJN F8D3.2 IF ERRORS ENCOUNTERED
LDN FPBL OUTPUT PARAMETER BLOCK
OAM SR,CH
NJN F8D3.1 IF INCOMPLETE DATA TRANSFER
F8D3 EJM F8D4,CH IF TRANSMISSION COMPLETE
SBN 1
NJN F8D3 IF NOT END OF DELAY
F8D3.1 DCN CH+40
LCN 1
F8D3.2 LJM F8DX EXIT WITH ERROR
F8D4 DCN CH+40
RJM WNB WAIT NOT BUSY
MJN F8DX IF ERRORS ENCOUNTERED
LDD T2
NJN F8D5 IF FORMATTING ALL CYLINDERS
AOD SR+2
LPN 77
LMN PTCYDC
NJN F8D2 IF ALL TRACKS NOT FORMATTED
UJN F8D7 RETURN
F8D5 AOD SR ADVANCE CYLINDER NUMBER
F8D6 RJM C2D
STD CM+2
LDD SR CONVERT VALUE FOR MESSAGE
SHN -6
RJM C2D
STD CM+1
LDD SR
LMD SR+3
NJP F8D2 IF MORE CYLINDERS TO FORMAT
F8D7 LDD T2
ZJN F8DX IF NO MESSAGE DISPLAYED
LDN 0 CLEAR THE MESSAGE
STD CM
LDD CP
ADN MS2W
CWD CM
F8D SUBR ENTRY/EXIT
LDD SR+1
RJM C2D CONVERT UNIT NUMBER
STM F8DB+4
LDD T5 SET EQUIPMENT IN MESSAGE
RJM C2D
STM F8DB+2 INSERT UNIT DESIGNATOR
LDD T5
SHN -6
ADC 2RC0
STM F8DB+1
LDD SR+1
SHN 0-12
LPN 1
STD T2
ZJN F8D1 IF NOT DISPLAYING THE FORMATTING MESSAGE
LDD CP
ADN MS2W
CWM F8DA,TR SET MESSAGE
SBN 1
CRD CM
LDC NTDC/2
ERRNZ TTDC CODE DEPENDS ON VALUE
STD SR+3
LDD SR
F8D1 LJM F8D6 FORMAT DEVICE
F8DA DATA H*FORMATTING*
F8DB DATA H* DC U *
DATA C* C0000.*
PFM SPACE 4,10
** PFM - PROCESS FLAW MAPS.
*
* ENTRY (S2) = UNIT NUMBER.
*
* EXIT (A) .LT. 0, IF ERRORS OCCURRED.
*
* USES T4, T6.
*
* CALLS FLT, RFS.
PFM SUBR
LDD S2
SHN 14
LMC FCRU+100
RJM RFS READ UTILITY SECTOR
MJN PFMX IF ERROR
* CONVERT FLAWS FROM PHYSICAL TO LOGICAL.
LDC BUFF
STD T4
PFM1 LDI T4 READ TRACK ADDRESS
ZJN PFMX IF NO MORE FLAWS
LPC 1777
SHN 1
STD T6
LDM 1,T4
SHN -6
SBN 7
MJN PFM3 IF IN FIRST TRACK
NJN PFM2 IF IN SECOND TRACK
RJM FLT FLAW BOTH TRACKS
PFM2 AOD T6
PFM3 RJM FLT FLAW LOGICAL TRACK
LDN 2 ADVANCE UTILITY SECTOR INDEX
RAD T4
UJN PFM1 CONTINUE PROCESSING
PSP SPACE 4,10
*** PSP - PACK SERIAL NUMBER PROCESSOR.
*
* ENTRY (S2) = UNIT NUMBER.
*
* EXIT (A) .LT. 0, IF ERRORS OCCURRED.
*
* USES T4, CM - CM+4.
*
* CALLS CSD, C2D, RFS.
PSP SUBR ENTRY/EXIT
LDD S2
SHN 14
LMC FCRP READ FACTORY SECTOR
RJM RFS
MJN PSPX IF ERROR
LDD S2
STM PSPB+3 PUT PHYSICAL UNIT NUMBER IN MESSAGE
RJM C2D
STM PSPA+4
LDC BUFF SET ADDRESS OF PACK SERIAL NUMBER
STD CM
LDC PSPA+7 SET ERRLOG MESSAGE DESTINATION ADDRESS
STD CM+1
LDC PSPB+7 SET BML MESSAGE DESTINATION ADDRESS
STD CM+2
RJM CSD CONVERT 6 BCD DIGITS TO DISPLAY
LDC PSPA+ERLN+400000 ISSUE MESSAGE TO ERRLOG
RJM DFM
LDC PSPBL
STD CM+1
LDC PSPB+BMLN+400000 ISSUE MESSAGE TO BML
RJM DFM
LJM PSPX EXIT
PSPA DATA C*DC000, U00,PS=000000.*
PSPB CON DM0401 MESSAGE ID
CON HI0100 MESSAGE SYMPTOM
CON 2RDC DEVICE TYPE (DISPLAY CODE)
CON 0 UNIT NUMBER (BINARY)
CON 0 RESERVED FOR CDC
CON 0 EST ORDINAL (BINARY)
CON 0 RESERVED FOR CDC
DATA 6AXXXXXX PACK SERIAL NUMBER (DISPLAY CODE)
PSPBL EQU *-PSPB REGULAR BML MESSAGE LENGTH
PSR SPACE 4,10
** PSR - PROCESS SPECIAL REQUESTS.
*
* ENTRY (CM - CM+4) = *PUT* WORD *UNCT*.
*
* EXIT SPECIAL REQUESTS PROCESSED.
*
* USES CS, PR, S2, T5, CM - CM+4, CN - CN+4, SR - SR+4.
*
* CALLS C2D, FIP, F8D, OVI, PFM, PSP, RHR, RPI.
*
* MACROS CPTA, MONITOR.
PSR9 RJM RPI RELEASE *PUT* INTERLOCK
PSR10 LDN 0 CLEAR SPECIAL REQUEST IN PROGRESS FLAG
STD PR
PSR SUBR ENTRY/EXIT
LDD CM
LPN 77 SAVE UNIT NUMBER
STD S2
LDD CM+1 SET EST ORDINAL IN BML MESSAGE
STM PSPB+5
STD T5
SHN -3 CONVERT FOR ERRLOG MESSAGE
RJM C2D
STM PSPA+1
LDD CM+1
LPN 7
SHN 6
ADC 2R0,
STM PSPA+2
LDN 1 SET SPECIAL REQUESTS IN PROGRESS
STD PR
RJM OVI INTERLOCK THE *PUT*
NJN PSR10 IF *PUT* NOT INTERLOCKED
CPTA PILL REREAD SPECIAL REQUEST FLAGS
CRD CN
LDD CN+3
* CHECK FOR FORMAT PACK REQUEST.
.M SET 0 INITIALIZE SHIFT COUNT CALCULATION
CSHN FMMC
PJN PSR1 IF NOT FORMAT REQUEST
LDN FMMC
SHN 6 SET *UTEM* PARAMETER
STM PSRA+1
LDC MCLTDC/2-4000/2 MAINTENANCE CYLINDER
STD SR
LDD TH SET LARGE RECORD SIZE
STD SR+2
LDD S2 UNIT + OPERATION STATUS
LMC 3S6
STD SR+1
RJM F8D PROCESS THE FORMAT REQUEST
UJN PSR4 COMPLETE THE REQUEST
* CHECK FOR FIRMWARE IDENTIFICATION REQUEST.
PSR1 CSHN LFMI
PJN PSR2 IF NOT FIRMWARE IDENT REQUEST
* LDD CN+3
ERRNZ .M-6 CODE DEPENDS ON VALUE
* SHN 14
LPN 77 CHECK CHANNEL NUMBER
LMD IR+4
NJN PSR6 IF REQUEST NOT FOR THIS DRIVER
LDN LFMI
SHN 6 SET *UTEM* PARAMETER
STM PSRA+1
RJM FIP PROCESS FIRMWARE IDENT MESSAGE
UJN PSR7 COMPLETE THE REQUEST
* CHECK FOR PACK SERIAL NUMBER REQUEST.
PSR2 CSHN LPSN
PJN PSR5 IF NOT SERIAL NUMBER REQUEST
LDN LPSN
SHN 6 SET *UTEM* PARAMETER
STM PSRA+1
RJM PSP LIST PACK SERIAL NUMBER
PSR4 UJN PSR7 COMPLETE THE REQUEST
* CHECK FOR FLAW MAP REQUEST.
PSR5 CSHN PRFM
PSR6 PJP PSR9 IF NOT FLAW MAP REQUEST
LDN PRFM
SHN 6 SET *UTEM* PARAMETER
STM PSRA+1
RJM PFM PROCESS THE FLAW MAPS
PSR7 SHN 0-21
STM PSRA+5+4
CPTA UNCT CLEAR REQUEST BIT SET RESPONSE
STD CM+4
SHN -14
STD CM+3
LDN 2
STD CM+1
LDD MA
CWM PSRA,CM+1
MONITOR UTEM
LDD CS
SCN 10
LMN 10
STD CS
RJM RHR RELEASE DRIVES
LJM PSR9 CLEAR *PUT* INTERLOCK
PSRA VFD 6/PILL,6/1,6/0,42/0
VFD 6/PILL,6/1,6/PERR,42/0
RFS SPACE 4,10
** RFS - READ FACTORY SECTORS.
*
* ENTRY (A) = 6/UN, 6/SC, 6/ FCN.
*
* EXIT (A) .LT. 0, IF ERRORS.
*
* CALLS FNC, GGS.
RFS SUBR ENTRY/EXIT
STM RFSA SAVE FUNCTION
SCN 77
SHN 6
STM RFSB SET UNIT IN SEEK PARAMETER BLOCK
SHN 6
LPN 77
STM RFSC SET SECTOR IN SEEK PARAMETER BLOCK
RFS1 LDN FCSK ISSUE SEEK FUNCTION
RJM FNC
MJN RFSX IF ERROR ENCOUNTERED
LDN FCSKL OUTPUT SEEK PARAMETERS
OAM RFSB,CH
ZJN RFS4 IF ALL DATA TAKEN
RFS2 DCN CH+40
RFS3 LCN 1 INDICATE ERROR
UJN RFSX RETURN ERROR STATUS
RFS4 EJM RFS5,CH IF ALL DATA TAKEN
SBN 1
NJN RFS4 IF NOT END OF DELAY
UJN RFS2 REPORT ERROR STATUS
RFS5 DCN CH+40
RJM GGS GET GENERAL STATUS
MJN RFSX IF ERROR OCCURRED
LDD GS
SHN 21-13
MJN RFS3 IF ERROR STATUS
NJN RFS1 IF NOT ON CYLINDER
LDC ** ISSUE SPECIAL READ FUNCTION
RFSA EQU *-1
LPN 77
RJM FNC
MJN RFS3 IF ERROR
RFS6 FJM RFS7,CH IF DATA PRESENT
SBN 1
NJN RFS6 IF NOT END OF DELAY
UJN RFS2 REPORT ERROR
RFS7 LDC 502 READ SPECIAL SECTOR
IAM BUFF,CH
NJN RFS2 IF ALL DATA NOT RECEIVED
SFM RFS2,CH IF CHANNEL PARITY ERROR
DCN CH+40
RJM GGS GET GENERAL STATUS
MJN RFS8 IF ERROR ENCOUNTERED
LDD GS
SHN 21-13
RFS8 LJM RFSX RETURN
RFSB CON 0 UNIT
CON 3352/2 CYLINDER
CON 0 TRACK
RFSC CON 0 SECTOR
WNB SPACE 4,10
** WNB - WAIT NOT BUSY.
*
* ENTRY (T5) = EST ORDINAL.
* (IR+4) = CHANNEL.
*
* EXIT (A) .LT. 0, IF CONTROLLER HUNG BUSY.
*
* USES GS, T4.
*
* CALLS C2D, DFM, GGS.
WNB SUBR ENTRY/EXIT
LCN 0 SET 4 SECOND TIMEOUT
STD T4
WNB1 DELAY 10
RJM GGS GET GENERAL STATUS
MJN WNB2 IF ERROR OCCURRED
LPN 2
ZJN WNBX IF NOT BUSY
SOD T4
NJN WNB1 IF NOT TIMEOUT
WNB2 LDD GS
SHN -6
RJM C2D CONVERT GENERAL STATUS
STM WNBB+11
LDD GS
RJM C2D
STM WNBB+12 STORE IN MESSAGE
LDD IR+4 SET CHANNEL IN MESSAGE
LPN 37
RJM C2D
STM WNBA+2
LDD T5 SET EST ORDINAL IN MESSAGE
SHN -3
RJM C2D
STM WNBA+5
LDD T5
LPN 7
SHN 6
ADC 2R0,
STM WNBA+6
LDC ERLN+WNBA+400000
RJM DFM
LDC ERLN+WNBB+400000
RJM DFM
LCN 1
LJM WNBX EXIT WITH ERROR FLAG
WNBA DATA C* CCHXX, DCYYY, FORMAT FAILURE.*
WNBB DATA C* HUNG BUSY - GS = ZZZZ.*
1XY SPACE 4
USE PRESET DEFINE LITERAL BLOCK BEFORE PRESET
BUFF EQU * DATA BUFFER
BUFFL MAX 502B,HLEN
ERRPL BUFF+BUFFL-10000 BUFFER OVERFLOWS PP
PRS TITLE PRESET PROGRAM.
PRS SPACE 4,10
** PRS - PRESET *1XY*.
*
* EXIT (CC) = 0.
* (CS) = 1.
* (EC) = 0.
* (EP) = 0.
* (ER) = 0.
* (FU - FU+1) = UEM BASE ADDRESS.
* (IL) = 0.
* (RC) = 0.
* (TI) = 0.
* (BMLCR) = 6/ CHANNEL, 6/0.
* (BMLMF) = MAINFRAME ID.
* (BMLPP) = 6/ PP NUMBER, 6/ CHANNEL.
* (CCRA) = WORD ADDRESS OF CHANNEL TABLE ENTRY.
* (CCRB) = BYTE ADDRESS OF CHANNEL TABLE ENTRY + LDDI.
* (CRQA) = FWA OF PP EXCHANGE PACKAGE.
* (CRQB) = FWA OF PP EXCHANGE PACKAGE.
* (CRQC) = CPU EXCHANGE INSTRUCTION (MXN).
* (CRQD) = FIRST WORD OF PP EXCHANGE PACKAGE.
* (SASA) = LONG CONSTANTS.
* (WTRA) = BYTE LENGTH OF I/O TRANSFER.
* (MSD) = 0.
* (SCDA) = WORD ADDRESS OF CONTROLWARE TABLE ENTRY.
* (SCDB) = BIT NUMBER OF DRIVER DROP FLAG.
* ALL *CCBA* REFERENCES TO *CBT* PLUGGED.
* ALL *CPTA* REFERENCES TO *PUT* PLUGGED.
* ALL *EMBE* REFERENCES TO *EMB* PLUGGED.
*
* USES BL, CC, CS, EC, EP, ER, IL, RC, TI, CM - CM+4,
* CN - CN+4, T0 - T7.
*
* CALLS CFR, DFM, FNC, FNN, RCH, SCD.
*
* MACROS CPTA, MONITOR, SETMS, SFA.
PRS SUBR ENTRY/EXIT
SETMS NODRIVER FORCE DRIVER LOAD ON NEXT *SETMS*
LDK NCPL VALIDATE CALLER
CRD CM
AOD CM+1 NUMBER OF CONTROL POINTS
SHN 7
LMD CP
ZJN PRS1 IF SYSTEM CONTROL POINT
LDC =C* 1XY - UNAUTHORIZED CALL.*
RJM DFM ISSUE DAYFILE MESSAGE
MONITOR ABTM ABORT CONTROL POINT
LJM PPR RETURN
PRS1 LDC PRSE SETUP LONG INSTRUCTIONS
STD CM+4
PRS2 LDI CM+4 GET NEXT INSTRUCTION
ZJN PRS2.1 IF END OF LIST
STD T3
BLI T3 BUILD LONG INSTRUCTION
AOD CM+4
UJN PRS2 LOOP
PRS2.1 STD CB CLEAR CURRENT BUFFER ORDINAL
STD CC CLEAR COMPLETION REQUEST COUNT
STD CS CLEAR CHANNEL STATUS
STD EC CLEAR ERROR CODE
STD EP CLEAR ERROR ON PREVIOUS SECTOR FLAG
STD ER CLEAR RECOVERY IN PROGRESS FLAG
STD IL CLEAR *PUT* INTERLOCK FLAG
STD PB CLEAR PREVIOUS BUFFER
STD PR CLEAR SPECIAL REQUEST FLAG
STD RC CLEAR RETRY COUNT
STD TI INITIALIZE *TPOR* INDEX
LDD IR+4 CHANNEL NUMBER
STM BMLPP
STM FIPB+2
RJM C2D CONVERT FOR CODED MESSAGES
STM FIPA+1
* PLUG LONG CONSTANTS.
LDC FCRO
STML SASA
LDC FCRC
STML SASA+1
LDC FCRE
STML SASA+2
LDC 40000
STML WTRA
* PLUG CHANNEL INSTRUCTIONS.
LDC PRSD SET FWA OF CHANNEL TABLE
STD T1
PRS3 LDI T1
ZJN PRS4 IF END OF CHANNEL TABLE
STD T2
LDD IR+4 CHANNEL
LPN 37
RAI T2 STORE CHANNEL IN INSTRUCTION
AOD T1 ADVANCE CHANNEL TABLE POINTER
UJN PRS3 CONTINUE
* REQUEST CHANNEL AND SET CHANNEL FLAG.
PRS4 RJM RCH REQUEST CHANNEL
ZJN PRS4 IF CHANNEL NOT ASSIGNED
* PLUG EXCHANGE PACKAGE LOCATIONS.
LDK PXPP READ PPU STATUS
CRD CN
ADN 1
CRM CRQD,ON READ FIRST WORD OF PP XP
AOM CRQD+4
LDK PPCP READ PP COMMUNICATIONS AREA POINTER
CRD CM
ADK MMFL-PPCP
CRD T1
LDD T1 SAVE MAINFRAME ID
STM BMLMF
LDD IA GET ((PP NUMBER - 2) * 10B)
SBD CM+4
SBN 20
SHN -3
STD T1 PP NUMBER - 2
ADN 16 ADJUST FOR CONCURRENT PP NUMBER
SHN 6
RAM BMLPP SET PP NUMBER
SHN 6
STM BMLCR SET RECOVERY CHANNEL
LDD T1 PP NUMBER - 2
SHN 4
ADD T1 (PP NUMBER - 2) * 21B
RAD CN+4 SET EXCHANGE ADDRESS
STM CRQA
STM CRQB
SHN -14
RAD CN+3
RAM CRQA-1
STM CRQB-1
LDD CN+4 SET *MA* ADDRESS
ADN 6
STM CRQE
SHN -14
ADD CN+3
RAM CRQE-1
LDD IR+4
STD T2
LDK ACPL CHECK CPU STATUS
CRD CM
LCN 0
STD T1 PRESET CHANNEL TABLE WORD INDEX
LDN 60D PRESET BIT POSITION FOR LOAD REQUEST
STD T3
LDD CM
SHN 21-13
PJN PRS6 IF CPU 0 ON
AOM CRQC SET EXCHANGE TO CPU 1
LDD HN
RAM CRQD+3 SET (A0) TO 1
* PLUG CHANNEL TABLE ADDRESSES.
PRS6 AOD T1 ADVANCE CM TABLE INDEX
LCN 5
RAD T2
PJN PRS6 IF NOT TO PROPER INDEX
ADN 5
RAM CCRB PRESET CHANNEL TABLE BYTE INDEX
LPN 7 BYTE ADDRESS
STD T2
PRS7 LCN 12D
RAD T3 DECREMENT POSITION
SOD T2
PJN PRS7 IF NOT TO PROPER POSITION
LDD T3 BIT POSITION
ADN 13 ADD OFFSET WITHIN BYTE
SHN 6
SBK 200
STM SCDB+1
LDK CHTP CHANNEL TABLE(S) POINTER
CRD CM
LDD CM+2 FWA OF CHANNEL TABLE
SHN 14
LMD CM+3
ADD T1 ADD WORD INDEX
STM CCRA CM ADDRESS OF CHANNEL TABLE ENTRY
SHN -14
RAM CCRA-1
LDD CM+2 COMPUTE FWA OF CONTROLWARE TABLE
SHN 14
LMD CM+3
ADN CTALL*2
ADD T1 ADD WORD INDEX
STM SCDA
SHN -14
RAM SCDA-1
* SET UEM BASE ADDRESS.
LDK UEML
CRD CM
LDD CM
SHN 21-2
STD FU
SHN 2-21
SHN 11
STD FU+1
* PLUG *EMB* ADDRESSES.
LDN EMBP FETCH *EMB* POINTER
CRD CM
.CM1 EQU CM+1
LDC .CM1*10000+PRSC
RJM STA SET *EMB* ADDRESSES
* READ BUFFERED I/O TABLE POINTERS.
LDK BIOL
CRD CM
LDD CM+1
SHN 14
LMD CM+2
ADK CCTP GET *CCT* DESCRIPTOR
CRD CA
ADK PUTP-CCTP GET *PUT* DESCRIPTOR
CRD T3
ADN CBTP-PUTP GET *CBT* DESCRIPTOR
CRD CN
AOD T3
* PLUG *CCT* ADDRESS.
LDD IR+2 SET ADDRESS OF *CCT*
SHN CCTLS-6
ADD CA+4
RAM OVIA+1
STM RPIA+1
SHN -14
ADD CA+3
RAM OVIA
STM RPIA
* PLUG *CBT* ADDRESSES.
.CN3 EQU CN+3
LDC .CN3*10000+PRSA
RJM STA SET *CBT* ADDRESSES
* PLUG *PUT* ADDRESSES.
LDC T6*10000+PRSB
RJM STA SET *PUT* ADDRESSES
* LDN 0
STD TB CLEAR TOTAL BUFFER COUNT
RJM MCA MASTER CLEAR ADAPTER
PJN PRS11 IF MASTER CLEAR WAS SUCCESSFUL
* PREVENT ANY I/O FROM BEING PERFORMED ON THIS CHANNEL. THE
* UNIT QUEUES MUST CONTINUE TO BE SERVICED BY THIS DRIVER TO
* ENSURE THAT CHANNEL SPECIFIC REQUESTS ARE PROCESSED.
* ALTHOUGH THIS DRIVER WILL BE FREE TO SELECT I/O REQUESTS, ANY
* ATTEMPT TO ISSUE A CHANNEL FUNCTION WILL RESULT IN A *CHANNEL
* FAILURE* ERROR. THE ERROR PROCESSOR WILL SET THE SUSPECT
* FLAG, CAUSING *1MV* TO PERFORM A HARDWARE VERIFICATION. THE
* EXPECTED RESULT OF THIS VERIFICATION IS THAT *1MV* WILL DOWN
* THE CHANNEL ON THE DEVICE.
ISTORE FNCC,(UJN FNC5.1)
ISTORE FNNA,(UJN FNN5.1)
PRS11 LDN 0 INITIALIZE *TPOR* INDEX
STD T1
* BUILD *TPOR* TABLE.
PRS12 SOD T3 DECREMENT *PUT* ORDINAL
STD PO SET *PUT* ORDINAL
ZJP PRSX IF SCAN COMPLETE
CPTA UNCT,A READ *PUT* ENTRY
CRD CM
LDD CM+1 SAVE THE EST ORDINAL
STD T5
SFA EST,CM+1 READ EST ENTRY
ADK EQDE
CRD CM
LDN 0 INITIALIZE EST CHANNEL BYTE INDEX
STD T2
LDD CM+1
LPN 77
LMD IR+4
ZJN PRS13 IF DEVICE SUPPORTED BY THIS DRIVER
LDD CM+2
ZJN PRS14 IF SINGLE ACCESS DEVICE
LPN 77
LMD IR+4
NJN PRS14 IF DEVICE NOT SUPPORTED BY THIS DRIVER
AOD T2 INCREMENT CHANNEL BYTE INDEX
PRS13 AOD T1 INCREMENT *TPOR* INDEX
ERRNZ TPORE-1 CODE DEPENDS ON VALUE
LMK MAXU+1
ZJN PRS15 IF TOO MANY UNITS ON CHANNEL
LDD T3 POSITION *PUT* ORDINAL
SHN 1
LMD T2 SET CHANNEL BYTE INDEX
STM TPOR-1,T1
LDD MA SAVE (T1), (T2) AND (T3)
CWD T1
CRM PRSF,ON
RJM CFR CHECK FOR FORMAT REQUESTED
LDD MA
CWM PRSF,ON RESTORE (T1), (T2) AND (T3)
SBN 1
CRD T1
PRS14 LJM PRS12 CONTINUE SCAN
PRS15 LDC =C* 1XM - TOO MANY UNITS ON CHANNEL.*
RJM DFM ISSUE SYSTEM DAYFILE MESSAGE
MONITOR HNGM
UJN * HANG
1XM SPACE 4
PRSA BSS 0 TABLE OF *CBT* ADDRESSES
TCBT HERE
CON 0 TERMINATE TABLE
PRSB BSS 0 TABLE OF *PUT* ADDRESSES
TPUT HERE
CON 0 TERMINATE TABLE
PRSC BSS 0 TABLE OF *EMB* ADDRESSES
QUAL COMPIMB
TEMB HERE
QUAL *
CON 0 TERMINATE TABLE
PRSD BSS 0 TABLE OF CHANNEL INSTRUCTION ADDRESSES
CHTB
PRSE BSS 0 16 BIT INSTRUCTION ADDRESSES
LIST16
PRSF BSS 5 DIRECT CELL SAVE AREA
CFR SPACE 4,10
** CFR - CHECK FOR FORMAT REQUEST.
*
* ENTRY (CM - CM+4) = EST ENTRY.
*
* EXIT DISK FORMATTTED IF REQUIRED.
* PP HUNG IF FORMATTING ERRORS.
*
* USES CS, PR, CA - CA+4, CN - CN+4, SR - SR+4.
*
* CALLS F8D, OVI, RHR, RPI, TLB.
CFR SUBR ENTRY/EXIT
LDD CM+1
SHN 21-5
PJN CFRX IF CHANNEL IS NOT CONCURRENT
LDD CM+2
SHN 21-13
PJN CFR1 IF ONLY ONE CHANNEL
SHN 21-5-21+13
PJN CFRX IF SECOND CHANNEL IS NOT CONCURRENT
CFR1 LDD CM+4
STM CFRA SAVE MST ADDRESS
CFR2 LDC **
CFRA EQU *-1
SHN 3
ADN STLL
CRD CN
ADN DDLL-STLL
CRD CA
LDD CN
SHN 21-13
PJN CFRX IF NO FORMAT REQUEST
LDD MA
CWM CFRB,TR
LDN 1 SET *PUT* REQUEST ACTIVE
STD PR
RJM OVI INTERLOCK THE *PUT*
NJN CFR2 IF *PUT* NOT INTERLOCKED
CFR3 LDN 0 SET FIRST CYLINDER
STD SR
LDD TH SET LARGE RECORD SIZE
STD SR+2
LDD CA+4 SET UNIT
SHN 14
STD CA+4
SHN -14
LMC 1S10+3S6
STD SR+1
RJM F8D FORMAT DISK
PJN CFR4 IF NO ERRORS
MONITOR HNGM
CFR4 LDD CS
SCN 10
LMN 10
STD CS
RJM RHR RELEASE DRIVES
LDD CA CHECK FOR MULTIPLE UNITS
LPN 7
SBN 1
STD CA
PJN CFR3 IF MORE UNITS
LCN LFPR CLEAR FORMAT REQUEST
RJM TLB
RJM RPI CLEAR *PUT* INTERLOCK
LDN 0 CLEAR *PUT* REQUEST ACTIVE
STD PR
LJM CFRX RETURN
CFRB DATA C*INTERLOCKING PUT.*
STA SPACE 4,10
** STA - SET TABLE ADDRESSES.
*
* ENTRY (A) = 6/ TP, 12/ TA
* TP = TABLE POINTER.
* TA = INSTRUCTION TABLE ADDRESS.
*
* EXIT (A) = 0.
*
* USES T0, T1, T2.
STA1 STD 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
AOD T0 ADVANCE INSTRUCTION LIST
STA2 LDI T0
NJN STA1 IF NOT END OF TABLE
STA SUBR ENTRY/EXIT
STD T0
SHN -14 SET ADDRESS POINTER
STD T1
UJN STA2 ENTER LOOP
1XY SPACE 4
* PRESET COMMON DECKS.
*CALL COMPTLB
1XY SPACE 4
OVERFLOW
USE *
END