perm filename SP.MAC[SIM,SYS] blob sn#460284 filedate 1979-07-22 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00004 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002
C00003 00003	SP:
C00005 00004		LIT
C00006 ENDMK
CāŠ—;

COMMENT;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

AUTHOR:		CLAES WIHLBORG
VERSION:	13
PURPOSE:	PERFORM MAIN SCAN OF PASS 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

	SEARCH	MC1,SIMMAC
	SALL
	CTITLE	SP (SYNTAX PARSER)

	INTERN	SP

	EXTERN	T1,SRPROG,LS,LC,YLCLB
	EXTERN	I1SRCH	;[13]
	EXTERN	O1XRCL,O1SCCL,O1LSCL,O1ICCL
	EXTERN	YMAXID,YMAXFX,.JBREL,DC1
	EXTERN	YC1DC,YDPD,YBSTP,YDLV,YSDENL


IFG QDEBUG,<	EXTERN P1INIT>
IFG QTRACE,<	EXTERN YTRPAS,YTRACC>

	MACINIT
	TWOSEG
	RELOC	400000

SP:

;INITIALIZATIONS

;MODULE SH

	L	[IOWD QZSELE-QNSYSID+1,QLOWID+QNSYSID]
	ST	YMAXID

;MODULE SR

	LI	QFTFX
	ST	YMAXFX

;MODULE SD

	LI	X1,YDPD
	SETON	ZHSRFL(X1)
	HRRZ	.JBREL

IFG QTRACE,<
		IFON	YTRSW
		HRRZI	YTRACC-1>

	SUBI	DC1
	MOVN
	HRLZ
	ADDI	DC1
	ST	YC1DC

	;[11]	ZERO YC1DC AREA
	SETZM	DC1
	L	X0,[DC1,,DC1+1]
	L	X1,.JBREL
	BLT	X0,-1(X1)

	LI	YDPD
	ST	YBSTP
	HRROI	-2
	ST	YDLV
	MOVSI	1,-6
LOOP
	L	[XWD 0,1
		XWD 0,2
		XWD 0,3
		XWD 4-QSTLL/3-QSTLL,0
		XWD 4-QSTLL,4
		XWD 0,0](1)
	ST	YSDENL(1)
AS
	AOBJN	1,TRUE
SA
	LI	2
	SF	,ZHSOBL(,YDPD)

;MODULE P1DUMP

IFG QDEBUG,<	EXEC	P1INIT >

	EXEC	I1SRCH	;[13] Set up standard search list for externals

;MAKE CURRENT CONTAIN FIRST SYMBOL

	L	X1LBP,[POINT 7,YLCLB]
	CLEAR	X1BYTE
	EXEC	LC
	IBP	X1LBP
	EXEC	LS
	EXEC	LS

;PERFORM SYNTAX RECOGNIZING

	EXEC	SRPROG

;CLOSE FILES

	EXEC	O1SCCL
	EXEC	O1XRCL
	EXEC	O1LSCL
	EXEC	O1ICCL

;TERMINATE PASS 1

	BRANCH	T1
	LIT
	END