LIB$SCANC       - scan for character                             21-AUG-1978 18:59:15   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      88  DECLARATIONS

   (3)     111  LIB$SCANC  - scan characters 

LIB$SCANC       - scan for character                             21-AUG-1978 18:59:15   VAX-11 MACRO X0.3-11               Page   1

00-03                                                                                                                            (1)



                                     0000     1 	.TITLE	LIB$SCANC - scan for character 

                                     0000     2 	.IDENT	/00-03/			; File: LIBSCANC.MAR

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ;			  COPYRIGHT (c) 1977 BY

                                     0000     6 ;	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000     7 ;

                                     0000     8 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED

                                     0000     9 ; ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE

                                     0000    10 ; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER

                                     0000    11 ; COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY

                                     0000    12 ; OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY

                                     0000    13 ; TRANSFERRED.

                                     0000    14 ;

                                     0000    15 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE

                                     0000    16 ; AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT

                                     0000    17 ; CORPORATION.

                                     0000    18 ;

                                     0000    19 ; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS

                                     0000    20 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

                                     0000    21 ;

                                     0000    22 

                                     0000    23 ;++

                                     0000    24 ; FACILITY: General Utility Library

                                     0000    25 ;

                                     0000    26 ; ABSTRACT:

                                     0000    27 ;

                                     0000    28 ;	Return an index into the source string of the satisfying character or zero

                                     0000    29 ;

                                     0000    30 ; ENVIRONMENT: User Mode, AST Reentrant

                                     0000    31 ;

                                     0000    32 ;--

                                     0000    33 ; AUTHOR: Donald G. Petersen, CREATION DATE: 03-Jan-78

                                     0000    34 ;

                                     0000    35 ; MODIFIED BY:

                                     0000    36 ;

                                     0000    37 ;	DGP, 03-Jan-78 : VERSION 00

                                     0000    38 ; 01	- Original 

                                     0000    39 ; 00-02	- DGP 05-Jan-78 - table.rbu.ra for table.rt.dx

                                     0000    40 ; 00-03	- DGP 18-Jan-78 - remove one instruction

LIB$SCANC       - scan for character                             21-AUG-1978 18:59:15   VAX-11 MACRO X0.3-11               Page   2

00-03           DECLARATIONS                                                                                                     (2)



                                     0000    42 	.SBTTL	DECLARATIONS

                                     0000    43 ;

                                     0000    44 ; INCLUDE FILES:

                                     0000    45 ;

                                     0000    46 

                                     0000    47 ;

                                     0000    48 ; MACROS:

                                     0000    49 ;

                                     0000    50 

                                     0000    51 ;

                                     0000    52 ; EQUATED SYMBOLS:

                                     0000    53 ;

                                     0000    54 

                                     0000    55 ;

                                     0000    56 ; OWN STORAGE:

                                     0000    57 ;

                                     0000    58 

                                     0000    59 ;

                                     0000    60 ; PSECT DECLARATIONS:

                                     0000    61 ;

                                 00000000    62 	.PSECT LIB$CODE PIC, SHR, LONG, EXE, NOWRT

                                     0000    63 

LIB$SCANC       - scan for character                             21-AUG-1978 18:59:15   VAX-11 MACRO X0.3-11               Page   3

00-03           LIB$SCANC  - scan characters                                                                                     (3)



                                     0000    65 	.SBTTL	LIB$SCANC  - scan characters 

                                     0000    66 ;++

                                     0000    67 ; FUNCTIONAL DESCRIPTION:

                                     0000    68 ;

                                     0000    69 ;	The bytes of the string specified by the source descriptor are successively

                                     0000    70 ;	used to index into a the table.

                                     0000    71 ;	The byte selected from the table is ANDed with the mask byte specified

                                     0000    72 ;	by the mask descriptor.  The operation continues until the result of the

                                     0000    73 ;	AND is non-zero.  The relative position of the character in the source string

                                     0000    74 ;	which terminated the operation is returned if one is found.  Otherwise, zero

                                     0000    75 ;	is returned.  If the source striing has a length of zero then a zero is

                                     0000    76 ;	returned.

                                     0000    77 ;

                                     0000    78 ; CALLING SEQUENCE:

                                     0000    79 ;

                                     0000    80 ;	index.wlu.v = LIB$SCANC (src.rt.dx, table.rbu.ra, mask.rbu.r)

                                     0000    81 ;

                           00000004  0000    82 	SOURCE = 4				; Adr of source string desc

                           00000008  0000    83 	TABLE = 8				; Adr of base of table

                           0000000C  0000    84 	MASK = 12				; adr of mask byte

                                     0000    85 

                                     0000    86 ; INPUT PARAMETERS:

                                     0000    87 ;

                                     0000    88 ;	NONE

                                     0000    89 ;

                                     0000    90 ; IMPLICIT INPUTS:

                                     0000    91 ;

                                     0000    92 ;	NONE

                                     0000    93 ;

                                     0000    94 ; OUTPUT PARAMETERS:

                                     0000    95 ;

                                     0000    96 ;	NONE

                                     0000    97 ;

                                     0000    98 ; IMPLICIT OUTPUTS:

                                     0000    99 ;

                                     0000   100 ;	NONE

                                     0000   101 ;

                                     0000   102 ; FUNCTION VALUE:

                                     0000   103 ;

                                     0000   104 ;	index.wlu.v

                                     0000   105 ;

                                     0000   106 ; SIDE EFFECTS:

                                     0000   107 ;

                                     0000   108 ;	NONE

                                     0000   109 ;

                                     0000   110 ;--

                                     0000   111 

                               0000' 0000   112 	.ENTRY LIB$SCANC , ^M< >		; Entry point

                                     0002   113 

            50         04 BC     7D  0002   114 	MOVQ	@SOURCE(AP), R0			; R0/R1 = source len and adr

            61            50     2A  0006   115 	SCANC	R0, (R1), @TABLE(AP), @MASK(AP)	; Scan character

         0C BC         08 BC         0009       

                          07     13  000D   116 	BEQL	10$				; branch if no character found

         04 BC            50     A3  000F   117 	SUBW3	R0, @SOURCE(AP), R0		; get position of character

                          50         0013       

                          50     D6  0014   118 	INCL	R0				; one origin

                                 04  0016   119 10$:	RET

LIB$SCANC       - scan for character                             21-AUG-1978 18:59:15   VAX-11 MACRO X0.3-11               Page   4

00-03           LIB$SCANC  - scan characters                                                                                     (3)



                                     0017   120 	.END

LIB$SCANC       - scan for character                             21-AUG-1978 18:59:15   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (3)



FOR$K_ERR_PREFX= 00000018            

LIB$SCANC        00000000 RG    02   

MASK           = 0000000C            

MTH$K_ERR_PREFX= 00000016            

MTH__FLOOVEMAT = 00000058            

MTH__FLOUNDMAT = 00000059            

MTH__INVARG    = 00000051            

MTH__LOGZERNEG = 00000053            

MTH__SINSIGLOS = 00000057            

MTH__SQUROONEG = 00000054            

MTH__UNDEXP    = 00000052            

MTH__WRONUMARG = 00000050            

SOURCE         = 00000004            

TABLE          = 00000008            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

LIB$CODE         00000017      02       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

28000. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:LIBSCANC,LIS$:LIBSCANC/-SP=LIB$:S/ML,SRC$:P,LIBSCANC

0 MLB DIR RDS - 0 GETS TO DEFINE 0 MACROS. 2 INTER. FILE WRITES. 

