Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0084/comprm.mac
There is 1 other file named comprm.mac in the archive. Click here to see a list.
00100	
00200	
00300	;***	THIS ROUTINE ASSEMBLED WITH PARAMETER FILE COMPRM.MAC    ***
00400	
00500	
00600		IF2,<IFNDEF P..LST,<TAPE>>	;DON'T LIST PARAMETER FILE
00700	
00800						;LIST PARAMETER FILE ONLY IF
00900						;P..LST IS DEFINED. NOT NORMALLY
01000						;DONE.
01100	
01200	
01300	;	COMPRM - PARAMETER FILE FOR ASYNCHRONOUS INTERPROCESSOR COMMUNICATIONS ROUTINES
01400	
01500	;	R. PALM			SYRACUSE, N.Y. JUNE-74
01600	
01700	;*** COPYRIGHT 1974 DIGITAL EQUIPMENT CORP. MAYNARD, MASS. ***
01800	
01900	
02000	
02100	;	THIS MODULE CONTAINS PARAMETER DEFINITIONS WHICH ARE COMMON
02200	;	TO BOTH OF THE ROUTINES FOR INTERPROCESSOR COMMUNICATIONS
02300	;	OVER AN ASYCHRONOUS LINE.  IT SHOULD BE ASSEMBLED AS A PARAMETER
02400	;	FILE WITH EACH OF THOSE ROUTINES.
02500	
02600	
02700	
02800	;	DEFINE REGISTER ASSIGNMENTS
02900	
03000		CHR=	1		;KEEPS CURRENT CHARACTER IN PROCOL
03100					;REGISTER ASSIGNMENT MUST AGREE WITH
03200					; REGISTER C IN CHANEL
03300		C=	1		;KEEPS CURRENT CHARACTER IN CHANEL
03400		CRC=	2		;KEEPS CYCLIC REDUNDANCY CHECK
03500		T1=	CRC+1		;TEMP  MUST BE CRC+1 FOR PROCOL
03600		T2=	T1+1		;TEMP
03700		CNT=	5		;CHARACTER COUNT AC
03800		TIME=	6		;KEEPS DAYTIME
03900		L=	16		;LINK REGISTER
04000					;  PUSHJ ARGUMENT LIST POINTER
04100					;  F40 JSA AC
04200		P=	17		;PUSH DOWN POINTER
04300	
04400	IFN CHR-C,<PRINTX 
04500		PRINTX ?VALUES OF C AND CHR DO NOT AGREE, CHECK COMPRM.MAC>
04600	
04700	;	DEFINE NUMBER OF TEMPORARY REGISTERS TO BE SAVED
04800	
04900		HICHNL=	4		;HIGHEST TEMP AC TO SAVE IN CHANEL.MAC
05000		HIPRCL=	6		;HIGHEST TEMP AC TO SAVE IN PROCOL.MAC
05100		HIAC=	HICHNL		;ASSUME HICHNL > HIPRCL.
05200	IFG HIPRCL-HICHNL,<HIAC=HIPRCL>	;DEFINE HIGHEST TEMP AC TO SAVE OVERALL
05300	
05400	
05500	
05600	;	DEFINE CONSTANTS
05700	
05800		TP%BYT=	15		;COBOL,FORTRAN-10 ARG. IS BYTE POINTER
05900	
06000		MSLMAX=	^D80		;MAXIMUM LENGTH OF MESSAGE
06100		TXLMAX=	^D72		;MAXIMUM LENGTH OF TEXT
     
00100	;	DEFINE MACROS
00200	
00300	
00400	DEFINE ENTR (AA)
00500	<	SALL
00600		IFDIF <AA> <.>,<
00700		IFNDEF CHANEL,<IFNDEF A.....,<
00800		LALL
00900	
01000		EXTERN	EXIT%%,SAVEL,ACSAV,JSAFLG
01100		SALL
01200	A.....=0>>
01300		LALL
01400	
01500		ENTRY	AA'F,AA'C,AA
01600	AA'F:				;FORTRAN CALL. FOR COMPATIBILITY ONLY
01700	AA'C:				;COBOL CALL. FOR COMPATIBILITY ONLY
01800	AA:	JFCL			;PUSHJ (F10,COBOL) ENTRY POINT
01900		SETZM	JSAFLG		;JSA (F40) ENTRY POINT
02000					;ASSUME PUSHJ ENTRY
02100		TLNE	L,-1		;WAS IT REALLY A PUSHJ ENTRY?
02200		SETOM	JSAFLG		;NO. FLAG AS A JSA ENTRY
02300		MOVEM	L,SAVEL		;SAVE ARG LIST POINTER
02400		SALL
02500		>
02600	
02700		IFIDN <AA> <.>,<
02800		LALL
02900	
03000		INTERN	EXIT%%,SAVEL,ACSAV,JSAFLG
03100	
03200	;	EXIT ROUTINE
03300	;	ALL ENTRY POINTS WHICH USE THE ABOVE CODE SHOULD EXIT
03400	;	WITH   JRST EXIT%%
03500	
03600	EXIT%%:	SKIPN	JSAFLG		;CALLED BY JSA ?
03700		JRST	XIT%%		;NO. CALLED BY A PUSHJ
03800		MOVEM	L,JSAFLG	;SAVE RETURN ADDRESS TEMPORARILY
03900		MOVSS	L		;ADDRESS OF ENTRY POINT IN RH
04000		PUSH	P,(L)		;GET VALUE OF L WE WANT RESTORED
04100		POP	P,SAVEL		;PUT IT IN THE CORRECT PLACE
04200		HRLI	L,(<JFCL>)	;ENTRY INSTR. TO BE RESTORED
04300		HLLZM	L,(L)		;RESTORE THE INSTR. FOR FUTURE PUSHJ
04400		SKIPA	L,JSAFLG	;RESTORE L AND SKIP
04500	XIT%%:	POP	P,L		;RH OF L IS RETURN ADDRESS
04600		HRLI	L,SAVEL		;LH OF L IS WHERE TO RESTORE L FROM
04700		JRA	L,(L)		;RESTORE L AND RETURN TO CALLER
04800	
04900	;	ENTRY/EXIT STORAGE AREAS
05000	
05100	SAVEL:	BLOCK	1		;SAVE THE ARGUMENT LIST POINTER
05200	ACSAV:	BLOCK	HIAC+1		;AREA TO SAVE TEMP REGISTERS
05300	JSAFLG:	BLOCK	1		;ENTRY TYPE FLAG
05400					;-1  CALLED BY JSA
05500					; 0  CALLED BY PUSHJ
05600		SALL>
05700		XALL>			;END OF ENTR MACRO
05800	
05900	
06000	
06100	DEFINE	SAVE(N)			;AC SAVE MACRO
06200	<	MOVEM	N,ACSAV+N	;SAVE AC N
06300		HRRZI	N,ACSAV		;SET UP BLT WORD
06400		BLT	N,ACSAV+N-1	;SAVE OTHER ACS
06500	>				; 
06600	
06700	
06800	
06900	DEFINE	RESTOR(N)		;RESTORE AC MACRO
07000	<	HRLZI	N,ACSAV		;SET UP BLT WORD
07100		BLT	N,N		;RESTORE ACS
07200	>				; 
07300	
07400	
07500	;	THE ARGUMENT REGISTER CONTAINS THE ADDRESS OF A SUBROUTINE
07600	;	ARGUMENT.  IF THAT ARGUMENT IS A BYTE POINTER REFERENCE
07700	;	TO THE REAL ARGUMENT (COBOL, FORTRAN-10 TYPE CODE 15), FIXUP
07800	;	THE ADDRESS IN THE REGISTER TO POINT TO THE REAL ARGUMENT.
07900	
08000	
08100	DEFINE ARYREF(AA)
08200	<	SKIPE	JSAFLG		;CALLED BY PUSHJ ?
08300		JRST	.+4		;NO. WE ARE OK
08400		LDB	0,[POINT 4,(L),12] ;GET ARG TYPE CODE
08500		CAIN	0,TP%BYT	;IS IT A BYTE POINTER ?
08600		HRRI	AA,@(AA)	;YES. GET ADDRESS FROM IT
08700	>				;WATCH THOSE NASTY INDIRECT REFERENCES
08800	
08900	
09000	
     
00100	
00200	;	DEFINE THE ENTRIES IN THE COMMUNICATIONS ROUTINE'S PERFORMANCE
00300	;	STATISTICS TABLE.  THE SYMBOLS ARE DEFINED AS AN OFFSET INTO
00400	;	THE TABLE (STATBL DEFINED IN PROCOL.MAC).  EACH ENTRY IN
00500	;	THE TABLE IS ONE WORD.
00600	
00700	
00800	DEFINE	STATOF (AA)
00900	<	IFNDEF S...,<
01000		S...=	-1 >		;;INITIAL OFFSET (TO BE INCREMENTED)
01100	
01200		S...=	S...+1		;;INCREMENT THE TABLE OFFSET
01300		AA=	S...		;;DEFINE THE SYMBOLIC OFFSET
01400	>
01500	
01600	
01700	
01800		STATOF	(NACKS)		;THE NUMBER OF DATA MESSAGES POSITIVELY
01900					;REACKNOWLEDGED AND IGNORED BY THE SEND
02000					;ROUTINE WHILE IT WAS WAITING FOR AN
02100					;ACKNOWLEDGEMENT MESSAGE.
02200		STATOF	(NIGNS)		;THE NUMBER OF DATA MESSAGES COMPLETELY
02300					;IGNORED BY THE SEND ROUTINE WHILE IT
02400					;WAS WAITING FOR AN ACKNOWLEDGEMENT
02500					;MESSAGE.
02600		STATOF	(NACKR)		;THE NUMBER OF DATA MESSAGES
02700					;REACKNOWLEDGED AND IGNORED BY THE
02800					;RECEIVE (RECV) ROUTINE.
02900		STATOF	(NRESET)	;THE NUMBER OF TIMES THE INTERNAL
03000					;MESSAGE NUMBER HAS BEEN REINITIALIZED
03100					;BY THE RECEIVE (RECV) ROUTINE.
03200		STATOF	(UEXPAK)	;THE NUMBER OF UNEXPECTED ACKNOWLEDGE-
03300					;MENT MESSAGES (EITHER ACK OR NAK)
03400					;RECEIVED BY THE RECEIVE (RECV) ROUTINE
03500					;WHILE IT WAS WAITING FOR A DATA MESSAGE.
03600	
03700	;	INSERT NEW ENTRIES HERE
03800	
03900	STATLN=	S...+1			;DEFINE THE LENGTH OF THE STATISTICS TABLE.
     
00100	
00200	;	ASSEMBLY CONDITIONS
00300	
00400	
00500	;IF CC (3RD HEADER WORD IN A MESSAGE) IS TO BE SETUP AND
00600	;CHECKED FOR ODD PARITY, ASSEMBLE WITH FTODCC==1
00700	
00800	IFNDEF	FTODCC,<FTODCC==0>	;NO PARITY CHECK ON CC
00900	
01000	
01050		FTDIAL==1
01100	IFNDEF FTDIAL,<FTDIAL==0>	;SET NON-ZERO IF THESE ROUTINES ARE
01200					;REQUIRED TO DIAL A NUMBER ON THE
01300					;COMMUNICATIONS CHANNEL
01400	IFNDEF FTPAGE,<FTPAGE==0>	;IF NON-ZERO SET LINE ATTRIBUTES
01500					;TO RECOGNIZE X-ON AND X-OFF.
01600					;NOT REQUIRED FOR IMAGE MODE LINES.
01700	IFNDEF FTVERSION,<FTVERSION==0>	;SET NONZERO IF THE VERSION
01800					;NUMBER OF THE COMMUNICATIONS ROUTINES
01900					;IS TO BECOME THE VERSION NUMBER OF THE
02000					;COMMUNICATION PROGRAM.
02100	IFNDEF FTMRCV,<FTMRCV==0>	;SET NONZERO IF RECEIVE ROUTINE IS TO
02200					;COLLECT MULTIPLE MESSAGES TO SATISFY
02300					;THE CHARACTER COUNT FOR A SINGLE
02400					;REQUEST. OTHERWISE THE RECEIVE ROUTINE
02500					;RETURNS TO THE CALLER (WITH A CHARACTER
02600					;COUNT) AFTER RECEIVING ONE MESSAGE.
02700	IFNDEF FTCIBS,<FTCIBS==0>	;CLEAR INPUT BEFORE SEND.
02800					;IF SET NON-ZERO, THE INPUT BUFFER WILL
02900					;BE CLEARED BEFORE A MESSAGE IS SENT.
03000					;DEFAULT IS TO NOT CLEAR THE INPUT BEFORE				;SENDING A MESSAGE BECAUSE THE DEC-10 HAS
03100					;HIGH PRIORITY FOR RECEIVING AND LOW
03200					;PRIORITY FOR SENDING.
03300	IFNDEF FTSNOI,<FTSNOI==-1>	;SEND NAK ON INITIALIZATION.
03400					;IF SET NON-ZERO, A NAK MESSAGE WITH A
03500					;MESSAGE NUMBER OF ZERO IS SENT AS PART
03600					;OF INITIALIZATION.
03700					;THE DEFAULT IS TO SEND THE MESSAGE.
03800	IFNDEF FTDEBUG,<FTDEBUG==0>	;SET NON-ZERO TO WRITE DEBUGGING TRACE
03900					;INTO "DEBUG.FIL".  THIS INCLUDES
04000					;EACH CHARACTER READ AND SENT.
04100	
04200	
04300	IFE FTDEBUG,<			;DEFINE NULL MACRO IF SWITCH IS 0
04400	DEFINE DEBUG(A)
04500	<>>
04600	
04700	IFN FTDEBUG,<			;DEFINE MACRO FOR WHEN SWITCH IS ON
04800	DEFINE DEBUG(A)
04900	<IFNDEF CHANEL,<EXTERNAL	DEBPNT>
05000		PUSH	P,0		;SAVE AC 0
05100		MOVSI	111111		;SET UP LEFT HALF WORD
05200		HRRI	A		;SET UP DEBUG NUMBER
05300		PUSHJ	P,DEBPNT	;WRITE OUT DEBUG ENTRY POINT
05400		POP	P,0		;RESTORE 0
05500	>>				;END OF DEFINE
05600	
05700	
05800	
05900	
06000	
06100	
06200		ASUPPRESS		;REMOVE UNREFERENCED SYMBOLS FROM LISTINGS
06300	
06400	IFDEF P..LST,<	END>		;GET CLEAN LISTING