

; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 1

;

;	0001	MODULE CREATE (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'A0024B'

;	0004			) =

;	0005	BEGIN

;	0006	

;	0007	!

;	0008	! Copyright (c) 1977

;	0009	! Digital Equipment Corporation, Maynard, Massachusetts 01754

;	0010	!

;	0011	! This software is furnished  under a license for use only on a single

;	0012	! computer  system and  may be  copied only with  the inclusion of the

;	0013	! above copyright notice.  This software, or any other copies thereof,

;	0014	! may not be provided or  otherwise made available to any other person

;	0015	! except for use on such system and to one who agrees to these license

;	0016	! terms.  Title to and  ownership of the  software  shall at all times

;	0017	! remain in DEC.

;	0018	!

;	0019	! The information in this software is subject to change without notice

;	0020	! and should  not be construed  as a commitment  by Digital  Equipment

;	0021	! Corporation.

;	0022	!

;	0023	! DEC assumes  no  responsibility  for  the use or  reliability of its

;	0024	! software on equipment which is not supplied by DEC.

;	0025	

;	0026	!++

;	0027	!

;	0028	! FACILITY:  F11ACP Structure Level 1

;	0029	!

;	0030	! ABSTRACT:

;	0031	!

;	0032	!	This module processes the create function. It creates a file with the

;	0033	!	attributes requested, enters it in a directory if desired, and

;	0034	!	accesses it if requested.

;	0035	!

;	0036	! ENVIRONMENT:

;	0037	!

;	0038	!	STARLET operating system, including privileged system services

;	0039	!	and internal exec routines.

;	0040	!

;	0041	!--

;	0042	!

;	0043	!

;	0044	! AUTHOR:  Andrew C. Goldstein,	 CREATION DATE:  28-Mar-1977  15:05

;	0045	!

;	0046	! REVISION HISTORY:

;	0047	!

;	0048	!   Andrew C. Goldstein, 31-Mar-1977  13:10

;	0049	!   X0002 - Add ENTER subfunction

;	0050	!

;	0051	!   Andrew C. Goldstein, 1-Apr-1977  16:58

;	0052	!   X0003 - Move GET_FIB out of kernel mode

;	0053	!

;	0054	!   Andrew C. Goldstein, 8-Apr-1977  14:48

;	0055	!   X0004 - Add supersede subfunction



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 1-1

;

;	0056	!

;	0057	!   Andrew C. Goldstein, 12-Apr-1977  16:18

;	0058	!   X0005 - Modify for buffer management

;	0059	!

;	0060	!   Andrew C. Goldstein, 14-Apr-1977  10:38

;	0061	!   X0006 - Switch context area for secondary delete

;	0062	!

;	0063	!   Andrew C. Goldstein, 2-May-1977  16:30

;	0064	!   X0007 - Insert creation date and time

;	0065	!

;	0066	!   Andrew C. Goldstein, 3-May-1977  15:05

;	0067	!   X0008 - Add file protection check

;	0068	!

;	0069	!   Andrew C. Goldstein, 9-May-1977  19:55

;	0070	!   X0009 - Put write attributes and access under CREATE flag

;	0071	!

;	0072	!   Andrew C. Goldstein, 11-May-1977  13:11

;	0073	!   X0010 - Add mark for delete subfunction

;	0074	!

;	0075	!   Andrew C. Goldstein, 18-May-1977  14:48

;	0076	!   X0011 - Record file header address

;	0077	!

;	0078	!   Andrew C. Goldstein, 23-May-1977  15:44

;	0079	!   X0012 - Mark file header for re-read during directory operation

;	0080	!

;	0081	!   Andrew C. Goldstein, 12-Jul-1977  14:16

;	0082	!   X0013 - Move WRITE_ATTRIB out of kernel mode

;	0083	!

;	0084	!   Andrew C. Goldstein, 13-Jul-1977  15:32

;	0085	!   X0014 - Rework file header checksumming

;	0086	!

;	0087	!   Andrew C. Goldstein, 10-Aug-1977  15:30

;	0088	!   X0015 - Add multi-header support

;	0089	!

;	0090	!   Andrew C. Goldstein, 22-Aug-1977  14:21

;	0091	!   X0016 - Add supersede status code

;	0092	!

;	0093	!   Andrew C. Goldstein, 2-Nov-1977  13:30

;	0094	!   X0017 - Check window size parameter

;	0095	!

;	0096	!   Andrew C. Goldstein, 12-Dec-1977  13:22

;	0097	!   X0018 - file ID interface changes

;	0098	!

;	0099	!   Andrew C. Goldstein, 12-Dec-1977  15:09

;	0100	!   X0019 - Move header setup to CREATE_HEADER

;	0101	!

;	0102	!   Andrew C. Goldstein, 7-Mar-1978  21:46

;	0103	!   X0020 - Remove use of CLF_RFILEHDR

;	0104	!

;	0105	!   Andrew C. Goldstein, 5-May-78  13:24

;	0106	!   A0021 - Remove window size restriction

;	0107	!

;	0108	!   Andrew C. Goldstein, 6-Jun-78  0:44

;	0109	!   A0022 - Add implicit spooling support

;	0110	!



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 1-2

;

;	0111	!   Andrew C. Goldstein, 12-Jun-78  20:55

;	0112	!   A0023 - PCB vector name change

;	0113	!

;	0114	!   Andrew C. Goldstein, 28-Jun-78  16:33

;	0115	!   A0024 - Add allocation interlock, move extend to after write attributes

;	0116	!

;	0117	!**

;	0118	

;	0119	

;	0120	LIBRARY 'SYS$LIBRARY:LIB.L32';

;	0121	REQUIRE 'SRC$:FCPDEF.B32';



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2

;

;	0440	GLOBAL ROUTINE CREATE =

;	0441	

;	0442	!++

;	0443	!

;	0444	! FUNCTIONAL DESCRIPTION:

;	0445	!

;	0446	!	This routine processes the CREATE function. It creates a file with the

;	0447	!	attributes requested, enters it in a directory if desired, and

;	0448	!	accesses the file if requested.

;	0449	!

;	0450	! CALLING SEQUENCE:

;	0451	!	CREATE ()

;	0452	!

;	0453	! INPUT PARAMETERS:

;	0454	!	NONE

;	0455	!

;	0456	! IMPLICIT INPUTS:

;	0457	!	CURRENT_VCB: VCB of volume

;	0458	!	IO_PACKET: packet of this I/O request

;	0459	!

;	0460	! OUTPUT PARAMETERS:

;	0461	!	NONE

;	0462	!

;	0463	! IMPLICIT OUTPUTS:

;	0464	!	PRIMARY_FCB: FCB of file if accessed

;	0465	!	CURRENT_WINDOW: window of file if accessed

;	0466	!	USER_STATUS: I/O status block of user

;	0467	!

;	0468	! ROUTINE VALUE:

;	0469	!	1 if successful

;	0470	!	0 if error

;	0471	!

;	0472	! SIDE EFFECTS:

;	0473	!	File created, blocks allocated, directory modified, file accessed, etc.

;	0474	!

;	0475	!--

;	0476	

;	0477	BEGIN

;	0478	

;	0479	LOCAL

;	0480		PACKET		: REF BBLOCK,	! address of I/O packet

;	0481		ABD		: REF BBLOCKVECTOR [,ABD$C_LENGTH],

;	0482						! buffer descriptors

;	0483		FIB		: REF BBLOCK,	! file identification block

;	0484		RESULT_LENGTH,			! length of result string from ENTER

;	0485		RESULT		: VECTOR [20, BYTE], ! result string from ENTER

;	0486		NAMEBLOCK	: BBLOCK [NMB$C_LENGTH], ! name block to build RAD-50 name

;	0487		IDENT_AREA	: REF BBLOCK,	! pointer to file header ident area

;	0488		PCB		: REF BBLOCK,	! process control block of user

;	0489		MAP_AREA	: REF BBLOCK,	! file header map area

;	0490		IDX_FCB		: REF BBLOCK,	! FCB of index file

;	0491		FCB		: REF BBLOCK,	! FCB address

;	0492		HEADER		: REF BBLOCK,	! address of file header

;	0493		FUNCTION	: BLOCK [1];	! function code qualifiers

;	0494	



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2-1

;

;	0495	EXTERNAL

;	0496		USER_STATUS	: VECTOR,	! I/O status block of user

;	0497		SCH$GL_PCBVEC	: REF VECTOR ADDRESSING_MODE (ABSOLUTE),

;	0498						! system PCB vector

;	0499		CURRENT_VCB	: REF BBLOCK,	! VCB of volume

;	0500		PRIMARY_FCB	: REF BBLOCK,	! FCB of file

;	0501		CURRENT_WINDOW	: REF BBLOCK,	! window for file

;	0502		IO_PACKET	: REF BBLOCK,	! I/O request packet

;	0503		FILE_HEADER	: REF BBLOCK,	! global address of file header

;	0504		NEW_FID,			! unrecorded file ID

;	0505		HEADER_LBN,			! LBN of current file header

;	0506		CURRENT_FIB	: REF BBLOCK,	! pointer to FIB in use

;	0507		SUPER_FID	: BBLOCK,	! file ID of superseded file

;	0508		SECOND_FIB	: BBLOCK,	! FIB for secondary operation

;	0509		CLEANUP_FLAGS	: BITVECTOR,	! cleanup action flags

;	0510		CONTEXT_START,			! start of context area

;	0511		CONTEXT_SAVE;			! start of context save area

;	0512	

;	0513	EXTERNAL LITERAL

;	0514		CONTEXT_SIZE;			! length of context save area

;	0515	

;	0516	EXTERNAL ROUTINE

;	0517		GET_FIB,			! get FIB for operation

;	0518		CHECK_PROTECT,			! check file protection

;	0519		CREATE_HEADER,			! create a file ID and header

;	0520		CHECKSUM,			! compute header checksum

;	0521		MARK_DIRTY,			! mark buffer for write-back

;	0522		WRITE_HEADER,			! write file header

;	0523		READ_HEADER,			! read file header

;	0524		ENTER,				! enter file in directory

;	0525		COPY_NAME,			! copy file name to result string

;	0526		MAKE_NAMEBLOCK,			! convert name string into RAD-50 name block

;	0527		GET_TIME,			! get system date and time string

;	0528		CREATE_FCB,			! create an FCB

;	0529		CREATE_WINDOW,			! create a window

;	0530		MAKE_ACCESS,			! complete the access

;	0531		MARKDEL_FCB,			! mark FCB for delete

;	0532		WRITE_ATTRIB,			! write attributes

;	0533		EXTEND,				! extend the file

;	0534		MARK_DELETE,			! mark file for delete

;	0535		NEXT_HEADER,			! read next extension file header

;	0536		UPDATE_FCB;			! update contents of FCB

;	0537	

;	0538	

;	0539	! Enable the deaccess cleanup if an access is taking place.

;	0540	!

;	0541	

;	0542	PACKET = .IO_PACKET;

;	0543	FUNCTION = .PACKET[IRP$W_FUNC];

;	0544	IF .FUNCTION[IO$V_ACCESS]

;	0545	THEN

;	0546	    BEGIN

;	0547	    CLEANUP_FLAGS[CLF_ZCHANNEL] = 1;

;	0548	    CLEANUP_FLAGS[CLF_DELWINDOW] = 1;

;	0549	    END;



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2-2

;

;	0550	

;	0551	! Set up pointers to interesting control blocks.

;	0552	!

;	0553	

;	0554						! pointer to buffer descriptors

;	0555	ABD = .BBLOCK [.PACKET[IRP$L_SVAPTE], AIB$L_DESCRIPT];

;	0556	FIB = GET_FIB (.ABD);			! pointer to FIB

;	0557	

;	0558	IF .FIB[FIB$V_TRUNC]

;	0559	OR (.FUNCTION[IO$V_DELETE] AND NOT .FUNCTION[IO$V_ACCESS])

;	0560	OR (NOT .FUNCTION[IO$V_CREATE]

;	0561	    AND (.FIB[FIB$V_EXTEND]

;	0562		OR .PACKET[IRP$W_BCNT] GTR ABD$C_ATTRIB

;	0563		OR .FUNCTION[IO$V_ACCESS]

;	0564		)

;	0565	    )

;	0566	THEN ERR_EXIT (SS$_BADPARAM);

;	0567	

;	0568	IF .CURRENT_VCB[VCB$V_NOALLOC]

;	0569	THEN ERR_EXIT (SS$_WRITLCK);

;	0570	

;	0571	! Do the create if requested. Start by allocating a file number from the

;	0572	! index file bitmap and reading in the initial file header.

;	0573	!

;	0574	

;	0575	IF .FUNCTION[IO$V_CREATE]

;	0576	THEN

;	0577	    BEGIN

;	0578	    CHECK_PROTECT (CREATE_ACCESS, 0, 0);

;	0579	

;	0580	    HEADER = CREATE_HEADER ();

;	0581	    FIB[FIB$W_FID_NUM] = .HEADER[FH1$W_FID_NUM];

;	0582	    FIB[FIB$W_FID_SEQ] = .HEADER[FH1$W_FID_SEQ];

;	0583	    FIB[FIB$W_FID_RVN] = 0;

;	0584	

;	0585	! Now build an initialized file header in the buffer.

;	0586	!

;	0587	

;	0588	    HEADER[FH1$B_IDOFFSET] = FH1$C_LENGTH / 2;

;	0589	    HEADER[FH1$B_MPOFFSET] = (FH1$C_LENGTH+FI1$C_LENGTH) / 2;

;	0590	    HEADER[FH1$W_STRUCLEV] = FH1$C_LEVEL1;

;	0591	    PCB = .SCH$GL_PCBVEC[.(PACKET[IRP$L_PID])<0,16>];

;	0592	    HEADER[FH1$B_UICMEMBER] = .PCB[PCB$W_MEM];

;	0593	    HEADER[FH1$B_UICGROUP] = .PCB[PCB$W_GRP];

;	0594	    HEADER[FH1$W_FILEPROT] = .CURRENT_VCB[VCB$W_FILEPROT];

;	0595	

;	0596	    CH$FILL (0, 512 - $BYTEOFFSET(FH1$W_FILECHAR), HEADER[FH1$W_FILECHAR]);

;	0597	

;	0598	    IF .FUNCTION[IO$V_DELETE]

;	0599	    THEN HEADER[FH1$V_MARKDEL] = 1;

;	0600	

;	0601	    IF .CLEANUP_FLAGS[CLF_SPOOLFILE]

;	0602	    THEN HEADER[FH1$V_SPOOL] = 1;

;	0603	

;	0604	    MAP_AREA = .HEADER + FH1$C_LENGTH + FI1$C_LENGTH;



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2-3

;

;	0605	    MAP_AREA[FM1$B_COUNTSIZE] = 1;

;	0606	    MAP_AREA[FM1$B_LBNSIZE] = 3;

;	0607	    MAP_AREA[FM1$B_INUSE] = 0;

;	0608	    MAP_AREA[FM1$B_AVAIL] = (512 - FH1$C_LENGTH - FI1$C_LENGTH - FM1$C_LENGTH - 2) / 2;

;	0609	

;	0610	    NEW_FID = 0;			! new file ID is no longer unrecorded

;	0611	    MARK_DIRTY (.HEADER);

;	0612	    CLEANUP_FLAGS[CLF_DELFILE] = 1;

;	0613	    FILE_HEADER = .HEADER;		! record header address for cleanup

;	0614	    CHECKSUM (.HEADER);

;	0615	    END;

;	0616	

;	0617	! If a non-zero directory ID is supplied, enter the file in the directory.

;	0618	! Otherwise, just copy down the name string (if any) into the result string.

;	0619	! Note that the directory operation is nooped on spool file operations.

;	0620	! Then convert the result string, from whatever source, into RAD-50 into the

;	0621	! file header ident area.

;	0622	!

;	0623	

;	0624	IF .FIB[FIB$W_DID_NUM] NEQ 0 AND NOT .CLEANUP_FLAGS[CLF_SPOOLFILE]

;	0625	THEN

;	0626	    ENTER (.ABD, .FIB, RESULT_LENGTH, RESULT)

;	0627	ELSE

;	0628	    BEGIN

;	0629	    KERNEL_CALL (COPY_NAME, .ABD);

;	0630	    RESULT_LENGTH = .ABD[ABD$C_NAME, ABD$W_COUNT];

;	0631	    CH$MOVE (.RESULT_LENGTH,

;	0632		.ABD[ABD$C_NAME, ABD$W_TEXT] + ABD[ABD$C_NAME, ABD$W_TEXT] + 1, RESULT);

;	0633	    END;

;	0634	

;	0635	! Now write attributes as specified.

;	0636	!

;	0637	

;	0638	IF .FUNCTION[IO$V_CREATE]

;	0639	THEN

;	0640	    BEGIN

;	0641	    HEADER = READ_HEADER (FIB[FIB$W_FID], 0);

;	0642	

;	0643	    MAKE_NAMEBLOCK (.RESULT_LENGTH, RESULT, NAMEBLOCK);

;	0644	    IDENT_AREA = .HEADER + .HEADER[FH1$B_IDOFFSET]*2;

;	0645	    CH$MOVE (10, NAMEBLOCK[NMB$W_NAME], IDENT_AREA[FI1$W_FILENAME]);

;	0646	    GET_TIME (IDENT_AREA[FI1$T_CREDATE]);

;	0647	

;	0648	    IF .PACKET[IRP$W_BCNT] GTR ABD$C_ATTRIB

;	0649	    THEN WRITE_ATTRIB (.HEADER, .ABD);

;	0650	

;	0651	! If access is requested, access the file.

;	0652	!

;	0653	

;	0654	    IF .FUNCTION[IO$V_ACCESS]

;	0655	    THEN

;	0656		BEGIN

;	0657		FCB = KERNEL_CALL (CREATE_FCB, .HEADER);

;	0658		PRIMARY_FCB = .FCB;

;	0659	



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2-4

;

;	0660		CURRENT_WINDOW = KERNEL_CALL (CREATE_WINDOW, .FIB[FIB$L_ACCTL],

;     P 0661		    .FIB[FIB$B_WSIZE], .HEADER, .PACKET[IRP$L_PID], .FCB);

;	0662		KERNEL_CALL (MAKE_ACCESS, .FCB, .CURRENT_WINDOW, .ABD);

;	0663		IF .FUNCTION[IO$V_DELETE]

;	0664		THEN KERNEL_CALL (MARKDEL_FCB, .FCB);

;	0665		END;

;	0666	

;	0667	! Now extend the file if requested.

;	0668	!

;	0669	

;	0670	    IF .FIB[FIB$V_EXTEND] THEN EXTEND (.FIB, .HEADER);

;	0671	    HEADER = .FILE_HEADER;

;	0672	    KERNEL_CALL (UPDATE_FCB, .HEADER);

;	0673	    CHECKSUM (.HEADER);

;	0674	    WRITE_HEADER ();

;	0675	    END;

;	0676	

;	0677	! If this is a supersede operation, delete the file that was removed during

;	0678	! the enter operation above. This must be done last since we cannot undo

;	0679	! a delete in cleaning up from a subsequent error. We first copy the primary

;	0680	! context into the context save area since this is a secondary operation.

;	0681	!

;	0682	

;	0683	IF TESTBITSC (CLEANUP_FLAGS[CLF_SUPERSEDE])

;	0684	THEN

;	0685	    BEGIN

;	0686	    USER_STATUS[0] = SS$_SUPERSEDE;

;	0687	    CH$MOVE (CONTEXT_SIZE, CONTEXT_START, CONTEXT_SAVE);

;	0688	    CH$FILL (0, CONTEXT_SIZE, CONTEXT_START);

;	0689	    CH$COPY (FID$C_LENGTH, SUPER_FID, 0,

;	0690		     FIB$C_LENGTH - $BYTEOFFSET (FIB$W_FID), SECOND_FIB[FIB$W_FID]);

;	0691	    CURRENT_FIB = SECOND_FIB;

;	0692	    MARK_DELETE (SECOND_FIB);

;	0693	    END;

;	0694	

;	0695	

;	0696	RETURN 1;

;	0697	

;	0698	END;					! end of routine CREATE





							    .TITLE  CREATE

							    .IDENT  \A0024B\



							    .EXTRN  USER_STATUS, SCH$GL_PCBVEC, CURRENT_VCB, PRIMARY_FCB

							    .EXTRN  CURRENT_WINDOW, IO_PACKET, FILE_HEADER, NEW_FID

							    .EXTRN  HEADER_LBN, CURRENT_FIB, SUPER_FID, SECOND_FIB

							    .EXTRN  CLEANUP_FLAGS, CONTEXT_START, CONTEXT_SAVE, CONTEXT_SIZE

							    .EXTRN  GET_FIB, CHECK_PROTECT, CREATE_HEADER, CHECKSUM

							    .EXTRN  MARK_DIRTY, WRITE_HEADER, READ_HEADER, ENTER, COPY_NAME

							    .EXTRN  MAKE_NAMEBLOCK, GET_TIME, CREATE_FCB, CREATE_WINDOW

							    .EXTRN  MAKE_ACCESS, MARKDEL_FCB, WRITE_ATTRIB, EXTEND

							    .EXTRN  MARK_DELETE, NEXT_HEADER, UPDATE_FCB, SYS$CMKRNL



							    .PSECT  $CODE$,NOWRT,2



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2-5

;



					 0FFC 00000 	    .ENTRY  CREATE, Save R2,R3,R4,R5,R6,R7,R8,R9,R10,R11	      ; 0440

		         5E 	       2C  C2 00002 	    SUBL2   #44, SP						      ;

		         59 	0000G  CF  D0 00005 	    MOVL    IO_PACKET, PACKET					      ; 0542

		         5B 	  20   A9  3C 0000A 	    MOVZWL  32(PACKET), FUNCTION				      ; 0543

	   07 	         5B 	       06  E1 0000E 	    BBC     #6, FUNCTION, 1$					      ; 0544

		  0000G  CF	0402   8F  A8 00012 	    BISW2   #1026, CLEANUP_FLAGS+2				      ; 0548

		         5A 	  2C   B9  D0 00019 1$:     MOVL    @44(PACKET), ABD					      ; 0555

				       5A  DD 0001D 	    PUSHL   ABD							      ; 0556

		  0000G  CF	       01  FB 0001F 	    CALLS   #1, GET_FIB						      ;

		         57 	       50  D0 00024 	    MOVL    R0, FIB						      ;

		         1B 	  17   A7  E8 00027 	    BLBS    23(FIB), 3$						      ; 0558

	   04 	         5B 	       08  E1 0002B 	    BBC     #8, FUNCTION, 2$					      ; 0559

	   13 	         5B 	       06  E1 0002F 	    BBC     #6, FUNCTION, 3$					      ;

	   11 	         5B 	       07  E0 00033 2$:     BBS     #7, FUNCTION, 4$					      ; 0560

	   0A 	    16   A7	       07  E0 00037 	    BBS     #7, 22(FIB), 3$					      ; 0561

		         05 	  32   A9  B1 0003C 	    CMPW    50(PACKET), #5					      ; 0562

				       04  1A 00040 	    BGTRU   3$							      ;

	   02 	         5B 	       06  E1 00042 	    BBC     #6, FUNCTION, 4$					      ; 0563

				       14  BF 00046 3$:     CHMU    #20							      ; 0566

		         50 	0000G  CF  D0 00048 4$:     MOVL    CURRENT_VCB, R0					      ; 0568

	   04 	    0B   A0	       04  E1 0004D 	    BBC     #4, 11(R0), 5$					      ;

				025C   8F  BF 00052 	    CHMU    #604						      ; 0569

	   03 	         5B 	       07  E0 00056 5$:     BBS     #7, FUNCTION, 6$					      ; 0575

				     008B  31 0005A 	    BRW     9$							      ;

				       7E  7C 0005D 6$:     CLRQ    -(SP)						      ; 0578

				       03  DD 0005F 	    PUSHL   #3							      ;

		  0000G  CF	       03  FB 00061 	    CALLS   #3, CHECK_PROTECT					      ;

		  0000G  CF	       00  FB 00066 	    CALLS   #0, CREATE_HEADER					      ; 0580

		         56 	       50  D0 0006B 	    MOVL    R0, HEADER						      ;

		    04   A7	  02   A6  D0 0006E 	    MOVL    2(HEADER), 4(FIB)					      ; 0581

				  08   A7  B4 00073 	    CLRW    8(FIB)						      ; 0583

		         66 	2E17   8F  B0 00076 	    MOVW    #11799, (HEADER)					      ; 0588

		    06   A6	0101   8F  B0 0007B 	    MOVW    #257, 6(HEADER)					      ; 0590

		         51 00000000G  9F  D0 00081 	    MOVL    @#SCH$GL_PCBVEC, R1					      ; 0591

		         50 	  0C   A9  3C 00088 	    MOVZWL  12(PACKET), R0					      ;

		         50 	     6140  D0 0008C 	    MOVL    (R1)[R0], PCB					      ;

		    08   A6	  20   A0  90 00090 	    MOVB    32(PCB), 8(HEADER)					      ; 0592

		    09   A6	  22   A0  90 00095 	    MOVB    34(PCB), 9(HEADER)					      ; 0593

		         50 	0000G  CF  D0 0009A 	    MOVL    CURRENT_VCB, R0					      ; 0594

		    0A   A6	  4A   A0  B0 0009F 	    MOVW    74(R0), 10(HEADER)					      ;

	   00 	         6E 	       00  2C 000A4 	    MOVC5   #0, (SP), #0, #500, 12(HEADER)			      ; 0596

		    0C   A6	01F4   8F     000A8									      ;

	   05 	         5B 	       08  E1 000AD 	    BBC     #8, FUNCTION, 7$					      ; 0598

		    0D   A6	  80   8F  88 000B1 	    BISB2   #128, 13(HEADER)					      ; 0599

	   04 	  0000G  CF	       07  E1 000B6 7$:     BBC     #7, CLEANUP_FLAGS, 8$				      ; 0601

		    0D   A6	       10  88 000BC 	    BISB2   #16, 13(HEADER)					      ; 0602

		         50 	  5C   A6  9E 000C0 8$:     MOVAB   92(R6), MAP_AREA					      ; 0604

		    06   A0 CC000301   8F  D0 000C4 	    MOVL    #-872414463, 6(MAP_AREA)				      ; 0605

				0000G  CF  D4 000CC 	    CLRL    NEW_FID						      ; 0610

				       56  DD 000D0 	    PUSHL   HEADER						      ; 0611

		  0000G  CF	       01  FB 000D2 	    CALLS   #1, MARK_DIRTY					      ;

		  0000G  CF	       20  88 000D7 	    BISB2   #32, CLEANUP_FLAGS+2				      ; 0612

		  0000G  CF	       56  D0 000DC 	    MOVL    HEADER, FILE_HEADER					      ; 0613

				       56  DD 000E1 	    PUSHL   HEADER						      ; 0614



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2-6

;

		  0000G  CF	       01  FB 000E3 	    CALLS   #1, CHECKSUM					      ;

				  0A   A7  B5 000E8 9$:     TSTW    10(FIB)						      ; 0624

				       17  13 000EB 	    BEQL    10$							      ;

	   11 	  0000G  CF	       07  E0 000ED 	    BBS     #7, CLEANUP_FLAGS, 10$				      ;

				  18   AE  9F 000F3 	    PUSHAB  RESULT						      ; 0626

				  04   AE  9F 000F6 	    PUSHAB  RESULT_LENGTH					      ;

				       57  DD 000F9 	    PUSHL   FIB							      ;

				       5A  DD 000FB 	    PUSHL   ABD							      ;

		  0000G  CF	       04  FB 000FD 	    CALLS   #4, ENTER						      ;

				       23  11 00102 	    BRB     11$							      ; 0624

				       5A  DD 00104 10$:    PUSHL   ABD							      ; 0629

				       01  DD 00106 	    PUSHL   #1							      ;

				       5E  DD 00108 	    PUSHL   SP							      ;

				0000G  CF  9F 0010A 	    PUSHAB  COPY_NAME						      ;

	      00000000G  9F	       04  FB 0010E 	    CALLS   #4, @#SYS$CMKRNL					      ;

		         6E 	  12   AA  3C 00115 	    MOVZWL  18(ABD), RESULT_LENGTH				      ; 0630

		         51 	  10   AA  9E 00119 	    MOVAB   16(ABD), R1						      ; 0632

		         50 	       61  3C 0011D 	    MOVZWL  (R1), R0						      ;

      18   AE	    01 A140	       6E  28 00120 	    MOVC3   RESULT_LENGTH, 1(R1)[R0], RESULT			      ; 0631

	   03 	         5B 	       07  E0 00127 11$:    BBS     #7, FUNCTION, 12$					      ; 0638

				     00D8  31 0012B 	    BRW     16$							      ;

				       7E  D4 0012E 12$:    CLRL    -(SP)						      ; 0641

				  04   A7  9F 00130 	    PUSHAB  4(FIB)						      ;

		  0000G  CF	       02  FB 00133 	    CALLS   #2, READ_HEADER					      ;

		         56 	       50  D0 00138 	    MOVL    R0, HEADER						      ;

				  04   AE  9F 0013B 	    PUSHAB  NAMEBLOCK						      ; 0643

				  1C   AE  9F 0013E 	    PUSHAB  RESULT						      ;

				  08   AE  DD 00141 	    PUSHL   RESULT_LENGTH					      ;

		  0000G  CF	       03  FB 00144 	    CALLS   #3, MAKE_NAMEBLOCK					      ;

		         50 	       66  9A 00149 	    MOVZBL  (HEADER), R0					      ; 0644

		         58 	     6640  3E 0014C 	    MOVAW   (HEADER)[R0], IDENT_AREA				      ;

	   68 	    0A   AE	       0A  28 00150 	    MOVC3   #10, NAMEBLOCK+6, (IDENT_AREA)			      ; 0645

				  19   A8  9F 00155 	    PUSHAB  25(IDENT_AREA)					      ; 0646

		  0000G  CF	       01  FB 00158 	    CALLS   #1, GET_TIME					      ;

		         05 	  32   A9  B1 0015D 	    CMPW    50(PACKET), #5					      ; 0648

				       09  1B 00161 	    BLEQU   13$							      ;

				0440   8F  BB 00163 	    PUSHR   #^M<R6,R10>						      ; 0649

		  0000G  CF	       02  FB 00167 	    CALLS   #2, WRITE_ATTRIB					      ;

	   66 	         5B 	       06  E1 0016C 13$:    BBC     #6, FUNCTION, 14$					      ; 0654

				       56  DD 00170 	    PUSHL   HEADER						      ; 0657

				       01  DD 00172 	    PUSHL   #1							      ;

				       5E  DD 00174 	    PUSHL   SP							      ;

				0000G  CF  9F 00176 	    PUSHAB  CREATE_FCB						      ;

	      00000000G  9F	       04  FB 0017A 	    CALLS   #4, @#SYS$CMKRNL					      ;

		         52 	       50  D0 00181 	    MOVL    R0, FCB						      ;

		  0000G  CF	       52  D0 00184 	    MOVL    FCB, PRIMARY_FCB					      ; 0658

				       52  DD 00189 	    PUSHL   FCB							      ; 0661

				  0C   A9  DD 0018B 	    PUSHL   12(PACKET)						      ;

				       56  DD 0018E 	    PUSHL   HEADER						      ;

		         7E 	  03   A7  98 00190 	    CVTBL   3(FIB), -(SP)					      ;

				       67  DD 00194 	    PUSHL   (FIB)						      ;

				       05  DD 00196 	    PUSHL   #5							      ;

				       5E  DD 00198 	    PUSHL   SP							      ;

				0000G  CF  9F 0019A 	    PUSHAB  CREATE_WINDOW					      ;

	      00000000G  9F	       08  FB 0019E 	    CALLS   #8, @#SYS$CMKRNL					      ;



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2-7

;

		  0000G  CF	       50  D0 001A5 	    MOVL    R0, CURRENT_WINDOW					      ;

				       5A  DD 001AA 	    PUSHL   ABD							      ; 0662

				0000G  CF  DD 001AC 	    PUSHL   CURRENT_WINDOW					      ;

				       52  DD 001B0 	    PUSHL   FCB							      ;

				       03  DD 001B2 	    PUSHL   #3							      ;

				       5E  DD 001B4 	    PUSHL   SP							      ;

				0000G  CF  9F 001B6 	    PUSHAB  MAKE_ACCESS						      ;

	      00000000G  9F	       06  FB 001BA 	    CALLS   #6, @#SYS$CMKRNL					      ;

	   11 	         5B 	       08  E1 001C1 	    BBC     #8, FUNCTION, 14$					      ; 0663

				       52  DD 001C5 	    PUSHL   FCB							      ; 0664

				       01  DD 001C7 	    PUSHL   #1							      ;

				       5E  DD 001C9 	    PUSHL   SP							      ;

				0000G  CF  9F 001CB 	    PUSHAB  MARKDEL_FCB						      ;

	      00000000G  9F	       04  FB 001CF 	    CALLS   #4, @#SYS$CMKRNL					      ;

	   09 	    16   A7	       07  E1 001D6 14$:    BBC     #7, 22(FIB), 15$					      ; 0670

				       56  DD 001DB 	    PUSHL   HEADER						      ;

				       57  DD 001DD 	    PUSHL   FIB							      ;

		  0000G  CF	       02  FB 001DF 	    CALLS   #2, EXTEND						      ;

		         56 	0000G  CF  D0 001E4 15$:    MOVL    FILE_HEADER, HEADER					      ; 0671

				       56  DD 001E9 	    PUSHL   HEADER						      ; 0672

				       01  DD 001EB 	    PUSHL   #1							      ;

				       5E  DD 001ED 	    PUSHL   SP							      ;

				0000G  CF  9F 001EF 	    PUSHAB  UPDATE_FCB						      ;

	      00000000G  9F	       04  FB 001F3 	    CALLS   #4, @#SYS$CMKRNL					      ;

				       56  DD 001FA 	    PUSHL   HEADER						      ; 0673

		  0000G  CF	       01  FB 001FC 	    CALLS   #1, CHECKSUM					      ;

		  0000G  CF	       00  FB 00201 	    CALLS   #0, WRITE_HEADER					      ; 0674

	   35 	  0000G  CF	       05  E5 00206 16$:    BBCC    #5, CLEANUP_FLAGS, 17$				      ; 0683

		  0000G  CF	0631   8F  3C 0020C 	    MOVZWL  #1585, USER_STATUS					      ; 0686

    0000G  CF	  0000G  CF	0000G  8F  28 00213 	    MOVC3   #CONTEXT_SIZE, CONTEXT_START, CONTEXT_SAVE		      ; 0687

	   00 	         6E 	       00  2C 0021D 	    MOVC5   #0, (SP), #0, #CONTEXT_SIZE, CONTEXT_START		      ; 0688

		  0000G  CF	0000G  8F     00221									      ;

	   00 	  0000G  CF	       06  2C 00227 	    MOVC5   #6, SUPER_FID, #0, #40, SECOND_FIB+4		      ; 0689

		  0000G  CF	       28     0022D									      ;

		  0000G  CF	0000G  CF  9E 00231 	    MOVAB   SECOND_FIB, CURRENT_FIB				      ; 0691

				0000G  CF  9F 00238 	    PUSHAB  SECOND_FIB						      ; 0692

		  0000G  CF	       01  FB 0023C 	    CALLS   #1, MARK_DELETE					      ;

		         50 	       01  D0 00241 17$:    MOVL    #1, R0						      ; 0696

					   04 00244 	    RET     							      ; 0440



; Routine Size:  581 bytes





;	0699	

;	0700	END

;	0701	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:51:35	DBB3:[F11A.SRC]CREATE.B32;13					Page 2-8

;

;

;  $CODE$         	   581  NOWRT,  RD ,  EXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

;					     -------- Symbols --------    Blocks

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582        56         1       266











; Size:		581 code + 0 data bytes

; Run Time:	00:14.1

; Elapsed Time:	00:29.9

; Memory Used:	403 pages

; Compilation Complete

