Google
 

Trailing-Edge - PDP-10 Archives - dec-10-omona-u-mc9 - ttdint.mac
There are 6 other files named ttdint.mac in the archive. Click here to see a list.
TITLE TTDINT - DRIVER FOR DTE20 TELETYPES V5
SUBTTL E. SOCCI/EVS	29-APR-76

	SEARCH	F,S,DTEPRM

;NOTE:
; IF ANY CHANGES ARE MADE TO DTEPRM THAT THIS MODULE MUST HAVE, UPDATE
; THE FOLLOWING SYMBOL TO THE VERSION OF DTEPRM THAT MUST BE USED
	PRMMIN==3
; THIS WAY, ASSEMBLING THIS MODULE WITH WRONG VERSION OF DTEPRM FOR SOME REASON
; (LIKE FORGETTING TO ASSEMBLE IT) WILL CAUSE ASSEMBLY TO TERMINATE
; THIS SCHEME DOES NOT CAUSE EXTRA EDITING, SINCE ONLY FILES
; WHICH NEED THE CHANGES NEED PRMMIN TO BE UPDATED. MODULES
; THAT DO NOT NEED A NEW VERSION OF DTEPRM NEED NOT DEMAND IT.

IFL VDTPRM-PRMMIN,<PRINTX ?PLEASE USE LATEST VERSION OF DTEPRM
			PASS2
			END>
	$RELOC
	$HIGH
;***COPYRIGHT 1976,1977, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***

XP VTTDNT,5
	SALL
	ENTRY	TTDINT

TTDINT::

	DEFINE STOPCD<HALT>	;***TEMP
SUBTTL DISPATCH TABLES

	CPOPJ##			;(-1)
CT0DSP::CPOPJ##			;(0)
	CPOPJ##			;(1)
	CPOPJ##			;(2)
	CPOPJ##			;(3)
	CTYLND			;(4)TAKE LINE, CHAR
	CPOPJ##			;(5)
	CPOPJ##			;(6)
	CPOPJ##			;(7)
	CPOPJ##			;(10)
	CPOPJ##			;(11)
	CPOPJ##			;(12)
	CPOPJ##			;(13)
	CPOPJ##			;(14)
	CPOPJ##			;(15)
	CPOPJ##			;(16)
	CTYACK			;(17)ACK
	CPOPJ##			;(20)
	CPOPJ##			;(21)
	CPOPJ##			;(22)
	CPOPJ##			;(23)
	CPOPJ##			;(24)
	CTYAAL			;(25)ACK ALL
	CPOPJ##			;(26)



	CPOPJ##			;(-1)
DLSDSP::CPOPJ##			;(0)
	CPOPJ##			;(1)
	CPOPJ##			;(2)
	CPOPJ##			;(3)
	DLSLND			;(4)TAKE LINE, CHAR
	CPOPJ##			;(5)
	CPOPJ##			;(6)
	CPOPJ##			;(7)
	CPOPJ##			;(10)
	CPOPJ##			;(11)
	CPOPJ##			;(12)
	CPOPJ##			;(13)
	CPOPJ##			;(14)
	CPOPJ##			;(15)
	CPOPJ##			;(16)
	DLSACK			;(17)ACK
	CPOPJ##			;(20)
	CPOPJ##			;(21)
	CPOPJ##			;(22)
	CPOPJ##			;(23)
	CPOPJ##			;(24)
	CPOPJ##			;(25)
	CPOPJ##			;(26)
SUBTTL CTY ROUTINES

;HERE FOR CTY INITIALIZATION. TURN IRMA CATCHER OFF, SINCE
; RSX20 IS IN THE HABIT OF IGNORING CTY OUTPUT AND WILL GET
; UPSET IF WE SHOVE CHARACTERS DOWN ITS LITTLE THROAT . . .

CT0INI::MOVEI	T1,LDRSHC##	;BIT TO SUPPRESS HUNG CHECK
	IORM	T1,LDBDCH##(U)	;SET IT IN CTY'S LDB
	POPJ	P,		;RETURN

;HERE FOR CTY OUTPUT
CTYTYO::PUSHJ	P,SKPMPP##		;IS MASTER RUNNING PRIMARY PROTOCOL?
	  PJRST	SPCTYO##			;NO, TYPE OUT WITH SECONDARY PROTOCOL


	PUSHJ	P,SAVE4##	;SAVE ACS
	MOVE	P3,T3		;SAVE CHAR
	PUSHJ	P,SVEPTD##	;GET MASTER ETD ADDRESS
	MOVE	T3,P3		;RESTORE CHAR
	LOAD.	P1,ED.DTN,(F)	;GET DTE NUMBER OF MASTER
	MOVE	P2,[.EMCTY,,EM.IND+.EMSTR] ;OUTPUT STRING TO CTY
	MOVEI	P3,1		;COUNT OF 1
	MOVE	P4,[POINT 8,CTYCHR]	;POINTER TO LITTLE BUFFER
	MOVEI	S,'FOO'		;NO POST ADDRESS, TEST DATA
	MOVE	T1,P4		;GET COPY OF POINTER
	IDPB	T3,T1		;STORE CHAR
	PUSHJ	P,DTEQUE##	;QUEUE UP REQUEST
	  JFCL			;IGNORE ERROR FOR NOW
				; (LET ACK ALL TAKE LINE OUT OF OUTPUT WAIT)
	POPJ	P,		;RETURN

	$LOW
CTYCHR:	BLOCK	1		;PLACE FOR CTY CHARACTER
	$HIGH
;MESSAGE RECEIVING

DLSLND:	LOAD.	T2,ED.CTN,(F)	;GET CTY DLS #
DLSLN1:	SOS	P3		;DECREMENT COUNT BY 2
	SOJL	P3,CPOPJ##	;DONE
	ILDB	T3,P4		;GET DATA
	ILDB	T1,P4		;LINE (???)
	CAME	T1,T2		;MATCH?
	JRST	DLSLN1		;NO, SEE IF ANY MORE TO DO
	MOVEI	U,TCONLN##	;YES, GET CTY LINE NUMBER FOR SCNSER
	PUSH	P,F		;SAVE ETD ADDRESS
	PUSHJ	P,RECINT##	;CALL SCNSER
	POP	P,F		;RESTORE F
	JRST	DLSLND		;GET ANOTHER CHAR


CTYLND:	ILDB	T3,P4		;GET DATA (???)
	IBP	P4		;FIX UP POINTER
	MOVEI	U,TCONLN##	;GET CTY LINE NUMBER
	PUSHJ	P,RECINT##	;CALL SCNSER
	SOS	P3
	SOJG	P3,CTYLND	;LOOP
	POPJ	P,		;RETURN


CTYACK:	TDZA	T1,T1		;CTY LINE NUMBER IS ZERO
DLSACK:	LOAD.	T1,ED.CTN,(F)	;GET CTY-DLS NUMBER
DLSAC1:	ILDB	T2,P4		;GET LINE NUMBER
	IBP	P4		;PASS OVER UNUSED BYTE
	CAME	T1,T2		;SAME?
	JRST	DLSAC1		;NO, SEE IF NEXT LINE OK
	PUSH	P,T1		;SAVE LINE NUMBER
	MOVEI	U,TCONLN##	;SETUP CTY LINE NUMBER
	PUSHJ	P,XMTINT##	;CALL SCNSER
	POP	P,T1		;RESTORE LINE NUMBER OF CTY
	SUBI	P3,2		;WE'VE PROCESSED 2 BYTES
	JUMPG	P3,DLSAC1	;GO GET MORE
	POPJ	P,		;DONE


;ACK ALL. DO TRANSMIT DONE IN CASE CTY WAS HUNG SENDING OUT CHAR
; DO A DEAD -11

CTYAAL:	MOVEI	U,TCONLN##	;CTY LINE NUMBER
	PJRST	XMTINT##	;GO DO XMT DONE
	END