Trailing-Edge
-
PDP-10 Archives
-
BB-P363B-SM_1985
-
mcb/blis16/b16ch3.lst
There are no other files named b16ch3.lst in the archive.
B16CH3 OTS CH$ String Searching 25-Jan-1983 16:48:19 TOPS-20 Bliss-16 2A(530) Page 1
25-Jan-1983 16:44:11 NETPKG:<BLIS16>B16CH3.B16.1 (1)
; 0001 MODULE B16CH3 (IDENT = '2-5' %TITLE'OTS CH$ String Searching'
; 0002 ,LANGUAGE(BLISS16)
; 0003 ) =
; 0004 BEGIN
; 0005
; 0006 !
; 0007 ! COPYRIGHT (c) 1977,1978,1979,1980,1981,1982 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:
; 0027 ! Bliss-16 (and Bliss-16C/Bliss-11) Object Time System (OTS)
; 0028 !
; 0029 ! ABSTRACT:
; 0030 ! Implements Simple String Searches Ch$Find_Ch and
; 0031 ! CH$FIND_NOT_CH.
; 0032 !
; 0033 ! ENVIRONMENT:
; 0034 ! May be compiled with /ENVIRONMENT:EIS or /ENVIRONMENT:NOEIS
; 0035 !
; 0036 ! AUTHOR: %(/**/)%, CREATION DATE: %(/**/)%
; 0037 !
; 0038 ! MODIFIED BY:
; 0039 !
; 0040 !
; 0041 ! 1. 13-SEP-77 JAH CONVERT TO MORE EFFICIENT CODE.
; 0042 !
; 0043 ! 2. 31-JAN-78 JAH ELIMINATE DUPLICATE LABEL 'LOOP'.
; 0044 !
; 0045 ! 3. 4-MAY-79 JAH ADD ADDITIONAL ENTRY POINTS.
; 0046 !
; 0047 ! 4. 13-Feb-80 DGF BROUGHT INTO CONFORMANCE WITH SOFTWARE STANDARDS.
; 0048 !
; 0049 ! 5. 18-FEB-80 DGF MOVE BLISS-11 ENTRY POINTS TO B16B11
; 0050 !--
; 0051 !
; 0052 ! TABLE OF CONTENTS:
B16CH3 OTS CH$ String Searching 25-Jan-1983 16:48:19 TOPS-20 Bliss-16 2A(530) Page 2
2-5 25-Jan-1983 16:44:11 NETPKG:<BLIS16>B16CH3.B16.1 (1)
; 0053 !
; 0054
; 0055 FORWARD ROUTINE
; 0056 BL$FCH,
; 0057 BL$FNC;
; 0058
; 0059 MACRO
; 0060 BLANK=%NAME(' ')(WRITE,EXECUTE,LOCAL,CONCATENATE) %,
; 0061 ELIF=ELSE IF%;
; 0062
; 0063 PSECT
; 0064 CODE=BLANK,
; 0065 PLIT=BLANK,
; 0066 OWN=BLANK;
B16CH3 OTS CH$ String Searching 25-Jan-1983 16:48:19 TOPS-20 Bliss-16 2A(530) Page 3
2-5 25-Jan-1983 16:44:11 NETPKG:<BLIS16>B16CH3.B16.1 (2)
; 0067 GLOBAL ROUTINE BL$FCH(LEN,SRC,CHAR) = !(3)
; 0068 !+
; 0069 ! FUNCTIONAL DESCRIPTION:
; 0070 ! FINDS THE FIRST OCCURRENCE OF A CHARACTER IN A STRING.
; 0071 !
; 0072 ! INPUTS:
; 0073 ! LEN: LENGTH OF THE STRING
; 0074 ! SRC: POINTER TO THE STRING
; 0075 ! CHAR: THE CHARACTER TO BE SOUGHT.
; 0076 !
; 0077 ! VALUE:
; 0078 ! POINTER TO THE CHARACTER FOUND. IF NONE FOUND, A NULL
; 0079 ! POINTER.
; 0080 !-
; 0081 BEGIN
; 0082
; 0083 LOCAL
; 0084 SPTR;
; 0085
; 0086 LABEL !(1)
; 0087 LOOP; !(1)
; 0088
; 0089 SPTR = .SRC; ! INITIALIZE.
; 0090
; 0091 LOOP: BEGIN !(1)
; 0092 DECR K FROM .LEN TO 1 DO !(1)
; 0093 IF CH$RCHAR_A(SPTR) EQL CH$RCHAR(CHAR) !(1)
; 0094 THEN LEAVE LOOP; !(1)
; 0095 RETURN 0 !(1)
; 0096 END; !(1)
; 0097
; 0098 RETURN CH$PLUS(.SPTR, -1) !(1)
; 0099
; 0100 END;
.TITLE B16CH3 OTS CH$ String Searching
.IDENT /2.5/
.SBTTL BL$FCH
000000 .PSECT .
000000 010146 BL$FCH::MOV R1,-(SP) ; 0067
000002 016600 000006 MOV 6(SP),R0 ; SRC,SPTR 0089
000006 016601 000010 MOV 10(SP),R1 ; LEN,K 0092
000012 003407 BLE 3$
000014 122066 000004 1$: CMPB (R0)+,4(SP) ; SPTR,CHAR 0093
000020 001402 BEQ 2$ ; 0094
000022 077104 SOB R1,1$ ; K,* 0000
000024 000402 BR 3$ ; 0081
000026 005300 2$: DEC R0 ; SPTR 0098
000030 000401 BR 4$ ; 0081
B16CH3 OTS CH$ String Searching 25-Jan-1983 16:48:19 TOPS-20 Bliss-16 2A(530) Page 4
2-5 25-Jan-1983 16:44:11 NETPKG:<BLIS16>B16CH3.B16.1 (2)
000032 005000 3$: CLR R0 ; 0067
000034 012601 4$: MOV (SP)+,R1
000036 000207 RTS PC
; Routine Size: 16 words, Routine Base: . + 0000
; Maximum stack depth per invocation: 2 words
; 0101
B16CH3 OTS CH$ String Searching 25-Jan-1983 16:48:19 TOPS-20 Bliss-16 2A(530) Page 5
2-5 25-Jan-1983 16:44:11 NETPKG:<BLIS16>B16CH3.B16.1 (3)
; 0102 GLOBAL ROUTINE BL$FNC(LEN,SRC,CHAR) =
; 0103 !+
; 0104 ! FUNCTIONAL DESCRIPTION:
; 0105 ! FINDS FIRST CHARACTER IN A STRING NEQ TO A SPECIFIED ONE.
; 0106 !
; 0107 ! INPUTS:
; 0108 ! LEN: LENGTH OF THE STRING
; 0109 ! SRC: POINTER TO THE STRING
; 0110 ! CHAR: THE CHARACTER TO BE ALLOWED.
; 0111 !
; 0112 ! VALUE:
; 0113 ! POINTER TO THE CHARACTER FOUND. IF NONE FOUND, A NULL
; 0114 ! POINTER.
; 0115 !-
; 0116 BEGIN
; 0117
; 0118 LOCAL
; 0119 SPTR;
; 0120
; 0121 LABEL !(1)
; 0122 NLOOP; !(2)
; 0123
; 0124 SPTR = .SRC; ! INITIALIZE.
; 0125
; 0126 NLOOP: BEGIN !(2)
; 0127 DECR K FROM .LEN TO 1 DO !(1)
; 0128 IF CH$RCHAR_A(SPTR) NEQ CH$RCHAR(CHAR) !(1)
; 0129 THEN LEAVE NLOOP; !(2)
; 0130 RETURN 0 !(1)
; 0131 END; !(1)
; 0132
; 0133 RETURN CH$PLUS(.SPTR, -1) !(1)
; 0134
; 0135
; 0136 END;
.SBTTL BL$FNC
000000 010146 BL$FNC::MOV R1,-(SP) ; 0102
000002 016600 000006 MOV 6(SP),R0 ; SRC,SPTR 0124
000006 016601 000010 MOV 10(SP),R1 ; LEN,K 0127
000012 003407 BLE 3$
000014 122066 000004 1$: CMPB (R0)+,4(SP) ; SPTR,CHAR 0128
000020 001002 BNE 2$ ; 0129
000022 077104 SOB R1,1$ ; K,* 0000
000024 000402 BR 3$ ; 0116
000026 005300 2$: DEC R0 ; SPTR 0133
000030 000401 BR 4$ ; 0116
000032 005000 3$: CLR R0 ; 0102
000034 012601 4$: MOV (SP)+,R1
000036 000207 RTS PC
B16CH3 OTS CH$ String Searching 25-Jan-1983 16:48:19 TOPS-20 Bliss-16 2A(530) Page 6
2-5 25-Jan-1983 16:44:11 NETPKG:<BLIS16>B16CH3.B16.1 (3)
; Routine Size: 16 words, Routine Base: . + 0040
; Maximum stack depth per invocation: 2 words
; 0137
; 0138
; 0139 END ELUDOM
; PSECT SUMMARY
;
; Psect Name Words Attributes
; . 32 RW , I , LCL, REL, CON
; Size: 32 code + 0 data words
; Run Time: 00:00.8
; Elapsed Time: 00:01.2
; Memory Used: 4 pages
; Compilation Complete