Google
 

Trailing-Edge - PDP-10 Archives - BB-H506E-SM - conversion/utility/comuni.unv
There are 15 other files named comuni.unv in the archive. Click here to see a list.
x
,5#@P C;uP E'P E2\I@ 9x3RaP
	IFNB	<:(A>,<A::>
	BLOCK	B
:>
	BLOCK61E2\I[ ;3ca`
	IFNB	<;8A>,<A::>
	IFN	;XB,<IFB	<C>,<BLOC;xK	B>
		    IFNB<	<C>,<REPEAT	B,<8<
					C>>
		>
				C>>
		>63T1G3YQ @G3[Q G>l: Wx5S
	IFG	A-XCOMSIZ,<
	XXX.==X8A-COMSIZ
  DEFIXXNE PEXCS(OVRFLO),Xx<
	PRINTX	?COMSIYZ EXCEEDED BY 'OVY8RFLO (OCTAL) WORDYXS - REGENERATE THYxE COMPILER
Z>
	PEXCS(\XXX.)
>Z8;END IFG A-COMSIZ
IFG A-COMSIG>n:=P pI
n0P I4.: |X09

IFNDEF|x .BITST,<	.BITST=}=0>	;START AT 0
}8
IF1,<			;ALL TH}XIS STUFF HAPPENS }xONLY IN PASS 1
~
;ERROR CHECKS
I~8FDEF YA,<	PRINTX~X ?A ALREADY DEFI~xNED WITH DEFBYT
	>

IFG <.BITST8+B-^D36>,< PRINTXX ?DEFBYT: A DOExS NOT FIT IN WORD>
; END OF ERROR8 CHECKS

;DEFINXE YA TO BE THE WxORD C
	YA==C

	DFENDP==B+.B8ITST-1	;END POSITXION

;COMPUTE FxLAGS
	DFBF==DFB.BT		;ASSUME BYTE 8INSTRUCTION NEEDEXD
IFE B-^D36,<
	DFBF==DFB.FW> ;FULL WORD
IFE B8-^D18,<
	IFE DFEXNDP-^D17,<
	DFBFx==DFB.LH>		;LEFT HALF-WORD INSTRUC8TION NEEDED
	IFEX DFENDP-^D35,<
	xDFBF==DFB.RH>		;RIGHT HALF-WORD IN8STRUCTION NEEDED
	>

	XA==<DFBxF>B21+B,,DFENDP

	.BITST==B+.B8ITST

IFE <.BITXST-^D36>,<.BITST=x=0>	;.BITST IS NEW STARTING POSITION
>;END IF1
IhZP Ii[P IkP IlTP I' IX4]
	ADR==HIIx.PUR	
	DEFINE	DIJSEL%	(N%)	<
	N%=J8:ADR		
	ADR==ADRJX+1
	>
	DEFINE	DJxSTBL%	(NAM,IR)	<DKISEL%	(NAM)>

	K8DISTB%				

	PUKXRGE	DISEL%,DSTBL%,ADR
L%,DSTBL%I'HB >X/a

	DISEL>x%	C.RSET
	DISEL%?	STOPR.
	DISEL%	?8C.STOP
	DISEL%	K?XILL.
	DISEL%	GOT?xO.
	DISEL%	TODAY@.
	DISEL%	KDECL.@8
	DISEL%	KPROG.
	DISEL%	DSP.FP
@x	DISEL%	LINE.C
	ADISEL%	LINE.D
	DA8ISEL%	LINE.H
	DIAXSEL%	LIN.RH
	DISAxEL%	CANCL.
IFN ABNS74,<
	DISEL%	SB8.CALL
>
	DISEL%BX	M.INIT
	DISEL%	BxM.RMW
	DISEL%	M.CRSW
	DISEL%	M.RMC8NW
	DISEL%	M.RSNCXW
	DISEL%	M.SENDCx
	DISEL%	M.AC
	DDISEL%	M.IFM
	DID8SEL%	M.DI
	DISELDX%	M.DIT
	DISEL%	DxM.DO
	DISEL%	M.EEI
	DISEL%	M.EIT
	DISEL%	M.EO
	DEXISEL%	STR.
	DISEExL%	STR.O
	DISEL%F	UNS.
	DISEL%	UNF8S.O
	DISEL%	FUNCFXT.
	DISEL%	FIX.
	DISEL%	PERF.
	GDISEL%	FLOT.1
	DG8ISEL%	FLOT.2
	DIGXSEL%	PD6.
	DISELGx%	PD7.
	DISEL%	GHD6.
	DISEL%	GD7.H8
	DISEL%	NEG.
	HXDISEL%	MAG.
	DISHxEL%	ADD.12
	DISEIL%	ADD.21
	DISELI8%	ADD.22
	DISEL%IX	SUB.12
	DISEL%	IxSUB.21
	DISEL%	SJUB.22
	DISEL%	MUJ8L.12
	DISEL%	MULJX.21
	DISEL%	MUL.Jx22
	DISEL%	DIV.1K1
	DISEL%	DIV.12K8
	DISEL%	DIV.21
	DISEL%	DIV.22
Kx	DISEL%	C.OPEN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L%	GD[x9.
	DISEL%	POS.9\
	DISEL%	NEG.9
\8	DISEL%	ZERO.9
	\XDISEL%	ALF.9
	DI\xSEL%	NUM.9
	DISE]L%	ALF.9
	DISEL%]8	SPAC.9
	DISEL%	]XCMP.96
	DISEL%	C]xMP.97
	DISEL%	ED^IT.B
	DISEL%	RST^8AB.
	DISEL%	ZERC^X.6
	DISEL%	ZERC.^x7
	DISEL%	ZERC.9_
IFN ANS74,<
	D_8ISEL%	C.STRT
	DI_XSEL%	DATE.
	DISE_xL%	DAY.
	DISEL%	`TIME.
>

	DSTB`8L%	USRTB.,15

`X

	DISEL%	DSPL.6`x
	DISEL%	DSPL.7

	DISEL%	SUBE1.a8
	DISEL%	SUBE2.
	DISEL%	SUBE3.
ax	DISEL%	EXIT.E
IbFN BIS,<
	DISEL%b8	XTND.E
	DISEL%	bXALP.66
	DISEL%	AbxLP.67
	DISEL%	ALcP.69
	DISEL%	ALPc8.76
	DISEL%	ALP.cX77
	DISEL%	ALP.7cx9
	DISEL%	ALP.96d
	DISEL%	ALP.97
	DISEL%	ALP.99
dX	DISEL%	ALPS.6
	dxDISEL%	ALPS.7
	DeISEL%	ALPS.9
	DIe8SEL%	NUM.66
	DISeXEL%	NUM.67
	DISEexL%	NUM.69
	DISELf%	NUM.76
	DISEL%f8	NUM.77
	DISEL%	fXNUM.79
	DISEL%	NfxUM.96
	DISEL%	NUgM.97
	DISEL%	NUMg8.99
	DISEL%	CVTDgXB.
	DISEL%	CBDOVgx.
	DISEL%	CVBD.6h
	DISEL%	CVBD.7
	DISEL%	CVBD.9
hX	DISEL%	MUL.41
	hxDISEL%	MUL.42
	DiISEL%	DIV.41
	DIi8SEL%	DIV.42
	DISiXEL%	DVI41.
	DISEixL%	DVI42.
>;END jIFN BIS
	DISEL%	j8KEY.
IFN TOPS20,jX<
	DISEL%	PSORT.jx
	DISEL%	PMERG.
	DISEL%	RELES.
k8	DISEL%	MERGE.
	kXDISEL%	MCLOS.
	DkxISEL%	RETRN.
	DIlSEL%	ENDS.
>

l8
IFN BIS,<
	DISlXEL%	ADD.4R
>;ENDlx IFN BIS
IFN TCSm,<
	DISEL%	MBINDm8
	DISEL%	MNAME
mX>
	DISEL%	MVD.ALmx
	DISEL%	NUM.3
n	DISEL%	WADVV.
	n8DISEL%	WRITV.

nX
	DISEL%	METER.
IFN BIS,<			;[55o4] QUAD-WORD SIZEo8 ERROR ROUTINES
oX	DISEL%	SIZE.4
	oxDISEL%	SIZE.5
>;pEND IFN BIS			;[5p854]
	DISEL%	FLT.pX12
	DISEL%	FLT.2px2
	DISEL%	FIX.2
	DISEL%	E.F2D1
q8	DISEL%	E.F2D2
	qXDISEL%	E.F2FP
	DqxISEL%	E.F2F2
	DIrSEL%	PPOT4.
	DISr8EL%	ISBPS.
	DISErXL%	MROUT.
				;[rx621] (MUST BE PREsSENT IN ALL FLAVOs8RS OF LIBOL)
;V1sX2B RMS ENTRY POINsxTS
IFN ANS74,<
t	DISEL%	OP.MIX
	t8DISEL%	CL.MIX
	DtXISEL%	WT.MIR
	DItxSEL%	WT.MIS
	DISuEL%	RD.MIR
	DISEu8L%	RD.MIS
	DISELuX%	DL.MIR
	DISEL%ux	DL.MIS
	DISEL%	vRW.MIR
	DISEL%	Rv8W.MIS
	DISEL%	STvX.MEQ
	DISEL%	ST.vxMGT
	DISEL%	ST.MwNL
>;END IFN ANSw874

	DISEL%	%STwXR.
	DISEL%	%STR.wxO
	DISEL%	%UNS.
	DISEL%	%UNS.O
x8IFN ANS74,<
	DISxXEL%	SWT.ON
	DISExxL%	SWT.OF
	DISELy%	CMP.67
	DISEL%y8	CMP.69
	DISEL%	yXCMP.79
	DISEL%	CyxOMP.6
	DISEL%	COzMP.7
	DISEL%	COMz8P.9
	DISEL%	SU.SzX69
	DISEL%	SU.S7zx9
	DISEL%	SU.S97{
>
IFN ANS74,<
IFN BIS,<
	DISE{XL%	CVDBT.
	DISEL{x%	CVDBL.
>;END I|FN BIS
>;END IFN ANS74

D IFNK:$IH X0{
PRINTX %x ENDDFB: THERE ARE A BITS STILL U8NASSIGNED BY "DEFBYT"
D BY "DEFK:$IQ 80q
IF1,<
IXFN .BITST,<
	.BIxTLFT==^D36-.BITST
	;COMPUTE # OF FR
8EE BITS
	RADIX 1
X0		;MAKE IT COME 
xOUT IN DECIMAL.
	ENDDF1U(\.BITLFT
	RA 8			;BACK TO OCTAL
>
>;END IF1

>
>;END IM&t.: 
0W
IF1,<
	
8.BITST==0	; Reset
X bit position to 
x0
>; END if1	

>; END if1	
M'Em6P	Q$u|SP&Q$v
	
	DEFIFXNE	SYMH%%	(N%,V)	Fx<N%==:0>	
	DEFINGE	SYML%%	(N%,V)	<G8SYM%%	N%,V>	
	DEGXFINE	ELMT%%	(N%,LGx<1>,V)	<BLKDFV	N%H,L,<V>>	

	RELOH8C	0
	CHK==.

	HX%LOSEG

	COMCHKHx	.-CHK		

	PURGIE	SYML%%,SYMH%%,ELMT%%
SYMH%%,ES:4*b "h":
	ELMT%%	#FILES.
	ELMT%%	U#(SES.
	ELMT%%	SEG#HWD.
	ELMT%%	ALTE#hR.
	ELMT%%	OVRFN$.
	ELMT%%	POINT.$(
	ELMT%%	COMMA.
	ELMT%%	MONEY.
$h	ELMT%%	MEMRY.
	%ELMT%%	%NM.
	ELM%(T%%	%DT.
	ELMT%%%H	%PR.
	ELMT%%	CO%hBVR.
	ELMT%%	COB&SW.
	ELMT%%	PUSH&(L.
	ELMT%%	SURRT&H.
	ELMT%%	SUEQT.&h
	ELMT%%	SUFBT.
 IFN ANS74,<
	E'(LMT%%	%DB.
 >
MT%%	%DB.
 >
S:5 Zx5k
	INC==0	[	
	DEFINE	ELMT%%[8	(N%,L<1>,V)	<
	[XIFNB	<N%>,<%'N%==[x:INC>
	INC==INC+\1
	>
	DEFINE	SY\8ML%%	(N%,L<1>,V)	\X<
	IFNB	<N%>,<%'\xN%==:INC>
	>
	I]NFBK%

	PURGE	E]8LMT%%,SYML%%,INC

,SYML%%,INC+q
	ELMT%%	X8UEBLK.,4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MTg8%%	FOP.BH,1
	ELMgXT%%	FOP.BN,1
	ELgxMT%%	FOP.LB,1
	EhLMT%%	FOP.PP,1
h8

	ELMT%%	CP.BLKhX,1
	ELMT%%	CP.BKhx1,1
	ELMT%%	CP.BiK2,1
	ELMT%%	CP.i8BK3,1
	ELMT%%	CPiX.BK4,1
	ELMT%%	CixP.BK5,1
	ELMT%%	jCP.BK6,1
	ELMT%%j8	CP.BK7,1
IFN TOjXPS20,<				; [1066jx]
	ELMT%%	GJ.BLKk,17
	ELMT%%	GJ.Ak8TR,4
>					; [10kX66]

	; MAKE TMkxP.BK AT LEAST AS lBIG AS .TPLEN ON l8TOPS10

IFN TOPlXS20,<	ELMT%%	TMP.lxBK,15>
IFE TOPS2m0,<	
 IFNDEF .TPm8LEN,<ELMT%%	TMP.BmXK,15>
 IFDEF .TPmxLEN,<
  IFL <15-n.TPLEN>,< ELMT%%	n8TMP.BK,.TPLEN>
 nX IFGE <15-.TPLEN>nx,< ELMT%%	TMP.BK,o15>
 >
>

	ELo8MT%%	FID.BK,15
oX
	ELMT%%	NRSAV.,5ox

	ELMT%%	AUTOLpB,1
	ELMT%%	DELSp8IZ,1
	ELMT%%	LNKpXNO.,1
	ELMT%%	REpxLEN.,1



	ELqMT%%	SRC.MD,1
	Eq8LMT%%	DLM.MD,1
	qXELMT%%	DST.MD,1
qx	ELMT%%	NX.SSA,1	r;ADDRESS OF NEXT r8SOURCE SERIES ITErXM
	ELMT%%	CV.DLMrx,1	;INSTRUCTION TsO CONVERT DELIMITs8ER
	ELMT%%	SSACBsX.,16	; SAVED AC'Ssx WHEN CALLING A TtAG
	ELMT%%	TAG.Pt8T,1	;ADDR OF ROUTtXINE TO STORE POINtxTER VALUE
	ELMT%u%	TAG.DL,1	;ADDR u8OF ROUTINE TO GETuX NUMERIC DELIMITEuxR
	ELMT%%	TAG.SRv,1	;ADDR OF ROUTIv8NE TO GET NUMERICvX SOURCE
	ELMT%%	vxSS.CNT,1	;SOURCE-wSERIES ITEM COUNTw8ER
	ELMT%%	DLM.TwXP,1	;ADDR OF %TEMwxP OR %LIT FOR DELxIMITER
	ELMT%%	Sx8RC.TP,1	;ADDR OF xX%TEMP OR %LIT FORxx SOURCE
	ELMT%%	yNX.SRC,1	;ADDR OFy8 NEXT SOURCE ITEMyX
	ELMT%%	NUM.SR,yx1	;NUMBER OF SOURzCES IN THIS SS
	z8ELMT%%	NUM.RC,1	;zXNUMBER OF RECEIVIzxNG ITEMS FOR UNST{RING
	ELMT%%	CT.{8DLM,1	;COUNT OF D{XELIMITERS
	ELMT%{x%	SRD.BP,1	;HOLDS| BP FOR SOURCE - |8START OF 1ST MATC|XH
	ELMT%%	SRD.CC|x,1	;HOLDS CC FOR }SOURCE - START OF}8 1ST MATCH
	ELMT}X%%	SRA.BP,1	;HOLD}xS BP FOR SOURCE A~FTER LAST MATCH
~8	ELMT%%	SRA.CC,1	~X;HOLDS CC FOR SOU~xRCE AFTER LAST MATCH
	ELMT%%	CV.S8DS,1	;CONVERSION XFROM SOURCE TO DExST
	ELMT%%	TAG.ST,1	;GET %TEMP SE8T UP FOR DEST.
	XELMT%%	NX.DLM,1	;xNEXT DELIMITER
	ELMT%%	NUM.DL,1	;8NUMBER OF DELIMITXERS
	ELMT%%	TAG.xCT,1	;TAG TO STORE COUNT ITEM
	EL8MT%%	TAG.DA,1	;TAXG TO STORE AWAY DxEST FROM OU.TMP
	ELMT%%	DST.TP,1	8;%LIT OR %TEMP FOXR DEST.
	ELMT%%	xTAG.TL,1	;TAG TO STORE TALLY ITEM

	ELMT%%	BS.AGLX,1




	ELMTx%%	SRC.PT,1
	ELMT%%	SRC.CT,1

	8ELMT%%	TMP.DP,1
X
	ELMT%%	OU.ARP,x1
	ELMT%%	OU.MDE,1

	ELMT%%	TL.8ARG,1
	ELMT%%	TLX.VLU,1

	ELMT%%x	PT.ARG,1
	ELMT%%	PT.VLU,1

	EL8MT%%	AP.TMP,1
	EXLMT%%	DW.TMP,1
x
	ELMT%%	SE.DLM,1

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BLOCK
	ELMT(X%%	MRTDBP,1
	ELM(xT%%	MRLDBL,1
			)		; OR BUFFER FOR)8 COPY FROM .TMP T)XO .MTO
IFN DBMS6)x,<
	ELMT%%	MRDDB*P,1
>
	ELMT%%	M*8RNM6,1
	ELMT%%	M*XRNMA,3
	ELMT%%	M*xRAFFT,1
	ELMT%%	+MRFKFT,1
IFE TOP+8S20,<
	ELMT%%	MB+XTIM.,1
	ELMT%%	M+xRCHNN,1
	ELMT%%	,MRCHCF,1
	ELMT%%,8	MRBLKO,1
	ELMT%,X%	MRBKO.,1
	>
I,xFN TOPS20,<
	ELM-T%%	MBTIM.,2
	EL-8MT%%	MRJFN,1
	EL-XMT%%	MRLCJF,1
	E-xLMT%%	MRBLKO,2
	.ELMT%%	MRBKO.,2
.8IFN FTLSDR,<
	EL.XMT%%	MRLDNA,^D10
	ELMT%%	MRLDJF,1/
	  >;END IFN FT/8LSDR
	>;END IFN /XTOPS20
IFN FTLSD/xR,<
	ELMT%%	MRLB0PC,1
	ELMT%%	MRL08SZL,1
	ELMT%%	MR0XLFPR,1
  IFE TOP0xS20,<
	ELMT%%	MR1CHLS,1
	ELMT%%	M18RLLDR,1
	ELMT%%	1XMRLLDV,1
	ELMT%%1x	MRCFNM,1
	ELMT%2%	MRCFEX,1
   >;28END IFE TOPS20
>2X;END IFN FTLSDR
2x	ELMT%%	MRAPN.,1
					;0 IF FILE 38IS NEW
	ELMT%%	M3XRFPGT,1,
	ELMT%%3x	MRKILL,1
	ELMT%4%	MRBNUM,1
	ELMT48%%	MRRERN,1
				4X	; (THUS CAN'T WR4xITE IN .MTO FILE)5
IFN TOPS20, ELM58T%% MRPSTM,2
IFE5X TOPS20, ELMT%% M5xRPSTM,1

>

	6ELMT%%	DBSTP.,1
68
;THE FOLLOWING 6XARE USED FOR $ERR6xOR PROCESSING
	E7LMT%%	ER.PC,1
	E78LMT%%	ER.FLG,1
	7XELMT%%	ER.MCL,1
7x	ELMT%%	ER.HIJ,1
					; SOMETIMES88 SET UP BEFORE TH8XE $ERROR
					; 8xCALL.
IFN TOPS209,<
	ELMT%%	ER.JS98E,1
	ELMT%%	MNTR9X5,1
>
IFE TOPS29x0,<
	ELMT%%	ER.E:10,1
>
	ELMT%%	:8ER.RBG,1

;** T:XHE FOLLOWING LOCA:xTIONS SHOULD BECO;ME "VISIBLE" IN V;8ERSION 13.
;   T;XHEY ARE HERE TEMP;xORARILY FOR 12B S<O 12A IS COMPATIB<8LE.
	ELMT%%	SLRS<XW.,1
	ELMT%%	RMF<xLG.,1


IFN AN=S74,<
;USED BY R=8MSIO
	ELMT%%	CVP=XRM.,2
	ELMT%%	CV=xARGS,2
	ELMT%%	R>MSVR.,1
>
	ELMT%%	INTRAP,1
MTY<v>
@ x1M

;ERROR CHECKS
IF1,<
	8IFNDEF XB,<PRINTXX ? B NOT DEFINExD WITH "DEFBYT">
>;END PASS 1 ERR8OR CHECKS

DFBFX==XB_-^D32		;GETx FLAG WORDS
IFE DFBF-DFB.FW,<		;G8EN FULL WORD INSTXRUCTION
	MOVE	Ax,YB+C
	>
IFE DFBF-DFB.RH,<		;G8EN RIGHT HALF WORXD INSTRUCTION
	HxRRZ	A,YB+C
	>
IFE DFBF-DFB.LH8,<		;GEN LEFT HALXF WORD INSTRUCTIOxN
	HLRZ	A,YB+C
	>
IFE DFBF-D8FB.BT,<
..X==XBX_^D18
..X==..X_-x^D18			;GET RID OF LH, = ENDING BI8T POSITION 
..Y=X=<XB_-^D18>&^O77x		;GET LH, JUST # OF BITS
	..LIT=8=<YB+C>	;FIRST XPART OF LITERAL BxEING BUILT
	..LIT==..LIT+<..Y_^D284> ;# OF BITS IN XBYTE PTR
	..LIT=x=..LIT+<<^D36-..X-1>_^D30> ;FINAL 8BIT POSITION IN BXYTE PTR
	LDB	A,[..LIT]
	>
A,Y?< L5;
	DEFINE	L8SYMH%%	(N%,V)	< >LX
	DEFINE	SYML%%	Lx(N%,V)	<SYM%%	N%,MV>	
	DEFINE	ELMTM8%%	(N%,L<1>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,<"R"-40>
	ELMT-8%%	,1,<"D"-40>
	-XELMT%%	,1,<"B"-40-x>
IFN ANS74,<
	.ELMT%%	,1,<"/"-40.8>
>

	ELMT%%	E.X0.7,1,<EDIT	0>
	.xELMT%%	E0.7.1,1,</0>
	ELMT%%	,1,<0/8>
	ELMT%%	,1,<"$/X">
	ELMT%%	,1,<"/x,">
	ELMT%%	,1,<0".">
	ELMT%%	,1,08<" ">
	ELMT%%	,10X,<"0">
	ELMT%%	,0x1,<"+">
	ELMT%%	1,1,<"-">
	ELMT%%18	,1,<"C">
	ELMT%1X%	,1,<"R">
	ELMT1x%%	,1,<"D">
	ELM2T%%	,1,<"B">
IFN28 ANS74,<
	ELMT%%2X	,1,<"/">
>

	2xELMT%%	E0.9,1,<ED3IT	0>
	ELMT%%	E038.9.1,1,<0>
	ELMT3X%%	,1,<0>
	ELMT%3x%	,1,<133>
	ELMT4%%	,1,<153>
	ELM48T%%	,1,<113>
	EL4XMT%%	,1,<100>
	E4xLMT%%	,1,<360>
	5ELMT%%	,1,<116>
58	ELMT%%	,1,<140>
	ELMT%%	,1,<303>5x
	ELMT%%	,1,<3316>
	ELMT%%	,1,<30684>
	ELMT%%	,1,<36X02>
IFN ANS74,<
	ELMT%%	,1,<141>7
>
>



	EL78MT%%	OU.TMP,5		;F7XOR STRING
	ELMT%7x%	DST.BP,1		;DEST8INATION BYTE POIN88TER
	ELMT%%	DST.8XCC,1		;DESTINATIO8xN CHAR COUNT
	EL9MT%%	PT.VAL,1		;'98POINTER' VALUE
	9XELMT%%	SRC.BP,1		9x;SOURCE BYTE PTR
	ELMT%%	SRC.CC,1:8		;CC OF SOURCE
:X	ELMT%%	SR.TMP,5	:x	;TEMP HOLD FOR N;UMERIC SOURCE
	E;8LMT%%	DLM.BP,1		;;XBYTE PTR TO DELIM;xITER
	ELMT%%	DLM<.CC,1		;CC OF DEL<8IMITER
	ELMT%%	T<XMP.DL,5		;TEMP HO<xLD FOR NUMERIC DE=LIMITER
	ELMT%%	=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X	

	
	DEFINE	S@xYMH%%	(N%,V)	<SYMA%%	N%,V>	
	DEFINA8E	SYML%%	(N%,V)	<AX >		
	DEFINE	ELMAxT%%	(N%,L<1>,V)	<BBLKDFV	,L,<V>>	
B8	PREST%				

	PBXURGE	ELMT%%,SYMH%Bx%,SYML%%,DISEL%,DSTBL%
DISEL%,DaWKb C84/

	DEFINCXE	ELMT%%	(N%,L<1>Cx,V)	<BLKDF	N%,L>	D
	LOC	LO.PUR			
	DEFINE	SYML%%	(DXN%,V)	<SYM%%	N%,VDx>	
	DEFINE	SYMH%E%	(N%,V)	< >	

E8	%LOSEG			

	COEXMCHK	.-LO.PUR	
Ex
	PURGE	ELMT%%,SYMH%%,SYML%%
SYe-nQ gl.: X0M

IF1,<	x			;ONLY HAPPENS ON PASS 1
;ERROR8 CHECKS
IFNDEF XXB,<	PRINTX ? SAMxBYT: B NOT PREVI	OUSLY DEFINED WIT	8H DEFBYT>

XA=	X=XB
YA==YB
>;END IF1
B
>gRX5Q @gRY8Q gRYzQ gR[VQ gR~)  $2o

;ERROR$8 CHECKS
IF1,<
	$XIFNDEF XB,<PRINT$xX ? B NOT DEFINE%D WITH "DEFBYT">
>;END PASS 1 ERR%XOR CHECKS

DFBF%x==XB_-^D32		;GET& FLAG WORDS
IFE &8DFBF-DFB.FW,<		;G&XEN FULL WORD INST&xRUCTION
	MOVEM	'A,YB+C
	>
IFE'8 DFBF-DFB.RH,<		;'XGEN RIGHT HALF WO'xRD INSTRUCTION
	(HRRM	A,YB+C
	(8>
IFE DFBF-DFB.L(XH,<		;GEN LEFT HA(xLF WORD INSTRUCTI)ON
	HRLM	A,YB+)8C
	>
IFE DFBF-)XDFB.BT,<
..X==X)xB_^D18
..X==..X_*-^D18			;GET RID *8OF LH, = ENDING B*XIT POSITION 
..Y*x==<XB_-^D18>&^O7+7		;GET LH, JUST +8# OF BITS
	..LIT+X==<YB+C>	;FIRST+x PART OF LITERAL ,BEING BUILT
	..L,8IT==..LIT+<..Y_^D,X24> ;# OF BITS IN,x BYTE PTR
	..LIT-==..LIT+<<^D36-..-8X-1>_^D30> ;FINAL-X BIT POSITION IN -xBYTE PTR
	DPB	A,[..LIT]
	>
AgfhQ  3eA==:BiP i?4HP m'+ H"

	ELMT%h%	MEMRY%,1
	ELMT%%	TALLY.,1,<Z>
(	ELMT%%	SZERA.,1,H<Z>
	ELMT%%	OVFLhO.,1,<Z>

	ELMT%%	TRAC1.,1,<JRST(	BTRAC.##>
	ELMTH%%	TRAC2.,1,<JRSTh	TRPOP.##>
	ELMT%%	TRAC3.,1,<JRST(	TRPD.##>

	ELMHT%%	OPNCH.,1,<XWDh	777774,0>
	ELMT%%	RN.DEV,1
	ELM(T%%	RN.PPN,1
	ELHMT%%	RN.NAM,1
	EhLMT%%	FSLOC.,1,<Z>
	ELMT%%	HLOVL.(,1,<Z>

	ELMT%%H	%REMOV,1,<EXP	REhMOV.##>
IFN ANS74,<
	ELMT%%	%ENT(OV,1,<EXP	ENTOV.#H#>
>

	ELMT%%	hKEYCV.,1,<Z>
	ELMT%%	SAVEF.,1,<Z>(






	ELHMT%%	HPRT.,1,<EXPh	HSRPT.##>
						; PRINTING ROUTI(NE.
	ELMT%%	SEGNHO.,1,<Z>
	ELMT%%h	SNRBP.,1,<EXP	SBPSG.##>


	ELM(T%%	TRAC4.,1,<EXPH	CNTRC.##>
	ELMTh%%	CIOTF.,1,<EXP	SFOV.##>



(


IFN DBMS,<		H		;[623]
	ELMT%%h	DBSTP%,1,<EXP	%D BSTP##>

	SYML% (%	LEVEL.,<.-1>
	 HIFNDEF LEVEL.,<PR hINTX ?LEVEL. NOT !DEFINED!>
>					!(;[623]
IFE DBMS,!H<				;[623]
	ELM!hT%%	LEVEL.,1,<Z>
>					;[623]

"(	ELMT%%	METR.,1,<Z>



.,1,<u2| 2

;ERROR8 CHECKS
IF1,<
	XIFNDEF XB,<PRINTxX ? B NOT DEFINED WITH "DEFBYT">
>;END PASS 1 ERRXOR CHECKS

DFBFx==XB_-^D32		;GET FLAG WORDS
IFE 8DFBF-DFB.FW,<		;GXEN FULL WORD INSTxRUCTION
	MOVE	A,C
	>
IFE DFBF8-DFB.RH,<		;GEN RXIGHT HALF WORD INxSTRUCTION
	HRRZ	A,C
	>
IFE DF8BF-DFB.LH,<		;GENX LEFT HALF WORD IxNSTRUCTION
	HLRZ	A,C
	>
IFE D8FBF-DFB.BT,<
..XX==XB_^D18
..X==x..X-^D18			;GETRIDOFLH,=ENDI8NGBITPOSITION