

; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE INITIO (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'X0001'

;	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:  INIT Utility Structure Level 1

;	0029	!

;	0030	! ABSTRACT:

;	0031	!

;	0032	!	These routines do basic disk I/O.

;	0033	!

;	0034	! ENVIRONMENT:

;	0035	!

;	0036	!	STARLET operating system, including privileged system services

;	0037	!	and internal exec routines.

;	0038	!

;	0039	!--

;	0040	!

;	0041	!

;	0042	! AUTHOR:  Andrew C. Goldstein,	 CREATION DATE:  14-Nov-1977  19:42

;	0043	!

;	0044	! REVISION HISTORY:

;	0045	!

;	0046	!**

;	0047	

;	0048	

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

;	0050	REQUIRE 'SRC$:INIDEF.B32';

;	0312	REQUIRE 'LIBD$:[VMSLIB.OBJ]INITMSG.B32';

;	0372	

;	0373	

;	0374	FORWARD ROUTINE

;	0375		READ_PHYSICAL,			! read block by physical address



; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 1-1

; Digital Equipment Corporation

;

;	0376		READ_BLOCK,			! read block by LBN

;	0377		WRITE_BLOCK	: NOVALUE;	! write block by LBN



; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 2

; Digital Equipment Corporation

;

;	0378	GLOBAL ROUTINE READ_PHYSICAL (PBN, BUFFER) =

;	0379	

;	0380	!++

;	0381	!

;	0382	! FUNCTIONAL DESCRIPTION:

;	0383	!

;	0384	!	This routine reads a disk block by physical block number.

;	0385	!

;	0386	!

;	0387	! CALLING SEQUENCE:

;	0388	!	READ_PHYSICAL (ARG1, ARG2)

;	0389	!

;	0390	! INPUT PARAMETERS:

;	0391	!	ARG1: physical block number

;	0392	!	ARG2: buffer address

;	0393	!

;	0394	! IMPLICIT INPUTS:

;	0395	!	CHANNEL: channel number assigned to disk

;	0396	!

;	0397	! OUTPUT PARAMETERS:

;	0398	!	NONE

;	0399	!

;	0400	! IMPLICIT OUTPUTS:

;	0401	!	NONE

;	0402	!

;	0403	! ROUTINE VALUE:

;	0404	!	status of read

;	0405	!

;	0406	! SIDE EFFECTS:

;	0407	!	block read into buffer

;	0408	!

;	0409	!--

;	0410	

;	0411	BEGIN

;	0412	

;	0413	LOCAL

;	0414		STATUS,				! system service status

;	0415		IO_STATUS	: VECTOR [4, WORD]; ! I/O status block

;	0416	

;	0417	EXTERNAL

;	0418		CHANNEL;			! I/O channel number

;	0419	

;	0420	

;	0421	STATUS = $QIOW (CHAN = .CHANNEL,

;     P 0422			FUNC = IO$_READPBLK,

;     P 0423			IOSB = IO_STATUS[0],

;     P 0424			P1   = .BUFFER,

;     P 0425			P2   = 512,

;     P 0426			P3   = .PBN

;     P 0427			);

;	0428	IF .STATUS THEN STATUS = .IO_STATUS[0];

;	0429	RETURN .STATUS;

;	0430	

;	0431	END;					! end of routine READ_PHYSICAL





; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 2-1

; Digital Equipment Corporation

;



							    .TITLE  INITIO

							    .IDENT  \X0001\



							    .GLOBL  CHANNEL, SYS$QIOW



							    .PSECT  $CODE$,NOWRT,2



					 0000 00000 	    .ENTRY  READ_PHYSICAL, Save nothing				      ; 0378

		         5E	       08  C2 00002 	    SUBL2   #8, SP						      ;

				       7E  7C 00005 	    CLRQ    -(SP)						      ; 0427

				       7E  D4 00007 	    CLRL    -(SP)						      ;

				  04   AC  DD 00009 	    PUSHL   PBN							      ;

		         7E	0200   8F  3C 0000C 	    MOVZWL  #512, -(SP)						      ;

				  08   AC  DD 00011 	    PUSHL   BUFFER						      ;

				       7E  7C 00014 	    CLRQ    -(SP)						      ;

				  20   AE  9F 00016 	    PUSHAB  IO_STATUS						      ;

				       0C  DD 00019 	    PUSHL   #12							      ;

				0000G  CF  DD 0001B 	    PUSHL   CHANNEL						      ;

				       7E  D4 0001F 	    CLRL    -(SP)						      ;

	      00000000G  9F	       0C  FB 00021 	    CALLS   #12, @#SYS$QIOW					      ;

		         03	       50  E9 00028 	    BLBC    STATUS, 1$						      ; 0428

		         50	       6E  3C 0002B 	    MOVZWL  IO_STATUS, STATUS					      ;

					   04 0002E 1$:     RET     							      ; 0378



; Routine Size:  47 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 3

; Digital Equipment Corporation

;

;	0432	GLOBAL ROUTINE READ_BLOCK (LBN, BUFFER) =

;	0433	

;	0434	!++

;	0435	!

;	0436	! FUNCTIONAL DESCRIPTION:

;	0437	!

;	0438	!	This routine reads a disk block by logical block number.

;	0439	!

;	0440	!

;	0441	! CALLING SEQUENCE:

;	0442	!	READ_BLOCK (ARG1, ARG2)

;	0443	!

;	0444	! INPUT PARAMETERS:

;	0445	!	ARG1: logical block number

;	0446	!	ARG2: buffer address

;	0447	!

;	0448	! IMPLICIT INPUTS:

;	0449	!	CHANNEL: channel number assigned to disk

;	0450	!

;	0451	! OUTPUT PARAMETERS:

;	0452	!	NONE

;	0453	!

;	0454	! IMPLICIT OUTPUTS:

;	0455	!	NONE

;	0456	!

;	0457	! ROUTINE VALUE:

;	0458	!	status of read

;	0459	!

;	0460	! SIDE EFFECTS:

;	0461	!	block read into buffer

;	0462	!

;	0463	!--

;	0464	

;	0465	BEGIN

;	0466	

;	0467	LOCAL

;	0468		STATUS,				! system service status

;	0469		IO_STATUS	: VECTOR [4, WORD]; ! I/O status block

;	0470	

;	0471	EXTERNAL

;	0472		CHANNEL;			! I/O channel number

;	0473	

;	0474	

;	0475	STATUS = $QIOW (CHAN = .CHANNEL,

;     P 0476			FUNC = IO$_READLBLK,

;     P 0477			IOSB = IO_STATUS[0],

;     P 0478			P1   = .BUFFER,

;     P 0479			P2   = 512,

;     P 0480			P3   = .LBN

;     P 0481			);

;	0482	IF .STATUS THEN STATUS = .IO_STATUS[0];

;	0483	RETURN .STATUS;

;	0484	

;	0485	END;					! end of routine READ_BLOCK





; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 3-1

; Digital Equipment Corporation

;









					 0000 0002F 	    .ENTRY  READ_BLOCK, Save nothing				      ; 0432

		         5E	       08  C2 00031 	    SUBL2   #8, SP						      ;

				       7E  7C 00034 	    CLRQ    -(SP)						      ; 0481

				       7E  D4 00036 	    CLRL    -(SP)						      ;

				  04   AC  DD 00038 	    PUSHL   LBN							      ;

		         7E	0200   8F  3C 0003B 	    MOVZWL  #512, -(SP)						      ;

				  08   AC  DD 00040 	    PUSHL   BUFFER						      ;

				       7E  7C 00043 	    CLRQ    -(SP)						      ;

				  20   AE  9F 00045 	    PUSHAB  IO_STATUS						      ;

				       21  DD 00048 	    PUSHL   #33							      ;

				0000G  CF  DD 0004A 	    PUSHL   CHANNEL						      ;

				       7E  D4 0004E 	    CLRL    -(SP)						      ;

	      00000000G  9F	       0C  FB 00050 	    CALLS   #12, @#SYS$QIOW					      ;

		         03	       50  E9 00057 	    BLBC    STATUS, 1$						      ; 0482

		         50	       6E  3C 0005A 	    MOVZWL  IO_STATUS, STATUS					      ;

					   04 0005D 1$:     RET     							      ; 0432



; Routine Size:  47 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 4

; Digital Equipment Corporation

;

;	0486	GLOBAL ROUTINE WRITE_BLOCK (LBN, BUFFER) : NOVALUE =

;	0487	

;	0488	!++

;	0489	!

;	0490	! FUNCTIONAL DESCRIPTION:

;	0491	!

;	0492	!	This routine writes a disk block by logical block number.

;	0493	!

;	0494	!

;	0495	! CALLING SEQUENCE:

;	0496	!	WRITE_BLOCK (ARG1, ARG2)

;	0497	!

;	0498	! INPUT PARAMETERS:

;	0499	!	ARG1: logical block number

;	0500	!	ARG2: buffer address

;	0501	!

;	0502	! IMPLICIT INPUTS:

;	0503	!	CHANNEL: channel number assigned to disk

;	0504	!

;	0505	! OUTPUT PARAMETERS:

;	0506	!	NONE

;	0507	!

;	0508	! IMPLICIT OUTPUTS:

;	0509	!	NONE

;	0510	!

;	0511	! ROUTINE VALUE:

;	0512	!	status of write

;	0513	!

;	0514	! SIDE EFFECTS:

;	0515	!	block written from buffer

;	0516	!

;	0517	!--

;	0518	

;	0519	BEGIN

;	0520	

;	0521	LOCAL

;	0522		STATUS,				! system service status

;	0523		IO_STATUS	: VECTOR [4, WORD]; ! I/O status block

;	0524	

;	0525	EXTERNAL

;	0526		CHANNEL;			! I/O channel number

;	0527	

;	0528	

;	0529	STATUS = $QIOW (CHAN = .CHANNEL,

;     P 0530			FUNC = IO$_WRITELBLK OR IO$M_DATACHECK,

;     P 0531			IOSB = IO_STATUS[0],

;     P 0532			P1   = .BUFFER,

;     P 0533			P2   = 512,

;     P 0534			P3   = .LBN

;     P 0535			);

;	0536	IF .STATUS THEN STATUS = .IO_STATUS[0];

;	0537	IF NOT .STATUS

;	0538	THEN ERR_EXIT (.STATUS);

;	0539	

;	0540	END;					! end of routine WRITE_BLOCK



; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 4-1

; Digital Equipment Corporation

;











					 0000 0005E 	    .ENTRY  WRITE_BLOCK, Save nothing				      ; 0486

		         5E	       08  C2 00060 	    SUBL2   #8, SP						      ;

				       7E  7C 00063 	    CLRQ    -(SP)						      ; 0535

				       7E  D4 00065 	    CLRL    -(SP)						      ;

				  04   AC  DD 00067 	    PUSHL   LBN							      ;

		         7E	0200   8F  3C 0006A 	    MOVZWL  #512, -(SP)						      ;

				  08   AC  DD 0006F 	    PUSHL   BUFFER						      ;

				       7E  7C 00072 	    CLRQ    -(SP)						      ;

				  20   AE  9F 00074 	    PUSHAB  IO_STATUS						      ;

		         7E	4020   8F  3C 00077 	    MOVZWL  #16416, -(SP)					      ;

				0000G  CF  DD 0007C 	    PUSHL   CHANNEL						      ;

				       7E  D4 00080 	    CLRL    -(SP)						      ;

	      00000000G  9F	       0C  FB 00082 	    CALLS   #12, @#SYS$QIOW					      ;

		         06	       50  E9 00089 	    BLBC    STATUS, 1$						      ; 0536

		         50	       6E  3C 0008C 	    MOVZWL  IO_STATUS, STATUS					      ;

		         09	       50  E8 0008F 	    BLBS    STATUS, 2$						      ; 0537

				       50  DD 00092 1$:     PUSHL   STATUS						      ; 0538

	      00000000G  00	       01  FB 00094 	    CALLS   #1, LIB$STOP					      ;

					   04 0009B 2$:     RET     							      ; 0486



; Routine Size:  62 bytes





;	0541	

;	0542	END

;	0543	ELUDOM









							    .GLOBL  LIB$STOP



;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $CODE$         	   156  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         8         0       224









; Bliss-32 7.352	Saturday 22-AUG-1978 00:34:13	DBB3:[INIT.SRC]INITIO.B32;7					Page 4-2

; Digital Equipment Corporation

;





; Size:		156 code + 0 data bytes

; Run Time:	00:10.9

; Elapsed Time:	00:24.4

; Memory Used:	266 pages

; Compilation Complete

