SOSISW - INITIALIZE SWITCHES VI	MACRO M1110  22-AUG-78 05:33  PAGE 3





    100						.TITLE	SOSISW - INITIALIZE SWITCHES VIA SWITCH.INI

    200						.IDENT	/020501/

    300					;

    400					; COPYRIGHT 1978, DIGITAL EQUIPMENT CORP., MAYNARD, MASS. 01754

    500					;

    600					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

    700					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

    800					;

    900					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE

   1000					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION

   1100					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT

   1200					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.

   1300					;

   1400					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT

   1500					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL

   1600					; EQUIPMENT CORPORATION.

   1700					;

   1800					; PETER H. LIPMAN	27-FEB-76

   1900					;

   2200						.MCALL	CSI$

   2300	000000					CSI$

   2360

   2370						.MCALL	SWINI$

   2400

   2500	000000					DATA$	ISW

   2600	000000				MKW1:	.BLKW	1		;OR OF MASK WORDS FROM

   2700	000002				MKW2:	.BLKW	1		;ITERATIVE CALLS TO SWINI

   2800	000004				SAVOPT:	.BLKW	5		;SAVED OPTION NAME, EXTRA 0

   2900	000016				RECBUF:	.BLKB	80.		;RECORD BUFFER FOR SWITCH INI LOGIC

   3000

   3100	000136					CODE$	ISW

   3200	000000	   123 	   117 	   123 	PRGNAM:	.ASCII	/SOS/		;PROGRAM NAME

   3300						.EVEN

   3600					;

   3700					; COMPLETE THE SETTING OF SWITCHES

   3800					;

   3900	000004	032767 	000000C	000024G	SWSET::	BIT	#BASIC!RMSFIL,CSIBLK+C.MKW1 ;IF /BAS OR /NOBAS OR /RMS OR /-RMS

   4000	000012	001403 				BEQ	30$

   4100	000014	052767 	000000G	000000G		BIS	#REQCPY,SOSFLG	;GUARANTEE A COPY

   4200	000022	006067 	000000G		30$:	ROR	ALTSWT		;C = BIT 0 (/ALT)

   4300	000026	103003 				BCC	40$		;BRANCH IF NOT SET

   4400	000030	116767 	000000G	000000G		MOVB	ALTSTR,ALTCHR	;SET NEW ALTMODE CHAR

   4500	000036	006067 	000000G		40$:	ROR	ALTSWT		;C = BIT 1 (/MAT)

   4600	000042	103003 				BCC	50$		;BRANCH IF NOT SET

   4700	000044	116767 	000000G	000000G		MOVB	MATSTR,MATCHR	;SET NEW SPECIAL MATCH CHAR

   4800	000052	000207 			50$:	RTS	PC

   5300

   5600	000054				INITSW::

   5700	000054	012700 	000012 			MOV	#10.,R0		;TO PREVENT INFINITE ITERATION

   5800	000060	005067 	000000'			CLR	MKW1		;INIT MASK WORDS

   5900	000064	005067 	000002'			CLR	MKW2

   6000	000070	016767 	000000G	000004'	10$:	MOV	OPTNAM,SAVOPT	;MOVE THE OPTION STRING

   6100	000076	016767 	000002G	000006'		MOV	OPTNAM+2,SAVOPT+2

   6200	000104	016767 	000004G	000010'		MOV	OPTNAM+4,SAVOPT+4

   6300	000112	016767 	000006G	000012'		MOV	OPTNAM+6,SAVOPT+6

   6400	000120	005067 	000000G			CLR	OPTNAM

   6500	000124	010046 				MOV	R0,-(SP)

SOSISW - INITIALIZE SWITCHES VI	MACRO M1110  22-AUG-78 05:33  PAGE 3-1





   6600	000126					SWINI$	#CSIBLK,#7,#SWTAB,#RECBUF,#80.,#PRGNAM,,#SAVOPT

   6700	000210	012600 				MOV	(SP)+,R0

   6800	000212	103422 				BCS	15$

   6900	000214	056767 	000024G	000000'		BIS	CSIBLK+C.MKW1,MKW1 ;OR THE MASKS FROM EACH CALL

   7000	000222	056767 	000026G	000002'		BIS	CSIBLK+C.MKW2,MKW2

   7100	000230	032767 	000000G	000026G		BIT	#NOOPT,CSIBLK+C.MKW2 ;/OPTION SPECIFIED?

   7200	000236	001401 				BEQ	12$		;BRANCH IF NO, ALL DONE

   7300	000240	077065 				SOB	R0,10$		;GO PROCESS ANOTHER, UNLESS TOO MANY

   7400	000242	016767 	000000'	000024G	12$:	MOV	MKW1,CSIBLK+C.MKW1 ;LEAVE THE OR OF SWITCHES

   7500	000250	016767 	000002'	000026G		MOV	MKW2,CSIBLK+C.MKW2 ;IN THE CSIBLK

   7600	000256	000207 				RTS	PC

   7610					;

   7620					; ERROR FROM SWINI

   7630					;

   7700	000260	010146 			15$:	MOV	R1,-(SP)	;SAVE A REGISTER

   7800	000262	012746 	000404'			MOV	#ISWER2,-(SP)	;"I/O ERROR ON SWITCH.INI"

   7900	000266	016701 	000016G			MOV	CSIBLK+C.FILD,R1 ;SIZE OF BAD RECORD IF BAD RECORD

   8000	000272	001402 				BEQ	20$		;IF ZERO, THEN FCS ERROR

   8100	000274	012716 	000344'			MOV	#ISWER1,(SP)	;"BAD RECORD IN SWITCH.INI"

   8200	000300	004767 	000000G		20$:	JSR	PC,PRINTC	;PRINT WITH CR,LF;

   8300	000304	010116 				MOV	R1,(SP)		;SIZE OF BAD RECORD OR 0

   8400	000306	016746 	000020G			MOV	CSIBLK+C.FILD+2,-(SP) ;ADR OF BAD RECORD OR ERROR CODE

   8500	000312	005701 				TST	R1		;0 MEANS ERR CODE IN C.FILD+2

   8600	000314	001405 				BEQ	25$		;THEN PRINT FCS ERROR MESSAGE

   8700	000316	004767 	000000G			JSR	PC,TYPSTR	;TYPE THE BAD RECORD

   8800	000322	004767 	000000G			JSR	PC,TYPECR	;AND CR,LF

   8900	000326	000402 				BR	30$

   9000	000330	004767 	000000G		25$:	JSR	PC,FCSERP	;PRINT FCS ERROR CODE

   9100	000334	022626 			30$:	CMP	(SP)+,(SP)+	;CLEAN UP THE STACK

   9200	000336	012601 				MOV	(SP)+,R1

   9300	000340	000207 				RTS	PC

   9400					;

   9500					; ERROR MESSAGES

   9600					;

   9700	000342					PLIT	ISWER1,</Bad record found in SWITCH.INI/>

   9800	000402					PLIT	ISWER2,<$I/O error opening or reading SWITCH.INI$>

   9900

  10100		000001 				.END

SOSISW - INITIALIZE SWITCHES VI	MACRO M1110  22-AUG-78 05:33  PAGE 3-2

SYMBOL TABLE



ALTCHR= ****** GX	CS.NMF= 000001   	C.SIZE= 000054   	MKW1    000000R     002	RONLY$= 000001

ALTSTR= ****** GX	CS.OUT= 000002   	C.STAT= 000001   	MKW2    000002R     002	R$$EIS= 000001

ALTSWT= ****** GX	CS.WLD= 000010   	C.SWAD= 000022   	NOOPT = ****** GX	R$$SHR= 000001

BASIC = ****** GX	C.CMLD= 000002   	C.TYPR= 000000   	OPTNAM= ****** GX	SAVOPT  000004R     002

CSIBLK= ****** GX	C.DEVD= 000006   	FCSERP= ****** GX	PAR$$$= 000027   	SOSFLG= ****** GX

CS.DIF= 000002   	C.DIRD= 000012   	INITSW  000054RG    003	PRGNAM  000000R     003	SWSET   000004RG    003

CS.DVF= 000004   	C.DSDS= 000006   	ISWER1  000344R     003	PRINTC= ****** GX	SWTAB = ****** GX

CS.EQU= 000040   	C.FILD= 000016   	ISWER2  000404R     003	RECBUF  000016R     002	TYPECR= ****** GX

CS.INP= 000001   	C.MKW1= 000024   	MATCHR= ****** GX	REQCPY= ****** GX	TYPSTR= ****** GX

CS.MOR= 000020   	C.MKW2= 000026   	MATSTR= ****** GX	RMSFIL= ****** GX	.SWINI= ****** G



. ABS.	000000	   000

      	000000	   001

ISW.D 	000136	   002

CODE  	000454	   003

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  2002 WORDS  ( 8 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:07

OBJ$:SOSISW,LIS$:SOSISW/-SP=SRC$:SWIMAC,PREFIX,SOSISW

