%EXTRINSICINTEGER INPTR %EXTRINSICINTEGER OUTPTR %CONSTINTEGER MASK=X'80FC3FFF' %EXTERNALINTEGERFNSPEC HANDKEYS %EXTERNALROUTINESPEC HOOT(%INTEGER NUM) %EXTERNALROUTINESPEC GET PSTB(%INTEGERNAME P0, P1) %EXTERNALROUTINESPEC SUP29 %EXTERNALROUTINESPEC GPC(%RECORDNAME P) %EXTERNALROUTINESPEC SLAVESONOFF(%INTEGER J) %EXTERNALROUTINESPEC PTREC(%RECORDNAME P) %SYSTEMROUTINESPEC MOVE(%INTEGER L, FROMAD, TOAD) %RECORDFORMAT PARMF(%INTEGER DEST, SRCE, P1, P2, P3, P4, P5, %C P6) !* COMMUNICATIONS RECORD FORMAT - EXTANT FROM CHOPSUPE 20A ONWARDS * %RECORDFORMAT COMF(%INTEGER OCPTYPE,IPLDEV,SBLKS,SEPGS,NDISCS, %C DDTADDR,GPCTABSIZE,GPCA,SFCTABSIZE,SFCA,SFCK,DIRSITE, %C DCODEDA,SUPLVN,WASKLOKCORRECT,DATE0,DATE1,DATE2, %C TIME0,TIME1,TIME2,EPAGESIZE,USERS,CATTAD,DQADDR, %C %BYTEINTEGER NSACS,RESV1,SACPORT1,SACPORT0, %C NOCPS,RESV2,OCPPORT1,OCPPORT0, %C %INTEGER ITINT,CONTYPEA,GPCCONFA,FPCCONFA,SFCCONFA, %C BLKADDR,DPTADDR,SMACS,TRANS,%LONGINTEGER KMON, %C %INTEGER DITADDR,SMACPOS,SUPVSN,PSTVA,SECSFRMN,SECSTOCD, %C SYNC1DEST,SYNC2DEST,ASYNCDEST,MAXPROCS,INSPERSEC,ELAPHEAD, %C COMMSRECA,STOREAAD,PROCAAD,SFCCTAD,DRUMTAD,TSLICE,SP0,SP1, %C SP2,SP3,SP4,SP5,SP6,SP7,SP8, %C LSTL,LSTB,PSTL,PSTB,HKEYS,HOOT,SIM,CLKX,CLKY,CLKZ, %C HBIT,SLAVEOFF,INHSSR,SDR1,SDR2,SDR3, %C SDR4,SESR,HOFFBIT,S2,S3,S4,END) ! ! This format describes "The Communication Record" which is kept ! locked in store at Public address X'80C00000'. It is readable at ! all ACR levels but writeable at ACR 1 only. Its purpose is to describe ! the hardware on which the EMAS System is running. Each entry is now ! described in more detail:- ! ! OCPTYPE The 2900 Processor on this configuration as follows ! 1 = 2950 or S1 ! 2 = 2960 or P2 ! 3 = 2970 or P3 ! 4 = 2980 or P4 ! 6 = 2976 or P4/1 ! ! IPLDEV The port/trunk/stream(or DCU/stream) of the ! device used at IPL time.(X'FFF' used for tape IPLS ! SBLKS The no of 128k blocks of main store present ! SEPGS The no of extended pages for paging(ie not including ! any pages occupied by resident code & data). ! NDISCS Then number of EDS drives avaliable ! DDTADDR The address of the Disc Device Table which has NDISC ! entries currently of 88 bytes each. ! GPCTABSIZE The size in bytes of the GPC (or DCU) table ! GPCA The address of the GPC (or DCU) table ! SFCTABSIZE The size of the SFC(ie DRUM) table ! SFCA The address of the SFC table ! SFCK The number of (useable) 1K page frames of Drum store ! available for paging.(0 = No drum configuration) ! DIRSITE The Director site address(eg X200) no longer reqd? ! DCODEDA The Disc Address of the Director (expressed as ! SUPLVN<<24!DIRSITE) ! SUPLVN The logical volume no of the disc from which the ! Sytem was "SLOADED". Various System components (eg ! DIRECT, VOLUMS will page from here ! ! KLOKCORRECT No longer useds ! DATE0} These three integers define the current date(updated at ! DATE1} at 2400) as a character string such that ! DATE2} the length byte is in the bottom of DATE0 ! ! TIME0} These three integers define the clock time as a string ! TIME1} in the same format as for DATE. The time is updated ! TIME2} about every 2 seconds ! ! EPAGESIZE The number of 1K pages combined together to make up ! the logical "Extended Page" used in Emas.Currently=4 ! USERS The number of user processes (foreground+background) ! currently in existence.Includes DIRECT,VOLUMS&SPOOLR ! CATTAD Address of maxcat followed by category table. ! DQADDR The address of a public segment holding the ! header blocks for the disc transfer queues ! NSACS The number of sacs found at grope time ! SACPORT1} Holds the Port no of the Store Access Controller(s) ! SACPORT0} found at grope time. SACPORT0 was used to IPL system. ! NOCPS The number of OCPS found at grope time. ! OCPPORT1} Hold the Port no of the OCPs found at grope time. ! OCPPORT0} OCPPORT0 was used to IPL the system. ! ITINT The Interval Timer interval in microsecs. Varies ! between different members of the range ! CONTYPEA The address of a 31 byte area containing the codes ! of the controllers in port-trunk order. Codes are:- ! 0 = Not relevant to EMAS ! 1 = SFC1 ! 2 = FPC2 ! 3 = GPC1 ! ! GPCCONFA} These three variables each point to a word array ! FPCCONFA} containing controller data. The first word in each ! SFCCONFA} case says how many controllers on the system. The ! remainder have Port&Trunk in top byte and Public ! segment no of comms segment in bottom byte. For GPCS ! the Public Seg no is apparently omitted! ! BLKADDR The address of first element of a word array bounds ! (1:SBLKS) containing the real address of each 128K ! block of main store. Real addresses are in the form ! RSN/SMAC NO/Address in SMAC ! DPTADDR The address of the Disc Property Table. Now not needed ! as the DDT has addresses not offsets for properties ! SMACS A bit mask of SMACS found at Grope time ! 2**0 bit set if SMAC 0 found etc ! TRANS The address of a 512 byte area containing 2 translate ! tables. The first is ISO to EBCDIC the second the ! exact converse ! KMON A 64 bit bitmask controlling monitoring of Kernel ! services. Bit 2**n means monitor service n. Bits can ! be set by Operator command KMON. ! DITADDR Disc index table address. The address of first ! element of an array(1:NDISCS) containing the address ! of the disc device entries. Needed for S series and ! provided for compatablity on P series ! SMACPOS The no of places that the Smac no must be left ! shifted to be in the right position to access ! a Smac image store location. Incredibly this varies ! between the 2980 and others!! ! SUPVSN The Supervisor id no as a three char string eg 22A ! PSTVA The virtual address of the Public Segment table which ! is itself a Public segment. All other information ! about PST can be found by looking at its own PST entry ! SECSFRMN The no of Seconds since midnight. Updated as for TIME ! SECSTOCD The number of seconds to System closedown if positive ! If zero or negative no close down time has yet been ! notified. Updated as for TIME ! SYNC1DEST} These are the service nos N2,N3 & N4 for process ! SYNC2DEST} parameter passing described in Supervisor Note 1 ! ASYNCDEST} ! MAXPROCS The maximum number of paged processes that the ! Supervisor is configured to run. Also the size ! of the Process array. ! INSPERSECS The number of instructions the OCP executes in 1 ! second divided by 1000(Approx average for EMAS) ! ELAPHEAD The head of a linked list of param cells holding ! service with an elapsed interval interrupt request ! outstanding ! COMMSRECA The address of an area containing details of the ! Communication streams.(private to COMMS Control) ! STOREAAD The address of first element of the store record array ! bounds (0:SEPGS-1) ! PROCAAD The address of first element of the process record ! array bounds(0:MAXPROCS) ! SFCCTAB} The addresses of two private tables provided by grope ! DRUMTAD} for use by the routine DRUM. They give details of ! the SFCS and DRUMS found on the system ! TSLICE Time slice in microsecs. Supervisor has to allow for ! differences in interval timer speeds accross the range ! SP0->SP8 Spare locations ! LSTL} ! LSTB} ! PSTL} ! PSTB} These are the image store addresses for the following ! HKEYS} control registers:- ! HOOT} Local Segment Table Limit & Base ! SIM } Public Segment Table Limit & Base ! CLKX} Handkeys,Hooter System Interrupt Mask Register ! CLKY} and the clock X,Y & Z Registers ! CLKZ} ! HBIT A bit pattern that when ORed into Control Register ! "HOOT" operates the Hooter.(0=Hooterless machine) ! SLAVEOFF A bit pattern (top 16 bits) and Image store address ! in bottom 16 bits. ORing the top 16 bits(after ! shifting) into the image store will stop all slaving of ! operands but not instructions ! INHSSR A bit pattern and image location as for SLAVEOFF. ! ORing the bits into the location will switch off ! reporting of successful system retry ! SDR1} ! SDR2} The image store addresses of SMAC internal registers ! SDR3} needed by the Engineers after Smac errors have ! SDR4} occurred ! SESR} ! HOFFBIT A bit pattern that when ORed into a Smac Engineers ! status register will stop reporting of error ! from that Smac %OWNRECORDNAME COM(COMF) !------------------------------------------------------------------------ %RECORDFORMAT ENTFORM(%INTEGER SER, PTSM, PROPADDR, %C TICKS SINCE, CAA, GRCB AD, LBA, ALA, STATE, RESP0, %C RESP1, SENSE1, SENSE2, SENSE3, SENSE4, REPSNO, BASE, %C ID, DLVN, MNEMONIC, ENTSIZE, PAW, USAW0, URCB AD, %C SENSDAT AD, LOGMASK, TRTAB AD, UA SIZE, UA AD, %C TIMEOUT, PROPS0, PROPS1) %OWNINTEGERARRAYFORMAT BF(0:63) !---------------------------------------------------------------- %ROUTINE RESTART %ROUTINESPEC DOWAIT(%INTEGER MASK) %RECORD Q, P(PARMF) %RECORDFORMAT RQBF(%INTEGER LFLAG, LSTBA, LBL, LBA, ALL, ALA, %C INIT) %RECORDFORMAT STRMF(%INTEGER SAW0, SAW1, RESP0, RESP1) %RECORDFORMAT CAF(%INTEGER MARK, PAW, PIW0, PIW1, CSAW0, CSAW1 %C , CRESP0, CRESP1, %RECORDARRAY STRMS(0:15)(STRMF)) %RECORDFORMAT SEG10F(%INTEGER SYSERRP,STACK,LSTL,LSTB,PSTL,PSTB, %C HKEYS,INPTR,OUTPTR,BUFFLASTBYTE,OLDSE,OLDST,OLDLSTL,OLDLSTB,SBLKS, %C %INTEGERARRAY BLOCKAD(0:63),%INTEGER PASL,KQ,RQ1,RQ2, %C %LONGINTEGER SA,PARM,PARML) %RECORDNAME SEG10(SEG10F) %RECORDNAME DEV(ENTFORM) %RECORDNAME CA(CAF) %RECORDNAME RQB(RQBF) %INTEGERNAME LBE, ALE1, ALE2 %INTEGERARRAYNAME BLOCKAD %EXTRINSICINTEGER PARMASL, KERNELQ, RUNQ1, RUNQ2 %RECORDFORMAT SERVAF(%INTEGER P, C) %EXTRINSICRECORDARRAY SERVA(0:576)(SERVAF) %EXTRINSICLONGINTEGER PARMDES %LONGINTEGER TEMP %INTEGER PTSM, I, J, STRM, RESP0, RESP1 %INTEGER SMARK, SENSE1, SENSE2, SENSE3, SENSE4, SRESP SLAVESONOFF(0) P=0 ! ! SEG 10 (WHICH MUST BE IN SMAC0-BLOCK0) IS USED AT FAILURE TO PASS ! INFO TO THE DUMP PROGRAM. FIRST 4 WORDS ARE SET UP BY SYSTEM ! ERROR ROUTINE (WHERE APPROPIATE) ! SEG10==RECORD(X'80280000') %CYCLE I=0,4,8 J=INTEGER(ADDR(COM_PSTL)+I) *LB_J; *LSS_(0+%B); *ST_J INTEGER(X'81000000'+I)=J INTEGER(X'80280010'+I)=J %REPEAT SEG10_INPTR=INPTR; ! FOR THE PRINTER BUFFER SEG10_OUTPTR=OUTPTR SEG10_BUFFLASTBYTE=MASK SEG10_SBLKS=COM_SBLKS BLOCKAD==ARRAY(COM_BLKADDR,BF) %CYCLE I=0,1,SEG10_SBLKS-1 SEG10_BLOCKAD(I)=BLOCKAD(I) %REPEAT SEG10_PASL=PARMASL SEG10_KQ=KERNELQ SEG10_RQ1=RUNQ1 SEG10_RQ2=RUNQ2 *LSD_SERVA; *ST_TEMP; SEG10_SA=TEMP SEG10_PARM=PARMDES SEG10_PARML=0 PTSM=HANDKEYS&X'FFFF' ! ! ALLOCATE TAPE DECK USING EMERGENCY ALLOCATE (ACT=8) ! Q=0 Q_DEST=8; Q_P1=PTSM Q_SRCE=X'80360000' GPC(Q) %IF Q_P1#0 %THEN %START PTREC(Q) NEWLINE HOOT(4) *IDLE_X'12121' %FINISH DEV==RECORD(Q_P3) CA==RECORD(DEV_CAA) RQB==RECORD(DEV_GRCB AD) CA_MARK=-1 LBE==INTEGER(RQB_LBA) ALE1==INTEGER(RQB_ALA) ALE2==INTEGER(RQB_ALA+4) RQB_LFLAG=1<<18!X'C000'; ! LST 1 SEG,NOTE MECH NO,ACR=0 ! AND TRUSTED CHAIN RQB_LSTBA=X'8080' RQB_LBL=4; RQB_ALL=8 RQB_INIT=(PTSM&15)<<24!X'FC03'; ! STATUS MASK&1600BPI STRM=PTSM>>4&15 ALE1=X'58001000' ALE2=X'81000000' ! ! RECONNECT THE STREAM IN CASE . KY SAYS THIS DOES NO HARM ! LBE=X'00F10800'; ! CONNECT STREAM IF NEC DOWAIT(X'C00000') LBE=X'80F03800'; ! REWIND ! ! SKIP BACK TO BT ! DOWAIT(X'C00000'); ! WAIT FOR TERM(=REWND STARTS) ! IF OK WAIT FOR ATTN ELSE SENSE %IF RESP0&X'800000'#0 %THEN DOWAIT(X'80100000') %ELSE %START SMARK=X'F1F1F1F1'; ! JUST A DUMP MARKER SRESP=0 ALE1=X'5800000D' ALE2=ADDR(SENSE1) LBE=X'80F00400' DOWAIT(X'C00000'); ! WAIT FOR SENSE TERM. SRESP=RESP0; ! REMEMBER RESULT ALE1=X'58001000'; ! RESET ALE ALE2=X'81000000' %FINISH %CYCLE I=1,1,500*COM_INSPERSEC %REPEAT; ! WAIT ABOUT 1 SEC WITHOUT USING ! RTC WHICH COULD BE DOWN(IN DUALS) ! ! NOW SKIP FORWARD 1 BLOCK ! LBE=X'80F04200' DOWAIT(X'C00000') ! ! NOW WRITE 1 TAPE MARK ! LBE=X'80F02300' DOWAIT(X'C00000') ! ! NOW DUMP STORE AS 4K BLOCKS ! LBE=X'80C00300' %CYCLE I=0,1,SEG10_SBLKS-1 %CYCLE J=0,4096,31*4096 ALE2=X'81000000'+SEG10_BLOCKAD(I)+J DOWAIT(X'C00000') %REPEAT %REPEAT ! ! WRITE 2 TAPE MARKS ! LBE=X'80F02300' DOWAIT(X'C00000') DOWAIT(X'C00000') ! ! ! REWWIND TO BT ! LBE=X'80F03800' DOWAIT(X'C00000') HOOT(40) *IDLE_X'E00E' ! %ROUTINE DOWAIT(%INTEGER MASK) !*********************************************************************** !* FIRES AN I-O OPERATION AND WAITS FOR THE REPLY. ANY ATTENTIONS * !* ARE THROWN AWAY. RESPONSE WORDS ARE LEFT IN GLOBALS * !*********************************************************************** %INTEGER CHISA %RECORDNAME STRMS(STRMF) STRMS==CA_STRMS(STRM) %IF MASK<0 %THEN MASK=MASK&X'7FFFFFFF' %AND ->AGN WAIT: *LXN_CA+4; *INCT_(%XNB+0) *JCC_8, %CYCLE CHISA=1,1,50 %REPEAT ->WAIT ON: CA_PAW=1<<24!STRM; ! DO STREAM REQUEST CA_PIW0=0 STRMS_SAW0=1<<28!32; ! CLEAR ABNORMAL TERMINATION STRMS_SAW1=ADDR(RQB) STRMS_RESP0=0 STRMS_RESP1=0 CA_MARK=-1 CHISA=X'40000800'!(PTSM>>8<<16) *LB_CHISA; *LSS_1; *ST_(0+%B); ! SEND CHANNEL FLAG ! AGN: %UNTIL STRMS_RESP0#0 %AND CA_MARK=-1 %CYCLE %REPEAT ! GET: *LXN_CA+4; *INCT_(%XNB+0); *JCC_7, RESP0=STRMS_RESP0 RESP1=STRMS_RESP1 STRMS_RESP0=0 STRMS_RESP1=0 CA_PIW0=0 CA_MARK=-1 ->AGN %UNLESS RESP0&MASK#0; ! NORMAL OR ABNORML SET %END %END; ! RESTART ! !------------------------------------------------------------------ %EXTERNALROUTINE ENTER(%INTEGER A, B) !*********************************************************************** !* THIS ROUTINE IS ENTERED FROM THE BOOT LOADER BY ACTIVATE * !* THE PARAMETERS A AND B ARE NO LONGER USED * !*********************************************************************** %RECORDFORMAT REGF(%INTEGER LNB, PSR, PC, SSR, SF, IT, IC, LTB) %RECORDNAME R(REGF) %INTEGER SSNP1ADDR, PB0, PB1, THIS LNB, THIS SF, REACT PC, CURSTKAD %CONSTINTEGER RESSTKAD=X'80180000' %CONSTINTEGER REACTAD=X'81000080'; ! ADDRESS OF REGS FOR ACTIVATE *STLN_THIS LNB COM==RECORD(X'80C00000'); ! FOR ALL RTS IN THIS FILE ! ! COPY WORDS FROM ALTERNATE STACK SEGMENT TO RA WORD 32(DEC) IE. X80 BYTES ! WORK OUT ALT STACK SEG FROM CURRENT STACK FRONT ! *STSF_THIS SF CURSTKAD=THIS SF&X'FFFC0000' SSNP1ADDR=CURSTKAD!X'00040000' ! ! COPY SUFFICIENT OF CURRENT STACK TO THE RESTART STACK (PUBLIC 6) TO ! ALLOW 'RESTART' TO BE CALLED ON IT. ! MOVE(THIS SF&X'3FFFF',CURSTKAD,RESSTKAD) ! ! NOW SET UP RE-ACTIVATION WORDS FOR RE-ENTRY BELOW ! *JLK_ *LSS_%TOS *ST_REACT PC R==RECORD(REACTAD) R_LNB=RESSTKAD!(THIS LNB&X'3FFFF') R_PSR=X'0014FF01' R_PC=REACT PC R_SSR=X'FFE'; ! VA MODE ALL MASKED EXCEPT SYSTEM ERROR R_SF=RESSTKAD!(THIS SF&X'3FFFF') GET PSTB(PB0,PB1) INTEGER(REACTAD+X'48')=PB0 INTEGER(REACTAD+X'4C')=PB1 MOVE(80,REACTAD,RESSTKAD+X'40000'); ! SECOND COPY IN NEXT SEG. %IF COM_OCP TYPE>=4 %AND COM_SMACS&2#0 %START LONGINTEGER(X'81400000')=LONGINTEGER(REACTAD+X'48') ! PSTB TO SMAC1 FOR P4 HARDWARE %FINISH SUP29 *IDLE_X'F003' ELAB: ! *JLK_%TOS ! RE-ENTRY HERE FOR POST MORTEM RESTART *IDLE_X'F003' ! SHOULD NOT RETURN ! %END; ! ENTER ! ! %ENDOFFILE