Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/cex/cat5.lst
There are 2 other files named cat5.lst in the archive. Click here to see a list.
a character.
!
! IMPLICIT INPU 						28-May-1985 14:29:24	TOPS-20 Bliss-16 2A(530)	    Page   1
								30-Dec-1982 17:28:16	DNET61:<MCB.UTILITIES>CAT5.BLI.1 (1)

;	  0001	
;	  0002	MODULE CAT5 (					!Convert ASCII to RAD50
;	  0003			IDENT = '001000',
;	  0004			LANGUAGE (BLISS16, BLISS36) %BLISS36 (, ENTRY ($CAT5))
;	  0005			) =
;	  0006	BEGIN
;	  0007	!
;	  0008	!                    COPYRIGHT (c) 1980, 1981, 1982
;	  0009	!                    DIGITAL EQUIPMENT CORPORATION
;	  0010	!                        Maynard, Massachusetts
;	  0011	!
;	  0012	!     This software is furnished under a license and may  be  used
;	  0013	!     and copied only in accordance with the terms of such license
;	  0014	!     and with the inclusion of the above copyright notice.   This
;	  0015	!     software  or any other copies thereof may not be provided or
;	  0016	!     otherwise made available to any other person.  No  title  to
;	  0017	!     and ownership of the software is hereby transferred.
;	  0018	!
;	  0019	!     The information  in  this  software  is  subject  to  change
;	  0020	!     without  notice  and should not be construed as a commitment
;	  0021	!     by DIGITAL EQUIPMENT CORPORATION.
;	  0022	!
;	  0023	!     DIGITAL assumes no responsibility for the use or reliability
;	  0024	!     of  its  software  on  equipment  which  is  not supplied by
;	  0025	!     DIGITAL.
;	  0026	!
;	  0027	
;	  0028	!++
;	  0029	! FACILITY: SYSTEM LIBRARY
;	  0030	!
;	  0031	! ABSTRACT:
;	  0032	!
;	  0033	!
;	  0034	!	This module contains the routine to convert 3 or less characters
;	  0035	!	to a RAD50 word.
;	  0036	!
;	  0037	!
;	  0038	! ENVIRONMENT: ANY
;	  0039	!
;	  0040	! AUTHOR: ALAN D. PECKHAM, CREATION DATE: 26-sep-78
;	  0041	!
;	  0042	! MODIFIED BY:
;	  0043	!
;	  0044	!	, : VERSION
;	  0045	! 01	-
;	  0046	!--
;	  0047	
;	  0048	!
;	  0049	! TABLE OF CONTENTS:
;	  0050	!
;	  0051	
;	  0052	FORWARD ROUTINE
CAT5								28-May-1985 14:29:24	TOPS-20 Bliss-16 2A(530)	    Page   2
001000								30-Dec-1982 17:28:16	DNET61:<MCB.UTILITIES>CAT5.BLI.1 (1)

;	  0053	    $CAT5;					!Convert ASCII to RAD50
;	  0054	
;	  0055	!
;	  0056	! INCLUDE FILES:
;	  0057	!
;	  0058	!
;	  0059	! MACROS:
;	  0060	!
;	  0061	!
;	  0062	! EQUATED SYMBOLS:
;	  0063	!
;	  0064	!
;	  0065	! OWN STORAGE:
;	  0066	!
;	  0067	!
;	  0068	! EXTERNAL REFERENCES:
;	  0069	!
;	  0070	
CAT5								28-May-1985 14:29:24	TOPS-20 Bliss-16 2A(530)	    Page   3
001000								30-Dec-1982 17:28:16	DNET61:<MCB.UTILITIES>CAT5.BLI.1 (2)

;	  0071	GLOBAL ROUTINE $CAT5 (BUF_PTR_ADR, FLAG) =
;	  0072	
;	  0073	!++
;	  0074	! FUNCTIONAL DESCRIPTION:
;	  0075	!
;	  0076	!
;	  0077	! FORMAL PARAMETERS:
;	  0078	!
;	  0079	!	.BUF_PTR_ADR				!Address of character sequence
;	  0080	!						!pointer to buffer to extract
;	  0081	!						!number from.
;	  0082	!	.FLAG					!If non-zero, the period is
;	  0083	!						!accepted as a character.
;	  0084	!
;	  0085	! IMPLICIT INPUTS:
;	  0086	!
;	  0087	!	NONE
;	  0088	!
;	  0089	! IMPLICIT OUTPUTS:
;	  0090	!
;	  0091	!	The buffer pointer ..BUF_PTR_ADR is updated to point past
;	  0092	!	the characters used in the conversion.
;	  0093	!
;	  0094	! ROUTINE VALUE:
;	  0095	!
;	  0096	!	The RAD50 equivalent of the next 3 (or less) characters.
;	  0097	!
;	  0098	! SIDE EFFECTS:
;	  0099	!
;	  0100	!	NONE
;	  0101	!
;	  0102	!--
;	  0103	
;	  0104	    BEGIN
;	  0105	
;	  0106	    LOCAL
;	  0107		INDEX,
;	  0108		CHAR,
;	  0109		VALUE;
;	  0110	
;	  0111	    VALUE = 0;
;	  0112	
;	  0113	    INCR INDEX FROM 0 TO 2 DO
;	  0114		BEGIN
;	  0115		CHAR = CH$RCHAR_A (.BUF_PTR_ADR);
;	  0116		VALUE = .VALUE*%O'50' + (SELECTONE .CHAR OF
;	  0117		    SET
;	  0118		    [%C' '] : %O'0';
;	  0119		    [%C'A' TO %C'Z'] : .CHAR - %C'A' + %O'1';
;	  0120		    [%C'$'] : %O'33';
;	  0121		    [%C'.'] : IF .FLAG NEQ 0 THEN %O'34' ELSE
;	  0122			    BEGIN
CAT5								28-May-1985 14:29:24	TOPS-20 Bliss-16 2A(530)	    Page   4
001000								30-Dec-1982 17:28:16	DNET61:<MCB.UTILITIES>CAT5.BLI.1 (2)

;	  0123			    .BUF_PTR_ADR = CH$PLUS (..BUF_PTR_ADR, -1);
;	  0124			    0
;	  0125			    END;
;	  0126		    [%C'0' TO %C'9'] : .CHAR - %C'0' + %O'36';
;	  0127		    [OTHERWISE] :
;	  0128			BEGIN
;	  0129			.BUF_PTR_ADR = CH$PLUS (..BUF_PTR_ADR, -1);
;	  0130			0
;	  0131			END;
;	  0132		    TES);
;	  0133		END;
;	  0134	
;	  0135	    .VALUE
;	  0136	    END;					!End of $CAT5


						.TITLE	CAT5
						.IDENT	/001000/

						.SBTTL	$CAT5
000000						.PSECT	$CODE$,  RO 

000000	004167  000000G			$CAT5:: JSR	R1,$SAVE5			;					0071
000004	005005 					CLR	R5				; VALUE					0111
000006	016604  000020 				MOV	20(SP),R4			; BUF.PTR.ADR,*				0115
000012	005003 					CLR	R3				; INDEX					0113
000014	005214 				1$:	INC	(R4)				;					0115
000016	011400 					MOV	(R4),R0
000020	005002 					CLR	R2				; CHAR
000022	156002  177777 				BISB	-1(R0),R2			; *,CHAR
000026	010501 					MOV	R5,R1				; VALUE,*				0116
000030	070127  000050 				MUL	#50,R1
000034	020227  000040 				CMP	R2,#40				; CHAR,*
000040	001444 					BEQ	6$
000042	020227  000101 				CMP	R2,#101				; CHAR,*
000046	002407 					BLT	2$
000050	020227  000132 				CMP	R2,#132				; CHAR,*
000054	003004 					BGT	2$
000056	010200 					MOV	R2,R0				; CHAR,*				0119
000060	162700  000100 				SUB	#100,R0
000064	000433 					BR	7$				;					0116
000066	020227  000044 			2$:	CMP	R2,#44				; CHAR,*
000072	001003 					BNE	3$
000074	012700  000033 				MOV	#33,R0
000100	000425 					BR	7$
000102	020227  000056 			3$:	CMP	R2,#56				; CHAR,*
000106	001006 					BNE	4$
000110	005766  000016 				TST	16(SP)				; FLAG					0121
000114	001415 					BEQ	5$
000116	012700  000034 				MOV	#34,R0
000122	000414 					BR	7$
000124	020227  000060 			4$:	CMP	R2,#60				; CHAR,*				0116
CAT5								28-May-1985 14:29:24	TOPS-20 Bliss-16 2A(530)	    Page   5
001000								30-Dec-1982 17:28:16	DNET61:<MCB.UTILITIES>CAT5.BLI.1 (2)

000130	002407 					BLT	5$
000132	020227  000071 				CMP	R2,#71				; CHAR,*
000136	003004 					BGT	5$
000140	010200 					MOV	R2,R0				; CHAR,*				0126
000142	162700  000022 				SUB	#22,R0
000146	000402 					BR	7$				;					0116
000150	005314 				5$:	DEC	(R4)				;					0129
000152	005000 				6$:	CLR	R0				;					0116
000154	060001 				7$:	ADD	R0,R1
000156	010105 					MOV	R1,R5				; *,VALUE
000160	005203 					INC	R3				; INDEX					0113
000162	020327  000002 				CMP	R3,#2				; INDEX,*
000166	003712 					BLE	1$
000170	010500 					MOV	R5,R0				; VALUE,*				0071
000172	000207 					RTS	PC

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


;	  0137	
;	  0138	END						!End of module
;	  0139	
;	  0140	ELUDOM



;					OTS external references
						.GLOBL	$SAVE5


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





; Size:		62 code + 0 data words
; Run Time:	00:00.9
; Elapsed Time:	00:01.6
; Memory Used:	9 pages
; Compilation Complete