Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/12/od.mac
There is 1 other file named od.mac in the archive. Click here to see a list.
;AUTHOR:	STEFAN ARNBORG 8-MAY-73
;VERSION:	0
;PURPOSE:	PROCESS IC1 SYMBOLS CORRESPONDING TO TERMINAL EXPRESSION
;		NODES AND PUT CORRESPONDING ZCN AND ZLI NODES INTO
;		THE OPERAND STACK
;CONTENTS:	CODE SEQUENCES FOR IDENTIFIERS AND LITERALS
	SALL
	SEARCH	SIMMCR,SIMMAC,SIMMC2
	CTITLE	OD
	INTERN	ODEN
	EXTERN	YOPSTP,YEXPP
	EXTERN	O2IV,CGPU
	MACINIT
DEFINE	SETTYPE(QT)=<
	TLO	XV1,<QT>B<%ZCNTYP+^D18>>
DEFINE	BTAB(N,V,DUM,DUM1)=<
IFL <SYMBL3-V>,<
IFG <SYMBL4-V>,<
	GOTO	N'.
>>
>
	TWOSEG
	RELOC	400K
ODEN:	PROC
	IF; SYMBOL IS IDENTIFIER
		CAIGE	XCUR,QLOWID
		GOTO	FALSE
	THEN
		; PACK A ZLI RECORD AND PUSH IT INTO THE OPERAND STACK
		HRLI	XCUR,<1B<%ZNOTER+^D18>+<QZLI>B<%ZNOTYP+^D18>>
		L	XP1,YOPSTP
		PUSH	XP1,XCUR
		PUSH	XP1,[Z]
		ST	XP1,YOPSTP
		RETURN
	ELSE
		; READ A LITERAL AND PUSH A ZCN RECORD INTO THE OPERAND STACK
		MOVSI	XV1,<1B<%ZNOTER+^D18>+<QZCN>B<%ZNOTYP+^D18>+<QSIMPLE>B<%ZIDKND+^D18>>
		SETZ	XV2,
		ASSERT<
			CAIG	XCUR,SYMBL3
			RFAIL	NOT OPERAND IN OD-LOW
			CAIL	XCUR,SYMBL4
			RFAIL	NOT OPERAND IN OD-HIGH
		>
		GOTO	.-SYMBL3(XCUR)
		SYMB 6,1,BTAB
	CONI.:	SETTYPE	QINTEGER
		GOTO	READ2
	CONR.:	SETTYPE	QREAL
		GOTO	READ2
	CONT.:	SETTYPE	QTEXT
		GOTO	READ2
	CONC.:	SETTYPE	QCHARACTER
		GOTO	READ1
	TRUE.:	SETO	XV2,
	FALSE.:	SETTYPE	QBOOLEAN
		GOTO	PUSHRC
	NOTEX.:	SETTYPE	QTEXT
		GOTO	PUSHRC
	NONE.:	SETTYPE	QREF
		LI	XV2,NONE
		GOTO	PUSHRC
	CONLR.:	SETTYPE	QLREAL
		LI	XV2,4	; READ 4 HALFWORDS FOR LONG REAL
		LOOP
			ROTC	XP1,^D18
			EXEC	O2IV
			HRR	XP2,
		AS
			SOJG	XV2,TRUE
		SA
		L	X1,YEXPP
		STD	XP1,-2(X1)
		SUBI	X1,2
		ST	X1,YEXPP
		HRR	XV2,X1
		MOVS	X1,YOPSTP
		ADDI	X1,2
		IF	TLNN	X1,400K
			GOTO	FALSE
		THEN
			ERROR2	35,EXPRESSION COMPLICATED IN ODEN
			BRANCH	CGPU
		FI
		MOVSM	X1,YOPSTP
		GOTO	PUSHRC
	LB.:	HRRI	XV1,1
	LP.:	HRLI	XV1,<1B<%ZNOTER+^D18>+<QZOS>B<%ZNOTYP+^D18>>
		GOTO	PUSHRC
	UDEF.:	SETTYPE	QUNDEF
		GOTO	PUSHRC
	READ2:	EXEC	O2IV
		HRL	XV2,
	READ1:	EXEC	O2IV
		HRR	XV2,
	PUSHRC:	L	XP1,YOPSTP
		PUSH	XP1,XV1
		PUSH	XP1,XV2
		ST	XP1,YOPSTP
		RETURN
	FI
	EPROC
	LIT
	RELOC
	VAR
	END