CLD * /--- FILE TYPE = E * /--- BLOCK CLD 00 000 78/02/06 11.43 IDENT CLD,CLD * CZZ TITLE CLD--PLATO IV COMMUNICATION LINK DRIVER PERIPH SST FNTL COMMENT LINK DRIVER * *CALL COMPMAC *CALL PTEXT *CALL PLAP501 * *CALL AIDTEXT QUAL CPS *CALL COMSCPS QUAL * PORT MACRO P1 LOCAL N,N1 N VFD 12/7700B+C=CH IFEO IFC EQ,*P1*EVEN* N1 VFD 12/5100B+E=CH CHAN E=CH,N1 IFEO ELSE N1 VFD 12/5101B+O=CH CHAN O=CH,N1 IFEO ENDIF CHAN C=CH,N ENDM * /--- BLOCK DIRECT 00 000 76/05/13 14.53 TITLE DIRECT CELL ASSIGNMENTS ************************************************************************ T0 EQU 0 * * T1 EQU 1 * * T2 EQU 2 * * T3 EQU 3 * TEMPORARY STORAGE * T4 EQU 4 * * T5 EQU 5 * * T6 EQU 6 * * T7 EQU 7 * * CM EQU 10B CM WORD BUFFER(5 WORDS) * LA EQU 15B PP PACKAGE LOAD ADDRESS * T8 EQU 16B TEMPORARY STORAGE * T9 EQU 17B TEMPORARY STORAGE * FUNC EQU 20B CURRENT REQUEST FUNCTION. * CHAR EQU 21B LAST CHARACTER INPUT * NC EQU 22B NUMBER OF TIMES TO CHECK FOR * CHARACTER READY. TI EQU 23B COUNTER SET IN PAUSE SO THAT * WE DO NOT LOOP TO LONG IN * CHARARCTER STATUS ROUTINES * WITHOUT CHECKING FOR STORAGE * RELOCATION. NAKFLAG EQU 24B 0=LAST BLOCK RECEIVED OKAY * 1=ERROR IN LAST BLOCK LT EQU 25B NUMBER CM WORDS IN LAST * LINKCTL COMMAND. DL EQU 26B NUMBER OF CM DATA WORDS IN * COMMUNICATION BUFFER. D0 EQU 27B TEMPORARY STORAGE * KEY EQU 30B POINTER TO NEXT KEY TO SEND * WHEN IN TERMINAL MODE. FRAME EQU 31B POINTER TO NEXT FRAME TO SEND * WHEN IN TERMINAL MODE MODE EQU 32B =0 FOR FILE TRANSFER MODE * =1 FOR TERMINAL MODE RESEND EQU 33B NUMBER OF TIMES A MESSAGE HAS * BEEN RESENT. TT EQU 34B TEMPORARY STORAGE * SC EQU 35B SYNC CODE COUNTER * OC EQU 36B OUTPUT CHARACTER * * /--- BLOCK DIRECT 00 000 78/01/05 09.02 ULP EQU 37B UPPER-LOWER POINTER FOR PACKING * ULU EQU 40B UPPER-LOWER POINTER FOR * UNPACKING. WP EQU 41B PPU WORD CURRENTLY BEING PACKED * WU EQU 42B PPU WORD CURRENTLY BEING * UNPACKED. NW EQU 43B NUMBER OF PPU WORDS IN THIS * MESSAGE. CKO EQU 44B LONGITUDINAL PARITY WORD FOR * OUTPUT DATA. CKI EQU 45B LONGITUDINAL PARITY WORD FOR * INPUT DATA. FRCHK EQU 46B TIME OUT COUNTER FOR READING * FRAMAT STATUS WORD SENDI EQU 47B SEND KEY INDEX * EOD,EOB, OR EOF. IR EQU 50B INPUT REGISTER(5 WORDS) * RA EQU 55B REFERENCE ADDRESS/100 * FL EQU 56B FIELD LENGTH/100 * ECS EQU 60B POINTER TO ECS ADDRESS FOR * READ AND WRITE ECS ROUTINES STATION EQU 61B STATION NUMBER OF LINKCTL * BADC EQU 62B CONSECUTIVE BAD CHAR. COUNT. * ECSOFF EQU 63B OFFSET TO BE ADDED TO BASE * ECS ADDRESS TIME EQU 64B TIME-OUT COUNTER FOR TERMINAL * MODE, NO CHAR. READY STATUS. PS EQU 65B HARDWARE STATUS * TMSTAT EQU 66B TERMINAL MODE STATION * CLK EQU 67B LAST CLOCK TIME * ON EQU 70B CONSTANT 1 * HN EQU 71B CONSTANT 100 * TH EQU 72B CONSTANT 1000 * TR EQU 73B CONSTANT 3 * CP EQU 74B CONTROL POINT ADDRESS * IA EQU 75B INPUT REGISTER ADDRESS * OA EQU 76B OUTPUT REGISTER ADDRESS * MA EQU 77B MESSAGE BUFFER ADDRESS * /--- BLOCK MAIN LOOP 00 000 78/05/11 21.44 TITLE MAIN PROCESSING LOOP ORG PPFW * CLD BSS 0 CZZ * * * * PERFORM INITIALIZATIONS * RJM INITIAL CALL PARGEN GENERATE PARITY TABLE * * * * CHECK TO SEE IF IT IS NECESSARY TO PAUSE * FOR STORAGE RELOCATION. * MAIN BSS 0 RJM PAUSE CHECK FOR PAUSE CONDITIONS * * * * PROCESS ANY 3266 INPUT CALL LOOPCHK * * * * CHECK FOR DROP SIGNAL FROM PLATO LESSON * CALL DROPCHK * * * * CHECK FOR REQUEST PENDING * ON RETURN IF -A- IS ZERO NO NEW REQUEST * RJM READSW ZJN MAIN NO NEW REQUEST STD LT SAVE LENGTH OF NEW REQUEST * * * * READ REQUEST FROM CM TO -IBF- * RJM READ * * * * PROCESS NEW REQUEST * RJM PROC * * * * WAIT FOR NEW REQUEST * UJN MAIN * TITLE PROCESS REQUEST * * * PROC * * THIS ROUTINE DETERMINES WHAT FUNCTION IS BEING * REQUESTED AND JUMPS TO THE CORRECT ROUTINE TO * PROCESS IT. IF AN ILLEGAL FUNCTION CODE IS * RECEIVED AN ERROR CODE IS PLACED INTO THE * RESPONSE AND THE REQUEST IS MARKED DONE. * PROC SUBR * * * * ISOLATE FUNCTION CODE * LDM IBF+RFUNC STD FUNC * * * * CHECK FOR LEGAL FUNCTION * SBN FLST SUBTRACT HIGHEST LEGAL CODE+1 PJN PRERR JUMP IF OUT OF RANGE * * * * JUMP TO PROCESS * PROCE BSS 0 LDM PTABLE,FUNC STD D0 LJM 0,D0 * * * * JUMP TABLE FOR FUNCTION CODE PROCESSING * PTABLE BSS 0 VFD 12/STUP 00 CHECK FOR STARTUP VFD 12/PRES 01 RESERVE LINK VFD 12/MESSIO 02 SEND AND RECEIVE MESSAGE VFD 12/PREL 03 RELEASE LINK VFD 12/STCOMD 04 RETURN 311 STATUS VFD 12/STATS 05 RETURN DRIVER STATISTICS VFD 12/TEST 06 RUN SPECIAL ROUTINE VFD 12/LTLINK 07 LOCAL TERMINAL MODE DRIVER VFD 12/RTLINK 10 REMOTE TERMINAL MODE DRIVER VFD 12/PRERR VFD 12/TLOP 12 LOOP BACK TEST FLST EQU *-PTABLE * * * * ERROR--ILLEGAL FUNCTION CODE * PRERR BSS 0 CALL SERROR,SIFC * /--- BLOCK PRES 00 000 77/10/01 00.02 TITLE RESERVE LINK * * *PRES * * THIS ROUTINE ATTEMPTS TO RESERVE THE LOCAL * AND REMOTE COMMUNICATION EQUIPMENT. * PRES BSS 0 * * * * GET AND SAVE LINKCTL STATION NUMBER * LDM IHDR+STNO STD STATION * * * * SAVE PLATO*S ECS RA LDM XECU STM ECU LDM XECL STM ECL * * * * IS LINK ALREADY IN SYNC * LDM SFLAG NJP MESSIO JUMP IF YES * * * * RESERVE LOCAL EQUIPMENT FIRST. * RJM LRES * * * * SETUP 6681 * PRES0 BSS 0 RJM SELDC * * * * WAIT FOR SYNCHRONIZATION TO BE ESTABLISHED * CALL SEST,2400 * * * * SEND START-UP MESSAGE * LJM MESSIO * /--- BLOCK LRES 00 000 77/08/29 15.39 TITLE RESERVE LOCAL EQUIPMENT AND CHANNEL * * *LRES * * THIS ROUTINE ATTEMPTS TO RESERVE THE COMMUNICATION * LINK BY RESERVING EQUIPMENT -CL- AND CHANNEL * -CH-. * LRES SUBR * * * * DO NOT RESERVE EQUIPMENT IF ALREADY RESERVED LDC ALSEVEN SBM CLEQ NJN LRESX IF EQUIPMENT ALREADY RESERVED * * * * FIND EQUIPMENT ORDINAL AND CHANNEL NUMBER. LDC 2RCL CALL EQN MJP LRES1 JUMP IF EQUIP NOT AVAILABLE STD CM+1 SAVE EQUIPMENT ORDINAL LDD CM GET CHANNEL NUMBER STD TT SAVE IT. * * * * RESERVE CHANNEL AND EQUIPMENT MONITOR REQM RESERVE EQUIPMENT LDD CM+1 READ REPLY ZJP LRES1 JUMP IF EQUIP ALREADY RESERVED STM CLEQ SAVE ORDINAL * LDD TT GET CHANNEL NO. RCHAN LDD CM+1 CHECK MONITOR REPLY ZJP LRES2 JUMP CHANNEL NOT AVAILABLE STM CLCH SAVE CHANNEL NUMBER * * * * PLUG CHANNEL AND PORT NUMBERS PLANT CHANNEL,C=CH PLUG CHANNEL NUMBER. LDM XPORTCH GET 311 CHANNEL NUMBER PLANT CHANNEL,E=CH PLUG CHANNEL NUMBER. LDM XPORTCH ADN 1 MAKE ODD CHANNEL NUMBER PLANT CHANNEL,O=CH PLUG ODD CHANNEL. LJM LRESX * * * * ERROR--EQUIPMENT ALREADY RESERVED LRES1 BSS 0 CALL SERROR,SENA * * * * ERROR--CHANNEL ALREADY RESERVED LRES2 BSS 0 CALL SERROR,SCNA * /--- BLOCK LREL 00 000 77/08/29 15.40 TITLE RELEASE LOCAL EQUIPMENT AND CHANNEL * * *LREL * * THIS ROUTINE RELEASES THE RESERVE ON THE LOCAL * COMMUNICATION LINK EQUIPMENT -CL- AND THE * ASSOCIATED CHANNEL(C=CH) IF IN FACT THEY HAVE * BEEN RESERVED. * LREL SUBR * * * * HAS -CL- BEEN RESERVED LDC ALSEVEN SBM CLEQ ZJN LREL1 JUMP IF NOT * * * * RELEASE EQUIPMENT LDM CLEQ GET EST ORDINAL OF -CL- STD CM+1 MONITOR DEQM RELEASE THE EQUIPMENT * * * * CHECK IF CHANNEL HAS BEEN RESERVED LREL1 BSS 0 LDC ALSEVEN SBM CLCH CHECK CHANNEL FLAG ZJN LREL2 IF ALL SEVENS CHANNEL HAS NOT * YET BEEN RESERVED * * * * RELEASE CHANNEL LDM CLCH DCHAN * * * * SET INDICATORS SHOW NO EQUIPMENT RESERVED LREL2 BSS 0 LDC ALSEVEN STM CLEQ STM CLCH UJN LRELX * /--- BLOCK STARTUP 00 000 78/03/30 10.23 TITLE REMOTE STARTUP * * * STUP * * CHECK TO SEE IF REMOTE SITE IS REQUESTING * USE OF LINK. IF SO SEND ACKNOWLEDGE AND * INFORM LINKCTL. * STUP BSS 0 * * * * GET AND SAVE LINKCTL STATION NUMBER * LDM IHDR+STNO STD STATION * * * * SAVE PLATO*S ECS RA LDM XECU STM ECU LDM XECL STM ECL * * * * IS LINK ALREADY IN SYNC * LDM SFLAG NJP STUP1 JUMP IF YES * * * * RESERVE LOCAL EQUIPMENT * RJM LRES * * * * SET UP 6681 * RJM SELDC * * * * ESTABLISH SYNCHRONIZATION * CALL SEST,750 * * * * SET SYNC CODE COUNTER TO ZERO * STUP1 BSS 0 LDN 0 STD SC * * * * CHECK FOR MESSAGE. * CALL MESSIN * * * * RECEIVED STARTUP MESSAGE INFORM LINKCTL. * CALL WRITE LJM PROCX TITLE SEND AND RECEIVE A MESSAGE * * * MESSIO * * SEND MESSAGE TO REMOTE SITE AND WAIT FOR * A RETURNING MESSAGE. * MESSIO BSS 0 * * * * MAKE SURE REMOTE STILL IN TOUCH * CALL SEST,2 * * * * OUTPUT MESSAGE * CALL MESSOUT * * * * WAIT FOR RESPONSE * CALL MESSIN * * * * SEND MESSAGE TO LINKCTL * CALL WRITE LJM PROCX * /--- BLOCK REL/STATUS 00 000 77/10/02 22.39 TITLE DE-ESTABLISH LINK * * *PREL * * RELEASE REMOTE AND LOCAL COMMUNICATION EQUIPMENT. * PREL BSS 0 * * * * MAKE SURE REMOTE IS STILL IN TOUCH * CALL SEST,2 * * * * SEND EOT MESSAGE TO REMOTE SITE * CALL MESSOUT * * * * INFORM -LINKCTL- THAT THE REQUEST IS COMPLETE * RJM WRITE LJM PROCX WAIT FOR NEXT COMMAND SPACE 2 * * * STCOMD * * THIS ROUTINE INPUTS THE STATUS FROM BOTH THE ODD * AND EVEN CHANNELS AND RETURNS IT TO -LINKCTL-. * STCOMD BSS 0 LDM IHDR+STNO STD STATION * * * * RESERVE EQUIPMENT AND CHANNEL * RJM LRES RJM SELDC * * * * GET ODD CHANNEL STATUS * CALL ICHR2 STM OBF+RSTA SAVE FOR THE RESPNSE * * * * GET EVEN CHANNEL STATUS * RJM ICHR STM OBF+RSTA1 PUT INTO RESPONSE * * * * SEND RESPONSE TO LINKCTL * RJM WRITE LJM PROCX WAIT FOR NEXT COMMAND EJECT * * * * STATS * * THIS ROUTINE PASSES ALL STATISTICS CELLS * TO -LINKCTL-. * STATS SUBR * * * * MOVE STATISTICS CELLS TO COMMUNICATION BUFFER * LDM PECNT STM DSTATS LDM BDCNT STM DSTATS+4 LDM LPCNT STM DSTATS+9 LDM SCCNT STM DSTATS+14 LDM BCCNT STM DSTATS+19 LDN 0 STM PECNT STM BDCNT STM LPCNT STM SCCNT STM BCCNT * * * * SET NUMBER OF WORDS USED IN DATA SECTION * OF COMMUNICATION BUFFER * LDN 6 STD DL * * * * SEND RESPONSE * RJM WRITE LJM PROCX WAIT FOR NEXT COMMAND * TITLE SPECIAL ROUTINES * * * SPEC * * FUNCTION CODE RESERVED FOR SPECIAL FUNCTIONS * SPEC BSS 0 * * * * SEND RESPONSE RJM WRITE LJM PROCX WAIT FOR NEXT COMMAND * /--- BLOCK TLOP 00 000 77/09/22 00.37 TITLE LOOPBACK TEST * * * TLOP * * TEST LOOP BACK TO MAKE SURE DATA IS BEING SENT * AND RECEIVE AT THIS SITE PROPERLY, ALSO CHECKS * TELEPHONE EQUIPMENT. * TLOP BSS 0 LDM IHDR+STNO STD STATION * * * * RESERVE LOCAL EQUIPMENT RJM LRES * * * * SETUP 6681 RJM SELDC * * * * ESTABLISH SYNCHRONIZATION CALL SEST,100 * * * * SET TO OUTPUT 100 CHARACTERS OF DATA LDC 99 STD SC * * * * WAIT FOR CHARACTER READY OR CHARACTER REQUEST NTL1 BSS 0 CALL WCR,MCRQ+MCRD SHN 6 MJN NTL2 JUMP IF CHARACTER READY * * * * OUTPUT A CHARACTER LDM XPATTRN CALL PUTCHR UJN NTL1 * * * * SAVE INPUT CHARACTER IN DATA BUFFER FOR LINKCTL NTL2 BSS 0 LDD CHAR STM DBUFF,SC * * * * INFINITE LOOP OR ONLY A HUNDRED LDM XLOOPS NJP NTL1 JUMP IF INFINITE LOOP * * * * HAVE 100 CHARACTERS BEEN OUTPUT SOD SC PJN NTL1 JUMP IF NOT * * * * SET TO PASS ALL INPUT TO LINKCTL LDN 21 STD DL * * * * SEND RESPONSE RJM WRITE LJM PROCX WAIT FOR NEXT COMMAND * /--- BLOCK TEST 00 000 78/01/04 10.52 * * * SPECIAL TEST ROUTINES * EJECT TEST BSS 0 LJM PROCX WAIT FOR NEXT COMMAND * /--- BLOCK LTLINK 00 000 78/01/05 09.03 TITLE LOCAL TERMINAL MODE DRIVER * * * LTLINK * * THIS ROUTINE COMMUNICATES WITH PLATO AT THE SYSTEM * LOCAL TO THE TERMINAL. ITS JOB IS TO GET * KEYS FROM PLATO AND SEND THEM OVER THE LINK TO THE * REMOTE SYSTEM, WHILE AT THE SAME TIME ACCEPTING * FRAMES FROM THE LINK AND PUTTING THEM INTO * FRAMERS LINK BUFFER. * LTLINK BSS 0 * * * * SET MASKS IN -TMIN- AND -TMOUT- LDN 1 STM TOMK SET TO 1, FOR KEY OUTPUT LDN 3 STM TIMK SET TO 3, FOR FRAME INPUT * * * * DO INITIALIZATIONS CALL TMSTART * * * * CHECK IF TIME TO SEND KEY OR GET FRAME LT0 BSS 0 CALL CLOCK,7 NJN LT1 * * * * TALK TO PLATO THROUGH ECS CALL SENDFRM SEND FRAME TO PLATO CALL LCHK SERVICE COMMUNICATION EQUIP. CALL GETKEY CHECK FOR KEY INPUT CALL FRMOVE READY ANOTHER FRAME IF ONE. LT1 BSS 0 CALL LCHK SERVICE COMMUNICATION EQUIP. * * * * IS IT TIME TO CHECK FRAMAT STATUS SOD FRCHK NJP LT0 * * * * CHECK FOR FRAMAT RE-INITIALIZING CALL FRMCHK UJP LT0 * /--- BLOCK LCHK 00 000 84/11/15 11.33 TITLE TERMINAL MODE IO * * * LCHK * * 'CHECK COMMUNICATION EQUIPMENT TO SEE IF INPUT * WAITING OR READY TO SEND OUTPUT. * LCHK SUBR * * * * CHECK FOR CHARACTER READY OR CHARACTER REQUEST CALL WCR,MCRD+MCRQ ZJN LCHKX IF NEITHER STATUS APPEARED SHN 6 PJN LCHK1 JUMP IF CHARACTER REQUEST * * * * CHECK FOR BUFFER OVERFLOW LDD ULP NEXT *IN* POINTER ADN CHPF CHARACTERS PER FRAME SBD FRAME NEXT *OUT* POINTER LPC TMASK KEEP IN RANGE ZJP OVERFLOW * * * * CHARACTER READY STATUS - PROCESS INPUT CALL TMIN MJN LCHKX IF ONLY SYNC CHARACTER * * * * MOVE FRAME TO -FRBUFF- IF NECESSARY OR POSSIBLE LDM FRBUFF NJN LCHKX IF ALREADY FILLED CALL FRMOVE READY NEXT FRAME LCHK2 UJN LCHKX * * * * CHECK CHARACTER IN TIME OUT LCHK1 BSS 0 AOD TIME BUMP TIME OUT COUNTER ADC -ALSEVEN CHECK VALUE OF COUNTER ZJP LOSTC JUMP IF TIMED OUT * * * * DO WE HAVE OUTPUT TO SEND LDD KEY SBD ULU ZJN LCHK2 IF NO OUTPUT * * * * SEND KEY TO REMOTE SYSTEM CALL TMOUT UJN LCHK2 * * * * INCREMENT OVERFLOW COUNTER OVERFLOW BSS 0 AOM OVER LOADCM COMBF ADN 3 CWM OVER,ON UJN LCHK2 * * OVER BSSZ 1 DIS ,*OVERFLOW* * /--- BLOCK GETKEY 00 000 77/10/02 23.04 TITLE GET KEY FROM ECS KEY BUFFER * * * GETKEY * * THE KEY BUFFER CORRESPONDING TO THE TERMINAL * MODE STATION (TMSTAT) IS CHECK. 'IF A NEW * KEY IS PRESENT IT IS MOVED TO THE LINK OUTPUT * BUFFER AND THE CPU INDEX IS INCREMENTED BY * ONE. THE SECOND WORD OF THE KEY BUFFER IS THEN * WRITTEN BACK TO ECS TO UPDATE THE CPU INDEX. * * FORMAT OF KEY BUFFER'; * / KEY / KEY / KEY / KEY / PPU INDEX / * / PRESS AND TIMING KEYS / CPU INDEX / * GETKEY SUBR * * * * CALCULATE OFFSET TO LINK STATIONS KEY BUFFER LDD TMSTAT SHN 1 TWO WORDS PER STATION STD ECSOFF * * * * READ THE KEY BUFFER FROM ECS LDN 2 STD ECS NUMBER OF CM WORDS TO READ CALL READECS,PKEYECS * * * * ARE THERE ANY NEW KEYS LDM LKBUF+4 PPU INDEX (INPUT PTR) SBM LKBUF+9 CPU INDEX (OUTPUT PTR) ZJN GETKEYX IF NO NEW KEYS * * * * SERVICE COMMUNICATION EQUIPMENT CALL LCHK * * * * INCREMENT CPU INDEX AND LOCATE NEXT KEY AOM LKBUF+9 LPN 3 MASK INDEX FOR MOD 4 STD D0 LDM LKBUF,D0 GET KEY STM KYBUFF SAVE KEY * * * * MOVE SECOND WORD OF KEY BUFFER TO FIRST * WORD OF PPU BUFFER SO IT CAN BE WRITTEN BACK. * LDN 4 STD D0 GK1 BSS 0 LDM LKBUF+5,D0 STM LKBUF,D0 SOD D0 PJP GK1 JUMP IF NOT ALL MOVED * * * * WRITE BACK TO ECS AOD ECSOFF POINT TO CPU WORD LDN 1 STD ECS WRITE ONE WORD CALL WRITECS,PKEYECS * * * * MOVE NEW KEY TO OUTPUT BUFFER LDD KEY LOAD CHARACTER POSITION SHN -1 DIVIDE BY TWO, WORD POSITION STD TT SAVE LDM KYBUFF GET NEW KEY STM ISTART,TT MOVE TO OUTPUT BUFFER. * * * * MOVE POINTER TO NEXT AVAILABLE SPOT. LDD KEY GET POINTER ADN CHPK TWO CHARACTERS/KEY LPC TMASK KEEP MOD 128 STD KEY LJM GETKEYX * /--- BLOCK SENDFRM 00 000 77/10/03 14.24 TITLE SEND FRAME TO PLATO * * * SENDFRM * * IF A FRAME HAS BEEN RECEIVED FROM THE REMOTE * SYSTEM THIS ROUTINE WILL APPEND THE TERMINAL * MODE STATION NUMBER (TMSTAT) AND GIVE IT * TO THE FRAMER FOR OUTPUT TO THE APPROPRIATE * STATION. THE BUFFER (LINKIO) IS A CIRCULAR * BUFFER INTO WHICH THE PPU WRITES THE FRAMES * AND FROM WHICH THE FRAMER REMOVES THEM. LKIN * CONTROLS INPUT TO THE BUFFER WHILE LKOUT * CONTROLS REMOVAL OF INFORMATION FROM THE BUFFER. * * INPUT PARAMETERS'; * (FRBUFF) = FRAME OR 0 IF NONE READY * SENDFRM SUBR * * * * IS THERE A FRAME READY TO GIVE TO FRAMER LDM FRBUFF ZJN SENDFRMX * * * * READ IN/OUT POINTERS FROM ECS LDN 0 STD ECSOFF LDN 2 STD ECS CALL READECS,LKIN * * * * CHECK FOR BUFFER FULL LDM LKBUF+4 IN POINTER ADN 1 BUMP TO NEXT WORD SBM LKBUF+9 OUT POINTER LPC LKMASK BUFFER LENGTH MASK ZJN SENDFRMX IF BUFFER FULL * * * * SERVICE COMMUNICATION EQUIPMENT CALL LCHK * * * * MOVE FRAME TO LKBUF FOR TRANSFER TO ECS LDM FRBUFF STM LKBUF LDM FRBUFF+1 STM LKBUF+1 * * * * ADD STATION NUMBER LDD TMSTAT STM LKBUF+2 * * * * DETERMINE OFFSET IN LINKIO BUFFER LDM PFRAME+4 LPC LKMASK BUFFER LENGTH MASK STD ECSOFF * * * * WRITE NEW FRAME TO ECS LDN 1 STD ECS NUMBER OF WORDS TO WRITE CALL WRITECS,LINKIO * * * * SERVICE COMMUNICATION EQUIPMENT CALL LCHK * * * * INCREMENT LINKIO PPU POINTER CALL AFIVE,PFRAME * * * * UPDATE ECS COPY OF POINTER LDN 0 STD ECSOFF CALL WRITECS,LKIN * * * * SET NO FRAME INDICATOR IN FRBUFF LDN 0 STM FRBUFF LJM SENDFRMX * /--- BLOCK FRMOVE 00 000 77/10/03 14.22 TITLE MOVE FRAME * * * FRMOVE * * THIS ROUTINE IS CALLED IF -FRBUFF- IS EMPTY * (FRBUFF=0). ITS FUNCTION IS TO MOVE THE * NEXT FRAME FROM THE INPUT BUFFER TO -FRBUFF-. * THIS CAN ONLY BE DONE WHEN THERE IS IN FACT * A COMPLETE FRAME ASSEMBLED IN THE INPUT * BUFFER. * FRMOVE SUBR * * * * IS THERE A COMPLETE FRAME IN THE -DBUFF-. LDD FRAME OUTPUT POINTER SHN -2 DIVIDE BY FOUR CHARS/FRAME STD TT LDD ULP NUMBER OF CHARACTERS INPUT SHN -2 DIVIDE BY FOUR SBD TT SUBTRACT OUTPUT POINTER ZJN FRMOVEX IF NO FRAME * * * * MOVE NEXT FRAME TO -FRBUFF- LDD TT CALCULATE WORD POSITION SHN 1 STD TT * * * * CHECK FIRST WORD FOR NEGATIVE VALUE(START BIT) LDM OSTART,TT 1ST WORD OF FRAME ADC 4000B ADD IN START BIT STM FRBUFF * * * * GET AND CHECK SECOND WORD OF FRAME, IS IT POSITIVE LDM OSTART+1,TT SECOND WORD OF FRAME STM FRBUFF+1 * * * * ADJUST OUTPUT POINTER TO NEXT FRAME POSITION XFR1 BSS 0 LDD FRAME GET CURRENT VALUE ADN CHPF FOUR CHARACTERS/FRAME LPC TMASK MODULO 512 STD FRAME SAVE NEW VALUE UJN FRMOVEX * /--- BLOCK RTLINK 00 000 78/01/05 09.04 TITLE REMOTE TERMINAL MODE DRIVER * * * RTLINK * * THIS ROUTINE COMMUNICATES WITH PLATO AT THE SYSTEM * REMOTE TO THE TERMINAL. ITS JOB IS TO GET * FRAMES FROM PLATO AND SEND THEM OVER THE LINK TO * THE SYSTEM LOCAL TO THE TERMINAL, WHILE AT THE * SAME TIME ACCEPTING KEYS FROM THE LINK AND * PUTTING THEM INTO PLATOS KEY BUFFER. * RTLINK BSS 0 * * * * MAKE SURE REMOTE IS STILL IN TOUCH CALL SEST,2 * * * * SEND REQUEST REPLY CALL MESSOUT * * * * SET MASK FOR IN -TMIN- AND -TMOUT- LDN 1 STM TIMK SET TO 1, KEY INPUT LDN 3 STM TOMK SET TO 3, FRAME OUTPUT * * * * DO INITIALIZATIONS CALL TMSTART * * * * WRITE NONZERO TO FRAMER STATUS WORD LDN 77B STM LKBUF+4 LDN 1 STD ECS NUMBER OF WORDS LDM FRAMID OFFSET TO CORRECT WORD STD ECSOFF CALL WRITECS,PIOSTS * * * * CHECK IF TIME TO SEND KEY OR GET FRAME * WILL BE DONE APPROXIMATELY EVERY 16 MS. RT0 BSS 0 CALL CLOCK,15 NJN RT1 * * * * TALK TO PLATO THROUGH ECS CALL SENDKEY SEND KEY TO PLATO CALL RCHK SERVICE COMMUNICATION EQUIP CALL GETFRAM GET FRAME FROM PLATO CALL KYMOVE CHECK FOR ANOTHER KEY READY RT1 BSS 0 CALL RCHK SERVICE COMMUNITION EQUIP * * * * IS IT TIME TO CHECK FRAMAT STATUS SOD FRCHK NJP RT0 * * * * CHECK FOR FRAMAT RE-INITIALIZING. CALL FRMCHK UJP RT0 * /--- BLOCK RCHK 00 000 84/11/15 11.33 TITLE TERMINAL MODE IO * * * RCHK * * 'CHECK COMMUNICATION EQUIPMENT TO SEE IF INPUT * WAITING OR READY TO SEND OUTPUT. * RCHK SUBR * * * * CHECK FOR CHARACTER READY AND CHARACTER REQUEST CALL WCR,MCRD+MCRQ ZJN RCHKX IF NEITHER STATUS APPEARED SHN 6 PJP RCHK1 JUMP IF CHARACTER NOT READY * * * * CHARACTER READY STATUS - PROCESS INPUT CALL TMIN MJN RCHKX IF ONLY SYNC CHARACTER * * * * MOVE KEY TO -KEYBUFF- IF NECESSARY OR POSSIBLE LDM KYBUFF SHN 6 PJN RCHKX IF KEY ALREADY THERE CALL KYMOVE UJN RCHKX * * * * CHECK CHARACTER READY TIME OUT RCHK1 BSS 0 AOD TIME BUMP TIME OUT COUNTER ADC -ALSEVEN CHECK VALUE OF COUNTER ZJP LOSTC JUMP IF TIMED OUT * * * * DO WE HAVE OUTPUT TO SEND LDD FRAME SBD ULU ZJN RCHKX IF NOTHING TO OUTPUT * * * * SEND FRAME TO REMOTE SYSTEM CALL TMOUT LJM RCHKX * /--- BLOCK SENDKEY 00 000 77/10/03 15.43 TITLE SEND KEY TO PLATO * * * SENDKEY * * WHEN A KEY HAS BEEN RECEIVED FROM THE REMOTE * SYSTEM THIS ROUTINE READS THE KEY BUFFER * CORRESPONDING TO THE TERMINAL MODE STATION * (TMSTAT) AND MOVES THE KEY INTO THE CORRECT * BYTE. THE PPU INDEX IS THEN INCREMENTED AND * THE FIRST WORD OF THE KEY BUFFER IS WRITTEN * BACK TO ECS. THE KEYS-IN BIT CORRESPONDING * TO THIS STATION IS THEN SET IN THE ECS * KEYS-IN BUFFER (PECSIN). * * FORMAT OF KEY BUFFER'; * / KEY / KEY / KEY / KEY / PPU INDEX / * / PRESS AND TIMING KEYS / CPU INDEX / * * INPUT PARAMETERS'; * (KYBUFF) = KEY TO SEND OR 7777B IF NO KEY READY * SENDKEY SUBR * * * * CHECK FOR KEY TO SEND LDM KYBUFF SHN 6 MJN SENDKEYX IF NO KEY READY TO SEND * * * * CALCULATE OFFSET TO KEY BUFFER LDD TMSTAT TERMINALS STATION NUMBER SHN 1 2 WORDS PER BUFFER STD ECSOFF OFFSET TO KEY BUFFER * * * * READ THE KEY BUFFER LDN 2 NUMBER OF CM WORDS STD ECS CALL READECS,PKEYECS * * * * IS THERE ROOM FOR THIS KEY LDM LKBUF+4 PPU INDEX IN KEY BUFFER SBM LKBUF+9 CPU INDEX IN KEY BUFFER ZJP SK1 JUMP IF NO KEYS IN BUFFER LPN 3 MASK INDEX FOR MOD 4 ZJP SK5 IGNORE KEYS NO ROOM * * * * SERVICE COMMUNICATION EQUIPMENT CALL RCHK * * * * BUMP PPU INDEX TO DETERMINE WHERE NEXT KEY GOES SK1 BSS 0 AOM LKBUF+4 INCREMENT PPU INDEX LPN 3 MASK TO FIND BYTE INDEX STD D0 SAVE INDEX LDM KYBUFF GET NEW KEY STM LKBUF,D0 PLUG IN NEW KEY * * * * WRITE KEY BUFFER BACK TO ECS LDN 1 NUMBER OF CM WORDS STD ECS CALL WRITECS,PKEYECS * * * * SERVICE COMMUNICATION EQUIPMENT CALL RCHK * /--- BLOCK SENDKEY 00 000 77/10/03 15.44 * * * * COMPUTE INDEX FOR THIS STATION IN KEYS-IN BIT TAB. LDD TMSTAT SHN 18-5 DIVIDE BY 32 STD ECSOFF SAVE WORD OFFSET SHN 5 LPN 37B MASK FOR STATION NUMBER ADN 4 ADD BIAS TO STARTING BIT STD T1 * * * * COMPUTE BYTE AND BIT POSITION IN THAT BYTE LDN 3 STD SENDI BYTES 1-3 HAVE KEYS-IN BITS SK2 BSS 0 LDD T1 SBN 12 MJP SK3 JUMP IF IN THIS BYTE STD T1 SOD SENDI DECREMENT BYTE POINTER UJP SK2 * * * * SET UP SHIFT INSTRUCTION TO POSITION BIT SK3 BSS 0 LDM SKSHF LPC -77B MASK OFF OLD SHIFT COUNT ADD T1 ADD IN NEW SHIFT COUNT STM SKSHF * * * * POSITION BIT MASK AND SET UP MASKING INSTRUCTIONS LDN 1 SKSHF BSS 0 SHN 0 POSITION BIT WITHIN BYTE STM SKAND LOGICAL PRODUCT INSTRUCTION STM SKXOR LOGICAL DIFFERENCE INSTRUCTION * * * * READ KEYS-IN WORD ( 1 WORD) CALL READECS,PECSIN * * * * SERVICE COMMUNICATION EQUIPMENT CALL RCHK * * * * CHECK FOR BIT ALREADY SET SK4 BSS 0 LDM LKBUF,SENDI LPC 0 MASK BIT SKAND EQU *-1 NJP SK5 EXIT IF ALREADY SET * * * * SET BIT LDM LKBUF,SENDI LMC 0 SKXOR EQU *-1 STM LKBUF,SENDI * * * * MARK LOWEST BYTE FOR REREAD LDM FRAMID STM LKBUF+4 * * * * WRITE BACK TO ECS CALL WRITECS,PECSIN * * * * SERVICE COMMUNICATION EQUIPMENT CALL RCHK * * * * READ BACK AND CHECK FOR CPU CONFLICT CALL READECS,PECSIN LDM LKBUF+4 SBM FRAMID NJP SK4 JUMP IF CONFLICT OCCURRED * * * * INITIALIZE KYBUFF SK5 BSS 0 LDC 7777B STM KYBUFF LJM SENDKEYX * /--- BLOCK GETFRAM 00 000 77/10/03 15.45 TITLE GET FRAMES FROM ECS * * * GETFRAM * * WHEN A STATION IS USING TERMINAL MODE THE * FRAMER DIRECTS ALL OF ITS OUTPUT TO A SPECIAL * SET OF FRAMES. EACH FRAME IN THIS BUFFER (LFRBUF) * IS 4 WORDS LONG AND HAS A CORRESPONDING * ENTRY IN ASSOCIATED TABLE (LFRLTHS) WHICH GIVES * THE NUMBER OF TERMINAL FRAMES IN THE FRAME * WAITING TO BE OUTPUT. THE LINK DRIVER MARKS * THE FRAME THAT IT WILL LOOK AT NEXT BY * INCREMENTING LFRPNT. THE BOTTOM SEVEN BITS * OF THIS POINTER ARE THE FRAME INDEX. THIS * ROUTINE MOVES THE TERMINAL FRAMES FROM * THE FRAME BUFFER INTO THE LINK DRIVER OUTPUT * BUFFER FOR LATER TRANSMISSION. * * GETFRAM SUBR * * * * SAVE CURRENT FRAME POINTER LDM IFRAME+4 STM IFRAMEX * * * * BUMP PPU FRAME POINTER, ALSO MOVES TO LKBUF CALL AFIVE,IFRAME * * * * WRITE IT TO ECS LDN 0 STD ECSOFF LDN 1 STD ECS NUMBER OF WORDS TO WRITE CALL WRITECS,LFRPNT * * * * SERVICE COMMUNICATION EQUIPMENT CALL RCHK * /--- BLOCK GETFRAM 00 000 77/10/03 15.45 * * * * ISOLATE FRAME INDEX LDM IFRAMEX LPC 177B 128 FRAMES STD ECSOFF * * * * READ FRAME LENGTH CALL READECS,LFRLTHS LDM LKBUF+4 ZJN GETFRAMX IF FRAME IS EMPTY STD ECS SAVE FRAME COUNT * * * * SERVICE COMMUNICATION EQUIPMENT CALL RCHK * * * * CALCULATE OFFSET OF FRAME IN FRAME BUFFER LDD ECSOFF FRAME NUMBER SHN 2 4 WORDS PER FRAME STD ECSOFF * * * * READ FRAME FROM ECS CALL READECS,LFRBUF * * * * CALCULATE POSITION OF LAST FRAME IN LKBUF * (NEW ECS) = ((OLD ECS)-1)*5 LDD ECS NUMBER OF FRAMES SBN 1 ADJUST SO 1 EQUALS ZERO OFFSET STD ECS SAVE NO. OF FRAMES - 1 SHN 2 MULTIPLE BY 4 RAD ECS * * * * MOVE NEW FRAME TO OUTPUT BUFFER LDD FRAME LOAD CHARACTER POSITION SHN -1 DIVIDE BY TWO, WORD POSITION STD TT SAVE LDM LKBUF,ECS GET 1ST BYTE OF FRAME STM ISTART,TT MOVE TO OUTPUT BUFFER. LDM LKBUF+1,ECS GET 2ND BYTE OF FRAME STM ISTART+1,TT MOVE IT TO THE OUTPUT BUFFER * * * * MOVE POINTER TO NEXT AVAILABLE SPOT. LDD FRAME GET POINTER ADN CHPF FOUR CHARACTERS/FRAME LPC TMASK KEEP MOD 128 STD FRAME LJM GETFRAMX * * /--- BLOCK KYMOVE 00 000 77/10/03 14.22 TITLE MOVE KEY * * * KYMOVE * * THIS ROUTINE IS CALLED IF -KYBUFF- IS EMPTY * (KYBUFF=4XXX). ITS FUNCTION IS TO MOVE THE * NEXT KEY FROM THE INPUT BUFFER TO -KYBUFF-. * THIS CAN ONLY BE DONE WHEN THERE IS IN FACT * A COMPLETE KEY ASSEMBLED IN THE INPUT * BUFFER. * KYMOVE SUBR * * * * IS THERE A COMPLETE KEY IN THE -DBUFF-. LDD KEY OUTPUT POINTER SHN -1 DIVIDE BY TWO CHARS/FRAME STD TT LDD ULP NUMBER OF CHARACTERS INPUT SHN -1 DIVIDE BY TWO SBD TT SUBTRACT OUTPUT POINTER ZJN KYMOVEX IF NO KEY * * * * MOVE NEXT KEY TO -KYBUFF- LDM OSTART,TT GET NEW KEY STM KYBUFF * * * * ADJUST OUTPUT POINTER TO NEXT FRAME POSITION LDD KEY GET CURRENT VALUE ADN CHPK TWO CHARACTERS/FRAME LPC TMASK MOD 512 STD KEY SAVE NEW VALUE UJN KYMOVEX * /--- BLOCK TMSTART 00 000 78/01/04 21.48 EJECT * * * TMSTART * TMSTART SUBR * * * * SET MODE TO TERMINAL MODE AND STATUS COUNT LDN 1 STD MODE STD NC * * * * INITIALIZE PACKING AND UNPACKING VARIABLES LDN 0 STD WP STD WU STD ULU STD ULP STD KEY STD FRAME STD TIME STD CLK STM CLKU STM CLKL LDC ALSEVEN STD NW * * * * SET TERMINAL MODE STATION. LDM XTMSTAT STD TMSTAT * * * * SET FRAM ID NUMBER LDM XFRAMID STM FRAMID * * * * SAVE NO. OF TERMINAL WORDS IN FRAME LDM XLFRLTH STM LFRLTH * * * * SET -FORINIP- ECS ADDRESS LDM ECL LOWER ECS RA ADC XFORINIP ADD RELATIVE ADDRESS STM FORINIP+1 SHN -12 ADM ECU ADD IN UPPER ECS RA STM FORINIP * * * * SET UP ECS ADDRESS TABLE LDN 0 STD T1 POINTER TO ADDRESS TABLE STD T2 POINTER TO INPUT BUFFER TMS1 BSS 0 LDM XPKEYEC+1,T2 LOWER 12 BITS OF ECS ADDRESS ADM ECL LOWER 12 BITS OF ECS RA STM ECSAD+1,T1 SHN -12 ADM ECU UPPER 9 BITS OF ECS RA ADM XPKEYEC,T2 UPPER 9 BITS OF ECS ADDRESS STM ECSAD,T1 LDN 5 RAD T2 BUMP POINTER TO INPUT BUFFER LDN 2 RAD T1 BUMP POINTER TO ADDRESS TABLE SBN ECSLTH SUBTRACT LENGTH OF TABLE MJN TMS1 JUMP IF MORE TO DO * * * * CLEAR IN/OUT POINTERS FOR LINK TO FRAMER BUFFER CALL LCLEAR,10 CLEAR FIRST 10 BYTES OF LKBUF LDN 2 STD ECS WRITE 2 CM WORDS LDN 0 STD ECSOFF NO OFFSET CALL WRITECS,LKIN CLEAR POINTERS * * * * INITIALIZE LOCAL FRAME POINTER LDN 1 STD ECS TRANSFER 1 WORD CALL READECS,LFRPNT * * * * MOVE FRAME POINTER TO LOCAL BUFFER LDN 4 STD T1 TMS3 BSS 0 LDM LKBUF,T1 STM IFRAME,T1 SOD T1 PJN TMS3 JUMP IF MORE TO MOVE LJM TMSTARTX * /--- BLOCK TMIN 00 000 77/08/17 14.05 TITLE TERMINAL MODE INPUT-OUTPUT * * * TMIN * * THIS ROUTINE PROCESSES INPUT FROM THE 311 AND * PACKS IT INTO -XBUFF-. IF THIS SYSTEM IS * THE REMOTE SYSTEM INPUT WILL BE KEYS, WHILE * A LOCAL SYSTEM WILL INPUT OUTPUT FRAMES. * EXIT PARAMETERS * (A) WITH BE NEGATIVE IF CHARACTER WAS SYNC CODE. * (A) WITH BE POSITIVE IF ANY OTHER CHARACTER. * TMIN SUBR LDN 0 STD TIME CLEAR TIMEOUT COUNTER * * * * PROCESS INPUT CALL GETCHR MJN TMINX IF SYNC CODE * * * * CHECK OUT OF SEQUENCE LDD ULP LPC 1 THIS MASK IS SET TO 1 OR 3 BY TIMK EQU *-1 -TLSET- OR -RTLSET-. ADN 3 SET BIT 2 IF 1, 2 OR 3 SHN 3 POSITION START BIT MASK LMD CHAR MASK CHARACTER SHN 12 WAS BIT CORRECT PJN TMINX * * * * CHECK WHERE IN BYTE THIS CHARACTER SHOULD GO TM1 BSS 0 AOD ULP LPN 1 ZJN TM2 JUMP IF LOWER CHARACTER AOD WP ADVANCE WORD POINTER. * * * * PUT NEW CHAR. INTO UPPER CHAR. POSITION LDD CHAR LPN 37B SHN 5 STM OSTART-1,WP STORE IN BUFFER UJN TM3 * * * * STORE NEW CHAR. IN LOWER CHAR. POSITION TM2 BSS 0 LDD CHAR LPN 37B RAM OSTART-1,WP STORE INTO BUFFER * * * * HAVE WE REACHED THE END OF THE BUFFER TM3 BSS 0 LDD ULP LPC TMASK NJN TM4 IF STILL ROOM STD WP OTHERWISE START AT BEGINNING STD ULP TM4 LJM TMINX * /--- BLOCK TMOUT 00 000 76/06/11 15.52 EJECT * * * TMOUT * * THIS ROUTINE HANDLES 311 OUTPUT DURING TERMINAL * MODE OPERATION. THE OUTPUT WILL BE KEYS IF AT * THE LOCAL SYSTEM, WHILE FRAMES WILL BE OUTPUT * IF AT THE REMOTE SYSTEM. THE DATA IS UNPACKED * FROM -DBUFF- AND SENT 6 BITS AT A TIME. * TMOUT SUBR * * * * IS NEXT CHAR. TO BE TAKEN FROM UPPER OR LOWER AOD ULU LPN 1 ZJN TO1 JUMP IF LOWER * * * * BUMP TO NEXT WORD IN BUFFER. AOD WU * * * * ISOLATE UPPER 5 BITS. LDM ISTART-1,WU SHN 13 UJN TO2 * * * * GET LOWER FIVE BITS IN WORD TO1 BSS 0 LDM ISTART-1,WU * * * * ISOLATE FIVE BIT PACKAGE TO2 BSS 0 LPN 37B ADC DCON STD OC * * * * ADD START BIT IF STARTING CHAR. OF FRAME OR KEY LDD ULU SBN 1 LPC 1 'THIS MASK SET TO 1 OR 3 BY TOMK EQU *-1 -TLSET- OR -RTLSET-. NJN TO3 * * * * ADD START BIT LDN 40B RAD OC * * * * SEND THIS CHARACTER TO3 BSS 0 LDM PARTBLE,OC GET PARITY BIT CALL OCHR * * * * IF AT END OF BUFFER SET POINTER TO BEGINNING LDD ULU LPC TMASK MODULO 1024 NJN TO4 IF NOT AT END STD WU RESET POINTER TO FIRST WORD. STD ULU TO4 LJM TMOUTX * /--- BLOCK READECS 00 000 77/08/29 15.26 TITLE READ ECS * * * READECS * * READ ECS USING CPU MONITOR CALL, WHICH TRANSFERS * DATA TO CM (TRNBF) WHERE THE PPU CAN THEN READ IT. * * INPUT PARAMETERS'; * (A) - POINTER TO ECS ADDRESS * (ECS) - NUMBER OF CM WORDS (1-60D) * (ECSOFF) - OFFSET TO ADD TO BASE ECS ADDRESS * * OUTPUT PARAMETERS'; * (LKBUF) - DATA READ FROM ECS * (A) = ZERO - TRANSFER OKAY * = NONZERO - ECS ERROR * * READECS SUBR * * * * SAVE ADDRESS OF ECS ADDRESS STD TT * LDK ZERL (A) = CM ADDR OF ZERO WORD CRD CM CLEAR LIST ENTRY LDM 1,TT LOWER 12 BITS OF ADDRESS ADD ECSOFF ADD OFFSET STD CM+4 SHN -12 SAVE ADD OVERFLOW ADM 0,TT UPPER 9 BITS OF ADDRESS STD CM+3 .NOSV2 IFLT OSLEV,562D IF NOS V1 LDD MA CWD CM (MB) = 36/TRASH,24/EM ADDRESS * * * * PUT SUBFUNCTION AND R/W CODES INTO REQUEST LDN 0 STD CM+4 (CM+4) = R/W CODE (READ) LDC /CPS/RWEM*1000B STD CM+3 (CM+3) = SUBFUNCTION = *RWEM* * * * * PUT CM ADDRESS AND NO. OF WORDS INTO REQUEST LOADCM TRNBF GET CM ADDRESS STD CM+2 STORE LOWER 12 BITS SHN -12 POSITION TOP 6 BITS STD CM+1 LDD ECS NO. OF WORDS MINUS ONE SBN 1 ADJUST COUNT FOR THIS REQUEST SHN 6 RAD CM+1 ADD TO REQUEST .NOSV2 ELSE IF NOS V2 LDD ECS (A) = NUM OF CPU WORDS TO READ SHN 6 STD CM+1 (CM+1) = CPU WORDS TO READ LOADCM TRNBF (A) = CM ADDRESS OF LIST CWD CM UPDATE LIST (1 ENTRY) LDK ZERL (A) = CM ADDR OF ZERO WORD CRD CM CLEAR REQUEST WORD LDN 1 (A) = ONE LIST ENTRY TO PROCESS SHN 6 STD CM+1 (CM+1) = NUMBER OF LIST ENTRIES LOADCM TRNBF (A) = CM ADDRESS OF LIST STD CM+2 (CM+2) = LOWER PART OF LIST ADR SHN -12D POSITION UPPER PART OF LIST ADR LPN 77B (A) = UPPER PART W/OUT SIGN EXT RAD CM+1 (CM+1) NOW INCLUDES UPPER PART * SET THE SUBFUNCTION (*PELS*), READ EM, AND * ABSOLUTE SYSTEM EM ADDRESS. LDK /CPS/PELS*1000B (A) = SUBFUNCTION = *PELS* STD CM+3 .NOSV2 ENDIF * * * * READ ECS TO CM MONITOR ECSM READ ECS TO CM LDD CM+1 * /--- BLOCK READECS 00 000 84/11/15 11.34 NJP READECSX IF EM ERROR * * * * READ CM TO PPU LOADCM TRNBF CM LOCATION OF DATA .NOSV2 IFGE OSLEV,562D IF NOS V2 ADN 1 SKIP THE LIST .NOSV2 ENDIF CRM LKBUF,ECS LDN 0 LJM READECSX * /--- BLOCK WRITECS 00 000 77/08/29 15.27 TITLE WRITE ECS * * * WRITECS * * WRITE ECS USING CPU MONITOR CALL. THE DATA * IS TRANSFERRED TO A CM BUFFER (TRNBF) BY THE * PPU, THEN TO ECS USING THE MONITOR CALL. * * INPUT PARAMETERS'; * (A) - POINTER TO ECS ADDRESS * (ECS) - NUMBER OF CM WORDS (1-64) * (ECSOFF) - OFFSET TO ADD TO BASE ECS ADDRESS * (LKBUF) - DATA TO BE WRITTEN * * OUTPUT PARAMETERS'; * (A) = ZERO - TRANSFER OKAY * = NONZERO - ECS ERROR * * MONITOR REQUEST FORMAT * / REQUEST CODE / NNCC / CCCC / REEE / EEEE/ * N - NUMBER OF CM WORDS MINUS ONE. * C - CM BUFFER ADDRESS * R - READ/WRITE CODE (READ = 2, WRITE = 3) * E - ECS ADDRESS * * WRITECS SUBR * * * * SAVE ADDRESS OF ECS ADDRESS STD TT * * * PUT ECS ADDRESS INTO REQUEST LDK ZERL (A) = CM ADDR OF ZERO WORD CRD CM CLEAR LIST ENTRY LDM 1,TT LOWER 12 BITS OF ADDRESS ADD ECSOFF ADD OFFSET STD CM+4 SHN -12 SAVE ADD OVERFLOW ADM 0,TT UPPER 9 BITS OF ADDRESS STD CM+3 .NOSV2 IFLT OSLEV,562D IF NOS V1 LDD MA CWD CM (MB) = 36/TRASH,24/EM ADDRESS * * * * PUT SUBFUNCTION AND R/W CODES INTO REQUEST LDN 1 STD CM+4 (CM+4) = R/W CODE (WRITE) LDC /CPS/RWEM*1000B STD CM+3 (CM+3) = SUBFUNCTION = *RWEM* * * * * PUT CM ADDRESS AND NO. OF WORDS INTO REQUEST LOADCM TRNBF GET CM ADDRESS STD CM+2 STORE LOWER 12 BITS SHN -12 POSITION TOP 6 BITS STD CM+1 LDD ECS NO. OF WORDS SBN 1 ADJUST COUNT FOR THIS REQUEST SHN 6 RAD CM+1 ADD TO REQUEST .NOSV2 ELSE IF NOS V2 LDD ECS (A) = NUM OF CPU WORDS TO READ SHN 6 STD CM+1 (CM+1) = CPU WORDS TO READ LOADCM TRNBF (A) = CM ADDRESS OF LIST CWD CM UPDATE LIST (1 ENTRY) LDK ZERL (A) = CM ADDR OF ZERO WORD CRD CM CLEAR REQUEST WORD LDN 1 (A) = ONE LIST ENTRY TO PROCESS SHN 6 STD CM+1 (CM+1) = NUMBER OF LIST ENTRIES LOADCM TRNBF (A) = CM ADDRESS OF LIST STD CM+2 (CM+2) = LOWER PART OF LIST ADR SHN -12D POSITION UPPER PART OF LIST ADR LPN 77B (A) = UPPER PART W/OUT SIGN EXT RAD CM+1 (CM+1) NOW INCLUDES UPPER PART * /--- BLOCK WRITECS 00 000 77/08/29 15.27 * SET THE SUBFUNCTION (*PELS*), WRITE EM, AND * ABSOLUTE SYSTEM EM ADDRESS. LDK /CPS/PELS*1000B+1S8 (A) = *PELS* + WRITE EM STD CM+3 (CM+3) = SUBFUNCTION .NOSV2 ENDIF * * * * WRITE PPU TO CM BUFFER LOADCM TRNBF CM LOCATION OF DATA .NOSV2 IFGE OSLEV,562D IF NOS V2 ADN 1 SKIP THE LIST .NOSV2 ENDIF CWM LKBUF,ECS * * * * WRITE FROM CM TO ECS MONITOR ECSM READ ECS TO CM LDD CM+1 LJM WRITECSX * /--- BLOCK CLOCK 00 000 77/08/26 16.41 TITLE CLOCK * * * CLOCK * * UPDATES RUNNING CLOCK IN CLKU AND CLKL * THIS ROUTINE MUST BE DONE AT LEAST ONCE EVERY * 4 MILLISECONDS. * * INPUT PARAMETERS'; * (A) = NUMBER OF MILLISECONDS AT WHICH TO TIME OUT * * OUTPUT PARAMETERS'; * (A) - NONZERO HAVE NOT REACH TIME OUT TIME * ZERO TIME OUT TIME HAS BEEN REACHED * CLOCK SUBR STD TT SAVE INPUT PARAMETE * * * * READ MICROSECOND CLOCK IAN 14B * * * * SAVE NEW INFO AND COMPARE TO LAST READING STD D0 SBD CLK LAST READING PJN CLOCK1 JUMP IF NO WRAP AROUND * * * * CLOCK HAS WRAPPED AROUND RECALCULATE DIFFERENCE ADC 10000B * * * * UPDATE RUNNING TIME CLOCK1 BSS 0 SHN 2 ADJUST TO GET MS IN UPPER CELL RAM CLKL LOWER 12 BITS OF CLOCK SHN -12 RAM CLKU UPPER 12 BITS * * * * REPLACE OLD CLOCK READING WITH NEW ONE LDD D0 STD CLK * * * * IS IT TIME TO TIME OUT LDM CLKU SBD TT MJN CLOCKX * * * * TIME OUT -- CLEAR THE CLOCK LDN 0 STM CLKU STM CLKL UJN CLOCKX * /--- BLOCK READCM 00 000 77/08/17 09.26 TITLE READ AND CLEAR PPU COMMUNICATIONS SWITCH * READSW * * THIS ROUTINE READS THE SWITCH FROM THE * CM COMUNICATIONS BUFFER AND SAVES THE LAST BYTE * IN -A-. * READSW1 LDD CM+4 READSW SUBR LOADCM COMBF PRESET TO 1ST WORD OF CM * COMMUNICATION BUFFER. CRD CM READ OUTPUT DATA REQUEST SWITCH LDD CM+4 ADC -MAXCM IS READ TOO LARGE MJN READSW1 IF READ LENGTH OK CALL SERROR,SCML SPACE 4 * READ * * THIS ROUTINE READS THE REQUEST PARAMETERS * FROM THE PARAMETER SECTION OF THE CM * COMMUNICATION BUFFER TO -IBF- AND THE DATA * PORTION TO -IHDR-. * READ SUBR READ1 LOADCM COMBF PRESET TO 1ST WORD OF CM * COMMUNICATION BUFFER. ADN PPOS ADJUST TO PARAMETER SECTION. CRM IBF,LT READ INTO PPU * * * * MOVE NEW PARAMETER SECTION TO OUTPUT BUFFER. * LDN IHDR-IBF-1 BYTES TO MOVE. STD D0 READ2 BSS 0 LDM IBF,D0 STM OBF,D0 SOD D0 PJP READ2 JUMP IF NOT FINISHED. UJN READX * /--- BLOCK WRITE 00 000 77/08/17 15.04 TITLE WRITE TO CM BUFFER. * WRITE * * THIS ROUTINE WRITES DATA RECEIVED OVER * LINK, PLUS ANY ERROR CODES OR STATUS TO A * CM BUFFER. * THE TOP BIT OF THE SWITCH IS SET TO 1 AND THE * NEXT-TO-LAST BYTE IS SET TO THE NUMBER OF CM * WORDS IN THIS RESPONSE. * * INPUT PARAMETER * (DL) = NUMBER OF CM WORDS OF DATA * * WRITE SUBR WTE1 BSS 0 LDN PLTH LENGTH OF PARAMETER SECTION. ADD DL PLUS NUMBER OF DATA WORDS. STD D0 WRITE1 LOADCM COMBF PRESET TO 1ST WORD OF CM * COMMUNICATION BUFFER. ADN PPOS ADJUST TO PARAMETER SECTION. CWM OBF,D0 WRITE TO CM. LDN ZERL CLEAR BUFFER CRD CM LDC 4000B SIGN BIT SET STD CM LDD D0 STD CM+3 SET NO. OF RESPONSE WORDS. WRITE2 LOADCM COMBF PRESET TO 1ST WORD ADDRESS OF * PARAMETER BUFFER IN CM. CWD CM WRITE SWITCH LDN 0 STD DL CLEAR DATA WORD COUNT * * * * PRESS KEY ON LESSON TO INDICATE REQUEST IS DONE. LDC LAB1K LAB1 TO BE PRESSED STM RQKEY CALL PREQ,PKEY UJN WRITEX * /--- BLOCK I/O CHAR 00 000 78/01/22 17.15 TITLE CHARACTER I/O * * * ICHR * * THIS ROUTINE INPUTS ONE BYTE OF INFORMATION * FROM THE EVEN CHANNEL OF THE 311. * ICHR SUBR RJM CCR NJN ICHR1 IF EQUIP/CHANNEL RESERVED CALL SERROR,SENA ICHR1 BSS 0 PORT EVEN FNC DCIC,C=CH SELECT 6681 INPUT ACN C=CH,40B ACTIVATE THE CHANNEL WAIT FULL,C=CH,ICHR10 IAN C=CH,40B INPUT BYTE OF DATA DCN C=CH,40B DE-ACTIVATE THE CHANNEL UJN ICHRX * ICHR10 CALL CTIMEO PROCESS CHANNEL TIME-OUT UJN ICHRX SPACE 4 * * * OCHR * * THIS ROUTINE OUTPUTS ONE BYTE OF INFORMATION * TO THE EVEN CHANNEL OF THE 311. * OCHR SUBR STD T1 SAVE (A) RJM CCR NJN OCHR1 IF EQUIP/CHANNEL RESERVED CALL SERROR,SENA OCHR1 LDD T1 RESTORE (A) PORT EVEN FNC DCOC,C=CH SELECT 6681 OUTPUT ACN C=CH,40B ACTIVATE THE CHANNEL OAN C=CH,40B OUTPUT DATA WAIT EMPTY,C=CH,OCHR10 DCN C=CH,40B DE-ACTIVATE THE CHANNEL UJN OCHRX * OCHR10 CALL CTIMEO PROCESS CHANNEL TIME-OUT UJN OCHRX * /--- BLOCK I/O CHAR 00 000 78/01/22 18.41 EJECT * * * ICHR2 * * THIS ROUTINE INPUTS ONE BYTE OF INFORMATION * FROM THE ODD CHANNEL OF THE 311. * ICHR2 SUBR RJM CCR NJN ICHR3 IF EQUIP/CHANNEL RESERVED CALL SERROR,SENA ICHR3 BSS 0 PORT ODD FNC DCIC,C=CH SELECT 6681 INPUT ACN C=CH,40B ACTIVATE THE CHANNEL WAIT FULL,C=CH,ICHR20 IAN C=CH,40B INPUT BYTE OF DATA DCN C=CH,40B DE-ACTIVATE THE CHANNEL STD PS SAVE STATUS UJN ICHR21 * ICHR20 CALL CTIMEO PROCESS CHANNEL TIME-OUT ICHR21 UJN ICHR2X SPACE 4 * * * OCHR2 * * THIS ROUTINE OUTPUTS ONE BYTE OF INFORMATION * TO THE ODD CHANNEL OF THE 311. * OCHR2 SUBR STD T1 SAVE (A) RJM CCR NJN OCHR3 IF EQUIP/CHANNEL RESERVED CALL SERROR,SENA OCHR3 LDD T1 RESTORE (A) PORT ODD FNC DCOC,C=CH SELECT 6681 OUTPUT ACN C=CH,40B ACTIVATE THE CHANNEL OAN C=CH,40B OUTPUT DATA WAIT EMPTY,C=CH,OCHR20 DCN C=CH,40B DE-ACTIVATE THE CHANNEL UJN OCHR21 * OCHR20 CALL CTIMEO PROCESS CHANNEL TIME-OUT OCHR21 UJN OCHR2X SPACE 4 * * * CTIMEO * * THIS ROUTINE ISSUES A DAYFILE MESSAGE FOR A * CHANNEL TIME-OUT AND DROPS THE PPU IF THE PPU IS * NOT ALREADY IN THE PROCESS OF DROPPING. * CTIMEO SUBR CALL DFM,CTOMSG OUTPUT TIME-OUT MESSAGE LDM DPPF CHECK IF ALREADY DROPPING PPU NJN CTIMEOX UJP DPP * CTOMSG DIS ,*(CLD) CHANNEL TIME-OUT* * SPACE 3 * * * CCR * * THIS ROUTINE CHECKS IF THE 3266 EQUIPMENT AND * CHANNEL HAVE BEEN RESERVED BEFORE ATTEMPTING TO * DO ANYTHING WITH IT. ON EXIT, (A) = 0 IF EITHER * THE EQUIPMENT OR CHANNEL IS NOT RESERVED, NON- * ZERO OTHERWISE. * CCR SUBR LDC ALSEVEN LMM CLEQ ZJN CCRX IF EQUIPMENT NOT RESERVED LDC ALSEVEN LMM CLCH ZJN CCRX IF CHANNEL NOT RESERVED LDN 1 UJN CCRX * /--- BLOCK WCR 00 000 76/05/13 14.23 TITLE WAIT CHARACTER READY OR REQUEST * * * WCR * * THIS ROUTINE WAITS FOR THE SPECIFIED STATUS * TO APPEAR OR UNTIL IT HAS CHECK THE STATUS * THE SPECIFIED NUMBER OF TIMES. * * INPUT PARAMETERS * (A) = MASK FOR REQUIRED STATUS * (NC) = NUMBER OF STATUS CHECKS TO BE PERFORMED. * * OUTPUT PARAMETERS * (A) = 0 STATUS DID NOT APPEAR. * 1 INDICATED STATUS APPEARED * (CHAR) = INPUT BYTE * WCR SUBR * * * * SAVE SPECIFIED MASK STM WRM * * * * GET NUMBER OF TIMES TO CHECK LDD NC STD D0 * * * * CHECK IF TIME TO CHECK FOR STORAGE RELOCATION WR1 BSS 0 SOD TI NJN WR2 JUMP IF NOT TIME TO CHECK RJM PAUSE CHECK FOR STORAGE RELOCATION RJM DROPCHK CHECK FOR DROP SIGNAL * * * * INPUT STATUS WR2 BSS 0 RJM ICHR STD CHAR SAVE INPUT * * * * CHECK FOR SPECIFIED STATUS LPC * WRM EQU *-1 NJN WCRX IF STATUS APPEARED * * * * STATUS CHECK DONE, IF SO CHECK ODD CHANNEL STATUS SOD D0 NJN WR1 JUMP IF NOT * * * * IF TERMINAL MODE, DO TIME OUT CHECK LDD MODE ZJN WCRX IF DATA MODE AOD TIME NUMBER OF CHECKS MADE FOR INPUT ADC -ALSEVEN MAXIMUM CHECKS TO MAKE ZJP LOSTC JUMP IF CONTACT LOST LDN 0 UJN WCRX * /--- BLOCK WCPE-PUTCH 00 000 76/05/17 11.08 TITLE ODD CHANNEL STATUS/PUT CHARACTER * * * WCPE * * THIS ROUTINE INPUTS THE ODD CHANNEL STATUS * AND CHECKS FOR CHARACTER PHASE ESTABLISHED. * * OUTPUT PARAMETERS * IF (A) = ZERO CHARACTER PHASE NOT ESTABLISHED * = POSITIVE - ESTABLISHED SYNCHRONIZATION * WCPE SUBR * * * * INPUT STATUS CALL ICHR2 * * * * CHECK CARRIER BIT LPC MCST NJN WP1 JUMP IF CARRIER NOT ON * * * * CHECK FOR STATUS BIT LDD PS LPC MCPH LMC MCPH UJN WCPEX * * * * ERROR--CARRIER NOT ON. WP1 BSS 0 CALL HERROR,HCNO SPACE 1 * * * PUTCHR * * WAIT FOR CHARACTER REQUEST STATUS TO APPEAR THEN * OUTPUT THE INDICATED CHARATER. * * INPUT PARAMETER * (A) = CHARACTER TO BE OUTPUT. * PUTCHR SUBR * * * * SAVE CHARACTER TO BE OUTPUT STD OC * * * * WAIT FOR CHARACTER REQUEST STATUS LDC MCRQ RJM WCR * * * * OUTPUT CHARACTER LDM PARTBLE,OC RJM OCHR UJN PUTCHRX * /--- BLOCK GETCHR 00 000 78/05/11 22.15 TITLE GETCHR * * * GETCHR * * THIS ROUTINE IS CALLED AFTER INPUT HAS * BEEN RECEIVED TO CHECK AND CLASSIFY IT. * * INPUT PARAMETERS * (CHAR) = INPUT BYTE. * OUTPUT PARAMETERS * (A) = -1 SYNC CODE * 0 DATA CHARATER RETURNED * 1 CONTROL CODE RETURNED * GETCHR SUBR * * * * SAVE ONLY CHARACTER INFO IN BYTE. LDD CHAR LPC MCHR8 MASK OFF STATUS BITS STD TT SAVE CHAR. PLUS PARITY BIT LPC MCHR7 MASK OFF PARITY BIT STD CHAR SAVE CHAR. MINUS PARITY BIT * * * * CHECK CHARACTER PARITY LDM PARTBLE,CHAR CHAR. PLUS CORRECT PARITY SBD TT WAS INPUT THE SAME NJP GC2 JUMP IF NOT * * * * FOUND GOOD CHAR. - CLEAR BAD CHARACTER COUNT LDN 0 STD BADC * * * * CHECK FOR SYNC CHARACTER LDD CHAR SBN CSYN NJN GC1 JUMP IF NOT SYNC CODE. LCN 1 UJN GETCHRX * * * * SET RETURN TO INDICATE DATA OR CONTROL CHAR. GC1 BSS 0 LDD CHAR SHN -6 ONLY INDICATOR BIT REMAINS LMN 1 COMPLEMENT IT. UJN GETCHRX * * * * CHARACTER PARITY ERROR GC2 BSS 0 AOM PECNT COUNT OF TOTAL BAD CHAR. STD NAKFLAG INDICATE MESSAGE HAS AN ERROR AOD BADC CONSECUTIVE BAD CHAR. COUNT SBN PEND CHECK FOR TOO MANY BAD CHAR. MJP GETCHRX IF NOT TOO MANY * * * * IF WAITING FOR LINKCTL COMMAND, SEND ERROR LATER LDM WAITF NJP WAITL JUMP IF WAITING ON COMMAND * * * * ERROR--TOO MANY BAD CHARACTERS CALL HERROR,HBCH * /--- BLOCK PACK 00 000 76/05/17 11.08 TITLE PACK DATA * * * PACK * * THIS ROUTINE TAKES LAST CHARACTER INPUT AND * PACKS IT INTO THE NEXT PPU WORD IN THE INPUT * BUFFER. TWO CHARACTERS ARE PUT INTO EACH WORD * THUS IT HAS TO BE DETEMINED WHETHER THIS * CHARACTER IS TO BE PUT IN THE UPPER(BITS 6-11) * LOWER(BITS 0-5) POSITION IN THE CURRENT WORD. * PACK SUBR * * * * UPDATE MESSAGE PARITY CHECK * LDD CHAR INPUT CHARACTER LMD CKI MESSAGE PARITY STD CKI * * * * CHECK WHERE IN BYTE THIS CHARACTER SHOULD GO * AOD ULP LPN 1 ZJN PK1 JUMP IF LOWER CHARACTER * * * * ADVANCE PPU WORD POINTER TO NEXT WORD * AOD WP * * * * CHECK FOR BUFFER OVERFLOW * ADC -MAXIN MAX. NO. OF BYTES TO ASSEMBLE MJN PK0 JUMP IF NO OVERFLOW * * * * ERROR--MESSAGE TOO LONG CALL HERROR,HMLT * * * * PUT NEW CHARACTER INTO UPPER CHARACTER POSITION * IN THIS PPU WORD. * PK0 BSS 0 LDD CHAR INPUT CHARACTER SHN 6 POSITION CHARACTER STM OSTART-1,WP STORE IN BUFFER UJN PACKX GET NEXT WORD * * * * STORE NEW CHARACTER IN LOWER CHARACTER POSITION * OF PPU WORD. * PK1 BSS 0 LDD CHAR INPUT CHARACTER LPN 77B GET RID OF DATA BIT RAM OSTART-1,WP STORE INTO DATA BUFFER UJN PACKX GET NEXT CHARACTER * /--- BLOCK UNPACK 00 000 77/08/17 14.01 TITLE UNPACK * * * UNPACK * * THIS ROUTINE EXTRACTS ONE CHARACTER AT A TIME * FROM THE OUTPUT BUFFER(XBUFF) AND SAVES IT * IN -OC-. 'THE CHARACTERS ARE STORED TWO TO A * PPU WORD SO IT MUST DETERMINE WHETHER THE NEXT * CHARACTER IS IN THE UPPER(BITS 6-11) OR LOWER * (BITS 0-5) POSITION OF THE WORD. * * OUTPUT PARAMETER * (A) = NONZERO IF CHARACTER IN -OC- * = ZERO IF NO MORE CHARACTERS IN BUFFER. * UNPACK SUBR * * * * IS NEXT CHARACTER TO BE TAKEN FROM UPPER OR * LOWER PORTION OF PPU WORD. * AOD ULU LPN 1 ZJN UPK1 JUMP IF LOWER * * * * CHECK TO SEE IF ALL DATA HAS BEEN OUTPUT * LDD WU CURRENT POSITION IN BUFFER SBD NW SUBTRACT LAST DATA POSITION ZJN UNPACKX IF ALL DONE AOD WU BUMP TO NEXT WORD * * * * ISOLATED NEXT CHARACTER FROM UPPER CHARACTER * POSITION OF PPU WORD. * LDM ISTART-1,WU SHN 12 POSITION CHARACTER IN LOWER * 6 BITS OF -A- UJN UPK2 GO MASK CHARACTER * * * * NEXT CHARACTER IN LOWER 6 BITS OF PPU WORD * UPK1 BSS 0 LDM ISTART-1,WU * * * * ISOLATE CHARACTER, ADD DATA BIT, AND SAVE * UPK2 BSS 0 LPN 77B ADC DCON ADD DATA BIT STD OC SAVE OUTPUT CHARACTER UJN UNPACKX * /--- BLOCK DATAIN 00 000 76/06/16 15.24 TITLE DATAIN * * * * DATAIN * * THIS ROUTINE INPUTS DATA CHARACTERS SENT BY * THE REMOTE SITE AND PACKS THEM TWO CHARACTERS * PER BYTE INTO THE DATA BUFFER. THE DATA INPUT * IS TERMINATED BY AN -EOD-(END OF DATA), -EOB- * (END OF BLOCK), OR -EOF-(END OF FILE) CONTROL * CHARACTER, WHICH IS INTURN FOLLOWED BY THE * MESSAGE PARITY CODE. * DATAIN SUBR * * * * INITIALIZE POINTERS LDN 0 STD ULP STD WP STD CKI STD NAKFLAG * * * * CLEAR SYNC CODE COUNTER DI1 BSS 0 LDN 0 STD SC * * * * WAIT FOR FIRST CHARATER DI2 BSS 0 CALL WCR,MCRD ZJP LOSTC PROBABLY LOST CONTACT * * * * PROCESS INPUT CHARACTER RJM GETCHR MJN DI3 JUMP IF SYNC CODE NJN DI4 JUMP IF CONTROL CODE * * * * PUT DATA AWAY CALL PACK UJN DI1 * * * * SYNC CODE INPUT, BUMP COUNTER, IF TOO MANY ARE * RECEIVED BEFOR NEXT DATA CHARACTER HAVE MESSAGE * RESENT. DI3 BSS 0 AOD SC BUMP SYNC CODE COUNTER ADC -SYEND1 CHECK FOR TOO MANY SYNC CHAR. MJN DI2 GET NEXT CHAR. IF NOT UJP DI6 SET NAKFLAG AND EXIT * /--- BLOCK DATAIN 00 000 84/11/15 11.34 * * * * CONTROL CODE RECEIVED, CHECK FOR -EOD-, -EOB-, * OR -EOF-. DI4 BSS 0 LDN CEOD SBD CHAR ZJN DI5 JUMP IF -EOD- * LDN CEOB SBD CHAR ZJN DI5 JUMP IF -EOB- * LDN CEOF SBD CHAR ZJN DI5 JUMP IF -EOF- * * * * BAD CHARACTER SET NAKFLAG AND GET NEXT CHARACTER LDN 1 STD NAKFLAG AOM BDCNT BUMP ERROR COUNT UJP DI2 * * * * PUT CONTROL CODE IN -LINKCTL- RESPONSE. DI5 BSS 0 LDD CHAR STM OHDR+REOM * * * * GET NUMBER OF PPU WORDS INPUT LDD WP STM RWDS+OHDR * * * * CALCULATE NUMBER OF CM WORDS IN MESSAGE ADN 4 EXTRA WORDS IN HEADER. CALL CMCAL * * * * INPUT MESSAGE PARITY CODE CALL WCR,MCRD WAIT FOR INPUT ZJP LOSTC JUMP IF LOST CONTACT * * * * PROCESS INPUT CALL GETCHR LDD CHAR * * * * COMPARE GENERATED PARITY TO ONE RECEIVED SBD CKI ZJN DI7 * * * * SET NAKFLAG AND EXIT DI6 BSS 0 LDN 1 STD NAKFLAG AOM LPCNT BUMP ERROR COUNT DI7 LJM DATAINX * /--- BLOCK DATAOUT 00 000 76/06/16 14.54 TITLE DATAOUT * * * DATAOUT * * THIS ROUTINE TRANSMITS DATA TO THE REMOTE * SITE. THE DATA IS GIVEN TO THE DRIVER BY * -LINKCTL-. THE DATA IS THEN UNPACKED A * CHARACTER AT A TIME AND TRANSMITTED. -LINKCTL- * ALSO SUPPLIES THE CONTROL CODE WHICH WILL * FOLLOW THIS MESSAGE(EOD, EOB, OR EOF). THIS * ROUTINE ALSO GENERATES A MESSAGE PARITY WHICH * IS TRANSMITTED FOLLOWING THE END OF MESSAGE * CONTROL CHARACTER. * DATAOUT SUBR * * * * OUTPUT START OF MESSAGE CHARACTER LDM IHDR+RSOM CALL PUTCHR * * * * INITIALIZE POINTERS LDN 0 STD ULU STD WU STD CKO * * * * GET NUMBER OF PPU WORDS IN DATA FIELD LDM RWDS+IHDR ADN 1 INCLUDE MESSAGE NUMBER STD NW * * * * GET NEXT CHARACTER DO1 BSS 0 RJM UNPACK ZJN DO6 JUMP IF ALL DONE * * * * OUTPUT NEXT CHARACTER CALL PUTCHR * * * * UPDATE MESSAGE PARITY LDD OC LMD CKO STD CKO UJN DO1 GET NEXT CHARACTER * * * * ALL DATA OUTPUT, OUTPUT END OF MESSAGE CHARACTER DO6 BSS 0 LDM IHDR+REOM GET CHARACTER FROM -LINKCTL- RJM PUTCHR SEND IT. * * * * OUTPUT MESSAGE PARITY CODE. LDD CKO RJM PUTCHR UJN DATAOUTX * /--- BLOCK MESSOUT 00 000 78/05/11 22.13 TITLE SEND MESSAGE * * * MESSOUT * * SEND MESSAGE TO REMOTE SITE AND WAIT FOR * ACKNOWLEDGE(ACK OR NAK). IF A -NAK- IS * RECEIVED OR AN ERROR RESEND THE MESSAGE. * MESSOUT SUBR LDN 0 STD RESEND CLEAR RESEND COUNT * * * * SEND MESSAGE MO1 BSS 0 CALL DATAOUT * * * * SET SYNC CODE COUNTER TO ZERO LDN 0 STD SC * * * * WAIT FOR ACK OR NAK. MO2 BSS 0 CALL WCR,MCRD ZJP LOSTC JUMP IF CONTACT LOST * * * * PROCESS INPUT CALL GETCHR ZJN MO5 RESEND MESSAGE BAD CHR. PJN MO4 JUMP IF CONTROL CHAR. * * * * INCREMENT SYNC CODE COUNTER AOD SC ADC -SYEND2 MJP MO2 WAIT FOR NEXT CHAR. * * * * TOO MANY SYNC CODES AOM SCCNT BUMP ERROR COUNTS UJP MO5 * * * * CONTROL CHARACTER FOUND IS IT A ACK. MO4 BSS 0 LDD CHAR SBN CACK ZJN MESSOUTX AOM BCCNT BUMP ERROR COUNT * * * * ALLOW 5 RESENDS, THEN GIVE UP MO5 BSS 0 AOD RESEND BUMP COUNTER SBN RSCNT TOO MANY RESENDS ALREADY MJP MO1 NO, RESEND THE MESSAGE CALL HERROR,HRSD ISSUE ERROR * /--- BLOCK MESSIN 00 000 84/11/15 11.35 TITLE RECEIVE A MESSAGE * * * MESSIN * * INPUT MESSAGE FROM REMOTE SITE, THEN SEND * AN ACK OR NAK DEPENDING ON CONDITION OF MESSAGE * RECEIVED. * * OUTPUT PARAMETERS * (A) = ZERO IF MESSAGE NUMBER OKAY * NONZERO OTHERWISE. * MESSIN SUBR * * * * WAIT FOR FIRST INPUT CHARACTER. MI1 BSS 0 CALL WCR,MCRD ZJP LOSTC JUMP IF CONTACT LOST CALL GETCHR MJN MI3 JUMP IF SYNC CHARACTER ZJN MI3 JUMP IF NOT CONTROL CHAR. * * * * SAVE START OF MESSAGE CHARACTER. LDD CHAR GET CHARACTER STM OHDR+RSOM * * * * INPUT REST OF MESSAGE CALL DATAIN * * * * WAS MESSAGE IN GOOD SHAPE LDD NAKFLAG ZJN MI2 JUMP IF YES * * * * OTHERWISE HAVE MESSAGE RESENT. CALL PUTCHR,CNAK UJP MI1 * * * * INDICATE TO REMOTE SITE THAT MESSAGE IS OKAY MI2 BSS 0 CALL PUTCHR,CACK SEND POSITIVE ACKNOWLEDGE UJN MESSINX * * * * JUST RECEIVED SYNC CHAR.-ARE WE IN STARTUP MI3 BSS 0 LDD FUNC SBN FASU NJP MI1 JUMP IF NOT * * * * IF STARTUP ONLY WAIT CERTAIN NUMBER OF CHAR. TIMES AOD SC INCREMENT COUNTER ADC -SYEND MAX. NUMBER ALLOWED. MJP MI1 JUMP IF TIME NOT UP * * * * OTHERWISE SEND MESSAGE BACK TO LINKCTL CALL SERROR,SRDR * /--- BLOCK SELDC 00 000 78/01/22 20.30 TITLE SELECT 6681 DATA CONVERTER * * * SELDC * * THIS ROUTINE TAKES THE FOLLOWING STEPS IN SETTING * UP THE 6681 AND 3266 FOR USE. * 1.DEACTIVATE THE CHANNEL * 2.SELECT CONVERTER * 3.CHECK 3266 PORTS * 4.SELECT RESYNC AND SEND FUNCTION TO 311. * * OUTPUT PARAMETERS * IF (A) IS NEGATIVE, ERROR OCCURED. * POSITVE, EVERYTHING IS OKAY. * SELDC SUBR RJM CCR NJN SELDC1 IF EQUIP/CHANNEL RESERVED CALL SERROR,SENA SELDC1 BSS 0 * * * * DEACTIVATE THE CHANNEL IF NECESSARY IJM SELDC2,C=CH JUMP IF CHANNEL INACTIVE DCN C=CH,40B DE-ACTIVATE THE CHANNEL RJM TIMOUT NJN SELDC2 JUMP IF CHANNEL DEACTIVATED. * * * * ERROR--CHANNEL DID NOT DROP CALL LREL RELEASE EQUIPMENT RESERVATIONS CALL HERROR,HDCN * * * * SELECT CONVERTER SELDC2 BSS 0 FNC DCSC,C=CH FUNCTION SELECT CONVERTER RJM TIMOUT WAIT FOR CHANNEL TO DEACTIVATE. NJN SELDC4 JUMP IF CHANNEL DEACTIVATED * * * * ERROR--SELECT CONVERTER FUNCTION NOT ACCEPTED CALL LREL RELEASE EQUIPMENT RESERVATIONS CALL HERROR,HFSC * * * * SET UP 311 SO IT IS READY TO SEND AND RECEIVE. SELDC4 BSS 0 PORT ODD CONNECT TO ODD CHANNEL RJM ST6681 CHECK FOR FUNCTION REJECT MJN SELDC5 IF ERROR * * * * CONNECT TO EVEN CHANNEL PORT EVEN CONNECT OT EVEN CHANNEL. RJM ST6681 CHECK FOR 6681 REJECT SELDC5 LJM SELDCX IGNORE ERRORS EJECT * * * TIMOUT * * ROUTINE TO MAKE SURE CHANNEL DEACTIVATES * WITHIN PROPER TIME LIMIT. * TIMOUT SUBR LDC TOUT TIME OUT COUNTER TMO1 BSS 0 IJM TIMOUTX,C=CH IF ALL QUIET SBN 1 NJN TMO1 JUMP IF COUNTER NOT EXPIRED UJN TIMOUTX * /--- BLOCK 6681 00 000 78/01/22 20.30 SPACE 6 * * * ST6681 * * CHECK 6681 STATUS FOR FUNCTION REJECT. * * OUTPUT PARAMETERS * IF (A) IS NEGATIVE FUNCTION WAS REJECTED. * POSITIVE EVERTHING IS OKAY. * ST6681 SUBR FNC DCCS,C=CH STATUS FUNCTION ACN C=CH,40B ACTIVATE THE CHANNEL IAN C=CH,40B INPUT STATUS DCN C=CH,40B STD PS SAVE STATUS LPN 7 MASK REJECT BITS ZJN ST6681X * * * * ERROR--6681 REJECT CONNECT FUNCTION * CALL LREL RELEASE EQUIPMENT RESERVATIONS CALL HERROR,HREJ * /--- BLOCK SEST 00 000 77/08/17 15.01 TITLE SYNCHRONIZATION ESTABLISH * * * * SEST * * ESTABLISH SYNCHRONIZATION WITH REMOTE SITE. * ON ENTRY (A) = NUMBER OF TIMES TO TRY * SEST SUBR * * * * SET LOOP COUNTER STD TT * * * * CLEAR SYNC CODE INDICATOR LDN 0 STM SFLAG * * * * SELECT RESYNCH. FUNCTION SE0 BSS 0 CALL OCHR2,BRSY+BSND * * * * SET NUMBER SYNCH CODES TO SEND LDN 4 STD SC * * * * WAIT FOR CHARACTER REQUEST STATUS SE1 BSS 0 RJM PAUSE CALL WCR,MCRQ WAIT FOR CHAR. REQUEST ZJN SE3 JUMP IF NEVER FOUND CHAR. REQ. * * * * OUTPUT SYNC CODE CALL OCHR,CSYN OUTPUT SYNC CODE. * * * * CHECK FOR SYNCHRONIZATION ESTABLISHED CALL WCPE STM SFLAG SET SYNC. ACHIEVED FLAG NJN SESTX IF ESTABLISHED * * * * HAVE ALL SYNCH CODES BEEN OUTPUT SOD SC NJP SE1 JUMP IF NOT * * * * DECREMENT COUNTER AND QUIT IF ZERO SOD TT NJN SE0 * * * * ERROR - SYNCHRONIZATION NEVER ESTABLISHED CALL HERROR,HECP * * * * ERROR--INITIAL CHARACTER REQUEST DID NOT APPEAR SE3 BSS 0 LDD CHAR SAVE STATUS FOR RESPONSE STD PS CALL HERROR,HCRQ * /--- BLOCK CMCAL 00 000 77/08/29 15.27 TITLE DIVIDE BY 5 * * * CMCAL * * DIVIDE NUMBER IN -A- BY FIVE AND PUT RESULT IN * -DL-. THE METHOD USED IS TO MULTIPLY THE * NUMBER BY 205, THEN DIVIDE BY 1024. THIS WORKS * FOR NUMBERS UPTO 1200. * CMCAL SUBR * * * * MULTIPLY BY 205. (N=NUMBER, *=MULTIPLY) * STD T1 SAVE N SHN 1 N*2 ADD T1 (N*2)+N = (N*3) STD T2 SAVE (N*3) SHN 4 (N*3)*16 ADD T2 (N*3)*16 + (N*3) = (N*51) SHN 2 (N*51)*4 = (N*204) ADD T1 (N*204)+N = (N*205) * * * * DIVIDE BY 1024 * SHN -10 (N*205)/1024 STD DL THE RESULT UJN CMCALX TITLE INCREMENT 5 BYTE COUNTER * * * AFIVE * * INCREMENT BY ONE A 5 BYTE COUNTER DESIGNATED * BY THE ADDRESS IN A. ALSO MOVE THE COUNTER * TO LKBUF SO THAT IT CAN BE WRITTEN TO ECS. * * INPUT PARAMETERS'; * (A) = ADDRESS OF BYTE ZERO OF COUNTER * * AFIVE SUBR STD TT SAVE ADDRESS LDN 4 STD T1 INITIALIZE THE LOOP COUNTER * * * * INCREMENT COUNTER STARTING WITH BYTE 4 AF1 BSS 0 AOM 4,TT INCREMENT THIS BYTE BY ONE STM LKBUF,T1 SAVE NEW VALUE FOR ECS TRANSFER SHN -12 CHECK FOR OVERFLOW ZJP AF2 JUMP IF NO OVERFLOW SOD TT SET TO NEXT BYTE SOD T1 DECREMENT BYTE COUNTER UJN AF1 * * * * MOVE REST OF COUNTER TO LKBUF AF2 BSS 0 SOD TT SOD T1 MJN AFIVEX IF ALL DONE LDM 4,TT STM LKBUF,T1 UJN AF2 * /--- BLOCK PARGEN 00 000 77/02/15 14.05 TITLE PARITY GENERATION * * * PARGEN * * 'THIS ROUTINE GENERATES A TABLE CONTAINING * ALL POSSIBLE 7 BIT COMBINATIONS THAT CAN * BE SENT AS DATA OR CONTROL CHARACTERS OVER * THE LINK PLUS THE APPROPRIATE PARITY BIT(ODD). * 'THUS WHEN SENDING A CHARACTER, THE CHARACTER * CAN BE USED AS AN INDEX INTO THIS TABLE TO GET * THE CHARACTER PLUS PARITY TO TRANSMIT. * PARGEN SUBR LDC 127 128 POSSIBLE 7 BIT CHARATERS. STD T1 * * * * MAIN LOOP DONE ONCE FOR EACH 7 BIT CHARATER. * PG1 BSS 0 LDN 0 INITIALIZE BIT COUNTER STD T2 LDD T1 SAVE WORKING COPY OF CURRENT STD T3 CHARACTER. LDN 6 SEVEN BITS/CHARACTER STD T4 * * * * INTER LOOP - COUNTS NUMBER OF BITS IN CHARACTER * PG2 BSS 0 LDD T3 GET SHIFTED 7 BIT CHARACTER SHN 1 POSITION NEXT BIT STD T3 SAVE FOR NEXT LOOP SHN 10 MOVE BIT TO TOP PJN PG3 JUMP IF BIT NOT SET AOD T2 BIT SET INCREMENT BIT COUNTER PG3 BSS 0 SOD T4 DECREMENT NUMBER OF BITS TESTED PJN PG2 JUMP IF MORE BITS * * * * GENERATE CHARACTER WITH PARITY BIT * LDD T2 LOAD BIT COUNT LPN 1 ISOLATE PARITY BIT LMN 1 TOGGLE BIT SHN 7 POSITION PARITY BIT ADD T1 ADD IN 7 BIT CHARACTER STM PARTBLE,T1 STORE IN TABLE * * * * END OF MAIN LOOP - JUMP IF MORE TO DO. * SOD T1 DECREMENT CHARACTER COUNTER. PJP PG1 JUMP IF NOT DONE UJN PARGENX * /--- BLOCK PAUSE 00 000 84/11/15 11.35 TITLE PAUSE--CHECK FOR STORAGE MOVE OR ERROR CONDITIONS * PAUSE * * THIS ROUTINE CHECKS TO SEE IF THE STORAGE * MOVE OR ERROR FLAGS AT THE CONTROL POINT ARE * SET. IF NECESSARY, IT PAUSES AND THEN RESETS * THE REFERENCE ADDRESSES. IF THE CONTROL POINT * ERROR FLAG IS SET OR THERE IS NO CPU ACTIVITY * AT THE CONTROL POINT, THE PPU IS DROPPED. * PAUSE SUBR * * * * RESET PAUSE COUNTER LDC TOUT2 STD TI * * * * READ CONTROL POINT STATUS LDD CP ADN STSW CRD CM LDD CM+C.CPEF ERROR FLAG NJP DPP2 EXIT IF CONTROL POINT ERROR. LDD CM+C.CPSTAT SHN -11B ZJP DPP2 IF NO CPU ACTIVITY * * * * CHECK FOR PAUSE CONDITION LDN CMCL CRD CM LDD CM SBD CP NJN PAUSEX IF NO PAUSE REQUIRED PAUSE ST * * * * READ CONTROL POINT STATUS WORD LDD CP ADN STSW CRD CM LDD CM+C.CPEF NJP DPP2 EXIT IF CONTROL POINT ERROR * * * * NEW PPU STATUS WORD ADDRESS LDM PU SHN 6 ADD RA SHN 6 ADM PL PLANT CM,PPST * * * * NEW COMMUNICATION BUFFER ADDRESS. LOADCM PPST ADN 2 PLANT CM,COMBF * * * * ECS TRANSFER BUFFER ADDRESS LOADCM PPST ADN 22 PLANT CM,TRNBF LJM PAUSEX SPACE 2 * * * FRMCHK * * CHECK FOR FRAMAT RE-INITIALIZING. 'THIS HAPPENS * WHEN FRAMAT IS DROPPED AND RELOADED FOLLOWING * AN ECS ERROR. * FRMCHK SUBR * * * * RESET TIME OUT COUNTER LDN 50 STD FRCHK * * * * READ FRAMAT STATUS WORD FRMCHK1 BSS 0 LDN 0 STD ECSOFF LDN 1 STD ECS CALL READECS,FORINIP * * * * CHECK TO SEE IF FRAMAT RE-INITIALIZING LDM LKBUF SHN 6 PJN FRMCHKX * * * * WAIT UNTIL FRAMAT DONE INITIALIZING CALL PAUSE DELAY 5000 UJP FRMCHK1 * /--- BLOCK ERROR 00 000 84/11/15 11.35 TITLE SOFTWARE AND HARDWARE ERROR ROUTINES * * * SERROR * * THIS ROUTINE PROCESSES SOFTWARE ERRORS AS FOLLOWS'; * 1. PUT ERROR CODE INTO RESPONSE BUFFER. * 2. WRITE RESPONSE TO CM * * * INPUT PARAMETERS * -A- MUST CONTAIN THE APPROPRIATE ERROR CODE. * SERROR SUBR STM OBF+RERR RJM WRITE UJP MAIN GO BACK TO MAIN LOOP SPACE 4 * * * HERROR * * THIS ROUTINE PROCESSES HARDWARE ERRORS AS FOLLOWS'; * 1.PUT ERROR CODE INTO RESPONSE BUFFER. * 2.PUT HARDWARE STATUS INTO RESPONSE BUFFER. * 3.WRITE RESPONSE BACK TO CM. * * *INPUT PARAMETERS * -A- MUST CONTAIN ERROR CODE. * -PS- MUST CONTAIN APPROPRIATE STATUS * HERROR SUBR STM OBF+RERR PUT ERROR CODE IN RESPONSE LDD PS GET HARDWARE STATUS STM OBF+RSTA PUT STATUS INTO RESPONSE RJM WRITE WRITE RESPONSE TO CM. LDD MODE CHECK FOR TERMINAL MODE ZJP MAIN JUMP IF DATA MODE LDC LABK KEY TO BE PRESSED STM RQKEY CALL PREQ,PKEY SEND A KEY TO WAKE UP LINKCTL LJM MAIN SPACE 2 * * *LOSTC * LOST CONTACT WITH REMOTE SITE EXIT * LOSTC BSS 0 CALL HERROR,HLCR * /--- BLOCK DPP 00 000 78/05/11 22.05 TITLE EXIT ROUTINES DPP BSS 0 CALL TMEND CALL PREQ,PKILL SEND KILL REQUEST TO PLATO. DPP2 BSS 0 LDN 1 MARK DROPPING PPU STM DPPF CALL STDPP IF EQUIPMENT UP SEND STOP CODE. CALL LREL RELEASE COMMUNICATION LINK MONITOR DPPM LJM PPR EXIT TO IDLE LOOP. SPACE 2 * * *DROPCHK * * CHECK FOR PLATO LESSON DROP SIGNAL * DROPCHK SUBR LOADCM PPST PPU STATUS WORD. CRD CM LDD CM+4 ZJP DPP JUMP IF BIT CLEARED UJN DROPCHKX TITLE SEND END LINK * * * STDPP * * 'THIS ROUTINE SELECTS -STOP SEND- ON 3266. * STDPP SUBR * * * * EXIT IF EQUIPMENT OR CHANNEL IS NOT RESERVED. * RJM CCR ZJN STDPPX * * * * SEND 100 BAD CHARACTERS TO OTHER SYSTEM LDC 100 STD RESEND SET CHARACTER COUNT * * * * WAIT FOR CHARACTER REQUEST STD1 BSS 0 LDC 7777B STD D0 NO. OF TIMES TO LOOK FOR STATUS * * * * CHECK FOR CHARACTER REQUEST STATUS STD2 BSS 0 CALL ICHR INPUT STATUS LPC MCRQ CHAR. REQUEST MASK NJP STD3 JUMP IF STATUS APPEARED * * * * DECREMENT STATUS CHECK COUNTER SOD D0 ZJP STD4 JUMP IF NO CHAR. REQUEST UJP STD2 LOOP AND CHECK AGAIN * * * * SEND CHARACTER STD3 BSS 0 LDN 3 CALL OCHR OUTPUT CHAR. * * * * HAVE 100 CHAR. BEEN OUTPUT SOD RESEND DECREMENT COUNTER PJP STD1 LOOP IF NOT * * * * SET UP CONTROLLER FOR NEXT TRY STD4 BSS 0 CALL OCHR2,BSTP+BRSY LJM STDPPX * /--- BLOCK T DPP 00 000 77/09/06 00.40 TITLE TERMINAL MODE TERMINATION * * * TMEND * * THIS ROUTINE DOES THE EXTRA PROCESSING NEEDED * WHEN LEAVING TERMINAL MODE PROCESSING ROUTINES. * TMEND SUBR LDD MODE ZJN TMENDX IF NOT IN TERMINAL MODE * * * * PRESS KEY ON CALLING STATION * LDC LABK PRESS A LAB KEY STM RQKEY CALL PREQ,PKEY * * * * CLEAR FRAMER STATUS WORD CALL LCLEAR,5 CLEAR 5 BYTES OF LKBUF LDN 1 STD ECS WRITE ONE WORD OF ECS LDM FRAMID OFFSET TO CORRECT WORD STD ECSOFF CALL WRITECS,PIOSTS UJN TMENDX * * * LCLEAR * * CLEAR INDICATED NUMBER OF BYTS IN -LKBUF- * * INPUT PARAMETER * (A) = NUMBER OF BYTES TO CLEAR * LCLEAR SUBR SBN 1 STD T1 LCL BSS 0 LDN 0 STM LKBUF,T1 SOD T1 PJN LCL JUMP IF MORE TO CLEAR UJN LCLEARX * /--- BLOCK PREQ 00 000 78/05/11 21.52 TITLE SEND PLATO REQUEST * * * PREQ * * SEND REQUEST TO PLATO * (A) CONTAINS REQUEST CODE ON ENTRY. * (RQKEY) CONTAINS KEY VALUE FOR REQUEST. * PREQ SUBR STD TT SAVE REQUEST CODE * * * * CHECK FOR PENDING REQUEST PREQ1 BSS 0 LOADCM PPST ADDRESS OF CM BUFFER ADN 1 BUMP TO REQUEST SLOT CRD T1 MAKE SURE NO REQUEST PENDING LDD T1 NJN PREQ2 JUMP IF PENDING REQUEST * * * * SET UP NEW REQUEST LDD TT GET REQUEST CODE STD CM+4 PUT REQUEST CODE INTO BUFFER LDM RQKEY GET KEY TO PUT INTO REQUEST STD CM+3 LDD STATION PUT STATION NUMBER IN REQUEST STD CM+2 LDN 0 STD CM+1 LDC 4000B SET REQUEST BIT STD CM * * * * GIVE NEW REQUEST TO PLATO LOADCM PPST NOTHING PENDING WRITE NEW REQ. ADN 1 CWD CM UJN PREQX * * * * WAIT FOR PENDING REQUEST TO BE PROCESSED PREQ2 BSS 0 DELAY 4000 CALL PAUSE UJP PREQ1 * * /--- BLOCK LOOPCHK 00 000 84/11/15 11.35 TITLE PROCESS 3266 INPUT * * * LOOPCHK * * PROCESS 3266 INPUT WHILE WAITING ON LINKCTL * TO SEND NEXT COMMAND. * LOOPCHK SUBR * * * * EXIT IF EQUIPMENT/CHANNEL NOT RESERVED RJM CCR ZJN LOOPCHKX * * * * SET SPECIAL WAIT-ON-LINKCTL FLAG LDN 1 STM WAITF * * * * WAIT FOR INPUT CHARACTER CALL WCR,MCRD ZJP WAITL JUMP IF NO CHARACTER APPEARED * * * * PROCESS NEW CHARACTER CALL GETCHR * * * * CLEAR SPECIAL FLAG LDN 0 STM WAITF UJN LOOPCHKX TITLE WAIT ON LINKCTL * * * WAITL * * THIS ROUTINE IS CALLED IF THE LINK IS DROPPED * WHILE CLD IS WAITING FOR A LINKCTL COMMAND. * WHEN THE NEXT COMMAND ARRIVES LINKCTL IS * INFORMED OF THE ERROR. * WAITL BSS 0 * * * * CHECK FOR PAUSE CONDITION CALL PAUSE * * * * CHECK FOR DROP SIGNAL FROM LINKCTL CALL DROPCHK * * * * CHECK FOR LINKCTL COMMAND CALL READSW ZJN WAITL NO NEW COMMAND, LOOP * * * * NEW COMMAND ARRIVED, SEND ERROR TO LINKCTL CALL HERROR,HBCH * /--- BLOCK EQUATES 00 000 78/05/11 22.16 TITLE EQUATES ************************************************************************ * LAB1K EQU 213B LAB1 KEY CODE * LABK EQU 212B LAB KEY CODE * LKMASK EQU 177B LINKIO BUFFER LENGHT MASK * TMASK EQU 777B TERMINAL MODE MODULO MASK * CHPK EQU 2 CHARACTERS PER KEY * CHPF EQU 4 CHARACTERS PER FRAME * ALSEVEN EQU 7777B CONSTANT * TOUT EQU 777B TIME OUT LOOP COUNTER * TOUT2 EQU 100B * MCHR8 EQU 377B 8 BIT CHARACTER MASK * MCHR7 EQU 177B CHARACTER MASK FOR DATA INPUT * DCON EQU 100B BIT ADD TO INDICATE DATA * CHARACTER. RSCNT EQU 30 NUMBER OF TIMES TO RESEND * A MESSAGE BEFORE GIVING UP. PEND EQU 30 NUMBER OF CONSECUTIVE BAD * CHAR. BEFORE GIVING UP. SYEND EQU 2000 NUMBER OF SYNC. CHAR TO WAIT * WHEN CHECKING FOR REMOTE REQ. SYEND1 EQU 10 NUMBER CONSECUTIVE SYNC CHAR * ALLOWED DURING A MESSAGE. SYEND2 EQU 500 NUMBER OF SYNC. CHAR. TO WAIT * WHEN LOOKING FOR ACK/NAK. MAXCM EQU 60 MAXIMUM SIZE OF LINKCTL REQUEST * XFORINIP EQU 2 ECS ADDRESS OF FORMATTER- * FRAMER STATUS WORD ************************************************************************ * /--- BLOCK DEFINES 00 000 78/05/11 21.58 TITLE STORAGE DEFINITIONS ************************************************************************ * * CLEQ DATA 7777B EST ORDINAL OF -CL- AFTER * EQUIPMENT RESERVED OTHERWISE * SET TO ALL SEVENS. CLCH DATA 7777B SET TO ALL SEVENS UNTIL * COMMUNICATION CHANNEL IS * RESERVED, THEN SET TO CHANNEL. SFLAG BSSZ 1 0 IF SYNC. NOT ACHIEVED, * NONZERO OTHERWISE WAITF BSSZ 1 1 = PROCESSING INPUT WHILE * WAITING FOR LINKCTL COMMAND. * 0 ALL OTHER TIMES. RQKEY BSSZ 1 KEY IN PRESS REQUEST TO PLATO * PECNT BSSZ 1 NUMBER OF CHARACTER PARITY * ERRORS. BDCNT BSSZ 1 NUMBER OF BAD CHARACTERS. * LPCNT BSSZ 1 NUMBER OF BAD LONGITUDINAL * PARITY CHARACTERS. SCCNT BSSZ 1 NO. OF MESSAGES RESENT BECAUSE * NO RESPONSE WAS RECEIVED. BCCNT BSSZ 1 NO. OF MESSAGES RESENT BECAUSE * RESPONSE WAS NOT AN -ACK-. LKBUF BSSZ 40 ECS READ/WRITE BUFFER * IFRAMEX BSSZ 1 TEMPORARY SAVE AREA FOR FRAME * INDEX. IFRAME BSSZ 5 CLD FRAME POINTER MATCHES * ECS RESIDENT LFRPNT. PFRAME BSSZ 5 CLD LINKIO POINTER MATCHES * ECS RESIDENT LKIN FRBUFF BSSZ 2 TERMINAL MODE FRAME BUFFER. * KYBUFF DATA 7777B TERMINAL MODE KEY BUFFER. * LFRLTH BSSZ 1 NO. OF TERMINAL WORDS IN * EACH FRAME. FRAMID BSSZ 1 LINK FRAME ID * DPPF BSSZ 1 NON-ZERO IF DROP PPU IN PROCESS * CLKU BSSZ 2 RUNNING CLOCK CLKL EQU CLKU+1 * PU BSSZ 2 CM ADDRESS OF PARAMETER AREA PL EQU PU+1 * * /--- BLOCK DEFINES 00 000 78/01/04 21.30 ECU BSSZ 2 ECS RA ECL EQU ECU+1 * ECSAD BSS 0 ECS ADDRESS TABLE PKEYECS BSSZ 2 KEY BUFFER * PECSIN BSSZ 2 KEYS-IN BIT TABLE * LINKIO BSSZ 2 TERMINAL WORD BUFFER FOR * PASSING INFO TO THE FRAMER. LKIN BSSZ 2 POINTER TO NEXT LOCATION IN * TERMINAL WORD BUFFER. LFRBUF BSSZ 2 FRAME BUFFERS * LFRPNT BSSZ 2 POINTER TO NEXT LOCATION IN * FRAME BUFFERS. LFRLTHS BSSZ 2 NO. OF TERMINAL WORDS IN EACH * FRAME. PIOSTS BSSZ 2 FRAMER STATUS WORD - INDICATES * CLD IS READING FRAMES ECSLTH EQU *-ECSAD LENGTH OF ECS ADDRESS TABLE * FORINIP BSSZ 2 FORMATTER-FRAMER STATUS WORD * ECS ADDRESS * /--- BLOCK IBF 00 000 77/10/03 14.21 TITLE COMMUNICATION BUFFERS ************************************************************************ * * THIS BUFFER IS USED TO HOLD REQUESTS AND DATA * FROM LINKCTL. 'THE SWITCH WORD IS CONTIGUOUS * WITH THE REST OF THE BUFFER IN THE CM BUFFER * BUT IS READ SEPARATLY BY THE LINK DRIVER. * * BYTE DESCRIPTIONS'; * SWITCH WORD * / 0 / 0 / 0 / 0 / NUMBER OF WORDS IN REQUEST(CM) / * PARAMETER SECTION (IBF) * / 0 / 0 / 0 / 0 / LINK FUNCTION CODE (RFUNC) / * / RSTA1 / RSTA / UNUSED / UNUSED / RERR / * MESSAGE INFO (IHDR) * / REOM / RWDS / STNO / RSOM / RMNO (ISTART) / * START OF ACTUAL DATA (XBUFF) * / 200 BYTES OF DATA / * PLTH EQU 2 CM WORDS IN PARAMETER SECTION * DLTH EQU 300 PPU WORDS IN DATA BUFFERS * PPOS EQU 1 OFFSET TO PARAMETER SECTION * (CM WORDS) DPOS EQU 3 OFFSET TO MESSAGE INFO SECTION * (CM WORDS) IBF BSS PLTH*5 PARAMETER SECTION * IHDR BSS 5 MESSAGE INFO * ISTART EQU IHDR+4 FIRST BYTE TRANSMITTED * (MESSAGE NUMBER) XBUFF BSS DLTH START OF ACTUAL DATA * * /--- BLOCK IBF 00 000 77/09/07 23.18 * * * * FOLLOWING ARE LOCATIONS OF VARIOUS PARAMETERS * SUPPLIED FOR CERTIAN LINK DRIVER FUNCTIONS. * XPORTCH EQU XBUFF+4 WORD WHERE 311 CHANNEL IS * RECEIVED FROM LINKCTL. XECU EQU XBUFF+8 PLATO*S ECS RA UPPER 9 BITS * XECL EQU XBUFF+9 PLATO*S ECS RA LOWER 12 BITS * XTMSTAT EQU XBUFF+9 TERMINAL MODE STATION NO. * XPKEYEC EQU XBUFF+13 ECS ADDRESS OF KEY BUFFER * XPECSIN EQU XBUFF+18 ECS ADDR. OF KEYS-IN BIT TABLE * XLINKIO EQU XBUFF+23 ECS ADDR. OF TERMINAL WORD BUF. * XLKIN EQU XBUFF+28 ECS ADDRESS OF POINTER TO NEXT * POSITION IN TERMINAL WORD BUF. XLFRBUF EQU XBUFF+33 ECS ADDRESS OF FRAME BUFFERS * XLFRPNT EQU XBUFF+38 ECS ADDRESS OF FRAME BUFFER * POINTER. XFRLTHS EQU XBUFF+43 ECS ADDRESS OF FRAME LENGTH * TABLE XPIOSTS EQU XBUFF+48 FRAMER STATUS WORD * XLFRLTH EQU XBUFF+54 NO. OF TERMINAL WORDS PER * FRAME. XFRAMID EQU XBUFF+59 LINK FRAME ID * XPATTRN EQU XBUFF+9 TEST PATTERN FOR LOOP BACK * XLOOPS EQU XBUFF+14 0=RECEIVE 100 LOOPBACK CHARS * 1=RECEIVE INFINITE NO. OF CHARS * * * * BYTE POSITIONS OF FIELDS IN PARAMETER SECTION * RFUNC EQU 4 FUNCTION CODE * RERR EQU 9 ERROR CODE * RSTA1 EQU 5 SECONDARY STATUS * RSTA EQU 6 EQUIPMENT STATUS * * * * * BYTE POSITION OF FIELDS IN MESSAGE INFO SECTION * RSOM EQU 3 START OF MESSAGE CHARACTER * REOM EQU 0 END OF MESSAGE CHAR. * STNO EQU 2 LINKCTL STATION NO. * RMNO EQU 4 MESSAGE NUMBER * RWDS EQU 1 PPU WORD COUNT * ************************************************************************ * /--- BLOCK OBF 00 000 77/09/07 01.20 TITLE COMMUNICATION BUFFERS ************************************************************************ * * THIS BUFFER IS USED FOR SENDING DATA AND * RESPONSE PARAMETERS TO LINKCTL. 'THE SWITCH * WORD IS APPENDED TO THE FOLLOWING BUFFER AFTER * IT IS WRITTEN TO CENTRAL MEMORY. * * BYTE DESCRIPTIONS'; * SWITCH WORD (BUILT AT A SEPARATE LOCATION) * / 4000B / 0 / 0 / NO. OF WORDS RETURNED(CM) / 0 / * PARAMETER SECTION (OBF) * / 0 / 0 / 0 / 0 / UNUSED / * / RSTA1 / RSTA / UNUSED / UNUSED / RERR / * MESSAGE INFO SECTION (IHDR) * / REOM / RWDS / STNO / RSOM / RMNO (OSTART) / * START OF ACTUAL DATA (DBUFF) * / 200 BYTES OF DATA / * MAXIN EQU DLTH+4 MAXIMUM NUMBER OF BYTES+2 IN * A MESSAGE FROM REMOTE SITE. OBF BSSZ PLTH*5 OUTPUT BUFFER FOR PARAMETER * OHDR BSS 5 MESSAGE INFO * OSTART EQU OHDR+4 LOCATION TO STORE 1ST BYTE OF * MESSAGE (MESSAGE NUMBER). DBUFF BSS DLTH LOCATION OF FIRST BYTE OF DATA. * * * * * LOCATIONS OF VARIOUS PARAMETERS RETURNED TO * LINKCTL. * DSTATS EQU DBUFF+4 LINK DRIVER STATISTICS * ************************************************************************ * /--- BLOCK ERROR CODE 00 000 78/01/05 09.04 TITLE ERROR CODES ************************************************************************ * * * ERROR CODES * CODES 0,1, AND 2 SAVE FOR PPU CALL ERRORS WHICH * ARE GENERATED BY TUTOR COMMAND LOADPPU. * SIFC EQU 3 ILLEGAL FUNCTION CODE SENA EQU 4 EQUIPMENT NOT AVAILABLE SCNA EQU 5 CHANNEL NOT AVAILABLE SRDR EQU 6 REMOTE DID NOT RESPOND AFTER * SENDING DURING STARTUP. HDCN EQU 7 CHANNEL WOULD NOT DEACTIVATE. HFSC EQU 8 COULD NOT SELECT 6681. HECP EQU 9 COULD NOT ESTABLISH CHARACTER * PHASE IN 311. HCNO EQU 10 CARRIER NOT ON IN 311. HDSF EQU 11 DATA SET FAILURE. HCRQ EQU 12 INITIAL CHARACTER REQUEST * NEVER APPEARED. HREJ EQU 13 6681 REJECTED CONNECT FUNCTION HSYN EQU 14 SYNCHRONIZATION LOST. HLCR EQU 15 LOST CONTACT WITH REMOTE SITE SCML EQU 16 LINKCTL REQUEST TOO LONG HRSD EQU 17 MESS. CANNOT BE SENT CORRECTLY HMLT EQU 18 MESSAGE TOO LONG. HBCH EQU 19 TOO MANY CONSECUTIVE BAD CHAR. ************************************************************************ * /--- BLOCK FUNC SOFT 00 000 76/10/14 13.31 TITLE COMMAND CODES AND CONTROL CHARACTERS ************************************************************************ * * COMMAND CODES FROM -LINKCTL-. * ************************************************************************ * FASU EQU 0 CHECK FOR STARTUP FRES EQU 1 RESERVE DRIVER. FMES EQU 2 SEND AND RECEIVE A MESSAGE FREL EQU 3 FSTA EQU 4 RETURN 311 STATUS FSTI EQU 5 RETURN STATISTICS COUNTERS FTST EQU 6 RUN LOOP BACK TEST FLTL EQU 7 LOCAL TERMINAL MODE FRTL EQU 10B REMOTE TERMINAL MODE FSIL EQU 11B UNUSED FNTL EQU 12B NEW LOOPBACK TEST. * ************************************************************************ SPACE 4 ************************************************************************ * * CONTROL CHARACTERS * ************************************************************************ * CEOD EQU 30B END OF DATA CEOB EQU 31B END OF BLOCK CEOF EQU 32B END OF FILE CNAK EQU 33B NEGATIVE ACKNOWLEDGE CACK EQU 34B POSITIVE ACKNOWLEDGE CETM EQU 35B END OF TERMINAL MODE CSYN EQU 62B SYNCH CODE CMAX EQU 77B MAXIMUM CONTROL CHARACTER * ************************************************************************ SPACE 2 ************************************************************************ * * PLATO REQUEST CODES * ************************************************************************ PKILL EQU 1 KILL THIS PPU ROUTINE PKEY EQU 2 PRESS A KEY ON LINKCTL ************************************************************************ * /--- BLOCK FUNC HARD 00 000 76/04/07 23.34 TITLE 6681 AND 311-B CODES ************************************************************************ * * 6681 DATA CHANNEL CONVERTER CODES * ************************************************************************ DCSC EQU 2000B SELECT CONVERTER DCDC EQU 2100B DESELECT CONVERTER DCIC EQU 1500B INPUT CODE DCOC EQU 1600B OUTPUT CODE DCMC EQU 1700B MASTER CLEAR DCCS EQU 1200B CONVERTER STATUS DCES EQU 1300B EQUIPMENT STATUS ************************************************************************ SPACE 4 ************************************************************************ * * 311-B FUNCTION CODES. * ************************************************************************ BSTP EQU 1 SELECT STOP BSND EQU 2 SELECT SEND BRSY EQU 4 RESYNC CODE. BSAR EQU 6 COMBINED SEND AND RESYNC CODE. ************************************************************************ SPACE 4 ************************************************************************ * * 311 STATUS MASKS * ************************************************************************ * MCPE EQU 1000B CHARACTER PARITY ERROR. MCRQ EQU 2000B CHARACTER REQUEST MCRD EQU 4000B CHARACTER READY MCST EQU 2 CARRIER ON MCPH EQU 1 CHARACTER PHASE MCSR EQU 4000B ODD CHANNEL STATUS READY * * /--- BLOCK INITIAL 00 000 78/02/06 10.58 TITLE INITIALIZATIONS * INITIAL SUBR * * * * READ CONTROL POINT STATUS LDD CP ADN STSW READ CONTROL POINT STATUS CRD CM LDD CM+C.CPEF NJP DPP2 DROP PPU IF ERROR * * * * GET CALL STATUS WORD LDD IR+3 READ STATUS WORD LPN 37B STM PU SAVE RELATIVE ADDRESS SHN 12 ADD IR+4 STM PL SAVE BOTTOM OF RELATIVE ADDR. CALL ABS CONVERT TO ABSOLUTE ZJP INITE JUMP IF OUT OF RANGE * * * * PLANT ABSOLUTE ADDRESS OF CALL STATUS WORD PLANT CM,PPST * * * * READ PPU CALL STATUS WORD LOADCM PPST CRD CM LDN 1 INDICATE PPU UP AND RUNNING STD CM+4 LOADCM PPST CWD CM REWRITE STATUS WORD. * * * * FORM ABSOLUTE ADDRESS OF COMMUNICATION BUFFER LOADCM PPST ADN 2 PLANT CM,COMBF * * * * PLANT ADDRESS USED FOR ECS TRANSFERS LOADCM PPST ADN 22 PLANT CM,TRNBF * * * * INITIALIZE WAIT FOR CHARACTER READY STATUS COUNTER LDC ALSEVEN STD NC * * * * INITIALIZE I/O CHARACTER COUNTS. LDN 0 STD DL STM SFLAG STD ECSOFF STD BADC STD MODE LDN 50 STD FRCHK TIME-OUT COUNTER FOR READING * FRAMAT STATUS LJM INITIALX * * * * ADDRESS OUT OF RANGE SENT AN ERROR CODE. INITE BSS 0 CALL DFM,CMSG LJM DPP DROP PPU. * CMSG DIS ,*(CLD)CM ADDRESS OUT OF RANGE* * PARTBLE BSS 128 START OF PARITY TABLE * *CALL PLAPABS *CALL PLAPDNM *CALL PLAPEQN *CALL PLAPPLN * C=CH TABLE CHANNEL 3266 CHANNEL TABLE * E=CH TABLE CHANNEL 311 EVEN CHANNEL * O=CH TABLE CHANNEL 311 ODD CHANNEL * PPST TABLE CM PPU CALL STATUS TABLE * COMBF TABLE CM COMMUNICATION BUFFER TABLE * TRNBF TABLE CM ADDRESS USED FOR ECS TRANSFERS * ERRNG 7777B-* PP OVERFLOW END