

; Bliss-32 10.1-416	Monday 21-AUG-1978 19:33:04	DBB3:[RTL.SRC]LESTAB.B32;6					Page 1

;

;	0001	MODULE LIB$ESTABLISH (	! Establish a handler

;	0002		IDENT = '0-06'	! File: LESTAB.B32

;	0003			) =

;	0004	BEGIN

;	0005	

;	0006	!

;	0007	!			  COPYRIGHT (c) 1977 BY

;	0008	!	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

;	0009	!

;	0010	! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED

;	0011	! ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE

;	0012	! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER

;	0013	! COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY

;	0014	! OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY

;	0015	! TRANSFERRED.

;	0016	!

;	0017	! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE

;	0018	! AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT

;	0019	! CORPORATION.

;	0020	!

;	0021	! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS

;	0022	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

;	0023	!

;	0024	

;	0025	!++

;	0026	! FACILITY:	Utility Library

;	0027	!

;	0028	! ABSTRACT:

;	0029	!

;	0030	!	This module places the address of a routine into the SRM$A_HANDLER

;	0031	!	offset of the callers stack frame, thereby setting up the routine

;	0032	!	as the callers error handler.

;	0033	!

;	0034	! ENVIRONMENT:	User mode, re-entrant, AST level or not or mixed.

;	0035	!

;	0036	! AUTHOR:	Jonathan M. Taylor	CREATION DATE: 6-JUL-77

;	0037	!

;	0038	! MODIFIED BY:

;	0039	!

;	0040	! 	, : VERSION

;	0041	! 01	-	original 

;	0042	! 0-2	- Use SF$ symbols.  TNH 8-Oct-77

;	0043	! 0-3	- Declare PSECTs.  TNH 19-Dec-77

;	0044	! 0-04	- Change to STARLET library.  DGP 20-Apr-78

;	0045	! 0-05	- Change REQUIRE files for VAX system build.  DGP 28-Apr-78

;	0046	! 0-06	- Change STARLET to RTLSTARLE to avoid conflicts.  DGP 1-May-78

;	0047	!--



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:33:04	DBB3:[RTL.SRC]LESTAB.B32;6					Page 2

;

;	0048	!

;	0049	! TABLE OF CONTENTS:

;	0050	!

;	0051	

;	0052	FORWARD ROUTINE

;	0053	

;	0054		LIB$ESTABLISH;			! Establish an error handler for the caller

;	0055	

;	0056	!

;	0057	! INCLUDE FILES:

;	0058	!

;	0059		REQUIRE	'RTLIN:LPSECT';		! Define DECLARE_PSECTS macro

; %PRINT:	 REQUIRE FILE: LPSECT.B32, VERSION 01-5, TNH, 27-Jun-78

;65535  0113		LIBRARY	'RTLSTARLE';		! STARLET library for macros and symbols

;65535  0114	

;65535  0115	!

;65535  0116	! MACROS:

;65535  0117	!

;65535  0118	

;65535  0119	!

;65535  0120	! EQUATED SYMBOLS:

;65535  0121	!

;65535  0122	

;65535  0123	

;65535  0124	!

;65535  0125	! Declare PSECTs

;65535  0126	!

;65535  0127	

;65535  0128		DECLARE_PSECTS (LIB);	! Declare LIB$CODE and LIB$DATA PSECTs

;65535  0129	

;65535  0130	!

;65535  0131	! OWN STORAGE:

;65535  0132	!

;65535  0133	

;65535  0134	!

;65535  0135	! EXTERNAL REFERENCES:

;65535  0136	!

;65535  0137	



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:33:04	DBB3:[RTL.SRC]LESTAB.B32;6					Page 3

;

;65535  0138	GLOBAL ROUTINE LIB$ESTABLISH (

;65535  0139		NEW_HANDLER) =		! Adr of adr of users handler

;65535  0140	

;65535  0141	!++

;65535  0142	! FUNCTIONAL DESCRIPTION:

;65535  0143	!

;65535  0144	!	Move the address passed as an argument to the SF$A_HANDLER

;65535  0145	!	offset of the callers frame. Return address of old handler.

;65535  0146	!

;65535  0147	! FORMAL PARAMETERS:

;65535  0148	!

;65535  0149	!	NEW_HANDLER.ra.v	Adr. of the routine to set up as handler

;65535  0150	!

;65535  0151	! IMPLICIT INPUTS:

;65535  0152	!

;65535  0153	!	NONE

;65535  0154	!

;65535  0155	! IMPLICIT OUTPUTS:

;65535  0156	!

;65535  0157	!	NONE

;65535  0158	!

;65535  0159	! ROUTINE VALUE:

;65535  0160	!

;65535  0161	!	OLD_HANDLER.wa.v		previous contents of SF$A_HANDLER

;65535  0162	!					of the callers frame.

;65535  0163	!

;65535  0164	! COMPLETION CODES:

;65535  0165	!

;65535  0166	!	NONE

;65535  0167	!

;65535  0168	! SIDE EFFECTS:

;65535  0169	!

;65535  0170	!	The callers stack frame will be modified.

;65535  0171	!

;65535  0172	!--

;65535  0173	

;65535  0174	    BEGIN

;65535  0175	

;65535  0176	    LOCAL

;65535  0177		OLD_HANDLER;		! store the old handler address

;65535  0178	    BUILTIN

;65535  0179		FP;

;65535  0180	    MAP

;65535  0181		FP: REF BLOCK[,BYTE];

;65535  0182	    OLD_HANDLER = ..FP[SF$L_SAVE_FP];

;65535  0183	    .FP[SF$L_SAVE_FP] = .NEW_HANDLER;

;65535  0184	    RETURN .OLD_HANDLER;

;65535  0185	    END;			!End of LIB$ESTABLISH





							    .TITLE  LIB$ESTABLISH

							    .IDENT  \0-06\









; Bliss-32 10.1-416	Monday 21-AUG-1978 19:33:04	DBB3:[RTL.SRC]LESTAB.B32;6					Page 3-1

;

							    .PSECT  LIB$CODE,NOWRT,  SHR,  PIC,2



					 0000 00000 	    .ENTRY  LIB$ESTABLISH, Save nothing				      ; 0138

		         50 	  0C   BE  D0 00002 	    MOVL    @12(FP), OLD_HANDLER				      ; 0182

		    0C   BE	  04   AC  D0 00006 	    MOVL    NEW_HANDLER, @12(FP)				      ; 0183

					   04 0000B 	    RET     							      ; 0138



; Routine Size:  12 bytes







; Bliss-32 10.1-416	Monday 21-AUG-1978 19:33:04	DBB3:[RTL.SRC]LESTAB.B32;6					Page 4

;

;65535  0186	END				!End of module

;65535  0187	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  LIB$CODE       	    12  NOWRT,  RD ,  EXE,  SHR,  LCL,  REL,  CON,  PIC,ALIGN(2)









;				LIBRARY STATISTICS

;

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

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]STARLET.L32;1		      2688         1         0       108











; Size:		12 code + 0 data bytes

; Run Time:	00:01.9

; Elapsed Time:	00:07.4

; Memory Used:	120 pages

; Compilation Complete

