

; Bliss-32 10.1-416	Monday 21-AUG-1978 19:36:17	DBB3:[RTL.SRC]LSIGRE.B32;9					Page 1

;

;	0001	MODULE LIB$SIG_TO_RET (	! Library routine to convert a signal to a return

;	0002		IDENT = '01-08'		! File: LSIGRE.B55

;	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	!	LIB$SIG_TO_RET converts any signaled condition value into

;	0031	!	an ordinary procedure return to the caller of the procedure

;	0032	!	which established the handler which called LIB$SIG_TO_RET.

;	0033	!

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

;	0035	!

;	0036	! AUTHOR:	homas N. Hastings CREATION DATE:  09-June-1977

;	0037	!

;	0038	! MODIFIED BY:

;	0039	!

;	0040	! 	Thomas N. Hastings, 09-June-1977: VERSION 01

;	0041	! 01	-  original

;	0042	! 01-06	- Change to STARLET library.  DGP 20-Apr-78

;	0043	! 01-07	- Change REQUIRE files for VAX system build.  DGP 28-Apr-78

;	0044	! 01-08	- Change STARLET to RTLSTARLE to avoid conflicts.  DGP 1-May-78

;	0045	!--



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:36:17	DBB3:[RTL.SRC]LSIGRE.B32;9					Page 2

;

;	0046	!

;	0047	! TABLE OF CONTENTS:

;	0048	!

;	0049	

;	0050	FORWARD ROUTINE

;	0051		LIB$SIG_TO_RET;		! Convert a signal to a return

;	0052	

;	0053	!

;	0054	! INCLUDE FILES:

;	0055	!

;	0056	

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

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

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

;65535  0112	

;65535  0113	!

;65535  0114	! MACROS:

;65535  0115	!

;65535  0116	!	NONE

;65535  0117	!

;65535  0118	! EQUATED SYMBOLS:

;65535  0119	!

;65535  0120	!	NONE

;65535  0121	!

;65535  0122	! PSECT DECLARATIONS:

;65535  0123	!

;65535  0124	

;65535  0125		DECLARE_PSECTS (LIB);	! declare PSECTs LIB LIB$ facility

;65535  0126	

;65535  0127	!

;65535  0128	! OWN STORAGE:

;65535  0129	!

;65535  0130	

;65535  0131	!

;65535  0132	! EXTERNAL REFERENCES:

;65535  0133	!

;65535  0134	



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:36:17	DBB3:[RTL.SRC]LSIGRE.B32;9					Page 3

;

;65535  0135	GLOBAL ROUTINE LIB$SIG_TO_RET  (	! Convert a signal to a return

;65535  0136		SIG_ARGS_ADR,	! Adr. of signal args vector

;65535  0137		MCH_ARGS_ADR)	! Adr. of mechanism args vector

;65535  0138			=	! Value is success, unless failure from SYS$UNWIND

;65535  0139	

;65535  0140	!++

;65535  0141	! FUNCTIONAL DESCRIPTION:

;65535  0142	!

;65535  0143	!	LIB$SIG_TO_RET is called with the argument list passed to a condition

;65535  0144	!	handler by the condition handling facility.  It converts the

;65535  0145	!	signaled condition into a return to the procedure which called the

;65535  0146	!	procedure which established the handler handling the signal.  The

;65535  0147	!	stack is unwound to the caller of the establisher and the condition code

;65535  0148	!	is returned as the value in R0.

;65535  0149	!

;65535  0150	!	In BLISS the argument list can be passed in toto by using the

;65535  0151	!	BUILTIN function CALLG and AP register, thus:

;65535  0152	!

;65535  0153	!		status = CALLG (.AP, LIB$SIG_TO_RET);

;65535  0154	!

;65535  0155	!	Or more simply by: ENABLE LIB$SIG_TO_RET ();

;65535  0156	!	If there is no need for the handler to do any more processing

;65535  0157	!

;65535  0158	! FORMAL PARAMETERS:

;65535  0159	!

;65535  0160	!	SIG_ARGS_ADR.rl.ra	Adr. of signal args vector

;65535  0161	!	MCH_ARGS_ADR.ml.ra	Adr. of mechanism args vector

;65535  0162	!	any other args to handler

;65535  0163	!

;65535  0164	! IMPLICIT INPUTS:

;65535  0165	!

;65535  0166	!	NONE

;65535  0167	!

;65535  0168	! IMPLICIT OUTPUTS:

;65535  0169	!

;65535  0170	!	NONE

;65535  0171	!

;65535  0172	! ROUTINE VALUE:

;65535  0173	! COMPLETION CODES:

;65535  0174	!

;65535  0175	!	SS$_NORMAL if SYS$UNWIND ok, else error codes form SYS$UNWIND.

;65535  0176	!

;65535  0177	! SIDE EFFECTS:

;65535  0178	!

;65535  0179	!	Causes the stack to marked to be unwound to the caller of the

;65535  0180	!	establishing procedure of the handler which was called on this signal.

;65535  0181	!

;65535  0182	!--

;65535  0183	

;65535  0184	    BEGIN

;65535  0185	    MAP

;65535  0186		SIG_ARGS_ADR: REF BLOCK[8, BYTE],	! Signal vector

;65535  0187		MCH_ARGS_ADR: REF BLOCK[20, BYTE];	! mechanism vector

;65535  0188	

;65535  0189	    !+



; Bliss-32 10.1-416	Monday 21-AUG-1978 19:36:17	DBB3:[RTL.SRC]LSIGRE.B32;9					Page 3-1

;

;65535  0190	    ! If this is unwind condition, just let unwinding continue since

;65535  0191	    ! propably it was this handler which invoked the unwind.

;65535  0192	    !-

;65535  0193	

;65535  0194	    IF .SIG_ARGS_ADR[CHF$L_SIG_NAME] EQL SS$_UNWIND THEN RETURN SS$_NORMAL;

;65535  0195	

;65535  0196	    !+

;65535  0197	    ! Copy condition value to saved image of R0

;65535  0198	    !-

;65535  0199	

;65535  0200	    MCH_ARGS_ADR[CHF$L_MCH_SAVR0] = .SIG_ARGS_ADR[CHF$L_SIG_NAME];

;65535  0201	

;65535  0202	    !+

;65535  0203	    ! Set to unwind stack using default depth and default new PC,

;65535  0204	    ! namely return to caller of the procedure which established the handler

;65535  0205	    !-

;65535  0206	

;65535  0207	    RETURN $UNWIND ();

;65535  0208	    END;			! End of LIB$SIG_TO_RET routine





							    .TITLE  LIB$SIG_TO_RET

							    .IDENT  \01-08\



							    .EXTRN  SYS$UNWIND



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



					 0000 00000 	    .ENTRY  LIB$SIG_TO_RET, Save nothing			      ; 0135

		         51 	  04   AC  D0 00002 	    MOVL    SIG_ARGS_ADR, R1					      ; 0194

	      00000920   8F	  04   A1  D1 00006 	    CMPL    4(R1), #2336					      ;

				       04  12 0000E 	    BNEQ    1$							      ;

		         50 	       01  D0 00010 	    MOVL    #1, R0						      ;

					   04 00013 	    RET     							      ;

		         50 	  08   AC  D0 00014 1$:     MOVL    MCH_ARGS_ADR, R0					      ; 0200

		    0C   A0	  04   A1  D0 00018 	    MOVL    4(R1), 12(R0)					      ;

				       7E  7C 0001D 	    CLRQ    -(SP)						      ; 0207

	      00000000G  9F	       02  FB 0001F 	    CALLS   #2, @#SYS$UNWIND					      ;

					   04 00026 	    RET     							      ; 0135



; Routine Size:  39 bytes







; Bliss-32 10.1-416	Monday 21-AUG-1978 19:36:17	DBB3:[RTL.SRC]LSIGRE.B32;9					Page 4

;

;65535  0209	END				! End of module LIB$SIG_TO_RET

;65535  0210	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  LIB$CODE       	    39  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         5         0       111











; Size:		39 code + 0 data bytes

; Run Time:	00:02.5

; Elapsed Time:	00:11.5

; Memory Used:	125 pages

; Compilation Complete

