BFFSR  - ROUTINE TO GUARANTEE F	MACRO M1110  22-AUG-78 05:29  PAGE 2





    100						.TITLE	BFFSR  - ROUTINE TO GUARANTEE FSR SPACE FOR COMMAND FILE

    200

    300

    400					; COPYRIGHT 1976, DIGITAL EQUIPMENT CORPORATION, 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 BE OTHERWISE 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					; WILLIAM T. MARSHALL	15-AUG-77

   1900					;

   2000

   2100						.MCALL	FDOF$L,CCML$

   2200	000000					FDOF$L

   2300

   2350	000000					CODE$	BFSR

   2400

   2500					;	BFFSR1  -  THIS ROUTINE IS CALLED BY THE SUBSTITUTE COMMAND

   2600					;		IN THE SPECIAL CASE OF DECIDE MODE.  AT THAT POINT,

   2700					;		IT IS USING THE TEMP BUFFER WITHIN THE FSR FOR THE NEW

   2800					;		LINE CONTAINING THE CHANGES, AND HAS ANY INDIRECT

   2900					;		COMMAND FILE CLOSED.  FOR DECIDE MODE, WE MUST OPEN THE

   3000					;		COMMAND FILE AND READ THE DECISION OPTION, MEANING

   3100					;		WE NEED ENOUGH FSR SPACE FOR A FILE OPEN.

   3200					;		 THAT SPACE IS OBTAINED BY MARKING OUR CURRENT PLACE

   3300					;		IN THE INPUT FILE, CLOSING IT, AND USING THAT SPACE

   3400					;		FOR THE COMMAND FILE.  WHEN THE RESULT HAS BEEN READ,

   3500					;		THE COMMAND FILE IS CLOSED AGAIN, AND THE INPUT FILE

   3600					;		RE-OPENED AND POINTED TO ITS CORRECT LOCATION.

   3700					;

   3800					;		A CONSIDERABLE TRADE-OFF IS BEING MADE HERE BETWEEN

   3900					;		CORE USED AND DISK ACCESSES, IN THE SPECIAL CASE

   4000					;		OF A SUBSTITUTE DECIDE MODE COMMAND APPEARING IN A

   4100					;		COMMAND FILE.

   4200

   4300	000000	005067 	000000G		BFFSR1::CLR	SAVIFL			; CLEAR WORK DONE FLAG

   4400	000004	005767 	000070G			TST	GCMLB+F.BDB		; IS COMMAND FILE OPEN NOW?

   4500	000010	001002 				BNE	99$			; IF IT IS, KB: INPUT, NO PROBLEM

   4600

   4700	000012	004767 	000000G			JSR	PC,GIVFSR		; CLOSE INPUT, GIVE BACK THAT FSR SPACE

   4800	000016	000207 			99$:	RTS	PC			; RETURN TO CALLER (CMDSDO)

   4900

   5000

   5100					;	UNDO ANYTHING THAT WAS DONE BY THE PREVIOUS CALL ON BFFSR1

   5200					;		(ASSUME NO CALLS TO GIVFSR/GETFSR IN MEANTIME)

   5300	000020	005767 	000000G		BFFSR2::TST	SAVIFL

   5400	000024	001406 				BEQ	99$

   5500	000026					CCML$	#GCMLB			; CLOSE CMD FILE (RELEASING FSR)

   5600	000036	004767 	000000G			JSR	PC,GETFSR		; RE-OPEN INPUT FILE

BFFSR  - ROUTINE TO GUARANTEE F	MACRO M1110  22-AUG-78 05:29  PAGE 2-1





   5700	000042	000207 			99$:	RTS	PC			; RETURN

   5800

   5900		000001 				.END

BFFSR  - ROUTINE TO GUARANTEE F	MACRO M1110  22-AUG-78 05:29  PAGE 2-2

SYMBOL TABLE



BFFSR1  000000RG    002	F.DSPT= 000044   	F.MBFG= 000056   	F.URBD= 000020   	PAR$$$= 000027

BFFSR2  000020RG    002	F.DVNM= 000134   	F.NRBD= 000024   	F.VBN = 000064   	RONLY$= 000001

F.ACTL= 000076   	F.EFBK= 000010   	F.NREC= 000030   	F.VBSZ= 000060   	R$$EIS= 000001

F.ALOC= 000040   	F.EFN = 000050   	F.OVBS= 000030   	GCMLB = ****** GX	R$$SHR= 000001

F.BBFS= 000062   	F.EOBB= 000032   	F.RACC= 000016   	GETFSR= ****** GX	SAVIFL= ****** GX

F.BDB = 000070   	F.ERR = 000052   	F.RATT= 000001   	GIVFSR= ****** GX	S.FATT= 000016

F.BGBC= 000057   	F.FACC= 000043   	F.RCNM= 000034   	N.DID = 000024   	S.FDB = 000140

F.BKDN= 000026   	F.FFBY= 000014   	F.RCTL= 000017   	N.DVNM= 000032   	S.FNAM= 000006

F.BKDS= 000020   	F.FNAM= 000110   	F.RSIZ= 000002   	N.FID = 000000   	S.FNB = 000036

F.BKEF= 000050   	F.FNB = 000102   	F.RTYP= 000000   	N.FNAM= 000006   	S.FNBW= 000017

F.BKP1= 000051   	F.FTYP= 000116   	F.SEQN= 000100   	N.FTYP= 000014   	S.FNTY= 000004

F.BKST= 000024   	F.FVER= 000120   	F.SPDV= 000072   	N.FVER= 000016   	S.FTYP= 000002

F.BKVB= 000064   	F.HIBK= 000004   	F.SPUN= 000074   	N.NEXT= 000022   	S.NFEN= 000020

F.CHR = 000075   	F.LUN = 000042   	F.STBK= 000036   	N.STAT= 000020   	.GCML3= ****** G

F.CNTG= 000034   	F.MBCT= 000054   	F.UNIT= 000136   	N.UNIT= 000034   	...TPC= 000140

F.DFNB= 000046   	F.MBC1= 000055



. ABS.	000000	   000

      	000000	   001

CODE  	000044	   002

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  1917 WORDS  ( 8 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:06

OBJ$:BFFSR,LIS$:BFFSR/-SP/NL:TOC=SRC$:PREFIX,BFFSR

