Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap2_198111 - decus/20-0043/tmsr.doc
There are 2 other files named tmsr.doc in the archive. Click here to see a list.
	THE PDP-8 TELETYPE MONITOR SERVICE ROUTINE

     THE PDP-8 TELETYPE CAN NOW BE USED AS A TERMINAL ON DECSYSTEM-10
SYSTEMS.  THE COMMUNICATION BETWEEN THE PDP-8 AND THE DECSYSTEM-10
MONITOR IS ACHIEVED WITH A CONTROL PROGRAM CALLED "THE
TELETYPE MONTIOR SERVICE ROUTINE (TMSR)" RUNNING IN THE PDP-8.
TMSR HANDLES ALL TELETYPE KEYBOARD AND PRINTER OPERATIONS
AND ALL OPERATIONS INVOLVING THE ASYNCRONOUS LINK BETWEEN THE PDP-8
AND THE DECSYSTEM-10.  TMSR SIMULATES A LOCAL COPY TERMINAL ON
THE DECSYSTEM-10, AND ALSO INCLUDES FACILITIES FOR THE CORE OF THE
PDP-8 TO BE LOADED OR DUMPED DIRECTLY FROM THE DECSYSTEM-10.
TMSR IS FOUR PAGES LONG AND RESIDES IN LOCATIONS 7000-7750 OF
FIELD ZERO OF THE PDP-8.  IT ALSO USES LOCATIONS 1, 2, AND
170-177 OF PAGE ZERO.  OTHER PDP-8 PROGRAMS CAN CO-EXIST WITH TMSR
IF THEY CONFORM TO A FEW BASIC RESTRICTIONS.

	1)  LOCATIONS 1, 2, 170-177, AND 7000-7750 ARE RESERVED FOR TMSR
	2)  ALL TELETYPE FUNCTIONS MUST BE PERFORMED THROUGH TMSR
	3)  ANY OTHER DEVICES BEING USED BY THE PDP-8 PROGRAM MUST
		BE HANDLED ACCORDING TO THE RULES SET FORTH BELOW.

     LOCATIONS 170-177 ON PAGE ZERO ARE FOR USE BY ANY PDP-8
PROGRAM WHICH IS TO BE RUN CONCURRENTLY WITH TMSR.  THESE LOCATIONS
ARE DEFINED AS FOLLOWS:

	170 - START	THIS LOCATION CAN BE LOADED WITH THE STARTING
			ADDRESS OF THE USER PROGRAM.  ANY TIME TMSR IS
			STARTED AT LOCATION 7000 IT TRANSFERS CONTROL
			TO THE ADDRESS SPECIFIED IN LOCATION 170.

	171 - CHAIN	THIS LOCATION IS LOADED WITH THE ADDRESS OF THE
			START OF THE USER'S INTERRUPT SERVICE ROUTINE.
			THIS SERVICE ROUTINE IS ENTERED UPON RECEIPT
			OF AN INTERRUPT OTHER THAN ONE FROM THE 
			TELETYPE KEYBOARD OR PRINTER OR FROM THE
			COMMUNICATIONS LINK.  THE USER SERVICE
			ROUTINE MUST SERVICE THE INTERRUPT, AND CLEAR
			THE INTERRUPTING CONDITION BEFOR DISMISSING,
			OTHERWISE THE USER PROGRAM WILL HANG.

	172 - DISMIS	THIS LOCATION CONTAINS THE ADDRESS OF THE
			DISMISS ROUTINE.  IN ORDER TO DISMISS AN 
			INTERRUPT, A USER SERVICE ROUTINE MUST EXECUTE
			A "JMP I DISMIS" INSTRUCTION SO THAT THE AC AND
			THE LINK CAN BE RESTORED PROPERLY.
	173 - TYPE8	THIS LOCATION CONTAINS THE ADDRESS OF A ROUTINE
			WHICH CAN BE CALLED TO TYPE CHARACTERS ON THE
			TELETYPE OF THE PDP-8.  THE SEQUENCE OF
			INSTRUCTIONS TO TYPE A CHARACTER ON THE TELETYPE
			IS AS FOLLOWS:
				TAD CHARACTER	/GET CHARACTER TO GO OUT
				IOF		/TURN OFF INTERRUPTS
				DCA CHAR	/STORE CHARACTER IN 175
				JMS I TYPE8	/TYPE IT OUT
				JMP NOROOM	/BUFFER IS FULL
				ION		/CHARACTER WENT OUT OK

	174 - SEND10	THIS LOCATION CONTAINS THE ADDRESS OF A ROUTINE
			WHICH CAN BE CALLED TO SEND CHARACTERS TO THE
			DECSYSTEM-10.  THE SEQUENCE OF INSTRUCTIONS
			TO SEND A CHARACTER TO THE PDP-10 IS AS
			FOLLOWS:
				TAD CHARACTER	/GET CHAR TO BE SENT
				IOF		/TURN OFF INTERRUPTS
				DCA CHAR	/STORE CHAR IN LOC 175
				JMS I SEND10	/SEND CHARACTER
				JMP NOROOM	/BUFFER WAS FULL
				ION		/CHAR SENT SUCESSFULLY

	175 - CHAR	THIS LOCATION IS LOADED WITH THE CHARACTER
			TO BE SENT TO EITHER THE PDP-10 OR THE PDP-8
			PRINTER BY THE TYPE8 OR SEND10
			ROUTINES.  SINCE THIS LOCATION IS USED BY TMSR
			ALSO, IT SHOULD BE USED ONLY IN THE SEQUENCES
			DESCRIBED ABOVE FOR TYPE8 AND SEND10.

	176 - TTYINT	THIS LOCATION ALLOWS THE PDP-8 USER PROGRAM
			TO RECEIVE ALL CHARACTERS TYPED ON THE PDP-8
			CTY.  WHEN TTYINT IS NON-ZERO, CONTROL IS
			PASSED TO THE ADDRESS IN TTYINT ANY TIME A KEY
			IS STRUCK ON THE PDP-8 KEYBOARD.  THE
			CHARACTER TYPED IS READ AND STORED INTO
			LOCATION "CHAR" BEFORE THE CONTROL IS TRANSFERED
			TO THE USER PROGRAM.  TO DISMISS THIS INTERRUPT
			THE USER PROGRAM MUST DO A "JMP I DISMIS".

	177 - PTYINT	THIS LOCATION IS USED TO CAUSE ANY CHARACTERS
			COMING FROM THE COMMUNICATIONS LINK TO BE
			SENT DIRECTLY TO THE USER PROGRAM.  WHEN
			PTYINT IS ZERO, TMSR HANDLES ALL CHARACTERS.
			WHEN PTYINT IS NON-ZERO, CONTROL IS PASSED
			TO THE ADDRESS IN PTYINT SO THAT THE USER
			CAN HANDLE THE CHARACTER.  THE CHARACTER IS
			PASSED TO HIM IN LOCATION CHAR, AND
			THE USER PROGRAM MUST DISMISS THIS ROUTINE
			BY EXECUTING A "JMP I DISMIS".
	TMSR LOADER FUNCTIONS

     TMSR IS CAPABLE OF RECEIVING A STRING OF ASCII CHARACTERS AND
TRANSLATING IT INTO CORE LOADING COMMANDS.  CORE LOADING IS
ACTIVATED ON THE RECEIPT OF A "STX" CHARACTER (CONTROL-B).
THE FOLLOWING CHARACTERS ARE THEN DECODED INTO MEMORY FIELD
CHANGE COMMANDS, ORIGIN COMMANDS, OR MEMORY DATA WORDS.  THE ASCII
CHARACTERS ARE DECODED AS FOLLOWS:

	ASCII CHAR	LOADING FUNCTION

	2 (STX)		FIRST INSTANCE - START OF LOAD
			SECOND INSTANCE - END OF LOAD

	150 - 157	MEMORY FIELD CHANGE - SWITCH LOADING TO THE
			FIELD SPECIFIED IN THE LOW ORDER 3 BITS OF
			THE CHARACTER.

	140		ORIGIN COMMAND - INTERPRET THE NEXT TWO
			CHARACTERS AS A 12 BIT ORIGIN DEFINING
			WHERE LOADING IS BE STARTED. THE FORMAT OF
			THE TWO ORIGIN CHARACTERS IS DEFINED BELOW.

	40 - 137	DATA - THE ASCII CHARACTER MINUS 40 IS A 6 BIT
			QUANITIY.  A PAIR OF CHARACTERS IS DECODED INTO
			TWO 6 BIT QUANTITIES, THE FIRST BEING THE HIGH
			ORDER 6 BITS AND THE SECOND BEING THE LOW ORDER
			6 BITS.

	EXAMPLE:	THE FOLLOWING SEQUENCE OF ASCII CHARACTERS
			LOADS DATA WORD "5426" INTO LOCATION 400 OF
			FIELD 1:

			2,151,140,44,40,114,66,2

	MEMORY LOCATION 7600 OF FIELD 0 CONTAINS A 12 BIT CHECKSUM OF
			THE ACTUAL CHARACTERS RECEIVED DURING A LOAD
			(NOT INCLUDING THE "STX" CHARACTERS)
			THE CHECKSUM OF THE PREVIOUS LOAD EXAMPLE WOULD
			BE:   617  (OCTAL)
	TMSR DUMP FUNCTIONS

     TMSR HAS A BUILT IN CORE DUMP ROUTINE TO ALLOW A PROGRAM RUNNING
ON THE PDP-10 TO READ PDP-8 CORE.  DUMPING IS ACTIVATED BY A "WRU"
(CONTROL-E) CHARACTER.  UPON RECEIPT OF A "WRU" CHARACTER, N WORDS ARE
SENT TO THE PDP-10 FROM AN ORIGIN AND FIELD DESIGNATED BY THREE WORDS
IN PDP-8 CORE: DFIELD, DORG, AND DCOUNT.

	DFIELD	LOC 7400	THE LOW ORDER 3 BITS OF THIS WORD
				DESIGNATE THE FIELD FROM WHICH DATA IS
				TO BE DUMPED.

	DORG	LOC 7401	THIS WORD CONTAINS THE STARTING
				ADDRESS OF THE DATA TO BE DUMPED.

	DCOUNT	LOC 7402	THIS WORD IS THE NEGATIVE COUNT OF
				THE NUMBER OF DATA WORDS TO BE DUMPED.

UPON RECEIPT OF A "WRU" CHARACTER (ASCII 5) TMSR WILL START DECODING
12 BIT WORDS INTO PAIRS OF CHARACTERS AS DESCRIBED IN THE LOADER 
SECTION, WHERE THE FIRST CHARACTER SENT IS THE HIGH ORDER 6 BITS OF THE
WORD PLUS 40, AND THE SECOND CHARACTER SENT IS THE LOW ORDER 6 BITS
OF THE WORD PLUS 40.  IMMEDIATELY FOLLOWING THE DUMPED DATA ARE TWO
CHARACTERS WHICH CAN BE DECODED INTO A 12 BIT CHECKSUM OF THE ACTUAL
CHARACTERS SENT DURING THE DUMP.

	EXAMPLE:	IF THE DUMP LOCATIONS CONTAINED THE
			FOLLOWING:

			DFIELD,	1
			DORG,	400
			DCOUNT,	-2
				AND LOCATIONS 400 AND 401 OF FIELD 1
				WERE:

			400/	1234
			401/	5670

			THE UPON RECEIPT OF A "WRU" TMSR WOULD SEND
			TO THE PDP-10 THE FOLLOWING ASCII STRING:

			52,74,116,130,44,54

			THE FIRST FOUR CHARACTERS ARE THE DATA WORDS,
			AND THE LAST TWO ARE THE CHECKSUM (414).
	TMSR OPERATING INSTRUCTIONS

     TMSR CAN BE LOADED INTO PDP-8 MEMORY WITH THE STANDARD PDP-8
BINARY LOADER (DEC-08-LBAA-PM).

     THE STARTING ADDRESS OF TMSR IS LOCATION 7000 OF FIELD 0.

     SINCE TMSR SIMULATES A FULL DUPLEX - LOCAL COPY TERMINAL, DOUBLE
ECHOING OF CHARACTERS MAY OCCUR.  TO CORRECT THIS PROBLEM, TYPE:
		SET TTY NO ECHO
THIS COMMAND WILL TELL THE PDP-10 THAT THE TERMINAL IS A LOCAL COPY
TERMINAL.

     THE PDP-10 ALSO NEEDS TO KNOW THAT THIS TERMINAL IS ACTUALLY
ANOTHER COMPUTER.  AFTER LOGGING ONTO THE PDP-10, THE FOLLOWING
COMMAND MUST BE TYPED:
		SET TTY PAGE
THIS COMMAND MAKES IT POSSIBLE FOR THE PDP-8 TO STOP THE PDP-10
FROM SENDING ANY MORE CHARACTERS WHENEVER ITS BUFFER IS ALMOST
FULL.  IF THIS COMMAND IS NOT TYPED, OUTPUT FROM THE PDP-10 MAY BE
LOST OR GARBLED.
	TMSR PROGRAMMING EXAMPLE

/ROUTINE TO SIMULATE A FULL DUPLEX TERMINAL
/  USING TYPE8, SEND10, PTYINT, AND TTYINT

	START=170	/TO BE LOADED WITH START ADDR OF THIS PROGRAM
	CHAIN=171	/UNUSED BY THIS ROUTINE
	DISMIS=172	/ADDRESS OF DISMISS ROUTINE IN TMSR
	TYPE8=173	/ADDR OF ROUTINE TO TYPE A CHAR ON PDP-8 CTY
	SEND10=174	/ADDR OF ROUTINE TO SEND A CHAR TO PDP-10
	CHAR=175	/LOCATION OF CHARACTERS DURING INTERCEPTS
	TTYINT=176	/TTY INTERCEPT LOCATION
	PTYINT=177	/PT08 INTERCEPT LOCATION

*200
INIT,	CLA CLL		/START ADDRESS OF USER PROGRAM
	TAD CPT		/GET PT08 INTERCEPT ADDRESS
	DCA PTYINT	/SET UP INTERCEPT
	TAD CTT		/GET TTY INTERCEPT ADDRESS
	DCA TTYINT	/SET UP INTERCEPT
	JMP .		/BACKGROUND PROGRAM JUST LOOPS

TTY,	JMS I SEND10	/GO SEND CHAR TO PDP-10
	NOP		/BUFFER WAS FULL
	JMP I DISMIS	/DISMISS THIS INTERCEPT

PTY,	JMS I TYPE8	/GO TYPE CHAR ON PDP-8 CTY
	NOP		/BUFFER FULL
	JMP I DISMIS	/DISMISS THE INTERCEPT

CTT,	TTY
CPT,	PTY

*START
	INIT		/LOAD START WITH STARTING ADDRESS OF PROGRAM
$