DDPT
* /--- FILE TYPE = E
* /--- BLOCK DDPT 00 000 82/07/15 11.34
IDENT DDPT,111B,DDPT
TITLE DDPT -- CPU BABYSITTER FOR DDP EXERCISER
ABS
SST
SYSCOM
*
* * THIS IS AN ON-LINE DIAGNOSTIC PROGRAM INTENDED TO
* * TEST A DDP PORT CONCURRENTLY WITH NORMAL PLATO
* * OPERATIONS.
* *
* * THE FOLLOWING CONTROL CARD OPTIONS ARE AVAILABLE
* * WITH DDPT. ALL ARGUMENTS ARE ASSUMED TO BE IN
* * OCTAL UNLESS SPECIFIED WITH A *D* POST-RADIX.
* *
* * CH= DDP CHANNEL NUMBER; IF NOT SPECIFIED
* * THE PP PROGRAM WILL LOOK FOR EQUIPMENT
* * OF TYPE *D1*
* * MN= MINIMUM EM TRANSFER LENGTH
* * MX= MAXIMUM EM TRANSFER LENGTH
* * FL= FLX/1000B TO REQUEST FROM MASTOR;
* * DOES NOT APPLY IF THE JOB ALREADY
* * HAS EM
* * EL= ERROR LIMIT; 0 = NO LIMIT
* * N= NUMBER OF TIMES THROUGH MAIN PP LOOP;
* * 0 = RUN UNTIL DROPPED
* * FW= RELATIVE EM FWA
* *
* * THE DEFAULT OPTIONS ARE EQUIVALENT TO THE
* * FOLLOWING --
* *
* * DDPT(MN=1,MX=100D,FL=1,EL=100D,N=1,FW=0)
* *
* * THE ALGORITHM FOR TESTING THE DDP IS --
* *
* * 1. FORMAT A PATTERN *MN* (MINIMUM TRANSFER
* * LENGTH) WORDS LONG IN PP MEMORY. THE
* * PATTERNS THEMSELVES RESIDE IN CM AND
* * ARE SHIFTED LEFT 1 BIT AND WRITTEN BACK
* * TO CM AFTER EACH USE.
* * 2. WRITE THE PATTERNS TO EM AT THE
* * RELATIVE EM FWA.
* * 3. DESTROY THE PATTERN IN PP MEMORY.
* * 4. READ THE PATTERNS BACK INTO PP MEMORY.
* * 5. VERIFY THAT WHAT WAS READ BACK WAS
* * CORRECT.
* * 6. REPEAT STEPS 1-5 WITH EACH REMAINING
* * PATTERN.
* * 7. REPEAT STEPS 1-6 FOR EACH OF THE 60
* * POSSIBLE SHIFTS.
* * 8. INCREMENT THE TRANSFER LENGTH AND, IF
* * LESS THAN OR EQUAL TO *MX* (MAXIMUM
* * TRANSFER LENGTH) WORDS LONG AND THE LWA
* * OF THE TRANSFER IS STILL WITHIN FLX,
* * REPEAT STEPS 1-7. IF NOT, ONE PASS
* * THROUGH THE MAIN PP LOOP IS COMPLETE.
* * 9. INCREMENT THE FWA (IF NOW BEYOND FLX,
* * RESET FWA TO 0) AND REPEAT STEPS 1-8
* * UNTIL THE MAIN PP LOOP HAS BEEN
* * EXECUTED *N* TIMES.
*
* /--- BLOCK DDPT 00 000 82/07/14 16.05
PURGMAC CALL
CALL MACRO NAME,N1,N2,N3,N4,N5,N6
NN DECMIC 0
ECHO 5,P1=(N1,N2,N3,N4,N5,N6),P2=(1,2,3,4,5,6)
IFC EQ,*P1**,1
STOPDUP
IFC NE,*P1**,2
SB_P2 P1
NN DECMIC P2
RJ _NAME_
BSS 0
ENDM
SPACE 4,10
*CALL AIDTEXT
SPACE 4,10
ORG 111B
*
* * OBTAIN EM, SET CPU AND QUEUE PRIORITIES,
* * AND CALL UP PP/DDP
*
DDPT CALL S=CM SET RUNNING CM FIELD LENGTH
CALL ARGS PROCESS CONTROL CARD ARGUMENTS
CALL M=ECS GET EM FROM MASTOR
CALL S=PRI,100B SET CPU AND QUEUE PRIORITIES
CALL S=DDP CALL UP DDP TEST PROGRAM
CALL S=END END PROGRAM
* /--- BLOCK MASTOR 00 000 82/07/15 11.44
TITLE MASTOR INTERFACE ROUTINES
*CALL PLASMRC
*
* * REQUEST EM FROM MASTOR
*
M=ECS EQ *
CALL S=ECS DETERMINE EM FL
NZ X1,M=ECS --- IF ALREADY HAVE EM
SX6 200 INITIALIZE TIMEOUT COUNTER
SA6 COUNT
M=ECS1 CALL M=ZERO ZERO MASTOR REQUEST AREA
SX6 MS.ECS EM REQUEST CODE
LX6 48
SA6 MASREQ
SA1 ECSFL FLX/1000B DESIRED
LX1 9 SHIFT TO POSITION
BX6 X1
SA6 MASREQ+1
CALL S=MAS
CALL M=STATUS GET MASTOR REQUEST STATUS
ZR X1,M=ECS --- IF SUCCESSFUL
SX1 X1-1
ZR X1,MREQERR --- IF IMPROPER MASTOR REQUEST
SA1 COUNT
SX6 X1-1
ZR X6,NOECS --- IF EM REQUEST TIMEOUT
SA6 COUNT
EQ M=ECS1
*
* * ZERO MASTOR REQUEST AREA
*
M=ZERO EQ *
SX6 0
SB2 MS.MDIM
M=ZERO1 SB2 B2-1
SA6 MASREQ+B2
ZR B2,M=ZERO
EQ M=ZERO1
*
* * PLACE STATUS OF MASTOR REQUEST IN X1
*
M=STATUS EQ *
SA1 MASREQ
MX0 -11
AX1 12
BX1 -X0*X1
EQ M=STATUS
*
* * MASTOR REQUEST ERRORS
*
MREQERR CALL S=MSG,REQMSG
CALL S=ABORT
NOECS CALL S=MSG,ECSMSG
CALL S=ABORT
*
* * STORAGE AREAS FOR MASTOR ROUTINES
*
MASREQ BSSZ MS.MDIM
COUNT BSS 1
REQMSG DIS ,* IMPROPER REQUEST.*
ECSMSG DIS ,* NO EM AVAILABLE.*
* /--- BLOCK SYSTEM 00 000 82/07/14 16.08
TITLE SYSTEM INTERFACE ROUTINES
*CALL COMCMAC
*CALL COMCSYS
*CALL COMCCPM
*CALL COMCARG
*CALL COMCDXB
*
* * SET RUNNING CM FIELD LENGTH
*
S=CM EQ *
SA1 LWPR
SX1 X1+100B
MX0 -6
BX6 X0*X1
LX6 30
SA6 CMFL SET CM FIELD LENGTH
MEMORY CM,CMFL,R
EQ S=CM
CMFL BSS 1
*
* * DETERMINE EM FL
*
S=ECS EQ *
MEMORY ECS,ECSWORD,R
SA1 ECSWORD
AX1 30 X1 = EM FL
EQ S=ECS
ECSWORD BSSZ 1 30/0,30/0 = DETERMINE FL
*
* * SET PRIORITIES
*
S=PRI EQ *
.NOSV2 IFLT OSLEV,562D IF NOS V1
SETQP B1
.NOSV2 ENDIF
SETPR 1B
EQ S=PRI
*
* * CALL UP PP/MAS
*
S=MAS EQ *
SYSTEM MAS,R,MASREQ
RECALL MASREQ
EQ S=MAS
*
* * CALL UP PP/DDP
*
S=DDP EQ *
SA1 CHANNEL X1 = CHANNEL NUMBER
LX1 48
SX2 NPATT X2 = NUMBER OF PATTERNS
LX2 36
BX6 X1+X2
SA1 MINIMUM X1 = MINIMUM TRANSFER LENGTH
LX1 24
BX6 X1+X6
SA1 MAXIMUM X1 = MAXIMUM TRANSFER LENGTH
LX1 12
BX6 X1+X6
SA1 CYCLES X1 = TIMES THRU MAIN PP LOOP
BX6 X1+X6
SA6 PATTERNS
SA1 ERRLIM X1 = ERROR LIMIT
LX1 48
SA2 ECSFWA X2 = STARTING EM FWA
LX2 24
BX6 X1+X2
SA6 PATTERNS+1
SYSTEM DDP,R,PATTERNS
RECALL (PATTERNS+1)
EQ S=DDP
*
* * ISSUE DAYFILE MESSAGE
*
S=MSG EQ *
MESSAGE B1,0,R B1 = ADDR OF MESSAGE
EQ S=MSG
*
* * ABORT JOB
*
S=ABORT EQ *
ABORT
EQ *
*
* * END JOB
*
S=END EQ *
ENDRUN
EQ *
* /--- BLOCK ARGS 00 000 82/07/14 16.08
TITLE PROCESS ARGUMENTS
*
* * PROCESS CONTROL CARD ARGUMENTS AND CONVERT
* * DISPLAY CODE VALUES TO BINARY
*
ARGS EQ *
SA1 ACTR X1 = NUMBER OF ARGUMENTS
SB4 X1 B4 = NUMBER OF ARGUMENTS
SB1 1 B1 = 1
SA4 ARGR X4 = 1ST ARG, A4 = ADDR THEREOF
SB5 ARGTAB B5 = ADDR OF ARGUMENT TABLE
CALL ARG
NZ X1,ARGERR --- IF ERROR IN ARGUMENTS
SB6 NARGS B6 = NO. OF WORDS TO CONVERT
SB7 0 OCTAL BASE ASSUMED
SA5 CHANNEL-1 PRESET A5
ARGS2 SA5 A5+B1
CALL DXB CONVERT DISPLAY CODE TO BINARY
NZ X4,ARGERR --- IF BAD DATA
SA6 A5 STORE RESULT
SB6 B6-B1 DECREMENT COUNTER
ZR B6,ARGS3 --- IF DONE
MX0 -12
BX0 X0*X6 LIMIT TO 12 BITS
NZ X0,ARGERR --- IF GREATER THAN 12 BITS
EQ ARGS2
ARGS3 MX0 -24
BX0 X0*X6 LIMIT EM FWA TO 24 BITS
NZ X0,ARGERR --- IF GREATER THAN 24 BITS
SA1 ARGTAB X1 = *CH* KEYWORD ENTRY
MX0 12
BX1 X0*X1
BX1 X0-X1 X1 = 0 IF CHANNEL SPECIFIED
NZ X1,ARGS --- IF NOT SPECIFIED
SA1 CHANNEL
SX6 X1+1
SA6 A1 STORE CHANNEL+1 IF SPECIFIED
EQ ARGS
ARGERR CALL S=MSG,ARGMSG
CALL S=ABORT
ARGMSG DIS ,* ARGUMENT ERROR.*
* /--- BLOCK STORAGE 00 000 82/07/14 16.09
TITLE STORAGE DEFINITIONS
*
* * PARAMETERS
* *
* * *ECSFWA* MUST BE LAST IN THIS LIST
*
CHANNEL VFD 60/1L0 DDP CHANNEL
MINIMUM VFD 60/1L1 MINIMUM TRANSFER LENGTH
MAXIMUM VFD 60/3L100 MAXIMUM TRANSFER LENGTH
CYCLES VFD 60/1L1 TIMES THROUGH MAIN PP LOOP
ECSFL VFD 60/1L1 EM/1000B TO REQUEST
ERRLIM VFD 60/3L100 ERROR LIMIT
ECSFWA VFD 60/1L0 STARTING RELATIVE EM FWA
*
* * TABLE OF CONTROL CARD ARGUMENTS -- SEE OPL DECK
* * COMCARG FOR FORMAT AND DOCUMENTATION
* *
* * THE *CH* KEYWORD MUST BE FIRST IN THE TABLE
*
ARGTAB VFD 12/2LCH,18/CHANNEL,12/4000B,18/CHANNEL
VFD 12/2LMN,18/MINIMUM,12/4000B,18/MINIMUM
VFD 12/2LMX,18/MAXIMUM,12/4000B,18/MAXIMUM
VFD 12/1LN,18/CYCLES,12/4000B,18/CYCLES
VFD 12/2LFL,18/ECSFL,12/4000B,18/ECSFL
VFD 12/2LEL,18/ERRLIM,12/4000B,18/ERRLIM
VFD 12/2LFW,18/ECSFWA,12/4000B,18/ECSFWA
ARGEND DATA 0 MARK END OF TABLE
NARGS EQU ARGEND-ARGTAB
*
* * PATTERNS TO TEST DDP AND EM WITH
*
PATTERNS BSS 2
VFD 60/0
VFD 60/-1
VFD 60/1
VFD 60/-1
VFD 60/52525252525252525252B
VFD 60/70707070707070707070B
VFD 60/47474747474747474747B
NPATT EQU *-PATTERNS-2
* /--- BLOCK END 00 000 80/01/09 02.28
END
* /--- BLOCK DDP 00 000 82/07/20 09.17
IDENT DDP,DDP
TITLE DDP EXERCISER
PERIPH
SST
*
* * PP CALL FORMAT
* *
* * SYSTEM DDP,PATTERN,R
* *
* * PATTERN = CM ADDRESS OF PATTERN AREA (2 WORDS
* * OF PARAMETERS + ONE WORD PER PATTERN)
* *
* * PARAMETERS FORMAT
* *
* * 12/DDP CHANNEL+1 (0 = DEFAULT TO FIRST *D1*
* * CHANNEL IN EST)
* * 12/NUMBER OF PATTERNS
* * 12/MINIMUM TRANSFER LENGTH
* * 12/MAXIMUM TRANSFER LENGTH
* * 12/NUMBER OF MAIN LOOP ITERATIONS (0 = RUN TILL
* * DROPPED)
* *
* * 12/ERROR LIMIT (0 = NO LIMIT)
* * 24/RELATIVE EM FWA
* * 12/0 (UNUSED)
* * 12/COMPLETION BIT
*
*CALL COMPMAC
*CALL COMSSSD
*CALL AIDTEXT
*CALL PTEXT
*CALL PLAPRJM
*CALL PLASRWX
SPACE 4,10
* ECS/ESM MODE WORD / BIT
.1 SET ESMP/12D
ESMW EQU 4-.1 BYTE IN *CPUL*
ESMB EQU ESMP-12D*.1 BIT IN THAT BYTE
SPACE 4,10
* /--- BLOCK MAIN 00 000 82/07/14 16.10
TITLE MAIN PROCESSING LOOPS
ORG PPFW
*
* * PERFORM VARIOUS INITIALIZATIONS
*
DDP CALL INITIAL
UJN DDP1B
*
* * OUTER LOOP -- INCREMENT FWA FOR EM TRANSFER
*
DDP1 LDM CYCLES (A) = NUMBER OF LOOPS TO GO
ZJN DDP1A --- IF NO LIMIT
SOM CYCLES
ZJR DROP --- DROP IF LIMIT REACHED
DDP1A AOM ECSFWA+1 INCREMENT FWA
SHN -12 POSITION CARRY-OVER BIT
RAM ECSFWA
DDP1B LDM MINTL
STM TLCM RESET TRANSFER LENGTH
*
* * MIDDLE LOOP -- INCREMENT TRANSFER LENGTH
*
DDP2 AOM TLCM INCREMENT TRANSFER LENGTH
SHN 2 MULTIPLY BY 4
ADM TLCM (A) = (TLCM) * 5
STM TLPP STORE TRANSFER LENGTH IN PP WDS
LDN 0
STM CPATT ZERO CURRENT PATTERN NUMBER
LDN 60
STM SHIFT INITIALIZE SHIFT COUNT
*
* * INNER LOOP -- GO THROUGH THE PATTERNS
*
DDP3 CALL PAUSE PAUSE / DROP IF NECESSARY
CALL CHECK SEE IF ADDRESSES VALID
MJP DDP5 --- IF TRANSFER LWA ILLEGAL
NJP DDP6 --- IF TRANSFER FWA ILLEGAL
CALL GETPATT PREPARE NEXT PATTERN
NJP DDP2 --- IF OUT OF PATTERNS
CALL RSVDDP RESERVE DDP PORT
CALL WRITECS WRITE PATTERNS TO EM VIA DDP
NJN DDP4 --- IF ERROR
CALL RELDDP RELEASE DDP PORT
CALL DESTROY DESTROY PATTERNS IN PP BUFFER
CALL RSVDDP RESERVE DDP PORT
CALL READECS READ PATTERNS BACK VIA DDP
NJN DDP4 --- IF ERROR
CALL RELDDP RELEASE DDP PORT
CALL VERIFY VERIFY READ CORRECTLY
UJP DDP3
DDP4 CALL RELDDP RELEASE DDP PORT
UJP DDP3
DDP5 LDM TLCM (A) = TRANSFER LENGTH
SBM MINTL
NJP DDP1 --- IF SHOULD INCREMENT FWA
DDP6 LDM ECSFWA+1
NJN DDP7 --- IF NOT ZERO
LDM ECSFWA
ZJR DROP DROP PPU IF FWA = 0 = OOR
DDP7 LDN 0 RESET FWA
STM ECSFWA
STM ECSFWA+1
UJP DDP1B
* /--- BLOCK CHECK 00 000 84/11/14 14.53
TITLE CHECK -- CHECK EM ADDRESSES VALID
*
* * SEE IF PARAMETERS FOR EM TRANSFER ARE VALID
* *
* * ON ENTRY, (ECSFWA) = REL FWA OF TRANSFER
* * (TLCM) = CM WORDS TO TRANSFER
* *
* * ON EXIT, (A) = NEG. = ILLEGAL TRANSFER LWA
* * 0 = OK
* * 1 = ILLEGAL TRANSFER FWA
* * (ECSABS) = ABS FWA OF TRANSFER
* *
* * USES T1 - T2, CM - CM+4
* *
* * CALLS WAITREC
*
CHECK1 LDN 1 (A) = 1 = BAD FWA
CHECK SUBR
CALL WAITREC
LDD CP (A) = ADDR OF CP AREA
ADN 5 OFFSET TO FLX IN XJ PACKAGE
CRD CM
LDD CM
LPC 777B
STD CM (CM, CM+1) = FLX
LDM ESM CHECK IF IN ESM MODE
ZJN CHK0 IF IN ECS MODE
LDD CM+1 CONVERT ESM FLX TO REAL FLX
SHN 6
STD CM+1
LPC 770000B
LMD CM
SHN 6
STD CM
CHK0 LDM ECSFWA+1
ADN 1
STD T2
SHN -12
ADM ECSFWA
STD T1 (T1, T2) = EM FWA + 1
LDD CM
SBD T1
MJP CHECK1 --- IF BAD FWA FOR EM TRANSFER
NJN CHK1 --- IF FWA OK
LDD CM+1
SBD T2
MJP CHECK1 --- IF BAD FWA FOR EM TRANSFER
* /--- BLOCK CHECK 00 000 84/11/14 14.53
CHK1 LDM TLCM (A) = CM WORDS TO TRANSFER
SBN 1
RAD T2
SHN -12
RAD T1 (T1, T2) = LWA + 1 OF TRANSFER
LDD CM
SBD T1
MJP CHECKX --- IF TRANSFER TOO LONG
NJN CHK2
LDD CM+1
SBD T2
MJP CHECKX --- IF TRANSFER TOO LONG
CHK2 LDM MTLCM
SBM TLCM SEE IF TOO LONG FOR PP BUFFER
MJP CHECKX --- IF BAD LWA
LDD CP (A) = ADDR OF CP AREA
ADN 4 OFFSET TO RAX IN XJ PACKAGE
CRD CM
LDD CM
LPC 777B
STD CM (CM, CM+1) = RAX
LDM ESM CHECK IF IN ESM MODE
ZJN CHK2.1 IF IN ECS MODE
LDD CM+1 CONVERT ESM RAX TO ABS. ADDR.
SHN 6
STD CM+1
LPC 770000B
LMD CM
SHN 6
STD CM
CHK2.1 LDM ECSFWA+1 CONVERT FWA TO ABSOLUTE
ADD CM+1
STM ECSABS+1
SHN -12
ADM ECSFWA
ADD CM
STM ECSABS
LDN 0 (A) = 0 = ALL OK
LJM CHECKX
* /--- BLOCK PATTERN 00 000 82/07/14 16.11
TITLE GETPATT -- PREPARE NEXT PATTERN
*
* * INCREMENT PATTERN NUMBER AND FORMAT BUFFER
* * FOR EM WRITE
* *
* * DROPS PP IF CM ADDRESS OF PATTERN IS BAD
* *
* * ON EXIT, (A) = 0 = ALL OK
* * 1 = NO MORE PATTERNS
* *
* * USES T1 - T2
* *
* * CALLS ABS
*
NOPATT SOM SHIFT DECREMENT SHIFT COUNT
ZJN NOPATT2 --- IF 60 SHIFTS DONE
LDN 0
STM CPATT RESET PATTERN NUMBER
UJN GETP0
NOPATT2 LDN 1 (A) = 1 = NO MORE PATTERNS
GETPATT SUBR
LDM CPATT (A) = CURRENT PATTERN NUMBER
SBM NPATT CHECK IF FINISHED
PJN NOPATT --- IF LAST PATTERN
GETP0 AOM CPATT INCREMENT PATTERN NUMBER
LDM APATT
SHN 12
ADM APATT+1
ADN 1
ADM CPATT (A) = CM ADDR OF NEXT PATTERN
CALL ABS CONVERT TO ABSOLUTE ADDR
ZJR DROP --- IF BAD ADDR
CRM PATTERN,ON READ PATTERN TO PP MEMORY
LDN 5
STD T1 OUTER LOOP COUNTER
GETP1 SOD T1 (A) = COUNTER
MJN GETP3 --- IF DONE
LDM TLPP (A) = TRANSFER LTH IN PP WORDS
STD T2 INNER LOOP COUNTER
LDC ECSBUF-5
ADD T1
STM GETP2+3 MODIFY NEXT STM INSTRUCTION
GETP2 LDM PATTERN,T1
STM *,T2 PROPOGATE PATTERN
LDD T2
SBN 5
STD T2 UPDATE INNER LOOP COUNTER
NJN GETP2 --- IF NOT YET DONE
UJN GETP1
GETP3 LDN 4 SHIFT PATTERN LEFT BY 1 BIT
STD T1
LDN 0
GETP4 LMM PATTERN,T1
SHN 1
STM CM,T1
SHN -12
STD T2
SOD T1
MJN GETP5
LDD T2
SHN 17
UJN GETP4
GETP5 LDD T2
LMD CM+4
STD CM+4
LDM APATT WRITE BACK TO CENTRAL MEMORY
SHN 12
ADM APATT+1
ADN 1
ADM CPATT (A) = ADDR OF PATTERN
CALL ABS
ZJR DROP --- IF BAD ADDRESS
CWD CM
LDN 0 (A) = 0 = ALL OK
LJM GETPATTX
*CALL PLAPABS
* /--- BLOCK DESTROY 00 000 82/07/14 16.11
TITLE DESTROY -- DESTROY PATTERNS IN PP MEMORY
*
* * ALTER PATTERNS IN PP MEMORY SO THAT
* * IF VERIFY IS GOOD IT MUST BE BECAUSE
* * PATTERN WAS READ FROM EM CORRECTLY
* *
* * USES T1
*
DESTROY SUBR
LDM TLPP (A) = TRANSFER LTH IN PP WDS
STD T1 (T1) = LOOP COUNTER
DEST1 SOD T1 DECREMENT COUNTER
MJN DESTROYX --- IF FINISHED
SOM ECSBUF,T1 SUBTRACT 1 FROM PATTERN WORD
UJN DEST1
* /--- BLOCK VERIFY 00 000 82/07/14 16.11
TITLE VERIFY -- CHECK DATA READ BACK CORRECTLY
*
* * VERIFY THAT DATA WAS READ BACK FROM EM CORRECTLY
* *
* * DAYFILE MESSAGE WILL BE ISSUED IN CASE OF VERIFY
* * ERROR
* *
* * USES T1 - T2
* *
* * CALLS VERERR
*
VERIFY SUBR
LDM TLCM
STD T1 INITIALIZE OUTER LOOP COUNTER
LDC ECSBUF
STM VERIFY2+1 SET TO FIRST WORD IN BUFFER
VERIFY1 LDN 4
STD T2 INITIALIZE INNER LOOP COUNTER
VERIFY2 LDM *,T2 (A) = DATA FROM EM
LMM PATTERN,T2 SEE IF SAME AS PATTERN
NJN VERIFY3 --- IF VERIFY ERROR
SOD T2 DECREMENT COUNTER
PJN VERIFY2 --- IF MORE IN CURRENT WORD
SOD T1 DECREMENT COUNTER
ZJN VERIFYX --- IF ALL WORDS VERIFIED
LDN 5
RAM VERIFY2+1 ADVANCE TO NEXT WORD
UJN VERIFY1
VERIFY3 LDM TLCM
SBD T1 (A) = OFFSET TO VERIFY ERROR
STM OFFSET
LDM VERIFY2+1 (A) = ADDR OF BAD DATA
STM VERIFY4+1
LDN 4 INITIALIZE COUNTER
STD T1
VERIFY4 LDM *,T1 (A) = NEXT 12 BITS OF BAD WORD
STM BADDATA,T1 STORE BAD WORD IN *BADDATA*
SOD T1
PJN VERIFY4
CALL VERERR ISSUE VERIFY ERROR DAYFILE MSG
LJM VERIFYX
* /--- BLOCK PAUSE 00 000 82/07/14 13.28
TITLE PAUSE -- CHECK FOR STORAGE MOVE OR CP ERROR
*
* * CHECK FOR STORAGE MOVE, CONTROL POINT ERROR
* * OR ROLLOUT REQUEST
* *
* * DROPS PP IF ERROR FLAG SET OR ROLLOUT REQUESTED
* *
* * USES CM - CM+4
* *
* * CALLS PRL
*
PAUSE SUBR
LDD CP
ADN STSW (A) = ADDR. OF CP STATUS WORD
CRD CM READ CP STATUS
LDD CM+1 (A) = ERROR FLAG
NJR DROP --- DROP PP IF CPU ERROR
LDD CP
.NOSV2 IFGE OSLEV,562D NOS V2
ADN STSW GET ROLLOUT INFO
.NOSV2 ELSE NOS V1
ADN JCIW (A) = ADDR. OF ROLLOUT INFO
.NOSV2 ENDIF
CRD CM READ ROLLOUT INFO
LDD CM+2 (A) = ROLLOUT INFO
LPN 1 CHECK IF ROLLOUT REQUESTED
NJR ROLLOUT --- IF ROLLOUT REQUESTED
CALL PAUSE1
UJN PAUSEX
PAUSE1 SUBR
LDN CMCL
CRD CM READ MEMORY CONTROL WORD
LDD CP
SBD CM CHECK IF THIS CONTROL POINT
NJP PAUSE1X --- IF NOT FOR THIS CP
PAUSE ST PAUSE FOR STORAGE MOVE
UJN PAUSE1X
ROLLOUT SUBR
.NOSV2 IFGE OSLEV,562D NOS V2
LDD CP GET SUBSYSTEM ID
ADN JCIW
CRD CM
LDD IRSI-1 (A) = MAXIMUM ROLLABLE ID VALUE
SBD CM+2 SUBTRACT ACTUAL SSID
.NOSV2 ELSE NOS V1
LDC MXPS (A) = 7760B
SBD CM+1 (A) < 0 IF ROLLOUT NOT ALLOWED
.NOSV2 ENDIF
MJP ROLLOUTX --- IF NO ROLLOUT
CALL DFM,ROLLMSG
RJM DROP
ROLLMSG DIS ,* ROLLOUT REQUESTED.*
* /--- BLOCK DROP 00 000 82/07/15 13.42
TITLE DROP PPU
*
* * MARK TESTING FINISHED AND DROP PPU
* *
* * USES T1, CM - CM+4
* *
* * CALLS DFM, ABS, RELDDP
*
DROP SUBR
LDM APATT (A) = TOP 6 BITS OF ADDRESS
SHN 12
ADM APATT+1 (A) = ADDR OF PATTERNS
ZJN DROP2 --- IF NO ADDRESS
ADN 1
CALL ABS
ZJN DROP3 --- IF BAD ADDRESS
CRD CM READ 1ST PATTERN WORD
LDN 1
STD CM+4 SET COMPLETION BIT
LDM APATT (A) = TOP 6 BITS OF ADDRESS
SHN 12
ADM APATT+1 (A) = ADDR OF PATTERNS
ZJN DROP2 --- IF NO ADDRESS
ADN 1
CALL ABS
ZJN DROP3 --- IF BAD ADDRESS
CWD CM REWRITE WORD
DROP2 CALL RELDDP MAKE SURE DDP RELEASED
MONITOR DPPM DROP PPU
UJP PPR
DROP3 CALL DFM,DROPMSG2
UJP DROP2
DROPMSG2 DIS ,* BAD ADDRESS.*
* /--- BLOCK RESV DDP 00 000 82/07/19 11.50
TITLE RSVDDP -- RESERVE DDP PORT
*
* * RESERVE DDP PORT CHANNEL
* *
* * USES CM - CM+4
* *
* * CALLS FTN, PAUSE1
*
RSVDDP SUBR
LDM RDDP CHECK IF DDP RESERVED
NJN RSVDDPX
RVD110 LDN ZERL PRE-CLEAR ARGUMENTS
CRD CM
LDM CHANNEL
STD CM+1
MONITOR CCHM
LDD CM+2
NJN RVD114 IF RESERVED
CALL PAUSE
UJN RVD110 TRY AGAIN
RVD114 AOM RDDP MARK DDP RESERVED
RVD120 IJM RVD122,C=DDP
DCN C=DDP,40B INSURE CHANNEL INACTIVE
RVD122 FNC 5010B,C=DDP MASTER-CLEAR PORT
WAIT EMPTY,C=DDP,RVD123
RVD123 WAIT INACTIVE,C=DDP,RVD124
RVD124 IJM RVD125,C=DDP
DCN C=DDP,40B INSURE CHANNEL INACTIVE
RVD125 PSN
* UJN 3 IF ECS MODE
FNC 5404B,C=DDP SELECT ESM MODE
LJM RSVDDPX
* /--- BLOCK REL DDP 00 000 82/07/14 13.30
TITLE RELDDP -- RELEASE DDP PORT RESERVATION
*
* * RELEASE DDP PORT CHANNEL RESERVATION
* *
* * USES CM - CM+4
* *
* * CALLS DCH
*
RELDDP SUBR
LDM RDDP CHECK IF DDP RESERVED
ZJN RELDDPX
LDN ZERL PRE-CLEAR ARGUMENTS
CRD CM
LDM CHANNEL
DCHAN RELEASE DDP CHANNEL
LDN 0
STM RDDP MARK DDP NO LONGER RESERVED
LJM RELDDPX
* /--- BLOCK READ ECS 00 000 82/07/19 15.25
TITLE READECS -- READ EM VIA DDP
*
* * ON ENTRY, (ECSABS) = UPPER 12 BITS OF EM ADDRESS
* * (ECSABS+1) = LOWER 12 BITS OF EM ADDR
* * (TLPP) = TRANSFER LENGTH IN PP WORDS
* *
* * ON EXIT, (A) = 0 = ALL OK
* * 1 = EM ERROR
* *
* * CALLS UNKNERR, PARERR, RDABERR, CHANERR
*
READECS SUBR
IJM RCS10,C=DDP
DCN C=DDP,40B
RCS10 FNC 5001B,C=DDP 5001B = READ EM
WAIT INACTIVE,C=DDP,RCSE1
ACN C=DDP,40B
FJM RCSE2,C=DDP
LDN 2
OAM ECSABS,C=DDP OUTPUT 2 WORD EM ADDRESS
WAIT FULL,C=DDP,RCSE3
LDM TLPP NUMBER OF WORDS TO READ
IAM ECSBUF,C=DDP READ TO PPU MEMORY
NJP RCSE4 --- IF ERROR
RCS20 IJM RCSE5,C=DDP WAIT CHANNEL ACTIVE + FULL
EJM RCS20,C=DDP
DCN C=DDP,40B
LDN 0 MARK NO ERROR OCCURRED
LJM READECSX
*
RCSE1 LDN 0 SET ERROR CODE
UJN RCSERR
RCSE2 LDN 1
UJN RCSERR
RCSE3 LDN 2
UJN RCSERR
RCSE4 LDN 3
UJN RCSERR
RCSE5 LDN 4
RCSERR ADC 2RR1 SET CHARACTER STRING FOR ERROR
CALL CHANERR
*
FNC 5004B,C=DDP GET PORT STATUS WORD
WAIT INACTIVE,C=DDP,RCSE1
ACN C=DDP,40B
WAIT FULL,C=DDP,RCSE3
IAN C=DDP,40B
DCN C=DDP,40B
LPN 5
NJN RCS32 --- IF ABORT OR PARITY ERROR
CALL UNKNERR ISSUE UNKNOWN ERROR MESSAGE
UJN RCS40
RCS32 LPN 1
NJN RCS34 --- IF ABORT
CALL PARERR ISSUE PARITY ERROR MESSAGE
UJN RCS40
RCS34 CALL RDABERR --- ISSUE ABORT MESSAGE
RCS40 FNC 5010B,C=DDP 5010B = MASTER CLEAR PORT
WAIT EMPTY,C=DDP,RCS41
RCS41 WAIT INACTIVE,C=DDP,RCS90
RCS90 IJM RCS95,C=DDP CHECK IF CHANNEL INACTIVE
DCN C=DDP DISCONNECT DDP CHANNEL
RCS95 PSN
* UJN 3 IF ECS MODE
FNC 5404B,C=DDP SELECT ESM MODE
LDN 1 MARK ERROR OCCURRED
LJM READECSX
* /--- BLOCK WRITE ECS 00 000 82/07/19 15.43
TITLE WRITECS -- WRITE EM VIA DDP
*
* * ON ENTRY, (ECSABS) = UPPER 12 BITS OF EM ADDRESS
* * (ECSABS+1) = LOWER 12 BITS OF EM ADDR
* * (TLPP) = TRANSFER LENGTH IN PP WORDS
* *
* * ON EXIT, (A) = 0 = ALL OK
* * 1 = EM ERROR
* *
* * CALLS WRABERR, CHANERR
*
WRITECS SUBR
IJM WCS10,C=DDP
DCN C=DDP,40B
WCS10 FNC 5002B,C=DDP 5002B = WRITE EM
WAIT INACTIVE,C=DDP,WCSE1
ACN C=DDP,40B
LDN 2
OAM ECSABS,C=DDP OUTPUT 2 WORD EM ADDRESS
LDM TLPP NUMBER OF WORDS TO WRITE
OAM ECSBUF,C=DDP WRITE FROM PPU MEMORY
NJP WCSE2 EXIT IF ERROR
DCN C=DDP,40B
WCS30 FNC 5004B,C=DDP 5004B = SELECT STATUS
WAIT INACTIVE,C=DDP,WCSE3
ACN C=DDP,40B RE-ACTIVATE DDP CHANNEL
WAIT FULL,C=DDP,WCSE4
IAN C=DDP,40B INPUT STATUS WORD
DCN C=DDP,40B
LPN 11B MASK WRITE/ABORT BITS
NJP WCS50 JUMP IF ERROR OR INCOMPLETE
IJM WCS40,C=DDP EXIT (A=0)
DCN C=DDP,40B
WCS40 LJM WRITECSX EXIT (A=0)
WCS50 LPN 10B
NJP WCS30 LOOP IF WRITE NOT COMPLETE
CALL WRABERR ISSUE WRITE ABORT MESSAGE
UJN WCSE5
WCSE1 LDN 0 SET ERROR CODE
UJN WCSERR
WCSE2 LDN 1
UJN WCSERR
WCSE3 LDN 2
UJN WCSERR
WCSE4 LDN 3
UJN WCSERR
WCSE5 LDN 4
WCSERR ADC 2RW1 SET CHARACTER STRING FOR ERROR
CALL CHANERR
IJM WCS54,C=DDP
DCN C=DDP,40B
WCS54 FNC 5010B,C=DDP 5010B = MASTER CLEAR PORT
WAIT EMPTY,C=DDP,WCS55
WCS55 WAIT INACTIVE,C=DDP,WCS90
WCS90 IJM WCS95,C=DDP CHECK IF CHANNEL INACTIVE
DCN C=DDP,40B DISCONNECT DDP CHANNEL
WCS95 PSN
* UJN 3
FNC 5404B,C=DDP SELECT ESM MODE
LDN 1 MARK ERROR OCCURRED
LJM WRITECSX
* /--- BLOCK WAITREC 00 000 82/07/14 16.36
TITLE WAITREC -- WAIT FOR AUTO-RECALL
*
* * WAIT UNTIL CPU PROGRAM IS IN RECALL
* *
* * USES CM - CM+4
*
WAITREC SUBR
LDC 100 INITIALIZE TIMEOUT COUNTER
STM WAITCNT
WAIT1 LDD CP
ADN STSW
CRD CM
LDD CM
.NOSV2 IFGE OSLEV,562D NOS V2
SHN -11B CHECK FOR *I* STATUS (6)
LMN 6
ZJP WAITRECX IF IN *I* STATUS
.NOSV2 ELSE NOS V1
LPC 1000B
NJN WAITRECX --- IF IN RECALL
.NOSV2 ENDIF
SOM WAITCNT
ZJN WAIT2
CALL PAUSE
DELAY 100
UJP WAIT1
WAIT2 CALL DFM,WAITMSG
RJM DROP
WAITMSG DIS ,* (DDP) RECALL TIMEOUT.*
*CALL PLAPDNM
* /--- BLOCK LIMITS 00 000 82/07/14 13.33
TITLE LIMITS -- ERROR LIMIT CHECKS
*
* * CHECK ERROR LIMIT AND DROP IF REACHED
* *
* * CALLS DFM
*
LIMITS SUBR
LDM ERRLIM
ZJN LIMITSX --- IF NO ERROR LIMIT
SOM ERRLIM SUBTRACT 1 FOR CURRENT ERROR
NJN LIMITSX --- IF LIMIT NOT REACHED
CALL DFM,LIMMSG
RJM DROP
LIMMSG DIS ,* ERROR LIMIT REACHED.*
* /--- BLOCK MESSAGES 00 000 82/07/20 09.20
TITLE ROUTINES TO FORMAT DAYFILE MESSAGES
*
* * ++++ (DDP) EM VERIFY ERROR +++
* * +
* * + CHANNEL XX
* * + ABS FWA XXXXXXXX
* * + LENGTH XXXX
* * + OFFSET XXXX
* * + PATTERN XXXXXXXXXXXXXXXXXXXX
* * + READ AS XXXXXXXXXXXXXXXXXXXX
* * +
* * ++++++++++++++++++++++++++++++
*
VERERR SUBR
CALL DFM,MSG1A
CALL DFM,MSG2
CALL X.MSG3
CALL X.MSG4
CALL X.MSG5
CALL X.MSG5A
CALL X.MSG6
CALL X.MSG7
CALL MSGSUB2
UJN VERERRX
*
* * ++++ (DDP) EM PARITY ERROR +++
* * +
* * + CHANNEL XX
* * + ABS FWA XXXXXXXX
* * + LENGTH XXXX
* * + PATTERN XXXXXXXXXXXXXXXXXXXX
* * +
* * ++++++++++++++++++++++++++++++
*
PARERR SUBR
CALL DFM,MSG1B
CALL MSGSUB
UJN PARERRX
*
* * ++++ (DDP) EM READ ABORT +++++
* * +
* * + CHANNEL XX
* * + ABS FWA XXXXXXXX
* * + LENGTH XXXX
* * + PATTERN XXXXXXXXXXXXXXXXXXXX
* * +
* * ++++++++++++++++++++++++++++++
*
RDABERR SUBR
CALL DFM,MSG1C
CALL MSGSUB
UJN RDABERRX
*
* * ++++ (DDP) EM WRITE ABORT ++++
* * +
* * + CHANNEL XX
* * + ABS FWA XXXXXXXX
* * + LENGTH XXXX
* * + PATTERN XXXXXXXXXXXXXXXXXXXX
* * +
* * ++++++++++++++++++++++++++++++
*
WRABERR SUBR
CALL DFM,MSG1D
CALL MSGSUB
UJN WRABERRX
*
* * DDP CHAN ERR C=XX E=XX
*
CHANERR SUBR
STM MSG1E+12
LDM CHANNEL (A) = CHANNEL NUMBER
CALL C2D CONVERT CHANNEL TO DISPLAY CODE
STM MSG1E+9
CALL DFM,MSG1E
UJN CHANERRX
*
* * ++++ (DDP) UNKNOWN ERROR +++++
* * +
* * + CHANNEL XX
* * +
* * ++++++++++++++++++++++++++++++
UNKNERR SUBR
CALL DFM,MSG1F
CALL DFM,MSG2
CALL X.MSG3
CALL MSGSUB2
LJM UNKNERRX
* /--- BLOCK MESSAGES 00 000 82/07/14 13.36
*
* * COMBINATIONS OF LINES FOR DAYFILE MESSAGES
*
MSGSUB SUBR
CALL MSGSUB1
CALL MSGSUB2
UJN MSGSUBX
MSGSUB1 SUBR
CALL DFM,MSG2
CALL X.MSG3
CALL X.MSG4
CALL X.MSG5
CALL X.MSG6
UJN MSGSUB1X
MSGSUB2 SUBR
CALL DFM,MSG2
CALL DFM,MSG8
CALL LIMITS DECREMENT ERROR LIMIT COUNT
UJN MSGSUB2X
* /--- BLOCK MESSAGES 00 000 82/07/14 16.17
*
* * OUTPUT CHANNEL NUMBER TO DAYFILE
* *
* * CALLS C2D, DFM
*
X.MSG3 SUBR
LDM CHANNEL (A) = CHANNEL NUMBER
CALL C2D CONVERT CHANNEL TO DISPLAY CODE
STM MSG3+5
CALL DFM,MSG3
UJN X.MSG3X
*
* * OUTPUT ABSOLUTE FWA OF EM TRANSFER TO DAYFILE
* *
* * USES T3
* *
* * CALLS C8D, DFM
*
X.MSG4 SUBR
LDC MSG4+5
STD T3 (T3) = WHERE TO PUT FWA
LDC ECSABS
CALL C8D
CALL DFM,MSG4
UJN X.MSG4X
*
* * OUTPUT LENGTH OF EM TRANSFER TO DAYFILE
* *
* * USES T1
* *
* * CALLS C4D, DFM
*
X.MSG5 SUBR
LDC MSG5+5 ADDR FOR DISPLAY CODE RESULT
STD T1
LDM TLCM (A) = TRANSFER LENGTH
CALL C4D
CALL DFM,MSG5
UJN X.MSG5X
*
* * OUTPUT OFFSET TO VERIFY ERROR TO DAYFILE
* *
* * USES T1
* *
* * CALLS C4D, DFM
*
X.MSG5A SUBR
LDC MSG5A+5 ADDR FOR DISPLAY CODE RESULT
STD T1
LDM OFFSET (A) = TRANSFER LENGTH
CALL C4D
CALL DFM,MSG5A
UJN X.MSG5AX
*
* * OUTPUT PATTERN TO DAYFILE
* *
* * USES T5
* *
* * CALLS C20D, DFM
*
X.MSG6 SUBR
LDC MSG6+5
STD T5 (T5) = ADDR FOR DISPLAY CODE
LDC PATTERN
CALL C20D
CALL DFM,MSG6
UJN X.MSG6X
*
* * OUTPUT INCORRECTLY READ DATA TO DAYFILE
* *
* * USES T5
* *
* * CALLS C20D, DFM
*
X.MSG7 SUBR
LDC MSG7+5
STD T5 (T5) = ADDR FOR DISPLAY CODE
LDC BADDATA
CALL C20D
CALL DFM,MSG7
LJM X.MSG7X
* /--- BLOCK MESSAGES 00 000 82/07/14 13.38
*
* * C2D - CONVERT 2 OCTAL DIGITS TO DISPLAY CODE
* *
* * ON ENTRY, (A) = NUMBER TO CONVERT
* * (A) = RESULT IN DISPLAY CODE
* *
* * USES T0
*
C2D SUBR
LPN 77B
STD T0
SHN 3
LMD T0
SCN 70B
ADC 2R00
UJN C2DX
*
* * C4D - CONVERT 4 OCTAL DIGITS TO DISPLAY CODE
* *
* * ON ENTRY, (A) = NUMBER TO CONVERT
* * (T1) = ADDRESS OF RESULT
* *
* * USES T1 - T2
* *
* * CALLS C2D
*
C4D SUBR
STD T2 SAVE NUMBER TO CONVERT
SHN -6 RIGHT JUSTIFY 1ST 2 DIGITS
CALL C2D (A) = 1ST 2 DIGITS DISPLAY CODE
STI T1 ((T1)) = 1ST 2 DIGITS
AOD T1 INCREMENT ADDRESS
LDD T2 RETRIEVE ORIGINAL NUMBER
CALL C2D CONVERT LAST 2 DIGITS
STI T1 ((T1)) = LAST 2 DIGITS
UJN C4DX
* /--- BLOCK MESSAGES 00 000 82/07/14 13.39
*
* * CONVERT 8 OCTAL DIGITS TO DISPLAY CODE
* *
* * ON ENTRY, (A) = ADDRESS OF NUMBER TO CONVERT
* * (T3) = ADDRESS OF RESULT
* *
* * USES T3 - T4
* *
* * CALLS C4D
*
C8D SUBR
STD T4 SAVE ADDRESS OF ORIGINAL NUMBER
LDD T3
STD T1 (T1) = WHERE TO PUT DIGITS 1-4
LDI T4 (A) = 1ST 4 DIGITS TO CONVERT
CALL C4D
LDN 2
ADD T3
STD T1 (T1) = WHERE TO PUT DIGITS 5-8
AOD T4
LDI T4 (A) = LAST 4 DIGITS TO CONVERT
CALL C4D
UJN C8DX
*
* * C20D - CONVERT 20 OCTAL DIGITS TO DISPLAY CODE
* *
* * ON ENTRY, (A) = ADDRESS OF NUMBER TO CONVERT
* * (T5) = ADDRESS OF RESULT
* *
* * USES T5 - T6
* *
* * CALLS C4D, C8D
*
C20D SUBR
STD T6 SAVE ADDRESS OF ORIGINAL NUMBER
LDD T5
STD T3 (T3) = WHERE TO PUT RESULT
LDD T6 (A) = ADDRESS OF NUMBER
CALL C8D CONVERT 1ST 8 DIGITS
LDN 4
RAD T5
STD T3 (T3) = ADDR FOR NEXT 8 DIGITS
LDN 2
RAD T6 (A) = ADDRESS OF NEXT DIGITS
CALL C8D CONVERT NEXT 8 DIGITS
LDN 4
ADD T5
STD T1 (T1) = ADDR FOR LAST 4 DIGITS
LDN 2
RAD T6
LDI T6 (A) = LAST 4 DIGITS TO CONVERT
CALL C4D CONVERT LAST 4 DIGITS
UJN C20DX
* /--- BLOCK STORAGE 00 000 82/07/19 15.07
TITLE STORAGE DEFINITIONS
*
* * STORAGE DEFINITIONS
*
APATT BSSZ 2 REL ADDR OF CM PATTERN AREA
CPATT BSSZ 1 CURRENT PATTERN NUMBER
NPATT BSS 1 TOTAL PATTERNS
PATTERN BSS 5 CURRENT PATTERN
BADDATA BSS 5 FOR DATA THAT WON'7T VERIFY
ECSFWA BSS 2 FWA FOR CURRENT TRANSFER
ECSABS BSS 2 ABS FWA FOR CURRENT TRANSFER
TLCM BSS 1 TRANSFER LENGTH IN CM WORDS
TLPP BSS 1 TRANSFER LENGTH IN PP WORDS
RDDP BSSZ 1 DDP RESERVATION FLAG
CHANNEL BSS 1 DDP CHANNEL NUMBER
WAITCNT BSS 1 RECALL TIMEOUT COUNTER
OFFSET BSS 1 OFFSET TO WORD WITH ERROR
SHIFT VFD 12/60 SHIFT COUNT
MINTL BSS 1 MINIMUM TRANSFER LENGTH
CYCLES BSS 1 MAIN LOOP ITERATIONS
ERRLIM BSS 1 ERROR LIMIT
ESM DATA 0 0 IF ECS MODE, 1 IF ESM MODE
*
* * VARIOUS MESSAGES
*
MSG1A DIS ,*++++ (DDP) EM VERIFY ERROR +++*
MSG1B DIS ,*++++ (DDP) EM PARITY ERROR +++*
MSG1C DIS ,*++++ (DDP) EM READ ABORT +++++*
MSG1D DIS ,*++++ (DDP) EM WRITE ABORT ++++*
MSG1E DIS ,* DDP CHAN ERR C=XX E=XX*
MSG1F DIS ,*++++ (DDP) UNKNOWN ERROR +++++*
MSG2 DIS ,*+*
MSG3 DIS ,*+ CHANNEL 99*
MSG4 DIS ,*+ ABS FWA 99999999*
MSG5 DIS ,*+ LENGTH 9999*
MSG5A DIS ,*+ OFFSET 9999*
MSG6 DIS ,*+ PATTERN 99999999999999999999*
MSG7 DIS ,*+ READ AS 99999999999999999999*
MSG8 DIS ,*++++++++++++++++++++++++++++++*
*
* * THE FOLLOWING MUST IMMEDIATELY PRECEDE THE
* * INITIALIZATION ROUTINE, WHICH WILL BE
* * OVERWRITTEN BY THE EM TRANSFERS
*
ECSBUF EQU *+1 BUFFER FOR EM TRANSFERS
MTLT1 EQU 7000B-ECSBUF
MTLT2 EQU MTLT1/5
ERRNG MTLT2-100B
MTLCM VFD 12/MTLT2 MAX EM TRANSFER IN CM WORDS
* /--- BLOCK INITIAL 00 000 82/07/14 16.20
TITLE INITIALIZATIONS
*
* * VARIOUS INITIALIZATIONS
* *
* * MUST BE AT END OF PP PROGRAM -- WILL LATER
* * BE OVERWRITTEN BY EM TRANSFERS
* *
* * MAY DROP PP DUE TO ILLEGAL AND/OR INCONSISTANT
* * PARAMETERS OR BAD ADDRESSES
* *
* * USES T1, T2, CM - CM+4
* *
* * CALLS WAITREC, ABS, EQN, PLN, DFM
*
INITIAL SUBR
CALL WAITREC
*
* * CHECK IF SYSTEM ORIGIN JOB
*
LDD CP (A) = ADDR OF CP AREA
.NOSV2 IFGE OSLEV,562D NOS V2
ADN JOTW READ JOB ORIGIN TYPE WORD
CRD CM
LDD CM+3 (A) = JOB ORIGIN CODE
.NOSV2 ELSE NOS V1
ADN JNMW
CRD CM
LDD CM+3
LPN 77B (A) = JOB ORIGIN
.NOSV2 ENDIF
LMN SYOT
NJP CALLERR0 --- IF NOT SYSTEM ORIGIN
*
* * CHECK IF JOB HAS EM
*
LDD CP (A) = ADDR OF CP AREA
ADN 5 ADD OFFSET TO FLX IN XJ PACKAGE
CRD CM
LDD CM+1
NJN INIT0 --- JOB HAS EM
LDD CM
LPC 777B
ZJP CALLERR1 --- ERROR IF NO EM
*
* * SAVE FLX TEMPORARILY IN *ECSABS*
*
INIT0 LDD CM+1 (A) = LOWER HALF
STM ECSABS+1
LDD CM (A) = UPPER HALF
LPC 777B LIMIT TO BOTTOM 9 BITS
STM ECSABS
*
* * CHECK IF RUNNING IN ESM MODE.
*
.NOSV2 IFGE OSLEV,578D IF NOS V2
LDK CFGL (A) = WORD WITH EM MODE
.NOSV2 ELSE IF NOS V1
LDN CPUL
.NOSV2 ENDIF
CRD T1
LDD T1+ESMW
SHN 17-ESMB
PJN INIT0.1 IF ECS MODE
AOM ESM SET ESM MODE FLAG
*
* * ADJUST FLX IN (ECSABS) FOR ESM MODE.
*
LDM ECSABS+1
SHN 6
STM ECSABS+1
LPC 770000B
LMM ECSABS
SHN 6
STM ECSABS
* /--- BLOCK INITIAL 00 000 83/08/21 19.36
*
* * GET ADDRESS OF PATTERNS
*
INIT0.1 LDD IR+3
LPN 37B (A) = TOP 6 BITS OF ADDRESS
SHN 12
ADD IR+4 (A) = ADDR OF PATTERNS
STM APATT+1 STORE BOTTOM 12 BITS
SHN -12
STM APATT STORE TOP 6 BITS
SHN 12
ADM APATT+1
CALL ABS CONVERT TO ABS ADDR
ZJP CALLERR2 --- IF BAD ADDR
CRD CM READ NUMBER OF PATTERNS
LDM APATT
SHN 12
ADM APATT+1
ADN 1
ADD CM+1 (A) = ADDR OF LAST PATTERN
CALL ABS CONVERT TO ABS ADDR
ZJP CALLERR3 --- IF BAD ADDR
LDD CM+1 (A) = NUMBER OF PATTERNS
ZJP CALLERR4 --- IF ZERO PATTERNS
STM NPATT
* /--- BLOCK INITIAL 00 000 84/11/14 14.54
*
* * SET MINIMUM AND MAXIMUM TRANSFER LENGTHS
*
LDD CM+2 (A) = MINIMUM TRANSFER LENGTH
ZJN INIT1 --- MAKE 0 LIKE 1
SBN 1
INIT1 STM MINTL
LDD CM+3 (A) = MAXIMUM TRANSFER LENGTH
ZJN INIT2 --- 0 = LARGEST POSSIBLE
LDM MTLCM (A) = ABSOLUTE MAXIMUM
SBD CM+3 CHECK IF TOO LARGE
MJP CALLERR5 --- IF MAXIMUM TOO LARGE
LDD CM+3
STM MTLCM
INIT2 LDM MTLCM
SBM MINTL CHECK MAXIMUM >= MINIMUM
MJP CALLERR6 --- IF MINIMUM > MAXIMUM
*
* * GET NUMBER OF MAIN LOOP ITERATIONS (0 = RUN
* * UNTIL DROPPED)
*
LDD CM+4
STM CYCLES
*
* * GET DDP CHANNEL NUMBER
*
SOD CM (A) = CHANNEL NUMBER OR -1
PJN INIT4 IF CHANNEL SPECIFIED
LDC 2RD1 (A) = DDP EQUIPMENT NAME
CALL EQN
MJP CALLERR7 --- IF NO DDP FOUND
LDD CM
INIT4 STM CHANNEL STORE CHANNEL NUMBER
LDN 13B
SBM CHANNEL
PJP INIT5 --- VALID CHANNEL NUMBER
LDN 17B
SBM CHANNEL
PJP CALLERR8 --- BAD CHANNEL NUMBER
LDN PPUL
CRD CM (CM+2) = NUMBER OF PPUS
LDN 10
SBD CM+2
PJP CALLERR8 --- IF <= 10 PPUS
LDN 33B
SBM CHANNEL
MJP CALLERR8 --- BAD CHANNEL NUMBER
INIT5 LDM CHANNEL
PLANT CHANNEL,C=DDP
* /--- BLOCK INITIAL 00 000 82/07/19 15.44
*
* * GET 2ND WORD OF PARAMETERS
*
LDM APATT
SHN 12
ADM APATT+1
ADN 1
CALL ABS
ZJR DROP
CRD CM (CM - CM+4) = 2ND PARAMS WORD
*
* * SET ERROR LIMIT (0 = NO LIMIT)
*
LDD CM
STM ERRLIM
*
* * GET RELATIVE STARTING EM FWA
*
LDD CM+1 (A) = UPPER HALF
STM ECSFWA
LDD CM+2 (A) = LOWER HALF
STM ECSFWA+1
ADN 1
STD T2
SHN -12
ADD CM+1
STD T1 (T1, T2) = EM FWA + 1
LDM ECSABS CHECK FWA IN RANGE
SBD T1
MJP CALLERR9 --- EM FWA TOO LARGE
NJN INIT6
LDM ECSABS+1
SBD T2
MJP CALLERR9 --- EM FWA TOO LARGE
INIT6 LDM ESM CHECK IF IN ESM MODE
NJP INITIALX IF ESM MODE
LDM INITA MODIFY CODE FOR ECS MODE
STM RVD125
STM RCS95
STM WCS95
LJM INITIALX
INITA UJN 3 MODIFIER FOR ECS MODE
* /--- BLOCK INITIAL 00 000 82/07/14 16.22
*
* * INITIALIZATION ERRORS
*
CALLERR0 CALL DFM,CALLMSG0
RJM DROP
CALLERR1 CALL DFM,CALLMSG1
RJM DROP
CALLERR2 CALL DFM,CALLMSG2
RJM DROP
CALLERR3 CALL DFM,CALLMSG3
RJM DROP
CALLERR4 CALL DFM,CALLMSG4
RJM DROP
CALLERR5 CALL DFM,CALLMSG5
RJM DROP
CALLERR6 CALL DFM,CALLMSG6
RJM DROP
CALLERR7 CALL DFM,CALLMSG7
RJM DROP
CALLERR8 CALL DFM,CALLMSG8
RJM DROP
CALLERR9 CALL DFM,CALLMSG9
RJM DROP
CALLMSG0 DIS ,* NOT SYOT JOB.*
CALLMSG1 DIS ,* JOB HAS NO EM.*
CALLMSG2 DIS ,* BAD PATTERN ADDRESS.*
CALLMSG3 DIS ,* LAST PATTERN ADDR OOR.*
CALLMSG4 DIS ,* ZERO PATTERNS.*
CALLMSG5 DIS ,* MAX TRANSFER TOO LARGE.*
CALLMSG6 DIS ,* MAX TRANSFER LT MIN.*
CALLMSG7 DIS ,* NO EQUIPMENT.*
CALLMSG8 DIS ,* BAD CHANNEL.*
CALLMSG9 DIS ,* RELATIVE FWA OOR.*
*CALL PLAPEQN
*CALL PLAPPLN
C=DDP TABLE CHANNEL
* /--- BLOCK END 00 000 80/01/09 00.27
ERRPL *-7000B
END