Google
 

Trailing-Edge - PDP-10 Archives - tops10_tools_bb-fp64b-sb - 10,7/ersatz/ersatz.mac
There are no other files named ersatz.mac in the archive.
	TITLE	ERSATZ--TYPE SYSTEM ERSATZ DEVICE NAMES
	SUBTTL	HANLEY A. STRAPPMAN/HAS		30-AUG-88
	SALL
	.DIREC	FLBLST
	SEARCH	JOBDAT,UUOSYM,SCNMAC,$SCNDC,MACTEN


;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1988.  ALL RIGHTS RESERVED.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
;TRANSFERRED.
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
;AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
;SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.
	SUBTTL	PREAMBLE

	TWOSEG	400K			;BE PURE
	RELOC	400K			;ESTABLISH A HISEG
	RELOC	0			;AND THE LOWSEG
	RELOC				;BACK TO THE HISEG

COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1988. ALL RIGHTS RESERVED.
\;END OF COPYRIGHT MACRO


ERZVER==2				;RE-ENGINEERED
ERZMIN==0
ERZEDT==5
ERZWHO==0

	.ORG	.JBVER
	VRSN.	ERZ
	.ORG


	.REQUEST REL:SCAN
	SUBTTL	DUMP THE SYSTEM ERSATZ NAMES

ERSATZ:	PORTAL	.+2			;ALLOW FOR PROTECTED ENTRY
	PORTAL	.+2			;EVEN CCL
	JFCL				;ON SECOND THOUGHT, IGNORE CCL
	RESET				;START OUT CLEAN

	MOVE	P,[IOWD PDLLEN,PDL]	;SETUP A STACK
	PUSHJ	P,.TOINI##		;INITIALIZE THE OUTPUT ROUTINE
	MOVEI	T1,.TOCHR##		;ITS ADDRESS
	PUSHJ	P,.TYOCH##		;TELL .TOUTS

	PUSHJ	P,.TOBOL##		;ENSURE AT START OF LINE
	MOVEI	T1,[ASCIZ \	ERSATZ DEVICE NAMES ON THIS SYSTEM\]
	PUSHJ	P,.TSTRG##		;TYPE SOME HEADER
	PUSHJ	P,.TCRLF##		;END THE LINE

	MOVE	P4,[.GTEDN,,.GTIDX]	;ARGUMENT TO GET THE MIN & MAX OF .GTEDN
	GETTAB	P4,			;FETCH FROM THE MONITOR
	  MOVEI	P4,-1			;OLD MONITOR, ASSUME THE WORST
	HRRI	P4,.GTEDN		;MAKE INTO THE NEXT GETTAB ARGUMENT

LINELP:	MOVSI	P3,-4			;FOUR DEVICES PER LINE
	PUSHJ	P,.TCRLF##		;START A NEW LINE
LOOP:	MOVE	T1,P4			;COPY THE GETTAB ARGUMENT
	ADD	P4,[1,,0]		;UPDATE FOR NEXT TIME
	GETTAB	T1,			;GET NEXT ERSATZ DEVICE NAME
	  JRST	FINISH			;GO CLEAN UP IF NO MORE DEVICES
	HLLZS	P1,T1			;ISOLATE AND COPY LEFT HALF
	PUSHJ	P,.TDEVN##		;TYPE OUT THE DEVICE NAME
	MOVE	T2,P1			;COPY THE NAME
	MOVE	T1,[3,,T2]		;PATH POINTER
	PATH.	T1,UU.PHY		;GET THE REAL PPN
	  SETZ	T4,			;CLEAR THE PPN IF FAILED
	JUMPE	T4,[MOVE T4,T2		;COPY IT
		 DEVPPN	T4,		;TRY THE OLDER WAY
		 GETPPN	T4,		;OR EVEN OLDER
		   JFCL			;BETTER NOT HAVE JACCT!
		 JRST	.+1]		;SKIP OTHER TEST
	MOVE	T1,T4			;COPY THE PPN
	PUSHJ	P,.TPPNW##		;AND TYPE IT
	AOBJP	P3,LINELP		;SKIP EXTRA TAB AT END OF LINE
	PUSHJ	P,.TTABC##		;TYPE A TAB
	JRST	LOOP			;GO DO NEXT DEVICE

FINISH:	PUSHJ	P,.TOBOL##		;MAKE SURE WE END THE LAST LINE
	EXIT				;ALLOW NO NONSENSE
	SUBTTL	EPILOGUE

	RELOC

PDL:	BLOCK	40
 PDLLEN==.-PDL

	RELOC				;BACK TO THE HISEG

	END	ERSATZ