LIB$MOVTUC      - move translated until escape character         21-AUG-1978 18:59:01   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      89  DECLARATIONS

   (3)     112  LIB$MOVTUC  - translate and move until escape f

LIB$MOVTUC      - move translated until escape character         21-AUG-1978 18:59:01   VAX-11 MACRO X0.3-11               Page   1

00-03                                                                                                                            (1)



                                     0000     1 	.TITLE	LIB$MOVTUC - move translated until escape character 

                                     0000     2 	.IDENT	/00-03/			; File: LIBMOVTUC.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 ;	A translate and move of the source string to the destination is performed

                                     0000    29 ;	until an escape character is found.

                                     0000    30 ;

                                     0000    31 ; ENVIRONMENT: User Mode, AST Reentrant

                                     0000    32 ;

                                     0000    33 ;--

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

                                     0000    35 ;

                                     0000    36 ; MODIFIED BY:

                                     0000    37 ;

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

                                     0000    39 ; 01	- Original 

                                     0000    40 ; 00-02	- DGP 06-Jan-78 - Point to escape character properly

                                     0000    41 ; 00-03	- DGP 18-Jan-78 - add optional fifth argument (ECO)

LIB$MOVTUC      - move translated until escape character         21-AUG-1978 18:59:01   VAX-11 MACRO X0.3-11               Page   2

00-03           DECLARATIONS                                                                                                     (2)



                                     0000    43 	.SBTTL	DECLARATIONS

                                     0000    44 ;

                                     0000    45 ; INCLUDE FILES:

                                     0000    46 ;

                                     0000    47 

                                     0000    48 ;

                                     0000    49 ; MACROS:

                                     0000    50 ;

                                     0000    51 

                                     0000    52 ;

                                     0000    53 ; EQUATED SYMBOLS:

                                     0000    54 ;

                                     0000    55 

                                     0000    56 ;

                                     0000    57 ; OWN STORAGE:

                                     0000    58 ;

                                     0000    59 

                                     0000    60 ;

                                     0000    61 ; PSECT DECLARATIONS:

                                     0000    62 ;

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

                                     0000    64 

LIB$MOVTUC      - move translated until escape character         21-AUG-1978 18:59:01   VAX-11 MACRO X0.3-11               Page   3

00-03           LIB$MOVTUC  - translate and move until escape f                                                                  (3)



                                     0000    66 	.SBTTL	LIB$MOVTUC  - translate and move until escape found 

                                     0000    67 ;++

                                     0000    68 ; FUNCTIONAL DESCRIPTION:

                                     0000    69 ;

                                     0000    70 ;	Each character of the source string is used as an index into the translation

                                     0000    71 ;	table.  If the translation character is the escape character then the move halts.

                                     0000    72 ;	Otherwise the translated character is placed into the destination string.

                                     0000    73 ;	Translation continues until either the source or destination strings are

                                     0000    74 ;	exhausted, or an escape character is found.

                                     0000    75 ;	If an escape character is found, the relative index of the character in the

                                     0000    76 ;	source string which translated into the escape character is returned.  Otherwise

                                     0000    77 ;	a zero is returned.  If either string is of zero length, then a zero is returned.

                                     0000    78 ;

                                     0000    79 ; CALLING SEQUENCE:

                                     0000    80 ;

                                     0000    81 ;	esc_index.wlu.v = LIB$MOVTUC (src.rt.dx, esc.rt.dx, table.rt.dx, dst.wt.dx

                                     0000    82 ;					(,fill.rt.dx))

                                     0000    83 ;

                           00000004  0000    84 	SOURCE = 4				; Adr of source string desc.

                           00000008  0000    85 	ESC = 8					; Adr of escape string desc

                           0000000C  0000    86 	TABLE = 12				; Adr of translation table desc

                           00000010  0000    87 	DEST = 16				; Adr of destination string desc

                           00000014  0000    88 	FILL = 20				; Adr of fill character desc

                                     0000    89 

                                     0000    90 ; INPUT PARAMETERS:

                                     0000    91 ;

                                     0000    92 ;	NONE

                                     0000    93 ;

                                     0000    94 ; IMPLICIT INPUTS:

                                     0000    95 ;

                                     0000    96 ;	NONE

                                     0000    97 ;

                                     0000    98 ; OUTPUT PARAMETERS:

                                     0000    99 ;

                                     0000   100 ;	NONE

                                     0000   101 ;

                                     0000   102 ; IMPLICIT OUTPUTS:

                                     0000   103 ;

                                     0000   104 ;	NONE

                                     0000   105 ;

                                     0000   106 ; FUNCTION VALUE:

                                     0000   107 ;

                                     0000   108 ;	esc_index.wlu.v

                                     0000   109 ;

                                     0000   110 ; SIDE EFFECTS:

                                     0000   111 ;

                                     0000   112 ;	NONE

                                     0000   113 ;

                                     0000   114 ;--

                                     0000   115 

                               003C' 0000   116 	.ENTRY LIB$MOVTUC , ^M<R2, R3, R4, R5>		; Entry point

                                     0002   117 

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

            52         08 AC     D0  0006   119 	MOVL	ESC(AP), R2			; R2 points to escape desc

            53         0C AC     D0  000A   120 	MOVL	TABLE(AP), R3			; R3 points to table desc

            54         10 BC     7D  000E   121 	MOVQ	@DEST(AP), R4			; R4/R5 = dest len and adr

            61            50     2F  0012   122 	MOVTUC	R0, (R1), @4(R2), @4(R3), -	; translate and move until escape

LIB$MOVTUC      - move translated until escape character         21-AUG-1978 18:59:01   VAX-11 MACRO X0.3-11               Page   4

00-03           LIB$MOVTUC  - translate and move until escape f                                                                  (3)



         04 B3         04 B2         0015       

                                     0019       

            65            54         0019   123 		R4, (R5)

                          07     1C  001B   124 	BVC	10$				; branch if no escape

         04 BC            50     A3  001D   125 	SUBW3	R0, @SOURCE(AP), R0		; R0 = length of source - no. of bytes

                          50         0021       

                                     0022   126 						; remaining in source including

                                     0022   127 						;  escape character

                          50     D6  0022   128 	INCL	R0				; 1 - origin

            05            6C     91  0024   129 10$:	CMPB	(AP), #5			; Check for fill character

                          12     12  0027   130 	BNEQ	20$				; branch if no fill

            7E            50     3C  0029   131 	MOVZWL	R0, -(SP)			; save index on stack

            51         14 AC     D0  002C   132 	MOVL	FILL(AP), R1			; R1 points to FILL desc

         04 B1            01     2C  0030   133 	MOVC5	#1, @4(R1), @4(R1), R4, (R5)	; fill destination string

            54         04 B1         0034       

                          65         0037       

            50            8E     D0  0038   134 	MOVL	(SP)+, R0			; R0 = return value

                                 04  003B   135 20$:	RET

                                     003C   136 	.END

LIB$MOVTUC      - move translated until escape character         21-AUG-1978 18:59:01   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (3)



DEST           = 00000010            

ESC            = 00000008            

FILL           = 00000014            

FOR$K_ERR_PREFX= 00000018            

LIB$MOVTUC       00000000 RG    02   

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          = 0000000C            





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         0000003C      02       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

27958. BYTES LEFT IN FREE MEMORY POOL.

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

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

