Google
 

Trailing-Edge - PDP-10 Archives - bb-x130a-sb - macunv.unv
There are no other files named macunv.unv in the archive.
x
,55@P C
~- P!'PRINTX ? pA
	PASS2
	END

	PASS2
	END
C, 
0 i
	XLIST

P	IFNB	<B>,<MOVE 
pA,B>
	ADDI	A,
	LIST
	LSH	A,-^D9T
	LSH	E-|R 0 _
	XLIST
P	IFNB	<B>,<MOVE pA,B>
	LIST
	LSH	A,7LIST
	LEVMI |`D
l==-1
}IRP E,<l==l+1
IFE D-l, <l==}@-1
IRP G,<l==}`l+1
IFE F-l, <~

;+.PARA -8
;~ XXXTTL	MACRO TO G~@ENERATE A TITLE S~`TATEMENT OF THE FORM:
;.BREAK
;- TITLE A COMMENT @VERSION
	DEFINE `KTTL,<IFG I,<
	TITLE	A - J  % BEG(H)-I
>I@FE I,<
	TITLE	`A - J  %BEG(H)
>>

;+.PARA  -8
;XXX137	MACR@O TO SETUP LOCATI`ON 137 WITH THE SPECIFIED
;-VERSI ON NUMBER. NOTE: @THE MACRO DOES IT`S OWN "LOC" AND "RELOC".
	DEFINE  K137,<IFG I,<
@	IF2,<LALL>
	LOC`	137
	BYTE (3)KWHO(9)KVER(6)KM IN(18)KEDT	; A @%BEG(H)-I
	`RELOC
	SALL
>	IFE I,<
	IF2,<LA LL>
	LOC	137
	B@YTE (3)KWHO(9)K`VER(6)KMIN(18)KEDT	; A %BEG( H)
	RELOC
	SAL@L
>>

; MACRO `TO DEFINE VERSION # AT CURRENT LOC ATION
;+.PARA -8@
;XXXVRS	MACRO T`O DEFINE THE VERSION NUMBER AT AN
;-ARBITRARY USER@ LOCATION.
	DEFI`NE KVRS,<IFG I,	<
	IF2,<LALL>
		 BYTE (3)KWHO(9)	@KVER(6)KMIN(18)	`KEDT	; A %BEG
(H)-I
	SALL
>
 	IFE I,<
	IF2,<
@LALL>
	BYTE (3)
`KWHO(9)KVER(6)KMIN(18)KEDT	; A  %BEG(H)
	SA@LL
>>
; GENERA`TE A PASS2 PRINTX
 STATEMENT
;+.PA
 RA -8
;-XXXPTX	G
@ENERATES A PASS2 
`PRINTX STATEMENT.
	DEFINE KPTX,<
	IF2,<
	IFGRIXIAJ%BE
>	IFE I,<PRINTX A  %BEG(H)	J
>@>>

;+.PARA -8
;XXXSTL	THE XXXSTL MACRO GENERATE S A NEW PAGE
;VI@A THE MACRO PAGE `PSEUDO-OP AND OPTIONALLY
;DEFINES  A NEW SUBTTL COM@MAND. THE CALL IS` "XXXSTL (COMMENT)".
;IF THE XXXS TL MACRO IS CALLE@D WITH A NULL ARG`UMENT A COMMENT
; LINE IS GENERAT ED AT THE BOTTOM @OF THE CURRENT PA`GE
; AND AT THE TOP OF THE NEXT P AGE INDICATING TH@AT THE PAGE
;-HA`S BEEN CONTINUED.
	DEFINE KSTL ( TEXT),<IFNB <TEXT@>,<
	SUBTTL	TEXT`
	PAGE
>	IFB <TEXT>,<
	LALL
	P AGE		; CONTINUED @TO NEXT PAGE
	SA`LL		; CONTINUED FROM PREVIOUS PAGE 
>>
;+.PARA -8
;XXXUNV	MACRO TO` GENERATE A UNIVERSAL STATEMENT. T HE MACRO IN
;EFF@ECT IS AN EXACT C`OPY OF THE XXXTTL MACRO EXCEPT THA T THE
;-WORD "UN@IVERSAL" REPLACES` THE WORD "TITLE".
	DEFINE KUNV, <IFG I,<
	LALL
	UNIVERSAL A - `J  %BEG(H)-I
	SALL
>IFE I ,<
	LALL
	UNIVE@RSAL A - J  %B`EG(H)
	SALL
>>
;+.PARA -8
;XXXERR	MACRO TO @TYPE A FATAL ERRO`R MESSAGE ON THE
;USER'S TERMINAL . THE CALL IS OF @THE FORM:
;.BREA`K
;XXXERR (ZZZ,ERROR MESSAGE,<PDP -10 INSTRUCTION>)@
;.BREAK
;ZZZ I`S THE 3-CHARACTER ERROR CODE, ERRO R MESSAGE IS THE @ASCIZ
;STRING TO` BE TYPED ON THE TERMINAL AND PDP- 10 INSTRUCTION IS@
;AN OPTIONAL AR`GUMENT INDICATING  WHAT THE USER WA  NTS TO DO
;ABOUT @ THE ERROR JUST T `YPED. IF THE ARGU!MENT IS NULL AN
! ;-EXIT IS EXECUTE!@D.
	DEFINE KERR!` (COD,MSG,INSTR),"<
...'COD:	JRST	" [
	OUTSTR	[ASCIZ"@ \
? K'COD MSG\"`]
	IFNB <INSTR>,#<INSTR>
	IFB <IN# STR>,<EXIT>
]>
#@
;+.PARA -8
;XX#`XWRN	MACRO SIMILA$R TO THE XXXERR M$ ACRO EXCEPT THAT $@A
;WARNING MESSA$`GE IS ISSUED RATH%ER THAN A FATAL A% ND
;-THE DEFAULT%@ PDP-10 INSTRUCTI%`ON TO BE EXECUTED& IS "JRST .+1".
& 	DEFINE KWRN (CO&@D,MSG,INSTR),<
.&`..'COD:	JRST	[
	'OUTSTR	[ASCIZ \
' % K'COD MSG\]
	'@IFNB <INSTR>,<INS'`TR>
	IFB <INSTR>(,<JRST .+1>
]>
( 

STOPI>>STOPI>(@>
	PURGE l,m,n
URGE l,m,FP I  |(b.INDR.(A,B,SOS)NDR.(A,I>6=z p"g

	XLIST 

DEFINE	FS(NAM 0E,OFFSET,DEFAULT, PINITIAL),<
S.'NA pME:
	IRP	OFFSET,!<
		.FZ'OFFSET==!0:.FZLEN
		.FZLEN!P==:.FZLEN+1
		BL!pOCK	1		;Storage f"or /'NAME
	>;END"0 IRP
>;END DEFIN"PE FS

	.FZLEN=="p:.FXLEN

	$LOW
FSWT.S::FSWTCH		#0		;BUILD SWITCH S#PTORAGE
FSWT.L==:#p.-FSWT.S

DEFIN$E	FS(NAME,OFFSET,$0DEFAULT,INITIAL),$P<
	IRP	OFFSET,<
		IFB <INITIAL>,%<EXP -1		;Initial%0 value for /'NAME%P(.FZ'OFFSET)>
		%pIFNB <INITIAL>,<E&XP INITIAL		;Init&0ial value for /'N&PAME(.FZ'OFFSET)>
	>;END IRP
>;EN'D DEFINE FS

	$'0HIGH
FSWT.I::FSW'PTCH				;BUILD INI'pTIAL VALUES

DE(FINE	FS(NAME,OFFS(0ET,DEFAULT,INITIA(PL),<
	IRP	OFFSET(p,<
		IFB <DEFAUL)T>,<EXP -1		;Defa)0ult value for /'N)PAME('.FZ'OFFSET)>)p
		IFNB <DEFAULT*>,<EXP DEFAULT		;*0Default value for*P /'NAME('.FZ'OFFS*pET)>
	>;END IRP
>;END DEFINE FS

FSWT.D::FSWTCH+P				;BUILD DEFAUL+pT VALUES

	$LOW,
FSWT.P::BLOCK	F,0SWT.L			;BUILD ST,PICKY SWITCH STORA,pGE
	$HIGH

	LIST

GH

	LII>>=z -0$x

	XLIST-P

DEFINE	GS(NAM-pE,LEN,DEFAULT,INI.TIAL),<
	..TEMP=.0=1
	IFNB <LEN>,<.P..TEMP==LEN>
	S..p'NAME:: BLOCK ..T/EMP
>;END DEFINE/0 GS

	$LOW
GSW/PT.S::GSWTCH				;G/pLOBAL SWITCH STOR0AGE
GSWT.L==:.-G00SWT.S

DEFINE	G0PS(NAME,LEN,DEFAUL0pT,INITIAL),<
	..1TEMP==1
	IFNB <L10EN>,<..TEMP==LEN>1P
	REPEAT	..TEMP,1p<
		IFB <INITIAL2>,<EXP -1		;Initi20al value for /'NA2PME('.FZ'OFFSET)>
		IFNB <INITIAL>3,<EXP INITIAL		;I30nitial value for 3P/'NAME('.FZ'OFFSEGHT)>
	>;END REPEAGhT
>;END DEFINE GHS

	$HIGH
GSWTH(.I::GSWTCH				;GLHHOBAL SWITCH INITIHhAL VALUES

DEFIINE	GS(NAME,LEN,DEI(FAULT,INITIAL),<
	..TEMP==1
	IFNIhB <LEN>,<..TEMP==JLEN>
	IFB <DEFAUJ(LT>,<REPEAT ..TEMJHP,<EXP -1>>
	IFNJhB <DEFAULT>,<
		K..TEMR==0
		IRP K(DEFAULT,<
			EXPKH DEFAULT
			..TEKhMR==..TEMR+1
		>L;END IRP DEFAULT
		IFN ..TEMR-1,<LHREPEAT ..TEMP-..TLhEMR,<EXP -1>>
		MIFE ..TEMR-1,<REPM(EAT ..TEMP-..TEMRMH,<EXP DEFAULT>>
Mh	>;END IFNB <DEFANULT>
>;END DEFINN(E GS

GSWT.D::GNHSWTCH				;GLOBAL NhSWITCH DEFAULT VAOLUES

	$HIGH
	LIST

HIGH
	KHtA ~KHth:Q KHuQ @KHuSQ  KHu|Q KHv=Q KHv|WQ L@ MP VP`
	ND(FTAVp,B)
	INTERNAL FWTA
	IF1,IFNB <V0C>,IFE FTA,PRINTVX [Assembling wit\hh C off]
	IF1,I\HFNB <C>,IFN FTA\ ,PRINTX [Assembli\ng with C on]
g with C on]
MR\P MR]P MR]@Q MS:8P R@ S:  {h^.INDR.(A,B,AOS)NDR.(A,U_9iVP Y>
@ z(T.LDST.(A,zHB,C,HRRZ,HLRZ,LDB,MOVE),HLRZ,L[2k 6#IIFG 0,<
	60IF2,<LALL>
	LOC	6P137
	BYTE (3)MCV6pWHO(9)MCVVER(6)MC7VMIN(18)MCVEDT	; 70MACUNV %1(27)-0
7P	RELOC
	SALL
>	7pIFE 0,<
	IF2,<LA8LL>
	LOC	137
	B80YTE (3)MCVWHO(9)M8PCVVER(6)MCVMIN(188p)MCVEDT	; MACUNV 9%1(27)
	RELOC
	SALL
>RELOC
	[4qQ MCV[4YP [4\Y CP$%
...A:	JCpRST	[
	OUTSTR	[ADSCIZ \
? MCVA D0B\]
	IFNB <C>,<DPC>
	IFB <C>,<EXIT>
] <C>,<E[5Z7P [6
	IF2,<
<p	IFG 0,<PRINTX MA=CUNV %1(27)-0	Use=0ful things for MA=PCRO programs
>	I=pFE 0,<PRINTX MACU>NV %1(27)	Useful >0things for MACRO programs
>>RO [6:<Q [0[6= >p$IFNB <A>,?<
	SUBTTL	A
	P?0AGE
>	IFB <A>,<?P
	LALL
	PAGE		;?p CONTINUED TO NEX@T PAGE
	SALL		; @0CONTINUED FROM PREVIOUS PAGE
>R[6M 3p#-IFG 0,<
	4TITLE	MACUNV - Us40eful things for M4PACRO programs  %14p(27)-0
>IFE 0,<
	TITLE	MACUNV - 50Useful things for5P MACRO programs  %1(27)
>rams  [6[[ @p$IFG 0,<
	ALALL
	UNIVERSAL A0MACUNV - Useful tAPhings for MACRO pAprograms  %1(27)-0B
	SALL
>IFE 0,<B0
	LALL
	UNIVERSBPAL MACUNV - UsefuBpl things for MACRCO programs  %1(27)
	SALL
>1(27[6i9P [6lY 9P#aIFG 0,<
	9pIF2,<LALL>
	BYTE: (3)MCVWHO(9)MCVV:0ER(6)MCVMIN(18)MC:PVEDT	; MACUNV %1(:p27)-0
	SALL
>	I;FE 0,<
	IF2,<LAL;0L>
	BYTE (3)MCVW;PHO(9)MCVVER(6)MCV;pMIN(18)MCVEDT	; M<ACUNV %1(27)
	SALL
>1(27)
	SA[6zP [6|W E$1
...A:	JE0RST	[
	OUTSTR	[AEPSCIZ \
% MCVA EpB\]
	IFNB <C>,<FC>
	IFB <C>,<JRST .+1>
]>,<J\P ] d%IF2,<IFDEFd0 A,<A==A>> IFNdPDEF A,<A==<B>>F A,<A==<B>>]<P 0P 8P `@ `D@ `H@ `L@ `P@ a 
	XLIST
	IFNB	<B>,<MOVE A,B>
	LIST
	LSH	A,^D9ST
	Lg/k` 6@g/yS 6@g/{@ 7`g/=z 7 g/9 7`gR~)  {Z.LDST.(A,{(B,C,HRRM,HRLM,DPB,MOVEM)HRLM,DhD@ hH@ hL@ hP@ i'%I' }D
	.XCREF
	Z==0
	IFNDEF }@AVER,<Z==-1>
	IF}`NDEF AMIN,<Z==-1~>
	IFNDEF AEDT,~ <Z==-1>
	IFNDEF ~@AWHO,<Z==-1>
	I~`FL Z,<PRINTX ?SYMBOLS AWHO,AVER, AMIN AND AEDT N@OT DEFINED
	PRIN`TX ?VERSION SYMBOLS MUST BE DEFINE D BEFORE CALLING @TITLE. MACRO
END`>
	.CREF
	IF2,<LALL>
	ASIX==SI XBIT /A/	; B AB@BREVIATION IN SIX`BIT
	AASC==ASCIZ /A/	; B ABBRE VIATION IN ASCII
	SALL
	.XCREF
`%FIRST=AMIN/^D26
IFE %FIRST,<%SE CON==AMIN
	%FIR@ST==0>
IFG %FIRS`T,<%SECON=AMIN-<^D26*%FIRST>>
IF E AMIN-^D26,<%SE@CON==AMIN
	%FIR`ST=0>
IFE AMIN-^D52,<%SECON==^D2 6
	%FIRST=1>
; @DEFINE ALL THE MA`CROS
BUILD$ (B,\AVER,\AMIN,\%F IRST,<,A,B,C,D,E,@F,G,H,I,J,K,L,M,N`,O,P,Q,R,S,T,U,V,W,X,Y,Z>,\%SECON, <,A,B,C,D,E,F,G,H@,I,J,K,L,M,N,O,P,`Q,R,S,T,U,V,W,X,Y,Z>,\AEDT,\AWHO ,C,A)

	IF2,<@PURGE %SECON,%FIRST,Z>
.CREFFIRmKc@ <cBYTE (3)A<8WHO (9)AVER (6)AMIN (18)AEDToJ"(U 
 W
	XLIST

0	IFNB	<B>,<MOVE 
PA,B>
	ADDI	A,
p177
	LIST
	LSH	A,-7IST
	LSH	sP up |h 
	IFNB	<}B>,<..T==0
		IFE}(	B-777777,<..T==}H1
			HLLZS	A>
}h		IFE	B-77777700~0000,<..T==1
			~(HRRZS	A>
		IFE	~HB-777777777777,<~h..T==1
			SETZM	A>
		IFE	..T,<M(OVX	TEMP,B
			 H    XLIST
			   h  ANDCAM	TEMP,A
			     LIST
		(	     SALL>>
	IFHB	<B>,<SETZM	A>
B>,<SETZM	A>	
N@ x(N
	IF1	<
xH	IFNB <B>,<%%B==xh1B<B>>
	IFNDEF y%%B,<%%B==1B35>
y(	IFE	%%B,<ABORT <yHWORD IS FULL>>
	yhF.A==%%B
	%%B==%%B*2
>
	%%B==	H6P!?%%ERR(.ERFpAT,A,<B>,C,D,E,F,G)C,D,	"p!Q%%ERR(.ERINF,A,<B>,C,D,E,F,G)C,D,	&u [@
	SALL
I[`F1,<
	IFN	FTKA,I[FB <B>,PRINTX [AZ`ssembling A for Y`KA10 CPU]
	IFN	FZTKI,IFB <B>,PRINZ TX [Assembling AZ@ for KI10 CPU]
	Y@IFN	FTKL,IFB <B>X@,PRINTX [AssembliX`ng A for KL10 CPYU]

IFB <B>,PRY INTX [Searching JX OBDAT]
	SEARCH JXOBDAT
IFB <B>,PW`RINTX [Searching W@MACTEN]
	SEARCH ]MACTEN
IFB <B>,](PRINTX [Searching]H UUOSYM]
	SEARCH]h UUOSYM
IFB <B>^,PRINTX [Searchin^(g SCNMAC]
 	SEAR^HCH SCNMAC
IFB <^hB>,PRINTX [Starti_ng PASS 1]
>;END_( IF1

;Show ver_Hsions of all symb_hol files
	%%MACU`==%%MACU		;MACUNV`(
	%%JOBD==%%JOBD`H		;JOBDAT
	%%MAC`hT==%%MACT		;MACTEaN
	%%UUOS==%%UUOa(S		;UUOSYM
	%%SCaHNM==%%SCNM		;SCNMahAC

IF2,<
	IFBb <B>,PRINTX [Stab(rting PASS 2]
>;END IF2


>;	2 sh,
	IF1	<
t	IFNB <B>,<%%L==t(1B<B>>
	IFNDEF tH%%L,<%%L==1B17>
th	IFE	%%L,<ABORT <uLEFT HALF OF WORDu( FULL>>
	FL.A==uH%%L
	%%L==%%L*2
>
	%%L==%%L*20!3
	SALL
	PTITLE	A -- B
	p$INIT	(A,-)
	$SEGMENT (PURE)
	$0HIGH
	ENTRY	A
GH
	ENTRY	A
	7D\YP 	7FN8P 	>t\` !	
	SETOM	0A
	XLIST
IFNB <PB>,<
	MOVE	T1,[pA,,A+1]
	BLT	T1,B
>;END IFNB
	LISTENDIFNB
	SETOM	0A
	XLIST
IFNB <PB>,<
	MOVE	T1,[pA,,A+1]
	BLT	T1,A+B-1
>;END IFNB
	LISTEND 	?  !K%%ERR(.ERO0PR,A,<B>,C,D,E,F,G)C,D,	J v>
	IF1	<
v(	IFNB <B>,<%%R==vH1B<B>>
	IFNDEF vh%%R,<%%R==1B35>
w	IFGE	%%R-1B17,<Aw(BORT <RIGHT HALF wHOF WORD FULL>>
	whFR.A==%%R
	%%R==%%R*2
>
	%%R=	N,{2 c
.
	..TEMP=c(=0
IFIDN <A><PUcHRE>,<
	..TEMP==1ch
	TWOSEG	B
	..dH%%==B
	..L%%=0d(

	DEFINE	$HIGHdH,<
		IFL .-B,<
			VAR			;Variabeles
			..L%%==.
			RELOC	..H%%
eH		>;END IFL
	>;EehND DEFINE $HIGH
f
	DEFINE	$LOW,<
		IFGE .-B,<
	fH		XLIST				;Literfhals
			LIT
			LgIST
			..H%%==.
			RELOC	..L%%
gH		>;END IFGE
	>;ghEND DEFINE $LOW
h>;END IFIDN <A><h(PURE>

IFIDN <hHA><TWOSEG>,<
	..hhTEMP==1
	TWOSEG	iB
	..H%%==B
	i(..L%%=0

	DEFINiHE	$HIGH,<
		IFL ih.-B,<
			VAR			j;Variables
			XLj(IST				;Literals
			LIT
			LIST
			..L%%==.
			kRELOC	..H%%
		>;k(END IFL
	>;END DkHEFINE $HIGH

	DkhEFINE	$LOW,<
		IlFGE .-B,<
			XLl(IST				;Literals
			LIT
			LIST
			..H%%==.
			mRELOC	..L%%
		>;m(END IFGE
	>;END mHDEFINE $LOW
>;ENmhD IFIDN <A><TWOSnEG>

IFIDN <A>n(<IMPURE>,<
	..TEnHMP==1
	DEFINE	$HnhIGH,<
		VAR				;oVariables
	>;ENDo( DEFINE $HIGH

oH	DEFINE	$LOW,<
	oh	XLIST				;Literapls
		LIT
		LISTp(
	>;END DEFINE $pHLOW
>;END IFIDN ph<A><IMPURE>

IqFE ..TEMP,ABORT Uq(nrecognized $SEGMENT A

$SEGM*r.JBHGH 	O%| p!9%%ERR(.ERSTP,A,<B>,C,D,E,F,G)C,D,	SN	  qh
	PUSHJ	Pr,.TSTRM##
	XLISTr(
	ASCIZ\A\
	LIST
IZ\A\
	LI	SN	6 rh
	PUSHJ	Ps,.TSTRM##
	XLISTs(
	ASCIZ\A
\
	LIST
\A
\
		^+@ 0!E%%ERR(.ERWPRN,A,<B>,C,D,E,F,G)C,D,	j.+` P }
	SETZM	pA
	XLIST
IFNB <B>,<
	MOVE	T1,[0A,,A+1]
	BLT	TP1,B
>;END IFNB
	LISTENDIFNB
	SETZM	pA
	XLIST
IFNB <B>,<
	MOVE	T1,[0A,,A+1]
	BLT	TP1,A+B-1
>;END IFNB
	LISTEND 
-X{P 
.,@ 0!{
E$$B:PUPSHJ P,.ERROR##
	pXLIST
ERB$==E$$B
	  CAIA	A,'0B'
	.N.==1
	IFNPB F,<.N.==2>
	IpFNB E,<.N.==2>
	IFNB G,<.N.==3>0
	IFNB H,<.N.==P3>
	XWD	-.N.,[E%p%B:  D,,[ASCIZ\C\]
IFG .N.-1,<0XWD F,E>
IFG .PN.-2,<XWD G,H>
	]
IFE A-.ERHLT,<
	SKIPA
	HAL0T	E$$B
>
	LISTE$$B
>
	LIST
lzQ ;$[8P ~3@  E
	IFLE A(-17,<ADDI A,1>
P	IFG  A-17,<AOS A>
A-17,<AOS S@P h:P P SP |P 	\P 99P =P NP N8P |WP &tLG ( <
	IFNB	<HB>,<..T==0
		IFEh	B-777777,<..T==1
			.C.	A>
	(	IFE	B-777777777H777,<..T==1
			.hC.	A>
		IFE	..T,<LOAD(TEMP,A,(B)
				  XLIST
H				  .C.	TEMP
h				  STORE(TEMP,A,B)
				  LIS(T
				  SALL>>
H	IFB	<B>,<.C.	A>
B>,<.C.	2&=  
	IFNB	<(C>,<..T==0
		IFEH	C-777777,<..T==h1
			D	A,B>
		IFE	C-77777700(0000,<..T==1
			HE	A,B>
		IFE	hC-777777777777,<..T==1
			G	A,(B>
		IFE	..T,<HF	A,[POINTR(B,hC)]>>
	IFB	<C>,<G	A,B>
C>,N~3@ 	 M
	IFLE A	0-17,<SUBI A,1>
	P	IFG  A-17,<SOS A>
A-17,<SOS >}{woP