BTUTIL          - UTILITY ROUTINES FOR BACK TRANSLATOR           22-AUG-1978 05:16:53   VAX-11 MACRO X0.3-11               Page   1

123077                                                                                                                           (1)



                                     0000     1 	.TITLE	BTUTIL - UTILITY ROUTINES FOR BACK TRANSLATOR

                                     0000     2 	.IDENT	/123077/

                                     0000     3  

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1977

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000     7 ;

                                     0000     8 ; THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

                                     0000     9 ; SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

                                     0000    10 ; SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

                                     0000    11 ; OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

                                     0000    12 ; AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

                                     0000    13 ; AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

                                     0000    14 ; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

                                     0000    15 ;

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

                                     0000    17 ; NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

                                     0000    18 ; EQUIPMENT CORPORATION.

                                     0000    19 ;

                                     0000    20 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

                                     0000    21 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    22 ;

                                     0000    23 ; H.J.	AUGUST 1977

                                     0000    24 ;

                                     0000    25 ; BACKTRANSLATOR UTILITY ROUTINES

                                     0000    26 ;

BTUTIL          - UTILITY ROUTINES FOR BACK TRANSLATOR           22-AUG-1978 05:16:53   VAX-11 MACRO X0.3-11               Page   2

123077                                                                                                                           (2)



                                     0000    28 ;

                                     0000    29 ; MACRO LIBRARY CALLS

                                     0000    30 ;

                                     0000    31 	$BTDEFS				;DEFINE VALUES TO BE USED LOCALLY

                                     0000       	.SAVE

                                 00000000       	.PSECT	$ABS$,ABS

                                     0000       	.RESTORE

                                     0000    32 

                                     0000    33 ;

                                     0000    34 ; LOCAL SYMBOLS

                                     0000    35 ;

                                     0000    36 

                                     0000    37 ;

                                     0000    38 ; ARGUMENT LIST OFFSET DEFINITIONS

                                     0000    39 ;

                                     0000    40 

                                     0000    41 ;

                                     0000    42 ; LOCAL DATA

                                     0000    43 ;

                                     0000    44 		IMPURE

                                 00000000       	.PSECT	IMPURE_	LONG,RD,WRT,NOEXE

                                     0000    45 ;

                                     0000    46 ;

                                     0000    47 ;

                           00000004' 0000    48 ARGSLISTPTR::	.LONG	ARGSLIST	;CURRENT POINTER INTO STRING AREA

                           0000007C  0004    49 ARGSLIST::	.BLKB	120		;AREA TO KEEP ARGS, USUALLY FILESPECS

                           0000007B  007C    50 ARGSENDPTR	==.-1			;HIGH ADDRESS OF LEGEAL AREA

                                     007C    51 

                           00000080' 007C    52 OPTLISTPTR::	.LONG	OPTLIST		;CURRENT POINTER INTO STRING AREA

                           000000F7  0080    53 OPTLIST::	.BLKB	119		;AREA TO KEEP TRANSLATE STRINGS

                           000000F6  00F7    54 OPTENDPTR	==.-1			;HIGH ADDRESS OF LEGAL AREA

                                 00  00F7    55 STRCHAR:	.BYTE			;LOCATION TO KEEP "STRING" FOR ADDCHAR

                                     00F8    56 

                                 00  00F8    57 PARAMLOC::	.BYTE	0		;USED TO CONTAIN FLAG OF WHERE TO PUT

                                     00F9    58 					;RESULT PARAMETERS

                                 00  00F9    59 LOCATION::	.BYTE	0		;USED TO CONTAIN FLAG OF WHERE TO PUT

                                     00FA    60 					;RESULT OPTIONS

                                 00  00FA    61 HOLDLOC::	.BYTE	0		;USED TO CONTAIN SAVED FLAG OF WHERE

                                     00FB    62 					;TO PUT RESULT OPTIONS

BTUTIL          - UTILITY ROUTINES FOR BACK TRANSLATOR           22-AUG-1978 05:16:53   VAX-11 MACRO X0.3-11               Page   3

123077                                                                                                                           (3)



                                     00FB    64 ;	.SBTTL	BUILD TRANSLATE STRING

                                     00FB    65 	PURE

                                 00000000       	.PSECT	PURE_	BYTE,RD,EXE,NOWRT

                                     0000    66 ;+

                                     0000    67 ; BACKTRANSLATOR UTILITY ROUTINES

                                     0000    68 ;

                                     0000    69 ; INSERT STRING   ENTER A NEW STRING OF TRANSLATION CHARACTERS

                                     0000    70 ;

                                     0000    71 ; INPUTS:

                                     0000    72 ;   LOCATION::  IDENTIFIES WHERE TEXT IS TO GO IN RESULT STRING

                                     0000    73 ;	R10 ->  RESULT STRING CHARACTERS

                                     0000    74 ;	R9  ->  LENGTH

                                     0000    75 ;

                                     0000    76 ;

                                     0000    77 ; OUTPUTS:

                                     0000    78 ;   USES ROUTINE ADDSTR TO ADD CHARACTERS TO OPTLIST

                                     0000    79 ;

                                     0000    80 ;-

                                     0000    81 INSERTSTR::

       007C'DF       00F9'CF     90  0000    82 	MOVB	W^LOCATION,@W^OPTLISTPTR;STORE IDENTIFIER FLAG IN STRING

                     007C'CF     D6  0007    83 	INCL	W^OPTLISTPTR		;BUMP POINTER

                                     000B    84 					;FALL INTO ROUTINE ADDSTR

                                     000B    85 

                                     000B    86 ;+

                                     000B    87 ; ADDSTR  ADD TEXT CHARACTERS TO THE LAST IDENTIFIED STRING

                                     000B    88 ;

                                     000B    89 ; INPUTS:

                                     000B    90 ;	R10 ->  RESULT STRING CHARACTERS

                                     000B    91 ;	R9  ->  LENGTH

                                     000B    92 ;

                                     000B    93 ;

                                     000B    94 ; OUTPUTS:

                                     000B    95 ;	OPTLIST CONTAINS ADDITIONAL CHARACTERS

                                     000B    96 ;

                                     000B    97 ;-

                                     000B    98 ADDSTR::

            53       007C'CF     D0  000B    99 	MOVL	W^OPTLISTPTR,R3		;GET POINTER TO INSERTION LOCATION

                     00F6'CF     9F  0010   100 	PUSHAB	W^OPTENDPTR		;CHECK TO MAKE SURE WITHIN BOUNDS

                          6349   9F  0014   101 	PUSHAB	(R3)[R9]		;PUSH ADDRESS OF RESULTANT STRING

            8E            8E     D1  0017   102 	CMPL	(SP)+,(SP)+		;ARE WE WITHIN OPTLIST?

                          0A     1E  001A   103 	BGEQU	TOOBIG			;BRANCH IF RESULT STRING TOO LARGE

            6A            59     28  001C   104 	MOVC3	R9,(R10),(R3)		;PUT IN CHARACTERS

                          63         001F       

                                     0020   105 

       007C'CF            53     D0  0020   106 	MOVL	R3,W^OPTLISTPTR		;UPDATE TEXT POINTER

                                 05  0025   107 	RSB				;RETURN

                                     0026   108 

                                     0026   109 TOOBIG:	ERROR	STRINGOVR,FATAL		;ABORT ON ERROR

            50            14     9A  0026       	MOVZBL	#BTR$_STRINGOVR+FATAL&^XFF,R0

                          FFD4'  31  0029       	BRW	ERR_EXIT

                                     002C   110 

                                     002C   111 ;+

                                     002C   112 ; ADDCHAR  ADD A SINGLE CHARACTER TO LAST IDENTIFIED STRING

                                     002C   113 ;

                                     002C   114 ; INPUTS:

                                     002C   115 ;	R7 CONTAINS CHARACTER

                                     002C   116 ;

BTUTIL          - UTILITY ROUTINES FOR BACK TRANSLATOR           22-AUG-1978 05:16:53   VAX-11 MACRO X0.3-11               Page   4

123077                                                                                                                           (3)



                                     002C   117 ; OUTPUTS:

                                     002C   118 ;   USES ROUTINE ADDSTR TO ADD CHARACTERS TO OPTLIST

                                     002C   119 ;

                                     002C   120 ;-

                                     002C   121 ADDCHAR::

                     0600 8F     BB  002C   122 	PUSHR	#^M<R9,R10>		;SAVE REGS

            5A       00F7'CF     9E  0030   123 	MOVAB	W^STRCHAR,R10		;POINT TO DUMMY STRING

            6A            57     90  0035   124 	MOVB	R7,(R10)		;STORE THE CHARACTER THERE

            59            01     B0  0038   125 	MOVW	#1,R9			;SET UP THE FAKE COUNT

                          CE     10  003B   126 	BSBB	ADDSTR			;INSERT THE CHARACTER

                     0600 8F     BA  003D   127 	POPR	#^M<R9,R10>		;RESTORE THE REGS

                                 05  0041   128 	RSB				;RETURN

                                     0042   129 

                                     0042   130 ;+

                                     0042   131 ; INSERT ARGUMENT   ENTER A NEW STRING (USUALLY A FILE SPEC)

                                     0042   132 ;		    OF CHARACTERS

                                     0042   133 ;

                                     0042   134 ; INPUTS:

                                     0042   135 ;   PARAMLOC::  IDENTIFIES WHERE TEXT IS TO GO IN RESULT STRING

                                     0042   136 ;	R10 ->  RESULT STRING CHARACTERS

                                     0042   137 ;	R9  ->  LENGTH

                                     0042   138 ;

                                     0042   139 ;

                                     0042   140 ; OUTPUTS:

                                     0042   141 ;	ARGSLIST CONTAINS ADDITIONAL CHARACTERS

                                     0042   142 ;

                                     0042   143 ;-

                                     0042   144 INSERTARG::

       0000'DF       00F8'CF     90  0042   145 	MOVB	W^PARAMLOC,@W^ARGSLISTPTR ;STORE IDENTIFIER FLAG IN STRING

                     0000'CF     D6  0049   146 	INCL	W^ARGSLISTPTR		;BUMP POINTER

            53       0000'CF     D0  004D   147 	MOVL	W^ARGSLISTPTR,R3	;GET POINTER TO INSERTION LOCATION

                     007B'CF     9F  0052   148 	PUSHAB	W^ARGSENDPTR		;CHECK TO MAKE SURE WITHIN BOUNDS

                          6349   9F  0056   149 	PUSHAB	(R3)[R9]		;PUSH ADDRESS OF RESULTANT STRING

            8E            8E     D1  0059   150 	CMPL	(SP)+,(SP)+		;ARE WE WITHIN ARGSLIST?

                          C8     1E  005C   151 	BGEQU	TOOBIG			;BRANCH IF RESULT STRING TOO LARGE

            6A            59     28  005E   152 	MOVC3	R9,(R10),(R3)		;PUT IN CHARACTERS

                          63         0061       

                                     0062   153 

       0000'CF            53     D0  0062   154 	MOVL	R3,W^ARGSLISTPTR	;UPDATE TEXT POINTER

                                 05  0067   155 	RSB				;RETURN

                                     0068   156 

                                     0068   157 

                                     0068   158 	.END

BTUTIL          - UTILITY ROUTINES FOR BACK TRANSLATOR           22-AUG-1978 05:16:53   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (3)



ADDCHAR          0000002C RG    04   PROG_LIB       = 0000000A            

ADDSTR           0000000B RG    04   PROG_MAC       = 00000004            

ARGSENDPTR     = 0000007B RG    03   PROG_MAR       = 00000003            

ARGSLIST         00000004 RG    03   PROG_PIP       = 00000001            

ARGSLISTPTR      00000000 RG    03   PROG_SLP       = 00000006            

BIT...         = 00000008            PROG_SOS       = 00000005            

BTR$M_DECIMAL  = 00000080            PROG_SRT       = 0000000E            

BTR$M_EXPLICIT = 00000020            PROG_TKB       = 00000009            

BTR$M_FORCE    = 00000002            PROG_UFD       = 0000000D            

BTR$M_LIST     = 00000040            SAVE_REG_MASK  = 00000FFC            

BTR$M_MULTKEY  = 00000010            STRCHAR          000000F7 R     03   

BTR$M_RETURN   = 00000001            TOOBIG           00000026 R     04   

BTR$M_TEMPPOS  = 00000004            

BTR$M_VALREQ   = 00000008            

BTR$V_DECIMAL  = 00000007            

BTR$V_EXPLICIT = 00000005            

BTR$V_FORCE    = 00000001            

BTR$V_LIST     = 00000006            

BTR$V_MULTKEY  = 00000004            

BTR$V_RETURN   = 00000000            

BTR$V_TEMPPOS  = 00000002            

BTR$V_VALREQ   = 00000003            

BTR$_AMBIGKEYW = 00688030            

BTR$_ILLEGOPT  = 00688018            

BTR$_IMGFNF    = 00688060            

BTR$_INTFAIL   = 00688048            

BTR$_INVALKEYW = 00688028            

BTR$_KEYVALOVR = 00688038            

BTR$_MISSNGVAL = 00688008            

BTR$_NOTIMPLEM = 00688020            

BTR$_OPTVALOVR = 00688050            

BTR$_STRINGOVR = 00688010            

BTR$_TOOMANY   = 00688058            

BTR$_UNEXPLIST = 00688040            

BTRAN          = 00680000            

ERR_EXIT         ********   X   04   

FATAL          = 00000004            

GBL...         = 00000000            

HOLDLOC          000000FA RG    03   

INSERTARG        00000042 RG    04   

INSERTSTR        00000000 RG    04   

LAST_PARAM     = FFFFFFEC            

LOCATION         000000F9 RG    03   

NONE           = 00000000            

OPTENDPTR      = 000000F6 RG    03   

OPTLIST          00000080 RG    03   

OPTLISTPTR       0000007C RG    03   

PARAMLOC         000000F8 RG    03   

PRIM_INPUT     = FFFFFFF6            

PRIM_OUTPUT    = 00000000            

PROG_BP2       = 0000000C            

PROG_CBL       = 00000008            

PROG_CNT       = 0000000F            

PROG_DIF       = 0000000F            

PROG_DMP       = 00000007            

PROG_F4V       = 00000002            

PROG_LBR       = 0000000B            

BTUTIL          - UTILITY ROUTINES FOR BACK TRANSLATOR           22-AUG-1978 05:16:53   VAX-11 MACRO X0.3-11               Page   6

PROGRAM SECTION SYNOPSIS                                                                                                         (3)







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  

$ABS$            00000000      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

IMPURE_          000000FB      03     NOPIC   USR   CON   REL   LCL NOSHR NOEXE   RD    WRT LONG  

PURE_            00000068      04     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

24676. BYTES LEFT IN FREE MEMORY POOL.

14. BYTES OF RECLAIMED MEMORY.

OBJ$:UTIL,LIS$:UTIL/-SP/LI:MEB=EXECML$/ML,LIB$:B/ML,SRC$:UTIL

19 MLB DIR RDS - 149 GETS TO DEFINE 14 MACROS. 14 INTER. FILE WRITES. 

