IDENT 6DP,MSFW
PERIPH
BASE MIXED
SST
*COMMENT 6DP - DDP/ECS DRIVER.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
TITLE 6DP - DDP/ECS DRIVER.
SPACE 4
*** 6DP - DDP/ECS DRIVER.
* R. A. LARSEN. 72/10/01.
* R. E. TATE. 73/10/17.
* L. L. CLINTON 78/07/28.
SPACE 4
*** *6DP* PROVIDES THE CAPABILITY TO ACCESS THE ECS I
* AND ECS II SECONDARY STORAGE DEVICES VIA THE DC135 OR
* THE PARITY ENHANCED DC145 DDP.
SPACE 4
*** ORGANIZATION OF ECS I SUBSYSTEM.
*
* EQUIPMENT TYPE = *DP*
*
* SECTORS/TRACK = *SLDE* (20B, 40B, 100B, 200B).
*
* WORDS PER DEVICE = 131,072 FOR 131K ECS I.
* 262,144 FOR 262K ECS I.
* 524,288 FOR 524K ECS I.
* 1,048,576 FOR 1048K ECS I.
* 2,097,152 FOR 2096K ECS I.
*
* MAXIMUM DATA RATE = 80K WORDS PER SECOND. FOR PP/CM TRANSFER.
SPACE 4
*** ORGANIZATION OF ECS II SUBSYSTEM.
*
* EQUIPMENT TYPE = *DP*.
*
* SECTORS/TRACK = *SLDE* (20B, 40B, 100B, 200B).
*
* WORDS PER DEVICE = 131,072 FOR 131K ECS II.
* 262,144 FOR 262K ECS II.
* 524,288 FOR 524K ECS II.
* 1,048,576 FOR 1048K ECS II.
* 2,097,152 FOR 2096K ECS II.
*
* MAXIMUM DATA RATE = 160K WORDS PER SECOND FOR 2X PPS.
SPACE 4
** ENTRY CONDITIONS.
*
*
* (T4) = CHANNEL, IF PREVIOUSLY RESERVED.
* (T5) = EST ORDINAL.
* (T6) = TRACK.
* (T7) = SECTOR.
SPACE 4
*CALL COMPMAC
*CALL COMPCHI
*CALL COMSDFS
*CALL COMSMSP
*CALL COMSPIM
SPACE 4
* ASSEMBLY CONSTANTS.
CH EQU 0 DDP CHANNEL
SC EQU 5000 DDP SELECT CODE
DEC MICRO 1,, 6DP DECK NAME
TITLE
** ENTRY POINT TRANSFERS.
ORG MSFW
CON PRS PRESET ADDRESS
RDS CON 0 ENTRY
UJN RDS. ENTER DRIVER
WDS CON 0 ENTRY
UJN WDS.
EMS SPACE 4,10
** EMS - END MASS STORAGE OPERATION.
*
* ENTRY (T4) = CHANNEL, IF PREVIOUSLY RESERVED.
* (T5) = EQUIPMENT.
*
* EXIT (A) = 0.
*
* NOTE - THE *.EMS* ENTRY POINT IS SUPPORTED ONLY VIA THE
* *ENDMS* MACRO DEFINED IN *COMPMAC*. IF THIS LOCATION
* CHANGES, THE DEFINITION OF *.EMS* MUST BE CHANGED IN
* *PPCOM* AND ALL PROGRAMS USING THE *ENDMS*
* MACRO MUST BE REASSEMBLED.
.EMS SUBR ENTRY/EXIT - END MASS STORAGE OPERATION
LDN 0
RJM DSW *DSWM* PROCESSING
UJN .EMSX RETURN
RDS SPACE 4
** RDS - READ SECTOR.
*
* ENTRY (A) = BUFFER ADDRESS FOR SECTOR.
*
* EXIT (A) < 0, IF UNRECOVERABLE PARITY ERROR.
*
* CALLS LDE.
RDS. STM RDSA SET BUFFER ADDRESS
LDC 50S12+RDS
UJN LDE REQUEST READ
WDS SPACE 4
** WDS - WRITE SECTOR.
*
* ENTRY (A) = BUFFER ADDRESS FOR SECTOR.
*
* EXIT (A) < 0, IF UNRECOVERABLE PARITY ERROR.
*
* CALLS LDE.
WDS. STM WDSA SET BUFFER ADDRESS
LDC 51S12+WDS
* UJN LDE REQUEST WRITE
LDE SPACE 4,10
** LDE - TRANSFER DATA TO/FROM ECS.
*
* ENTRY (A) = 6/ OPTION,12/ ENTRY
* 50 = READ.
* 51 = WRITE.
* (LDEF) = EM TRACK SHIFT COUNT.
* (RDSA) = BUFFER ADDRESS IF READ.
* (WDSA) = BUFFER ADDRESS IF WRITE.
*
* EXIT TO *RDSX*/*WDSX* WITH (A) =0 IF NO ERROR.
* TO *ERR* IF ERROR.
*
* CALLS SFN, STS.
LDE STD T0 SAVE ENTRY ADDRESS
SHN -14
STI D1 SET OPERATION
LDEA SBN 50
* SBN 51 (DRIVER SET FOR WRITE)
ZJN LDE0 IF DRIVER SET FOR REQUESTED OPERATION
RAM LDEA
LDM LDED SET PROPER JUMP
LMN .A&.B
ERRPL LDE3.1-LDED-40 JUMP OUT OF RANGE
ERRPL LDE5-LDED-40 JUMP OUT OF RANGE
STM LDED
LDE0 LDI T0 SET RETURN ADDRESS
STM LDEE
* REENTER HERE FOR ERROR RETRY.
LDE1 LDN 1
RJM DSW CHECK FOR CHANNEL RESERVED
LDD T6 COMPUTE HEADER ADDRESS
LPC 3777
LDEF SHN 4
* SHN 4+EMTS (EMTS = EM TRACK SHIFT COUNT)
STD CM+1
SHN -6
STD CM
SHN -6
RAD CM
LDC ** LARGEST TRACK VALUE
LDEB EQU *-1
SBD T6
MJN LDE4 IF TRACK TOO LARGE
LDD T7
SBM SLM
PJN LDE4 IF SECTOR TOO LARGE
LDD CM+1
LPN 77
SHN 6
ADD T7
LDE3 RAD CM+1
SHN -14
RAD CM
LDI D1 LOAD READ OR WRITE FUNCTION
LPN 7
RJM SFN SEND FUNCTION
LDN 2
OAM CM,CH OUTPUT ADDRESS
LDI D1 SET WORD COUNT
SHN -3
LDED UJN LDE3.1 READ OPERATION
* UJN LDE5 (WRITE OPERATION)
LDE3.1 IAM *,CH
RDSA EQU *-1 READ BUFFER ADDRESS
.A EQU LDE3.1-LDED
UJN LDE6 CHECK STATUS
LDE4 LDN ADDE SET ADDRESS ERROR
UJN LDE10 PROCESS ERROR
LDE5 OAM *,CH
WDSA EQU *-1
.B EQU LDE5-LDED
FJM *,CH IF DATA NOT ACCEPTED BY CONTROLLER
LDE6 STM ERRB SAVE BYTE COUNT
DCN CH+40
* (T0) = P ADDRESS OF IAM/OAM INSTRUCTION.
LDE7 SOD T0
ZJN LDE9 IF TIME OUT
LDN 4-1 SELECT STATUS
RJM SFN SELECT FUNCTION
IAN CH+40
DCN CH+40
STM STSA
LMN 2
NJN LDE7.1 IF NOT ACCEPT STATUS
LDC ** CHECK REMAINING BYTE COUNT
ERRB EQU *-1
NJN LDE8 IF INCOMPLETE TRANSFER
LDI D1
LPN 70
NJN LDE12 IF HEADER OPERATION
LJM * RETURN
LDEE EQU *-1
LDE7.1 SCN 13
ZJN LDE7 IF NO PARITY ERROR
LDE8 LDN PARE&DSTE
LDE9 LMN DSTE
LDE10 UJN ERR PROCESS ERROR
LDE12 LDC 5000-50 SET DATA WORD COUNT
RAI D1
LDN 2 SET DATA BUFFER ADDRESS
RAM RDSA
LDN 2
RAM WDSA
LDD T7
SHN 6
SBD T7
ADM SLM
LJM LDE3 PROCESS DATA
SFN SPACE 4,10
** SFN - SELECT FUNCTION.
*
* ENTRY (A) = FUNCTION CODE - 1.
*
* EXIT FUNCTION SELECTED.
* TO *ERR* IF FUNCTION TIMEOUT.
SFN2 ACN CH
SFN SUBR ENTRY/EXIT
ADC SC+1
FAN CH+40
SFN1 IJM SFN2,CH IF SELECT ACCEPTED
SBN 1
NJN SFN1 IF NOT TIMED OUT
LDN FTOE
* UJN ERR PROCESS ERROR
ERR SPACE 4,10
** ERR - ERROR PROCESSOR.
*
* ENTRY (A) = ERROR CODE, IF ENTRY AT *ERR*.
* PARE = PARITY ERROR.
* ADDE = ADDRESS ERROR.
* DSTE = WRITE TIMEOUT. (STATUS ERROR)
* FTOE = FUNCTION TIMEOUT.
* EXIT TO *7DP* IF ENTRY AT *ERR*.
* TO *7SP* IF ENTRY AT *ERR2*.
ERR DCN CH+40
STM ERRA SAVE ERROR CODE
ERR1 MSERR 7DP,*
UJN ERR3 LOAD *7DP*
ERR2 MSERR 7SP,*
ERR3 LJM LEP1 LOAD ERROR PROCESSOR
DSW SPACE 4,10
** DSW - DRIVER SERVICE PROCESSING.
*
* ENTRY (A) = 1, CHECK IF CHANNEL RESERVED.
* (A) = 0, RELEASE CHANNEL.
*
* EXIT (A) = 0.
* (LDEF) = EM TRACK SHIFT COUNT.
* (MSEA) = EM TRACK SHIFT COUNT.
*
* USES T0, T1, CM - CM+4.
*
* MACROS MONITOR.
DSW2 RAI T0
AOD CM+2
DSW3 LDM TCHS-12,CM+2
STD T0
LDD T4
DSWA SBN CH
NJN DSW2 IF MORE INSTRUCTIONS TO MODIFY
DSW SUBR ENTRY/EXIT
STD CM+3 SET *DSWM* REQUEST CODE
LMM CHRV
LPN 1
ZJN DSWX IF CORRECT CHANNEL STATUS
LDM CHRV SET CHANNEL STATUS AND FLAGS FOR *DSWM*
STD CM
DSW1 LDD OA
CRM SBUF,ON
LDM SBUF
NJN DSW1 IF OUTPUT REGISTER BUSY
LDD MA WRITE *DSWM* PARAMETERS
CWD T4
MONITOR DSWM
LDD MA READ UPDATED CHANNEL
CRD T4
LDD CM+3 SET CHANNEL STATUS
STM CHRV
LJM DSW3 MODIFY INSTRUCTIONS
SPACE 4
** CHANNEL TABLE.
CHTL DSWA TERMINATE CHANNEL TABLE
TCHS CHTB
SBUF BSS 5 SCRATCH BUFFER
PRS SPACE 4
** PRS - PRESET DRIVER.
*
* ENTRY (CM - CM+4) = EST ENTRY.
PRS LDD CM+4 GET MAXIMUM TRACK
SHN 3
ADK TDGL
CRM SBUF,ON
SOM SBUF
ADC 4000
STM LDEB
LDI D1 GET EM TRACK SHIFT COUNT
SHN -6
LPN 3
ADC SHNI+4
STM LDEF
LJM SMSX RETURN
OVERFLOW MSFW,PPFW-5,CMR
7DP MSOVL 7512,T2,EPFW-1,(DDP/ECS ERROR PROCESSOR.)
SPACE 4,10
***** 7DP - DDP/ECS ERROR PROCESSOR.
* W. E. GOEBEL 78/10/18.
*
SPACE 4
*** *7DP* IS CALLED WHEN AN UNRECOVERED ECS ABORT HAS OCCURRED.
* *7RP* IS CALLED TO COMPLETE THE INITIAL DATA TRANSFER AFTER
* AN ECS PARITY ERROR HAS OCCURRED DURING AN ECS READ FUNCTION.
* FOR AN ECS PARITY ERROR DURING A ECS READ OR WRITE FUNCTION
* *7DP* CALLS *7SP* TO PERFORM SINGLE WORD REREAD/REWRITE OF THE
* BLOCK IN AN ATTEMPT TO RECOVER FROM THE ERROR. *7DP* EXITS
* TO CALL *7ER* OR *7ES* TO ISSUE APPROPRIATE FINAL ERROR
* MESSAGES.
MSE SPACE 4
QUAL
BEGIN BSSN PRS
ERRA BSSN 1 ERROR FLAG WORD
ADDR BSSN 1 BUFFER ADDRESS
ECSA BSSN 2 ECS ADDRESS (2 BYTES)
WDCT BSSN 1 WORD COUNT OF BLOCK
RECF BSSN 1 ERROR TYPE FLAG
SPSA BSSN 1 *7SP* STATUS
ERRNG DEFW-* *7DP*/COMMON ERROR PROCESSOR CONFLICT
END BSSN
QUAL *
MSE SPACE 4,10
** MSE - MASS STORAGE ERROR PROCESSOR.
*
* ENTRY (T1) = ERRA.
* (T2) = RDCT.
* (T4 - T7) = DRIVER PARAMETERS.
* (RDCT) = ERROR PROCESSOR INTERFACE WORD.
* BIT 6 = 0 IF FIRST RETRY ATTEMPT.
* (DEST) = ERROR PROCESSING CONTROL WORD.
* BIT 12 = 1 IF *7MP* IS REPORTING AN
* UNRECOVERED PARITY ERROR.
* ((D1)) BIT 0 = 0 IF READ, 1 IF WRITE.
* ((D1)) BITS 3-11 = TOTAL BYTE COUNT (5 FOR HEADER
* OPERATION, 500 FOR DATA OPERATION).
*T ERRA 2/ OP,1/ D,1/ A,1/ S,1/ R,6/ EC
* OP = OPERATION.
* 0 = READ HEADER.
* 1 = READ DATA.
* 2 = WRITE HEADER.
* 3 = WRITE DATA.
* D = DDP TYPE.
* 0 = DC145.
* 1 = DC135.
* A = *7RP*/*7SP* ABORT FLAG.
* S = *7SP* CALL FLAG (SET IF CALLED).
* R = *7RP* CALL FLAG (SET IF CALLED)
* EC = ERROR CODE AS DEFINED IN *COMSMSP*.
* (ERRB) = BYTES LEFT TO BE TRANSFERED IF DISCONNECT ON I/O.
*
* EXIT (DEDT) = ERROR PROCESSING CONTROL WORD.
* BITS AFFECTED BY THIS OVERLAY -
* BITS 3 - 0 = *6DP* DRIVER TYPE.
* BIT 4 = 1 IF RETURN TO *7SP*.
* (DEEC) = ERROR CODE.
* (DENR) = 0 IF FIRST RETRY ATTEMPT, ELSE UNCHANGED.
* (DERC) = 0 IF FIRST RETRY ATTEMPT, ELSE UNCHANGED.
* (DERW) = 1 IF WRITE REQUEST, 0 IF READ REQUEST.
* (DEST) = 0.
* (DEWR) = 0 IF FIRST RETRY ATTEMPT, ELSE UNCHANGED.
* (DEXA) = EXIT ADDRESS.
* (RDCT) = ERROR PROCESSOR INTERFACE WORD.
* BIT 6 = 1.
*
* USES CM - CM+4, T0 - T2.
*
* MACROS ENDMS, MSERR.
DDP ENTRY *7DP* ENTRY
LDM LDEF
STM MSEA USE EXISTING INSTRUCTION TO SAVE SPACE
SFA EST,T5 READ EST ENTRY
ADK EQDE
CRD CM
LDD CM+4 READ DILL OF MST ENTRY
SHN 3
ADN DILL
CRD CM
SOD CM+3 SET DDP TYPE
LPN 1
STD CM+2
LDI D1 SET READ WRITE FLAG
LPN 1
STM DERW
ERRPL DERW-* STORE DESTROYS CODE
ERRNZ REDP CODE DEPENDS OF VALUE OF *REDP*
ERRNZ WRIP-1 CODE DEPENDS OF VALUE OF *WRIP*
ZJN MSE1 IF READ OPERATION
SHN 2
RAD CM+2 SET WRITE OPERATION
LDN WDSA-RDSA
MSE1 ADC RDSA SET BUFFER LOCATION
STD CM
LDC LDE1 SAVE ERROR EXIT RETURN ADDRESS
STM DEXA
ERRPL DEXA-* STORE DESTROYS CODE
LDI T2
LPC 100
NJN MSE1.1 IF NOT FIRST RETRY ATTEMPT
STM DENR INITIALIZE *NON-RECOVERABLE ERROR* FLAG
STM DERC INITIALIZE RETRY COUNT
STM DEWR INITIALIZE *DATA WRITTEN/READ* FLAG
LDD HN SET RECOVERY IN PROGRESS FLAG
STI T2
LDD T4 SAVE INITIAL CHANNEL
STM MSFW
MSE1.1 LDK /COMSDFS/D6DP SAVE DRIVER TYPE FOR *7EK*
STM DEDT
ERRPL DEDT-* STORE DESTROYS CODE
LDI T1
SCN 77
NJN MSE3 IF CALLED FROM *7RP* OR *7SP*
STM DEST INITIALIZE ERROR PROCESSING CONTROL WORD
ERRPL DEST-* CODE DESTROYED
LDI CM
STM ADDR SET BUFFER ADDRESS
LDI D1
SHN -5
SCN 76
STM WDCT
SHN -6
ZJN MSE2 IF HEADER OPERATION
LCN 2
RAI CM
LDC 50-5000 RESET DRIVER FOR HEADER OPERATION
RAI D1
LDN 2 FLAG ERROR IN DATA OPERATION
MSE2 LMD CM+2
SHN 13-2 APPEND STATUS FLAGS TO *ERRA*
RAI T1
MSE3 LPC 2000
ZJN MSE4 IF HEADER OPERATION
* DATA ADDRESS = HEADER ADDRESS + SECTOR LIMIT + 77 * SECTOR
LDD T7
SHN 6
SBD T7
ADM SLM
MSE4 STD T2
SHN -14
STD T0
* HEADER ADDRESS = TRACK * SECTOR LIMIT * 101 + SECTOR
LDD T6
LPC 3777
MSEA SHN 4
* SHN 4+EMTS (EMTS = EM TRACK SHIFT COUNT)
STD CM+4
SHN -6
STD CM+3
SHN -6
RAD CM+3
LDD CM+4
LPN 77
SHN 6
ADD T7
ADD T2
RAD CM+4
STM ECSA+1
SHN -14
ADD T0
RAD CM+3
STM ECSA
LDI CM SAVE BUFFER ADDRESS FOR *7EK*
STD T2
LDN 0 DEFAULT IS NO FIRST OR SECOND WORD PRESENT
STD CM
LDM STSA DEFAULT STATUS IS LAST STATUS
STD CM+1
LDM WDCT ADD WORD COUNT TO MESSAGE
STD CM+2
LDI T1 SAVE ERROR CODE
LPN 77
STM DEEC
ERRPL DEEC-* CODE DESTROYED
LMK PARE
NJN MSE8 IF NOT PARITY ERROR
LDD T2
SBK EPFW+1-502
PJN MSE8 IF BUFFER OVERLAYS ERROR PROCESSOR AREA
LDI T1
SHN 21-13
MJN MSE6 IF WRITE OPERATION
SHN 13-6
MJN MSE6 IF *7RP* ALREADY CALLED
MSERR 7RP,*
UJN MSE9 EXECUTE *7RP*
MSE6 LDI T1
SHN 21-10
MJN MSE8 IF *7RP* OR *7SP* ABORTED
SHN 10-7
MJN MSE10 IF *7SP* ALREADY CALLED
LPN 20 SET SINGLE WORD READ FOR DC135
SHN 12-4
RAM ECSA
LDC ERR2 SET RETURN ADDRESS TO *7SP*
STM DEXA
LDN 20 SET RETURN TO ERROR PROCESSOR
RAM DEDT
MSE8 LDD MA STORE *7EK* PARAMETERS
ADN 2
CWD CM
MSERR 7EK,*
MSE9 LJM LEP1 LOAD ERROR PROCESSOR
MSE10 LDM DEST
SHN 21-12
MJN MSE11 IF AT LEAST ONE ERROR WAS UNRECOVERED
LDI T1
SHN 21-12
PJN MSE12 IF A HEADER OPERATION
ENDMS
MSERR 7ES,*
UJN MSE9 LOAD ERROR PROCESSOR
MSE11 ENDMS ISSUE ERRLOG AND DAYFILE MESSAGES
MSERR 7ER,*
UJN MSE9 LOAD ERROR PROCESSOR
MSE12 LDN 0 CLEAR MESSAGE FROM *MS2W*
STD T1
LDD CP
ADK MS2W
CWD T1
LJM LDE1 RETRY THE OPERATION
HERE
SPACE 4
ERRNG 10000-* *7DP* HAS OVERFLOWED
BSS 10000-* SPARES (ADJUST ORIGIN BY 5 AS REQUIRED)
CON DDP-1 (T0) = ENTRY ADDRESS - 1
CON ERRA (T1) = ERROR FLAG WORD
CON RDCT (T2) = RDCT
ERRNZ LN-* INCORRECT OVERLAY LENGTH
QUAL *
7RP MSOVL 7613,T2,EPFW-1,(DDP/ECS READ ERROR PROCESSOR.)
SPACE 4,10
***** 7RP - DDP/ECS REMAINING BLOCK ERROR PROCESSOR.
*
* J. L. LARSON. 78/07/28.
SPACE 4,10
*** *7RP* IS CALLED BY *7DP* WHEN A ECS PARITY ERROR HAS
* OCCURRED DURING AN ECS READ FUNCTION. *7RP* RETRIEVES THE
* DATA IN ERROR FROM THE DDP PORT AND COMPLETES THE READ OF
* THE REMAINING ECS WORDS.
SPACE 4,10
*** ENTRY CONDITIONS.
*
* (T4) = CHANNEL NUMBER.
* (T5) = ECS EST ORDINAL.
* CHANNEL RESERVED.
* (WDCT) = TOTAL WORD COUNT (1 OR 100B).
* (ERRA) = AS DOCUMENTED IN *7DP*.
* (ERRB) = REMAINING BYTE COUNT.
* (ECSA - ECSA+1) = ECS FWA.
* (ADDR) = PP BUFFER FWA.
SPACE 4,10
*** EXIT CONDITIONS.
*
* (ERRA) BIT 6 SET TO INDICATE *7RP* CALLED.
* (ERRA) BIT 10 SET IF *7RP* ABORT.
* (ECSA - ECSA+1) = UNCHANGED.
* (ADDR) = UNCHANGED.
* (WDCT) = UNCHANGED.
SPACE 4,10
** COMMON DECKS.
FWDL$ EQU 1 SELECT FORWARD LINKED LIST
*CALL COMPCHL
RRP SPACE 4,10
** RRP - DDP/ECS REMAINING BLOCK ERROR PROCESSOR.
DRP ENTRY *7RP* ENTRY
* MODIFY CHANNEL INSTRUCTIONS.
LDN 0
RRP1 RAD T1
LDI T1 SAVE LINK TO NEXT INSTRUCTION
LPN 37
STD CM
LDD T4 MODIFY CHANNEL INSTRUCTION
SBD CM
RAI T1
LDD CM
NJN RRP1 IF MORE CHANNEL INSTRUCTIONS
* READ ERROR DATA FROM DDP PORT.
RRP2 LDI T2 CALCULATE NUMBER OF BYTES TO INPUT
ZJN RRP5 IF NO BYTES TO INPUT
STD CM+2
SBN 10*5
MJN RRP3 IF NOT FULL RECORD TO BE READ
LDN 10*5
STD CM+2
RRP3 LDM ERRA CHECK DDP TYPE (1 = DC135, 0 = DC145)
LPC 1000
STD CM SET MAINTENANCE MODE ADDRESS BIT
SHN 4-11
LMN 20
RJM RED READ ECS DATA
NJN ABT IF ERROR DATA NOT SUCCESSFULLY READ
STD CM
SBD CM+2 DECREMENT REMAINING BYTE COUNT
RAI T2
ZJN END IF NO MORE ECS WORDS TO READ
* READ REMAINING ECS WORDS.
STD CM+2 SET BYTES TO INPUT
LDN 7 MASTER CLEAR PORT
RJM SFC
DCN CH+40
LDN 0
RJM RED READ ECS DATA
STI T2 SAVE REMAINING BYTE COUNT
NJN RRP2 IF NOT ALL DATA TRANSFERRED SUCCESSFULLY
RRP5 UJN END RETURN TO *7DP*
SFC SPACE 4,10
** SFC - SELECT FUNCTION.
*
* ENTRY (A) = FUNCTION CODE - 1.
*
* EXIT CHANNEL ACTIVATED.
* TO *ABT*, IF CHANNEL PREVIOUSLY ACTIVE, OR FUNCTION
* TIMEOUT.
SFC2 ACN CH
SFC SUBR ENTRY/EXIT
ADC SC+1
AJM ABT,CH IF ILLEGAL CHANNEL STATE
FAN CH
SFC1 IJM SFC2,CH IF SELECT ACCEPTED
SBN 1
NJN SFC1 IF NOT FUNCTION TIMEOUT
* UJN ABT ABORT
ABT SPACE 4,10
** ABT - ABORT PROCESSOR.
ABT DCN CH+40
LDC 400 SET *7RP* ABORT FLAG
* UJN END RETURN TO *7DP*
END SPACE 4,10
** END - END PROCESSOR.
END ADD HN INDICATE *7RP* CALLED
RAM ERRA
LJM ERR1 RETURN TO *7DP*
RED SPACE 4,10
** RED - READ ECS DATA.
*
* ENTRY (A) = FUNCTION CODE (NORMAL OR MAINTENANCE MODE READ).
* (CM) = ADDRESS BIT FOR MAINTENANCE MODE READ.
* (CM+2) = NUMBER OF BYTES TO INPUT.
*
* EXIT (A) = BYTE COUNT REMAINING AFTER INPUT.
* TO *ABT*, IF ECS ADDRESS NOT ACCEPTED.
*
* USES T1, CM, CM+1, CM+3.
*
* CALLS SFC.
RED1 LDN 10 INCREMENT ECS ADDRESS OFFSET
RAD CM+1
LCN 10*5 DECREMENT BYTE COUNT
RAD T1
RED2 NJN RED1 IF MORE BYTES TO COUNT
LDM ECSA+1 CALCULATE ECS ADDRESS FOR NEW READ
RAD CM+1
SHN -14
ADM ECSA
RAD CM
LDD CM+3 SELECT READ FUNCTION
RJM SFC
LDN 2 OUTPUT ECS ADDRESS
OAM CM,CH
NJN ABT IF ADDRESS NOT ACCEPTED
LDD CM+2 INPUT ECS DATA
IAM *,CH
REDA EQU *-1
DCN CH+40
STD T1
LDN 4-1 SELECT STATUS
RJM SFC
IAN CH+40
DCN CH+40
LDD T1 RETURN BYTE COUNT AFTER INPUT
RED SUBR ENTRY/EXIT
STD CM+3
LDM WDCT CALCULATE BYTE COUNT ALREADY READ
SHN 2
ADM WDCT
SBI T2
STD T1
ADM ADDR SET PP BUFFER ADDRESS FOR NEW READ
STM REDA
LDN 0
STD CM+1
LDD T1
SCN 7
LJM RED2 CALCULATE ECS ADDRESS OFFSET
SPACE 4,10
HERE TERMINATE LINKED CHANNEL INSTRUCTIONS
SPACE 4,10
ERRNG 10000-* *7RP* HAS OVERFLOWED
BSS 10000-* SPARES
CON DRP-1 (T0) = ENTRY ADDRESS - 1
CON CH01$ (T1) = FIRST CHANNEL INSTRUCTION ADDRESS
CON ERRB (T2) = POINTER TO REMAINING BYTE COUNT
ERRNZ LN-* INCORRECT OVERLAY LENGTH
QUAL *
7SP MSOVL 7555,T2,DDMD+4,(DDP/ECS SINGLE WORD RETRY PROCESSOR.)
SPACE 4
***** SINGLE WORD RETRY ERROR PROCESSOR.
*
* L. L. CLINTON 78/07/28.
SPACE 4,10
*** *7SP* IS INITIALLY CALLED BY *7DP* WHEN AN ECS PARITY ERROR
* HAS OCCURRED DURING AN ECS READ OR WRITE FUNCTION.
* *7SP* REREADS OR REWRITES THE DATA ONE WORD AT A TIME
* AND COMPARES PREVIOUSLY READ DATA WITH THE NEW DATA.
* *7SP* CALLS *7MP* TO ISSUE AN ERROR MESSAGE WHENEVER A
* SINGLE WORD READ OR WRITE FUNCTION IS UNSUCCESSFUL AND
* WHENEVER THE DATA READ DOES NOT COMPARE. AFTER ISSUING
* THE ERROR MESSAGE, *7MP* RECALLS *7SP* TO CONTINUE THE
* SINGLE WORD READ OR WRITE ERROR RECOVERY.
SPACE 4,10
*** ENTRY CONDITIONS.
*
* (ADDR) = PP BUFFER FWA.
* (ECSA - ECSA+1) = ECS FWA.
* (ERRA) = AS DOCUMENTED IN *7DP*.
* (WDCT) = TOTAL WORD COUNT (1 OR 100B).
SPACE 4,10
*** EXIT CONDITIONS.
*
* FOR *7DP* -
* (ERRA) BIT 7 SET TO INDICATE *7SP* CALLED.
* (ERRA) BIT 10 SET IF *7SP* ABORT.
*
* FOR *7MP* -
* (RECF) BIT 0 SET IF DATA DID NOT COMPARE.
* (RECF) BIT 1 SET IF ECS ERROR ON REREAD/REWRITE.
* (SWBF - SWBF+4) = DATA FROM SINGLE WORD REREAD.
SPACE 4,10
** COMMON DECKS.
FWDL$ EQU 1 SELECT FORWARD LINKED LIST
*CALL COMPCHL
7SP SPACE 4,10
QUAL
SWBF EQU /7SP/OFFW SINGLE WORD RETRY BUFFER
QUAL *
ERRPL SWBF+4-* RETRY BUFFER OVERLAYS CODE
MSW SPACE 4,10
** MSW - MOVE SINGLE WORD FROM PP BUFFER TO SINGLE WORD BUFFER.
*
* ENTRY (MSWA) PP BUFFER ADDRESS FOR MOVE.
MSW SUBR ENTRY/EXIT
LDD MA
CWM **,ON
MSWA EQU *-1
SBN 1
CRM SWBF,ON
UJN MSWX RETURN
STS SPACE 4,10
** STS - GET DDP STATUS.
*
* EXIT (SPSA) = DDP STATUS.
*
* CALLS SFC.
STS SUBR ENTRY/EXIT
STS1 LDN 4-1 ISSUE STATUS FUNCTION
RJM SFC
IAN CH+40
STM SPSA SAVE DDP STATUS
LPN 2
DCN CH+40
NJN STSX IF FUNCTION ACCEPTED
UJN STS1 RETRY
SFC SPACE 4,10
** SFC - SELECT FUNCTION AND OUTPUT ECS ADDRESS.
*
* ENTRY (A) = FUNCTION CODE-1.
* (CM - CM+1) = ECS ADDRESS TO OUTPUT.
*
* EXIT (A) = 2.
* TO *ABT*, IF FUNCTION TIMEOUT OR ADDRESS NOT
* ACCEPTED.
SFC2 ACN CH
LDN 2
SFC SUBR ENTRY/EXIT
ADC SC+1
AJM ABT,CH IF ILLEGAL CHANNEL STATUS
FAN CH
SFC1 IJM SFC2,CH IF SELECT ACCEPTED
SBN 1
NJN SFC1 IF NOT TIMEOUT
* UJN ABT ABORT
ABT SPACE 4,10
** ABT - ABORT *7SP*.
ABT LDC 400-1 SET *7SP* ABORT FLAG
DCN CH+40
* UJN END RETURN TO *7DP*
END SPACE 4,10
** END - END *7SP*.
END ADC 200+1 SET *7SP* CALLED FLAG
RAI T2
LJM ERR1 RETURN TO *7DP*
SPACE 4,10
DSP ENTRY *7SP* ENTRY
SSP LDN 1 RESERVE CHANNEL
RJM DSW
* LDN 0
* SET CHANNEL INSTRUCTIONS.
SSP1 RAD T1 LINK TO NEXT CHANNEL INSTRUCTION
LDI T1 SAVE LINK TO NEXT CHANNEL INSTRUCTION
LPN 37
STD CM
LDD T4 MODIFY CHANNEL INSTRUCTION
SBD CM
RAI T1
LDD CM
NJN SSP1 IF MORE CHANNELS TO MODIFY
STM RECF
SSP2 SOM WDCT CHECK WORD COUNT
MJN END IF ALL WORDS PROCESSED
LDN 7 MASTER CLEAR PORT
RJM SFC
DCN CH+40
LDI D1 CHECK FUNCTION
LPN 1
NJN SSP3 IF WRITE
LDI T2 SET SINGLE WORD READ FUNCTION FOR DC145
SHN 5-11
LPN 40
LMN 40
SSP3 RJM SFC SELECT FUNCTION
OAM ECSA,CH OUTPUT ADDRESS
LDM ADDR
STM MSWA
STM SSPB
RJM MSW MOVE SINGLE WORD
LDI D1
LPN 1
NJN SSP4 IF WRITE
LDN 5
IAM SWBF,CH INPUT DATA
UJN SSP5 CHECK STATUS
SSP4 LDN 5
OAM SWBF,CH OUTPUT DATA
FJM *,CH IF DATA NOT ACCEPTED
SSP5 STD CM SAVE REMAINING BYTE COUNT
DCN CH+40
ZJN SSP6 IF DATA TRANSFERED
RJM MSW RESTORE DATA FROM PP BUFFER
SSP6 LDN 5
STD T1
RJM STS GET STATUS
LDD CM
NJN SSP9 IF DATA NOT TRANSFERED
* COMPARE DATA.
SSP7 SOD T1
MJN SSP8 IF END OF COMPARE
LDM **,T1
SSPB EQU *-1
LMM SWBF,T1
ZJN SSP7 IF DATA COMPARES
AOM RECF
SSP8 LDM SPSA
SCN 2
ZJN SSP10 IF NO ERROR IN STATUS
SCN 10
NJN SSP9 IF NOT *WRITE BUSY*
RJM STS GET STATUS
UJN SSP8 RECHECK STATUS
SSP9 LDN 2
SSP10 RAM RECF
ZJN SSP11 IF NO ERROR MESSAGE
ENDMS
MSERR 7MP CALL *7MP* TO ISSUE ERROR MESSAGE
SSP11 AOM ECSA+1 INCREMENT EXTENDED MEMORY ADDRESS
SHN -14
RAM ECSA
LDN 5 INCREMENT PP BUFFER ADDRESS
RAM ADDR
LJM SSP2 READ NEXT WORD
7SP SPACE 4,10
HERE TERMINATE LINKED CHANNEL INSTRUCTIONS.
SPACE 4,10
ERRNG 10000-* *7SP* HAS OVERFLOWED
BSS 10000-* SPARES
CON DSP-1 (T0) = ENTRY ADDRESS - 1
CON CH01$ (T1) = FIRST CHANNEL INSTRUCTION ADDRESS
CON ERRA (T2) = POINTER TO ERROR FLAG WORD
ERRNZ LN-* INCORRECT OVERLAY LENGTH
QUAL *
7MP MSOVL 7656,T2,SWBF+4,(DDP/ECS ERROR MESSAGE PROCESSOR.)
SPACE 4,10
***** ERROR MESSAGE PROCESSOR.
*
* L. L. CLINTON 78/08/15.
SPACE 4,10
*** *7MP* IS CALLED BY *7SP* TO ISSUE INTERMEDIATE ECS ERROR
* MESSAGES WHEN A SINGLE WORD REREAD OR REWRITE IS
* UNSUCCESSFUL OR WHEN THE DATA READ DOES NOT COMPARE WITH
* THE PREVIOUSLY READ DATA. AFTER ISSUING THE ERROR
* MESSAGES, *7MP* RECALLS *7SP* TO CONTINUE THE SINGLE WORD
* READ OR WRITE ERROR RECOVERY.
SPACE 4,10
7MP SPACE 4,10
** DMP - DAYFILE MESSAGE PROCESSOR.
*
* ENTRY (ADDR) = ADDRESS OF WORD IN BUFFER.
* (STSB) = LAST READ/WRITE DDP FUNCTION STATUS.
* (RECF) = 9/, 1/R, 1/C.
* R = 1, IF REREAD/REWRITE FAILED TO COMPLETE
* OR IF THE STATUS TAKEN AFTER THE
* REREAD/REWRITE INDICATES AN ERROR.
* C = 1, IF DATA RECEIVED ON READ RETRY DID
* NOT COMPARE WITH THE DATA RECEIVED
* THE FIRST TIME.
* (SWBF - SWBF+4) = DATA FROM SINGLE WORD RE-READ.
* (ECSA - ECSA+1) = EXTENDED MEMORY ADDRESS.
* (MSGH - MSGH+4) = *EMB* MESSAGE HEADER.
* (HEDR - HEDR+11) = BML MESSAGE HEADER, PREPARED BY
* *7EK* THROUGH *7EP*.
* (DDMD - DDMD+4) = DEVICE DEPENDENT MESSAGE DATA.
DMP ENTRY *7MP* ENTRY
LDM DERW CALCULATE DRIVER ENTRY POINT
SHN 1
ADC RDS
ERRNZ RDS+2-WDS CODE DEPENDS ON VALUE
STD T0
LDI T2
ZJN DMP1 IF NO EXIT ADDRESS SET
STI T0
DMP1 LDC ERR2 SET RETURN TO *7SP*
STI T2
LDI T1
ZJN DMP2 IF RECOVERED ERROR
LDM DEST
LPC -2000
LMC 2000 SET *UNRECOVERED ERROR* FLAG
STM DEST
LDC 1S17
DMP2 LMM DERW SET READ/WRITE FLAG IN MESSAGE
SHN 1
LMD HN APPEND RETRY COUNT
STM HEDR+6
LDN 5 SET BML MESSAGE LENGTH
STM MSGH+3
LDM ADDR
STM DMPA
STM DMPB
LDD MA
ADN 3
CWM **,ON
DMPA EQU *-1
CWM SWBF,ON
LDM SPSA
STM DSFA+1 SET FUNCTION STATUS IN MESSAGE
LDM ECSA
STM DSFA+3 ADD XM ADDRESS TO MESSAGE
LDM ECSA+1
STM DSFA+4
LDN 1 APPEND WORD COUNT TO MESSAGE
STM DSFA+2
STM DSFA INDICATE FIRST DATA WORD PRESENT
LDI T1
LMN 2
ZJN DMP3 IF ONLY ONE WORD TO BE REPORTED
AOM MSGH+3
LDN 2
RAM DSFA INDICATE SECOND DATA WORD PRESENT
LDI T1
LMN 1
NJN DMP3 IF WORD NOT TO BE TRANSFERED
LDD MA
ADN 4
CRM **,ON
DMPB EQU *-1
DMP3 LJM LEP CALL *7EQ* TO ISSUE BML MESSAGE
SPACE 4,10
ERRNG 10000-* *7MP* HAS OVERFLOWED
BSS 10000-* (SPARES)
CON DMP-1 (T0) = ENTRY ADDRESS - 1
CON RECF (T1) = RECF
CON ERXA (T2) = ERXA
ERRNZ LN-* INCORRECT OVERLAY LENGTH
QUAL *
SPACE 4
END