Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/cex/b16abs.lst
There are no other files named b16abs.lst in the archive.
B16ABS		B16ABS Absolute and Sign Routines		28-May-1985 14:29:40	TOPS-20 Bliss-16 2A(530)	    Page   1
2-4								29-Dec-1982 14:18:32	DNET61:<MCB.CEX>B16ABS.B16.1 (1)

;	  0001	MODULE B16ABS (IDENT = '2-4' %TITLE'B16ABS Absolute and Sign Routines') =
;	  0002	BEGIN
;	  0003	
;	  0004	!
;	  0005	!                    COPYRIGHT (c) 1980, 1981, 1982
;	  0006	!                    DIGITAL EQUIPMENT CORPORATION
;	  0007	!                        Maynard, Massachusetts
;	  0008	!
;	  0009	!     This software is furnished under a license and may  be  used
;	  0010	!     and copied only in accordance with the terms of such license
;	  0011	!     and with the inclusion of the above copyright notice.   This
;	  0012	!     software  or any other copies thereof may not be provided or
;	  0013	!     otherwise made available to any other person.  No  title  to
;	  0014	!     and ownership of the software is hereby transferred.
;	  0015	!
;	  0016	!     The information  in  this  software  is  subject  to  change
;	  0017	!     without  notice  and should not be construed as a commitment
;	  0018	!     by DIGITAL EQUIPMENT CORPORATION.
;	  0019	!
;	  0020	!     DIGITAL assumes no responsibility for the use or reliability
;	  0021	!     of  its  software  on  equipment  which  is  not supplied by
;	  0022	!     DIGITAL.
;	  0023	!
;	  0024	
;	  0025	!++
;	  0026	! FACILITY:
;	  0027	!   BLISS-16 Object Time System (OTS)
;	  0028	!
;	  0029	! ABSTRACT:
;	  0030	!   OTS Routines for calculating sign and absolute value.
;	  0031	!
;	  0032	! ENVIRONMENT:
;	  0033	!   PDP-11 or Compatibility Mode of the VAX, EIS and NOEIS
;	  0034	!
;	  0035	! AUTHOR: Don Frank, CREATION DATE: 10-Mar-80
;	  0036	!
;	  0037	! MODIFIED BY:
;	  0038	!
;	  0039	! 0.	19-Apr-77   Paul Dickson	Original creation in Macro
;	  0040	!
;	  0041	! 1.	3-May-79    John Hrones		Create double entry points.
;	  0042	!
;	  0043	! 2.	31-May-79   John Hrones		Correct BLS16C names.
;	  0044	!
;	  0045	! 3.	18-Feb-80	DGF	Move BLISS-11 entry points to B16B11
;	  0046	!
;	  0047	! 4.	10-Mar-80	DGF	Translated to BLISS-16.
;	  0048	!--
;	  0049	!
;	  0050	! TABLE OF CONTENTS:
;	  0051	!
;	  0052	
B16ABS		B16ABS Absolute and Sign Routines		28-May-1985 14:29:40	TOPS-20 Bliss-16 2A(530)	    Page   2
2-4								29-Dec-1982 14:18:32	DNET61:<MCB.CEX>B16ABS.B16.1 (1)

;	  0053	FORWARD ROUTINE
;	  0054		BL$SGN,			! Sign of a value
;	  0055		BL$ABS;			! Takes absolute value
;	  0056	
B16ABS		B16ABS Absolute and Sign Routines		28-May-1985 14:29:40	TOPS-20 Bliss-16 2A(530)	    Page   3
2-4								29-Dec-1982 14:18:32	DNET61:<MCB.CEX>B16ABS.B16.1 (2)

;	  0057	GLOBAL ROUTINE BL$SGN(V) =
;	  0058	
;	  0059	!++
;	  0060	! FUNCTIONAL DESCRIPTION:
;	  0061	!
;	  0062	!	Determines the sign of a value.
;	  0063	!
;	  0064	! FORMAL PARAMETERS:
;	  0065	!
;	  0066	!	V -- A bliss value.
;	  0067	!
;	  0068	! IMPLICIT INPUTS:
;	  0069	!
;	  0070	!	- None -
;	  0071	!
;	  0072	! IMPLICIT OUTPUTS:
;	  0073	!
;	  0074	!	- None -
;	  0075	!
;	  0076	! ROUTINE VALUE and
;	  0077	! COMPLETION CODES:
;	  0078	!
;	  0079	!	-1 -- If .V lss 0
;	  0080	!	 0 -- If .V eql 0
;	  0081	!	+1 -- If .V gtr 0
;	  0082	!
;	  0083	! SIDE EFFECTS:
;	  0084	!
;	  0085	!	- None -
;	  0086	!
;	  0087	!--
;	  0088	
;	  0089	    BEGIN
;	  0090	
;	  0091	    SWITCHES NOOPTIMIZE;    ! Prevents CSE creation for V
;	  0092	    REGISTER R = 0;
;	  0093	    
;	  0094	    R = -1;
;	  0095	    
;	  0096	    IF .V LSS 0
;	  0097	    THEN
;	  0098		RETURN .R;
;	  0099	    
;	  0100	    IF .V NEQ 0
;	  0101	    THEN
;	  0102		R = .R + 1;
;	  0103		
;	  0104	    RETURN .R + 1
;	  0105	    
;	  0106	    END;
B16ABS		B16ABS Absolute and Sign Routines		28-May-1985 14:29:40	TOPS-20 Bliss-16 2A(530)	    Page   4
2-4								29-Dec-1982 14:18:32	DNET61:<MCB.CEX>B16ABS.B16.1 (2)

						.TITLE	B16ABS B16ABS Absolute and Sign Routines
						.IDENT	/2.4/

						.SBTTL	BL$SGN
000000						.PSECT	$CODE$,  RO 

000000	012700  177777 			BL$SGN::MOV	#-1,R0				; *,R					0094
000004	005766  000002 				TST	2(SP)				; V					0096
000010	002403 					BLT	2$				;					0098
000012	001401 					BEQ	1$				;					0100
000014	005200 					INC	R0				; R					0102
000016	005200 				1$:	INC	R0				; R					0104
000020	000207 				2$:	RTS	PC				;					0057

; Routine Size:  9 words,	Routine Base:  $CODE$ + 0000
; Maximum stack depth per invocation:  0 words


;	  0107	
B16ABS		B16ABS Absolute and Sign Routines		28-May-1985 14:29:40	TOPS-20 Bliss-16 2A(530)	    Page   5
2-4								29-Dec-1982 14:18:32	DNET61:<MCB.CEX>B16ABS.B16.1 (3)

;	  0108	GLOBAL ROUTINE BL$ABS(V) =
;	  0109	
;	  0110	!++
;	  0111	! FUNCTIONAL DESCRIPTION:
;	  0112	!
;	  0113	!	Determines absolute value of the argument.
;	  0114	!
;	  0115	! FORMAL PARAMETERS:
;	  0116	!
;	  0117	!	V -- A BLISS value.
;	  0118	!
;	  0119	! IMPLICIT INPUTS:
;	  0120	!
;	  0121	!	- None -
;	  0122	!
;	  0123	! IMPLICIT OUTPUTS:
;	  0124	!
;	  0125	!	- None -
;	  0126	!
;	  0127	! ROUTINE VALUE and
;	  0128	! COMPLETION CODES:
;	  0129	!
;	  0130	!	 .V -- If .V geq 0
;	  0131	!	-.V -- If .V lss 0
;	  0132	!
;	  0133	! SIDE EFFECTS:
;	  0134	!
;	  0135	!	- None -
;	  0136	!
;	  0137	!--
;	  0138	
;	  0139	    BEGIN
;	  0140	    
;	  0141	    RETURN (IF .V LSS 0 THEN -.V ELSE .V)
;	  0142	    
;	  0143	    END;


						.SBTTL	BL$ABS
000000	016600  000002 			BL$ABS::MOV	2(SP),R0			; V,*					0141
000004	002001 					BGE	1$
000006	005400 					NEG	R0
000010	000207 				1$:	RTS	PC				;					0108

; Routine Size:  5 words,	Routine Base:  $CODE$ + 0022
; Maximum stack depth per invocation:  0 words


;	  0144	END				! End of module
;	  0145	ELUDOM
B16ABS		B16ABS Absolute and Sign Routines		28-May-1985 14:29:40	TOPS-20 Bliss-16 2A(530)	    Page   6
2-4								29-Dec-1982 14:18:32	DNET61:<MCB.CEX>B16ABS.B16.1 (3)


;					PSECT SUMMARY
;
;	Psect Name			Words	  Attributes
;	 $CODE$				   14	    RO ,  I  ,  LCL,  REL,  CON





; Size:		14 code + 0 data words
; Run Time:	00:00.5
; Elapsed Time:	00:01.0
; Memory Used:	3 pages
; Compilation Complete