Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/26/sutmap.mac
There are 2 other files named sutmap.mac in the archive. Click here to see a list.
	TITLE	SUTMAP

	SALL
	SEARCH	SIMMAC

	CHANNEL=12

	INTERN	MAP

DEFINE	GETCHAR(REG)<
	SOSGE	BC
	EXEC	READ
	ILDB	REG,BP
>

DEFINE	ERROR(TXT)<
	GOTO	[OUTSTR	[ASCIZ/
?ERROR IN MAP IN TXT
/]
		EXIT]
>


	OPDEF	SETLINK	[SETZM	LILO]
	OPDEF	SETLOAD	[SETOM	LILO]
	OPDEF	IFLINK	[SKIPN	LILO]
	OPDEF	IFLOAD	[SKIPE	LILO]
	OPDEF	GETNUM	[EXEC	GNUM]
MAP:
	STD	5,SAVE
	ST	17,PSAVE
	SKIPE	OPFLAG
	GOTO	L2
	OPEN	CHANNEL,[0
			SIXBIT/DSK/
			XWD 0,BUFH]
	ERROR(OPEN)
	INBUF	CHANNEL,
	L	1,PASSNO
	L	2,[SIXBIT/MAP1/
		SIXBIT/MAP2/
		SIXBIT/MAP3/
		SIXBIT/RTSLOW/
		SIXBIT/SIMRTS/]-1(1)
	SETZM	LBLOCK+3
	EXEC	LUP
	GOTO	MAP1
	L	1,[XWD 13,454
		XWD 13,455
		XWD 13,457
		0
		XWD 13,617]-1(1)
	ST	1,LBLOCK+3
	EXEC	LUP
	GOTO	MAP1
	RELEASE	CHANNEL
	RETURN
MAP1:
	SETOM	OPFLAG

;SCAN PAST HEADER

L1:	GETCHAR 2
	CAIGE	2,"0"
	GOTO	L1
	CAIN	2,"L"
	GOTO	L13	;IF LINK-MAP
	SETLOAD
L10:	GETCHAR	2
	CAIE	2,":"
	GOTO	L10
	LI	3,2
L11:	GETCHAR	2
	CAIE	2,QCR
	GOTO	L11
	SOJG	3,L11
	L	3,BP
	IBP	3
	ILDB	2,3
	CAIE	2,"S"
	GOTO	L2
	ILDB	2,3
	CAIE	2,"T"
	GOTO	L2
	GETCHAR	2
	GOTO	L2
L13:	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