RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)     134  RSX$ASCIIR50 - CONVERT ASCII STRING TO RAD50

   (3)     204  CONVERT TASK NAME

   (4)     234  CONVERT RAD50 TO ASCII

   (5)     287  MEMORY ALLOCATION SUBROUTINE

   (6)     356  DEALLOCATE MEMORY BLOCK

   (7)     404  CONVERT RSX11M TIME DATA TO DELTA TIME

   (8)     463  RSX$RSXQIOERR - MAP STARLET I/O STATUS TO RSX

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   1

V03.0                                                                                                                            (1)



                                     0000     1 

                                     0000     2 	.TITLE	RSXSUBROUTINES

                                     0000     3 	.IDENT	/V03.0/		;

                                     0000     4 

                                     0000     5 ;

                                     0000     6 ; COPYRIGHT (C) 1977

                                     0000     7 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     8 ;

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

                                     0000    10 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000    11 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000    12 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000    13 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000    14 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000    15 ; REMAIN IN DEC.

                                     0000    16 ;

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

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

                                     0000    19 ; CORPORATION.

                                     0000    20 ;

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

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

                                     0000    23 

                                     0000    24 ;++

                                     0000    25 ; FACILITY:

                                     0000    26 ;

                                     0000    27 ;	STARLET RSX11M COMPATIBILITY MODE EMULATOR

                                     0000    28 ;

                                     0000    29 ; ABSTRACT:

                                     0000    30 ;

                                     0000    31 ; 	THIS MODULE CONTAINS UTILITY SUBROUTINES FOR THE RSX.

                                     0000    32 ;--

                                     0000    33 ;

                                     0000    34 ; AUTHOR: R. HEINEN 1-OCT-76 

                                     0000    35 ;

                                     0000    36  

                                     0000    37 ;

                                     0000    38 ; EXTERNAL SYMBOLS

                                     0000    39 ;

                                     0000    40 	$RSXDEF			; DEFINE RSX SYMBOLS

                                     0000    41 	IOERR$			; DEFINE I/O ERROR CODES

                                     0000    42  

                                 00000000    43 	.PSECT	RSXCODE,NOWRT

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   2

V03.0           RSX$ASCIIR50 - CONVERT ASCII STRING TO RAD50                                                                     (2)



                                     0000    45 	.SBTTL	RSX$ASCIIR50 - CONVERT ASCII STRING TO RAD50

                                     0000    46 ;++

                                     0000    47 ; RSX$ASCIIR50 - CONVERT ASCII STRING TO RAD50

                                     0000    48 ;

                                     0000    49 ; FUNCTIONAL DESCRIPTION:

                                     0000    50 ;

                                     0000    51 ; THIS ROUTINE CONVERTS A ASCIZ STRING TO RAD50, PLACING THE RAD50

                                     0000    52 ; VALUES IN A SPECIFIED BUFFER. DOT CAN BE LEGAL OR ILLEGAL.

                                     0000    53 ;

                                     0000    54 ; INPUTS:

                                     0000    55 ;

                                     0000    56 ;	R0 = 0 IF DOT ILLEGAL

                                     0000    57 ;	R1 = ADDRESS OF THE ASCIZ STRING

                                     0000    58 ;	R4 = ADDRESS TO PLACE THE RAD50

                                     0000    59 ;	R6 = IMAGE STACK

                                     0000    60 ;	R10 = ADDRESS OF THE IMAGE IMPURE DATA BASE

                                     0000    61 ;	R11 = ADDRESS OF THE IMAGE

                                     0000    62 ;

                                     0000    63 ; OUTPUTS:

                                     0000    64 ;

                                     0000    65 ;	R1 = ADDRESS OF THE TERMINATING CHARACTER

                                     0000    66 ;	R4 = ADDRESS OF THE NEXT WORD IN THE OUTPUT BUFFER

                                     0000    67 ;	

                                     0000    68 ;	R5,R7,R8 ARE DISTROYED.

                                     0000    69 ;	R6,R10,R11 ARE PRESERVED.

                                     0000    70 ;--

                                     0000    71 RSX$ASCR503::				;

                          02     10  0000    72 	BSBB	RSX$ASCR501		; CONVERT THREE WORDS

                                     0002    73 RSX$ASCR502::				;

                          00     10  0002    74 	BSBB	RSX$ASCR501		; CONVERT TWO WORDS

                                     0004    75 RSX$ASCR501::				; CONVERT ONE WORD

            58            03     9A  0004    76 	MOVZBL	#3,R8			; SET UP COUNTER

                          55     D4  0007    77 	CLRL	R5			; RESET ACCUM.

            57            61     9A  0009    78 5$:	MOVZBL	(R1),R7			; GET THE CHARACTER

                          35     13  000C    79 	BEQL	22$			; IF EQL THEN DONE

            57            20     C2  000E    80 	SUBL	#32,R7			; SPACE OR LESS?

                          30     19  0011    81 	BLSS	22$			; IF LESS THEN DONE

                          35     13  0013    82 	BEQL	30$			; IF EQL THEN ADD ZERO

            57            10     C2  0015    83 	SUBL	#48-32,R7		; ADJUST FOR NUMBERS

                          11     1F  0018    84 	BLSSU	15$			; IF LSS THEN TRY $ OR .

            57            09     D1  001A    85 	CMPL	#9,R7			; IS IT A NUMBER?

                          28     1E  001D    86 	BGEQU	25$			; ADD DIRECTLY IF YES

            57            10     C2  001F    87 	SUBL	#64-48,R7		; GET CHARACTERS

                          1F     1F  0022    88 	BLSSU	22$			; IF LSS THEN ILLEGAL

            57            1A     D1  0024    89 	CMPL	#90-64,R7		; IN CHARACTER RANGE?

                          1A     1F  0027    90 	BLSSU	22$			; IF LSSU THEN ILLEGAL

                          1F     11  0029    91 	BRB	30$

                                     002B    92 ;

                                     002B    93 ; CHARACTER MUST BE DOT OR $

                                     002B    94 ;

            24            57     91  002B    95 15$:	CMPB	R7,#^A/$/		; DOLLAR?

                          0E     13  002E    96 	BEQL	20$			; IF EQL THEN CONTINUE

            2E            57     91  0030    97 	CMPB	R7,#^A/./		; DOT?

                          0E     12  0033    98 	BNEQ	22$			; IF NEQ THEN ILLEGAL CHARACTER

                          50     D5  0035    99 	TSTL	R0			; DOT LEGAL?

                          0A     13  0037   100 	BEQL	22$			; IF EQL THEN NO

            57            1C     9A  0039   101 	MOVZBL	#28,R7			; SET DOT CODE

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   3

V03.0           RSX$ASCIIR50 - CONVERT ASCII STRING TO RAD50                                                                     (2)



                          0C     11  003C   102 	BRB	30$			; AND CONTINUE

            57            1B     9A  003E   103 20$:	MOVZBL	#27,R7			; SET CODE FOR DOLLAR

                          07     11  0041   104 	BRB	30$			; CONTINUE

                          57     D4  0043   105 22$:	CLRL	R7			; CONVERT ILLEGAL CHARACTERS TO BLANK

                          05     11  0045   106 	BRB	35$			;

            57            1E     C0  0047   107 25$:	ADDL	#30,R7			; PLACE IN NUMERIC RANGE

                          51     D6  004A   108 30$:	INCL	R1			; POINT TO NEXT INPUT CHARACTER

            55            28     C4  004C   109 35$:	MULL	#40,R5			; CONVERT

            55            57     C0  004F   110 	ADDL	R7,R5			;

            B4            58     F5  0052   111 	SOBGTR	R8,5$			; CONTINUE

            84            55     B0  0055   112 	MOVW	R5,(R4)+		; INSERT CONVERTED WORD

                                 05  0058   113 	RSB

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   4

V03.0           CONVERT TASK NAME                                                                                                (3)



                                     0059   115 	.SBTTL	CONVERT TASK NAME

                                     0059   116 ;++

                                     0059   117 ; RSX$CVTNAME  -  CONVERT TASK NAME

                                     0059   118 ;

                                     0059   119 ; FUNCTIONAL DESCRIPTION:

                                     0059   120 ;

                                     0059   121 ; CONVERT A RAD50 TASK NAME TO ASCII AND PUT THE RESULTANT STRING

                                     0059   122 ; IN THE IMAGE SCRATCH AREA.

                                     0059   123 ;

                                     0059   124 ; INPUTS:

                                     0059   125 ;

                                     0059   126 ;	R5 = ADDRESS OF DPB+2

                                     0059   127 ;	R6 = CM IMAGE STACK POINTER

                                     0059   128 ;	R10 = IMAGE DATA BASE ADDRESS

                                     0059   129 ;	R11 = IMAGE HEADER ADDRESS

                                     0059   130 ;

                                     0059   131 ; OUTPUTS:

                                     0059   132 ;

                                     0059   133 ;	R7 = SIZE OF THE RESULTANT STRING

                                     0059   134 ;	R10,R10 ARE PRESERVED

                                     0059   135 ;--

                                     0059   136 RSX$CVTNAME::

            57         0C AA     9E  0059   137 	MOVAB	I_SCRATCH+12(R10),R7	; ADDRESS TARGET PLACE

            6A            57     D0  005D   138 	MOVL	R7,I_SCRATCH(R10)	; SET UP FOR SIZE CALC

         04 AA            57     D0  0060   139 	MOVL	R7,I_SCRATCH+4(R10)	; SET UP DESCRIPTOR

            54            55     D0  0064   140 	MOVL	R5,R4			; ADDRESS RAD50 BLOCK

                          0A     10  0067   141 	BSBB	RSX$R50CVT2		; CONVERT STRING

            57            6A     C3  0069   142 	SUBL3	I_SCRATCH(R10),R7,I_SCRATCH(R10); CALC SIZE

                          6A         006C       

                                 05  006D   143 	RSB				; AND RETURN

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   5

V03.0           CONVERT RAD50 TO ASCII                                                                                           (4)



                                     006E   145 	.SBTTL	CONVERT RAD50 TO ASCII

                                     006E   146 ;++

                                     006E   147 ; RSX$R50CVTN - CONVERT RAD50 TO ASCII

                                     006E   148 ;

                                     006E   149 ; FUNCTIONAL DESCRIPTION:

                                     006E   150 ;

                                     006E   151 ; THIS ROUTINE CONVERTS A VARRIABLE NUMBER OF WORDS OF RAD50 TO AN ASCII STRING.

                                     006E   152 ;

                                     006E   153 ; CALLING SEQUENCE:

                                     006E   154 ;

                                     006E   155 ;	BSBW	RSX$R50ASCII

                                     006E   156 ;

                                     006E   157 ;

                                     006E   158 ; INPUT PARAMETERS:

                                     006E   159 ;

                                     006E   160 ;	R4 = RAD50 BLOCK ADDRESS

                                     006E   161 ;	R7 = ADDRESS OF TARGET STRING

                                     006E   162 ;

                                     006E   163 ; OUTPUT PARAMETERS:

                                     006E   164 ;

                                     006E   165 ;	R4 = POINTER TO NEXT WORD TO CONVERT

                                     006E   166 ;	R7 = NEXT FREE BYTE IN TARGET STRING

                                     006E   167 ;

                                     006E   168 ; STRING IS IN STANDARD COUNT,TEXT FORMAT. BLANKS STOP THE CONVERTION.

                                     006E   169 ;--

                                     006E   170 RSX$R50CVT3::				; CONVERT THREE WORDS

            50            84     3C  006E   171 	MOVZWL	(R4)+,R0		; GET THE WORD

                          08     10  0071   172 	BSBB	CVT			; CONVERT A WORD

                                     0073   173 RSX$R50CVT2::				; CONVERT TWO WORDS

            50            84     3C  0073   174 	MOVZWL	(R4)+,R0		; GET WORD

                          03     10  0076   175 	BSBB	CVT			; CONVERT A WORD

                                     0078   176 RSX$R50CVT1::				; CONVERT ONE WORD

            50            84     3C  0078   177 	MOVZWL	(R4)+,R0		; GET THE WORD

                          51     D4  007B   178 CVT:	CLRL	R1			; SET HIGH HALF

            50            28     7B  007D   179 	EDIV	#40,R0,R0,-(SP)		; GET REMAINDER FOR EACH CHARACTER

            7E            50         0080       

            50            28     7B  0082   180 	EDIV	#40,R0,R0,-(SP)		;

            7E            50         0085       

            50            28     7B  0087   181 	EDIV	#40,R0,R0,-(SP)		;

            7E            50         008A       

            67            8E     F6  008C   182 	CVTLB	(SP)+,(R7)		; CONVERT FIRST CHARACTER

                          08     10  008F   183 	BSBB	50$			; 

            67            8E     F6  0091   184 	CVTLB	(SP)+,(R7)		; CONVERT SECOND CHARACTER

                          03     10  0094   185 	BSBB	50$			; 

            67            8E     F6  0096   186 	CVTLB	(SP)+,(R7)		; CONVERT THIRD CHARACTER

                          67     95  0099   187 50$:	TSTB	(R7)			; DONE?

                          14     13  009B   188 	BEQL	DONE			; IF EQL THEN YES

            67            1B     91  009D   189 	CMPB	#27,(R7)		; LETTER?

                          09     1A  00A0   190 	BGTRU	60$			; IF EQL THEN YES

                          03     13  00A2   191 	BEQL	55$			; IF EQL THEN DOLLAR

            67            09     80  00A4   192 	ADDB	#9,(R7)			;

            67         C9 8F     80  00A7   193 55$:	ADDB	#-55,(R7)		;

            67            20     80  00AB   194 60$:	ADDB	#32,(R7)		;

            87            20     80  00AE   195 65$:	ADDB	#32,(R7)+		;

                                 05  00B1   196 DONE:	RSB				;

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   6

V03.0           MEMORY ALLOCATION SUBROUTINE                                                                                     (5)



                                     00B2   198 	.SBTTL	MEMORY ALLOCATION SUBROUTINE

                                     00B2   199 ;++

                                     00B2   200 ; RSX$ALLOCATE - ALLOCATE MEMORY FROM DYNAMIC STORAGE POOL

                                     00B2   201 ;

                                     00B2   202 ; FUNCTIONAL DESCRIPTION:

                                     00B2   203 ;

                                     00B2   204 ; THIS ROUTINE ALLOCATES CORE BLOCKS FROM THE PER IMAGE CORE POOL

                                     00B2   205 ; WHICH IS RESIDENT JUST BELOW THE USER STACK. IF THE REQUIRED MEMORY

                                     00B2   206 ; IS NOT AVAILABLE, THEN A PAGE IS REQUESTED,LINKED INTO THE LIST AND

                                     00B2   207 ; THE OPERATION RETRIED.

                                     00B2   208 ;

                                     00B2   209 ; INPUTS:

                                     00B2   210 ;

                                     00B2   211 ;	R1 = SIZE OF BLOCK TO ALLOCATE

                                     00B2   212 ;	R10 = ADDRESS OF THE IMAGE DATA BASE

                                     00B2   213 ;	R11 = ADDRESS OF THE IMAGE HEADER

                                     00B2   214 ;

                                     00B2   215 ; OUTPUTS:

                                     00B2   216 ;

                                     00B2   217 ;	R0 = ADDRESS OF THE BLOCK ALLOCATED

                                     00B2   218 ;	R1 = SIZE OF ALLOCATED BLOCK

                                     00B2   219 ;	R8 = ADDRESS OF THE IMAGE REGISTER SAVE AREA

                                     00B2   220 ;	R10 = ADDRESS IF THE IMAGE DATA BASE

                                     00B2   221 ;	R11 = ADDRESS OF THE IMAGE HEADER

                                     00B2   222 ;--

                                     00B2   223 RSX$ALLOCATE::				; ALLOCATE BLOCK

            51            07     C0  00B2   224 	ADDL	#7,R1			; ROUND BLOCK SIZE TO QUAD WORD

            51            07     CA  00B5   225 	BICL	#7,R1			;

            50       0000'CF     9E  00B8   226 	MOVAB	W^RSX$A_POOL,R0		; ADDRESS CORE POOL LIST HEAD

            52            50     D0  00BD   227 10$:	MOVL	R0,R2			; COPY CURRENT BLOCK ADDRESS

            50            62     D0  00C0   228 	MOVL	(R2),R0			; ADDRESS NEXT BLOCK

                          21     13  00C3   229 	BEQL	100$			; IF EQUAL THEN FAILURE TO ALLOCATE

         04 A0            51     D1  00C5   230 	CMPL	R1,4(R0)		; IS THE NEXT BLOCK LARGE ENOUGH?

                          F2     1A  00C9   231 	BGTRU	10$			; IF GTRU THEN NO

                          15     13  00CB   232 	BEQL	20$			; IF EQL THEN EXACT FIT

         04 A0            51     C2  00CD   233 	SUBL	R1,4(R0)		; CALC NEW BLOCK SIZE

            51            50     C0  00D1   234 	ADDL	R0,R1			; CALC ADDRESS OF NEW NEXT ENTRY

            61            60     D0  00D4   235 	MOVL	(R0),(R1)		; INSERT LINK WORD

         04 A1         04 A0     D0  00D7   236 	MOVL	4(R0),4(R1)		; INSERT SIZE

            60            51     D0  00DC   237 	MOVL	R1,(R0)			; INSERT LINK TO FREE BLOCK

            51            50     C2  00DF   238 	SUBL	R0,R1			; CALC ALLOCATED SIZE

            62            60     D0  00E2   239 20$:	MOVL	(R0),(R2)		; LINK TO LIST

                                 05  00E5   240 	RSB				; RETURN

                                     00E6   241 ;

                                     00E6   242 ; ALLOCATION FAILURE

                                     00E6   243 ;

                                     00E6   244  

                                     00E6   245 100$:					;

                                     00E6   246  

                                     00E6   247 	.IF NDF	C$$ORE

                                     00E6   248  

                                     00E6   249 	PUSHR	#^M<R1,R3>		; SAVE NEEDED SIZE

                                     00E6   250 	CLRQ	-(SP)

                                     00E6   251 	MOVL	SP,R2

                                     00E6   252 	$EXPREG_S	#2,(R2),,#0	; CREATE THE SPACE

                                     00E6   253 	BLBC	R0,120$			; IF LOW CLEAR THEN FAILURE

                                     00E6   254 	MOVZWL	#1024,R1		; SET SIZE OF BLOCK

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   7

V03.0           MEMORY ALLOCATION SUBROUTINE                                                                                     (5)



                                     00E6   255 	MOVL	(R2),R0			; ADDRESS BLOCK

                                     00E6   256 	BSBB	RSX$DEALLOCATE		; DEALLOCATE IT TO POOL

                                     00E6   257 	POPR	#^M<R1,R2>		; REMOVE RETURN DATA

                                     00E6   258 	POPR	#^M<R1,R3>		; RESTORE SIZE

                                     00E6   259 	BRB	RSX$ALLOCATE		; TRY AGAIN

                                     00E6   260  

                                     00E6   261 	.ENDC

                                     00E6   262 ;

                                     00E6   263 ; FAILURE TO ALLOCATE ADDITIONAL SPACE

                                     00E6   264 ;

                                     00E6   265 120$:	$IMAGEABORT	#RSX$_INSFDYNMEM; ABORT IMAGE - OUT OF SPACE

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   8

V03.0           DEALLOCATE MEMORY BLOCK                                                                                          (6)



                                     00F0   267 	.SBTTL	DEALLOCATE MEMORY BLOCK

                                     00F0   268 ;++

                                     00F0   269 ; RSX$DEALLOCATE - DEALLOCATE MEMORY BLOCK TO CORE POOL

                                     00F0   270 ;

                                     00F0   271 ; FUNCTIONAL DESCRIPTION:

                                     00F0   272 ;

                                     00F0   273 ; THIS ROUTINE RETURNS ALLOCATED STORAGE TO THE PER IMAGE CORE POOL.

                                     00F0   274 ;

                                     00F0   275 ; INPUTS:

                                     00F0   276 ;

                                     00F0   277 ;	R0 = ADDRESS OF BLOCK TO RETURN

                                     00F0   278 ;	R1 = SIZE OF BLOCK TO RETURN

                                     00F0   279 ;	R8 = ADDRESS OF THE IMAGE REGISTER SAVE AREA

                                     00F0   280 ;	R10 = ADDRESS OF THE IMAGE DATA BASE

                                     00F0   281 ;	R11 = ADDRESS OF THE IMAGE HEADER

                                     00F0   282 ;

                                     00F0   283 ; OUTPUTS:

                                     00F0   284 ;

                                     00F0   285 ;	R8 = ADDRESS OF THE IMAGE REGISTER SAVE AREA

                                     00F0   286 ;	R10 = ADDRESS OF THE IMAGE DATA BASE

                                     00F0   287 ;	R11 = ADDRESS OF THE IMAGE HEADER

                                     00F0   288 ;--

                                     00F0   289 RSX$DEALLOCATE::			; DEALLOCATE MEMORY

            51            07     C0  00F0   290 	ADDL	#7,R1			; ROUND BLOCK SIZE

            51            07     CA  00F3   291 	BICL	#7,R1			;

            53       0000'CF     9E  00F6   292 	MOVAB	W^RSX$A_POOL,R3		; ADDRESS LIST HEAD

            52            53     D0  00FB   293 10$:	MOVL	R3,R2			; ADDRESS NEXT ENTRY

            53            62     D0  00FE   294 	MOVL	(R2),R3			; COPY LINK WORD

                          05     13  0101   295 	BEQL	20$			; IF EQL THEN END OF LIST

            53            50     D1  0103   296 	CMPL	R0,R3			; DEALLOCATE HERE?

                          F3     1E  0106   297 	BGEQU	10$			; IF GEQU THEN NO

            60            53     D0  0108   298 20$:	MOVL	R3,(R0)			; ASSUME NO AGLOMERATION

            51            50     C1  010B   299 	ADDL3	R0,R1,-(SP)		; CALC END OF BLOCK ADDRESS

                          7E         010E       

            8E            53     D1  010F   300 	CMPL	R3,(SP)+		; AGLOMERATE?

                          06     12  0112   301 	BNEQ	30$			; IF NEQ THEN NO

            60            83     D0  0114   302 	MOVL	(R3)+,(R0)		; SAVE LINK TO NEXT

            51            63     C0  0117   303 	ADDL	(R3),R1			; CALC NEW SIZE

                          52     DD  011A   304 30$:	PUSHL	R2			; CALC ADDRESS OF BLOCK

            82            50     D0  011C   305 	MOVL	R0,(R2)+		; ASSUME NO AGLOMERATION

            6E            62     C0  011F   306 	ADDL	(R2),(SP)		; ADD IN SIZE

            8E            50     D1  0122   307 	CMPL	R0,(SP)+		; END EQUAL TO BLOCK RELEASED?

                          09     12  0125   308 	BNEQ	40$			; IF YES THEN DONE

            51            62     C0  0127   309 	ADDL	(R2),R1			; ACCUMULATE BLOCK SIZE

            72            60     D0  012A   310 	MOVL	(R0),-(R2)		; MOVE LINK TO PREVIOUS

            50            52     D0  012D   311 	MOVL	R2,R0			; ADDRESS NEW FREE BLOCK

         04 A0            51     D0  0130   312 40$:	MOVL	R1,4(R0)		; INSERT SIZE OF BLOCK

                                 05  0134   313 	RSB				; AND RETURN

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page   9

V03.0           CONVERT RSX11M TIME DATA TO DELTA TIME                                                                           (7)



                                     0135   315 	.SBTTL	CONVERT RSX11M TIME DATA TO DELTA TIME

                                     0135   316 ;++

                                     0135   317 ; RSX$TIMEMAG - CONVERT RSX11M TIME DATA TO DELTA TIME

                                     0135   318 ;

                                     0135   319 ; FUNCTIONAL DESCRIPTION:

                                     0135   320 ;

                                     0135   321 ; THIS ROUTINE CONVERTS AN RSX11M TIME SPECIFICATION OF UNITS AND

                                     0135   322 ; MAGNITUDE TO A DELTA TIME QUAD WORD.

                                     0135   323 ;

                                     0135   324 ; INPUT:

                                     0135   325 ;

                                     0135   326 ;	R0 = TIME UNITS (1-4)

                                     0135   327 ;	R2 = TIME MAGNITUDE

                                     0135   328 ;	R10 = ADDRESS OF THE IMAGE DATA BASE

                                     0135   329 ;	R11 = ADDRESS OF THE IMAGE HEADER

                                     0135   330 ;

                                     0135   331 ; OUTPUTS:

                                     0135   332 ;

                                     0135   333 ;	R0,R1 = DELTA TIME QUAD WORD

                                     0135   334 ;	R2 = INDICATION OF SUCCESS (LOW SET IS SUCCESS)

                                     0135   335 ;

                                     0135   336 ;	R10,R11 ARE PRESERVED.

                                     0135   337 ;--

                                     0135   338 ;

                                     0135   339 ; LOCAL STORAGE

                                     0135   340 ;

                                 00000000   341 	.PSECT	RSXPURE,NOWRT,NOEXE

                                     0000   342 ;

                                     0000   343 ; TICKS PER UNIT TIME

                                     0000   344 ;

                           00000001  0000   345 TICKS:	.LONG	1			; TICKS PER SECOND

                           000003E8  0004   346 	.LONG	1000			; 1000 10,000'S IN A SECOND

                           0000EA60  0008   347 	.LONG	60*1000			; 60*1000 10,000'S IN A MIN.

                           0036EE80  000C   348 	.LONG	60*60*1000		; 3600*1000 10,000'S IN AN HOUR

                                     0010   349 ;

                                     0010   350 ; MAXIMUM VALUE OF MAGNITUDE PER UNIT

                                     0010   351 ;

                               8000  0010   352 MAX:	.WORD	1@15			; 15 BITS TICKS

                               8000  0012   353 	.WORD	1@15			; 15 BITS FOR SECOND

                               05A0  0014   354 	.WORD	60*24			; MINUTE

                               0018  0016   355 	.WORD	24			; HOUR

                                     0018   356  

                                 00000135   357 	.PSECT	RSXCODE,NOWRT

                                     0135   358  

                                     0135   359 RSX$TIMEMAG::				; CONVERT TIME TO DELTA TIME

            04            50     91  0135   360 	CMPB	R0,#4			; UNITS IN RANGE?

                          1B     1A  0138   361 	BGTRU	30$			; IF GTRU THEN YES

       000E'CF40          52     B1  013A   362 	CMPW	R2,W^MAX-2[R0]		; IN RANGE?

                          13     1A  0140   363 	BGTRU	30$			; IF GTR THEN NO

            52       FFFC'CF40   C4  0142   364 	MULL	W^TICKS-4[R0],R2	; GET NUMBER OF 10000000 UNITS

            52   FFFFD8F0 8F     7A  0148   365 	EMUL	#-10000,R2,#0,R0	; GET QUAD VALUE

            50            00         014F       

            52            01     9A  0151   366 	MOVZBL	#1,R2			; SET SUCCESS

                                 05  0154   367 	RSB				; AND RETURN

                                     0155   368 ;

                                     0155   369 ; SET PARAM ERROR

                                     0155   370 ;

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page  10

V03.0           CONVERT RSX11M TIME DATA TO DELTA TIME                                                                           (7)



                          52     D4  0155   371 30$:	CLRL	R2			; SET ERROR

                                 05  0157   372 	RSB				; AND RETURN

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page  11

V03.0           RSX$RSXQIOERR - MAP STARLET I/O STATUS TO RSX                                                                    (8)



                                     0158   374 	.SBTTL	RSX$RSXQIOERR - MAP STARLET I/O STATUS TO RSX

                                     0158   375 ;++

                                     0158   376 ; RSX$RSXQIOERR - MAP STARLET I/O STATUS TO RSX

                                     0158   377 ;

                                     0158   378 ; FUNCTIONAL DESCRIPTION:

                                     0158   379 ;

                                     0158   380 ; THIS ROUTINE MAPS A STARLET I/O STATUS VALUE TO A RSX VALUE

                                     0158   381 ; BY TABLE LOOKUP.

                                     0158   382 ;

                                     0158   383 ; INPUTS:

                                     0158   384 ;

                                     0158   385 ;	R0 = STARLET STATUS CODE

                                     0158   386 ;	R10 = ADDRESS OF THE IMAGE IMPURE DATA BASE

                                     0158   387 ;	R11 = ADDRESS OF THE IMAGE

                                     0158   388 ;

                                     0158   389 ; OUTPUTS:

                                     0158   390 ;

                                     0158   391 ;	R0 = STARLET STATUS CODE

                                     0158   392 ;	R1 = RSX VALUE

                                     0158   393 ;

                                     0158   394 ;	R10,R11 ARE PRESERVED.

                                     0158   395 ;--

                                     0158   396 RSX$RSXQIOERR::				; MAP STARLET TO RSX STATUS VALUE FOR QIO

            51            01     9A  0158   397 	MOVZBL	#1,R1			; ASSUME SUCCESS

            17            50     E8  015B   398 	BLBS	R0,20$			; DONE IF SUCCESS

            51       0000'CF     9E  015E   399 	MOVAB	W^RSX$A_RSXQIOERR,R1	; ADDRESS STATUS MAP TABLE

            81            50     B1  0163   400 10$:	CMPW	R0,(R1)+		; MATCH?

                          0A     13  0166   401 	BEQL	15$			; IF EQL THEN FOUND

                          81     B5  0168   402 	TSTW	(R1)+			; TABLE END?

                          F7     12  016A   403 	BNEQ	10$			; IF NEQ THEN NO

            51       FFFC 8F     32  016C   404 	CVTWL	#IE.VER,R1		; SET DEFAULT ERROR

                                 05  0171   405 	RSB				;

                                     0172   406 ;

                                     0172   407 ; RETURN MATCHED VALUE

                                     0172   408 ;

            51            61     32  0172   409 15$:	CVTWL	(R1),R1			; PICK UP RSX VALUE

                                 05  0175   410 20$:	RSB				; RETURN

                                     0176   411 ;

                                     0176   412 	.END

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page  12

SYMBOL TABLE                                                                                                                     (8)



$$MSG          = 00000000            H.IPS            0000000C            IE.IFU         = FFFFFFE7            

...GBL         = 00000000            H.ISP            00000010            IE.ILL         = FFFFFFD6            

ACBC_CTLRCAST  = 00000002            H.LUN            0000003E            IE.ISQ         = FFFFFFC3            

ACBC_FLOATAST  = 00000003            H.NLUN           0000003C            IE.LCK         = FFFFFFE5            

ACBC_PWRAST    = 00000000            H.NML            00000031            IE.MOD         = FFFFFFEB            

ACBC_RCVAST    = 00000001            H.ODVA           00000012            IE.NBF         = FFFFFFD9            

ACBV_INPROG    = 00000001            H.ODVL           00000014            IE.NBK         = FFFFFFD7            

ACBV_PERM      = 00000000            H.OVLY           0000002C            IE.NDR         = FFFFFFB8            

ACBV_TYPE      = 00000008            H.PFVA           0000001A            IE.NFI         = FFFFFFC4            

ACB_FLAGS        0000000C            H.RCVA           0000001E            IE.NFW         = FFFFFFBB            

ACB_LINK         00000000            H.RRVA           00000032            IE.NLK         = FFFFFFB1            

ACB_UPC          0000000A            H.SPRI           00000030            IE.NLN         = FFFFFFDB            

ACB_UPRM         00000008            H.TKVA           00000016            IE.NNC         = FFFFFFB3            

ADR_HIGHLIM      00000004            H.TKVL           00000018            IE.NNL         = FFFFFFB2            

ADR_LOWLIM       00000000            H.VEXT           0000002E            IE.NNN         = FFFFFFBC            

ADR_SIZE         00000008            H.WND            00000024            IE.NOD         = FFFFFFE9            

AP_NAME          00000004            IE.2DV         = FFFFFFD0            IE.NSF         = FFFFFFE6            

AST_PARAM        00000004            IE.ABO         = FFFFFFF1            IE.NST         = FFFFFFB0            

AST_PC           00000010            IE.ALC         = FFFFFFAC            IE.OFL         = FFFFFFBF            

AST_PSL          00000014            IE.ALN         = FFFFFFDE            IE.ONP         = FFFFFFFB            

AST_R0           00000008            IE.AST         = FFFFFFB0            IE.OVR         = FFFFFFEE            

AST_R1           0000000C            IE.BAD         = FFFFFFFF            IE.PES         = FFFFFFAD            

BIT...         = 00068084            IE.BBE         = FFFFFFC8            IE.PRI         = FFFFFFF0            

C$$ORE         = 00000000            IE.BCC         = FFFFFFBE            IE.RAC         = FFFFFFD4            

CVT              0000007B R     05   IE.BDI         = FFFFFFCC            IE.RAT         = FFFFFFD3            

C_CANONPS      = 83C00000            IE.BDR         = FFFFFFCE            IE.RBG         = FFFFFFD8            

C_RCVDSTR      = 44564352            IE.BDV         = FFFFFFC9            IE.RCN         = FFFFFFD2            

DONE             000000B1 R     05   IE.BHD         = FFFFFFC0            IE.RER         = FFFFFFE0            

FCB_ATTRIBS      0000007C            IE.BLB         = FFFFFFBA            IE.RNM         = FFFFFFCD            

FCB_FIB          0000004C            IE.BLK         = FFFFFFEC            IE.RSU         = FFFFFFEF            

FCB_FID          00000000            IE.BNM         = FFFFFFCA            IE.SNC         = FFFFFFDD            

FCB_FNAME        00000014            IE.BTF         = FFFFFFB4            IE.SPC         = FFFFFFFA            

FCB_FNAMEDESC    0000000C            IE.BTP         = FFFFFFD5            IE.SQC         = FFFFFFDC            

FCB_FNB          00000002            IE.BVR         = FFFFFFC1            IE.SRE         = FFFFFFF2            

FCB_PC           00000078            IE.BYT         = FFFFFFED            IE.STK         = FFFFFFC6            

FCB_RESULT       00000030            IE.CKS         = FFFFFFE2            IE.TMM         = FFFFFFB9            

FCB_RESULTDESC   00000004            IE.CLO         = FFFFFFDA            IE.TMO         = FFFFFFB6            

FCB_SIZE         000000B4            IE.CNR         = FFFFFFB7            IE.ULK         = FFFFFFAB            

FP_AP            00000008            IE.CON         = FFFFFFEA            IE.VER         = FFFFFFFC            

FP_FP            0000000C            IE.DAA         = FFFFFFF8            IE.WAC         = FFFFFFE3            

FP_PC            00000010            IE.DAO         = FFFFFFF3            IE.WAT         = FFFFFFE1            

FP_PSL           00000004            IE.DFU         = FFFFFFE8            IE.WCK         = FFFFFFAA            

FP_REGISTERS     00000014            IE.DNA         = FFFFFFF9            IE.WER         = FFFFFFDF            

GBL...         = 00000000            IE.DNR         = FFFFFFFD            IE.WLK         = FFFFFFF4            

H.CSP            00000000            IE.DUN         = FFFFFFF7            IS.BV          = 00000005            

H.CUIC           00000008            IE.DUP         = FFFFFFC7            IS.CC          = 00000301            

H.DSW            00000026            IE.EOF         = FFFFFFF6            IS.CR          = 00000D01            

H.DUIC           0000000A            IE.EOT         = FFFFFFC2            IS.EOT         = 00000401            

H.EFLM           00000004            IE.EOV         = FFFFFFF5            IS.ESC         = 00001B01            

H.EFSV           00000020            IE.EXP         = FFFFFFB5            IS.ESQ         = 00009B01            

H.FCS            00000028            IE.FEX         = FFFFFFCF            IS.PES         = 00008001            

H.FORT           0000002A            IE.FHE         = FFFFFFC5            IS.PND         = 00000000            

H.FPSA           00000022            IE.FLN         = FFFFFFAF            IS.RDD         = 00000002            

H.FPVA           0000001C            IE.FOP         = FFFFFFCB            IS.SUC         = 00000001            

H.GARD           0000003A            IE.HFU         = FFFFFFE4            IS.TAB         = 00000901            

H.HDLN           00000002            IE.IES         = FFFFFFAE            IS.TMO         = 00000002            

H.IPC            0000000E            IE.IFC         = FFFFFFFE            I_ADR0           000000D8            

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page  13

SYMBOL TABLE                                                                                                                     (8)



I_ASCIINAME      0000011C            LUTV_CTRLO     = 00000000            RSX$_NOSUCHDEV = 000680C2            

I_ASTPOOL        000000A8            LUTV_PRM       = 00000003            RSX$_NOTSKIMG  = 00068064            

I_ASTQUEUE       000000A0            LUTV_TI        = 00000001            RSX$_ODDADDR   = 00068034            

I_BAILOUTFP      0000018C            LUT_CHAN         0000000C            RSX$_PMD       = 000680CA            

I_CMDAD          000000C4            LUT_CHAR         00000014            RSX$_RCVMBXSIZ = 0000012C            

I_CMDSZ          000000C0            LUT_CTRLC        00000034            RSX$_RESERVED  = 00068004            

I_CURAST         00000194            LUT_FLAGS        0000000A            RSX$_TBIT      = 0006803C            

I_FCBPOOL        000000B0            LUT_INFONAME     00000030            RSX$_TRAP      = 00068024            

I_FCC            000001B0            LUT_INFOUNIT     00000032            SV_ASTLVL        00000005            

I_FLOATA0        000001BC            LUT_LINK         00000000            SV_DCL           00000002            

I_FLOATA1        000001C4            LUT_REALNAME     00000020            SV_FLOATAST      0000000A            

I_FLOATA2        000001CC            LUT_REF          00000008            SV_FRESTORE      00000003            

I_FLOATA3        000001D4            LUT_RSXNAME      00000010            SV_NOAST         00000004            

I_FLOATA4        000001DC            LUT_RSXUNIT      00000012            SV_PENDWAIT      00000006            

I_FLOATA5        000001E4            LUT_SIZE         00000038            SV_PWRAST        00000009            

I_FLOATADR       000001AC            LUT_TYPE         00000018            SV_RCVAST        00000008            

I_FLOATAST       000001A0            LUT_UNIT         00000020            SV_RESTORE       00000000            

I_FLOATCSR       000001A4            MAX              00000010 R     06   SV_TRANSLATE     00000001            

I_FLOATERR       000001A8            PSL_CC         = 00000000            SV_WAIT          00000007            

I_FLOATTMP       000001B4            PSL_CM         = 0000001F            S_PC             00000020            

I_GARD           000000C8            PSL_FPD        = 0000001B            S_PS             00000024            

I_HIGHEFN        00000148            PSL_FU         = 00000006            S_R0             00000000            

I_HIGHSIZE       000000D0            PSL_TBIT       = 00000004            S_R1             00000004            

I_IMAGEVBN       000000D4            QIOV_FILES     = 00000000            S_R2             00000008            

I_INISIZE        000000CC            QIO_FLAGS        0000001C            S_R3             0000000C            

I_LENGTH         000001EC            QIO_FUNCTION     0000001A            S_R4             00000010            

I_LOGNAME        000000B8            QIO_IOSB         0000000E            S_R5             00000014            

I_LUT            00000144            QIO_LUT          00000016            S_R6             00000018            

I_NLUN           00000140            QIO_SECONDBLK    0000001E            S_TYPE           0000001C            

I_PC             00000184            QIO_SIZE         00000022            TICKS            00000000 R     06   

I_PROCNAME       00000128            RSX$ABORT        ********   X   05   W.BATT           00000006            

I_PS             00000188            RSX$ALLOCATE     000000B2 RG    05   W.BFPD           0000000C            

I_PWRAST         0000019C            RSX$ASCR501      00000004 RG    05   W.BHVR           00000004            

I_R0             00000164            RSX$ASCR502      00000002 RG    05   W.BLGH           00000010            

I_R1             00000168            RSX$ASCR503      00000000 RG    05   W.BLPD           0000000E            

I_R2             0000016C            RSX$A_POOL       ********   X   05   W.BLVR           00000002            

I_R3             00000170            RSX$A_RSXQIOERR  ********   X   05   W.BNPD           0000000D            

I_R4             00000174            RSX$CVTNAME      00000059 RG    05   W.BOFF           0000000A            

I_R5             00000178            RSX$C_SUBSYSTEM= 00000006            W.BPCB           00000000            

I_R6             0000017C            RSX$DEALLOCATE   000000F0 RG    05   W.BSIZ           00000008            

I_RAD50NAME      00000124            RSX$R50CVT1      00000078 RG    05   

I_RCVAST         00000198            RSX$R50CVT2      00000073 RG    05   

I_RCVMAIL        0000013C            RSX$R50CVT3      0000006E RG    05   

I_RUNFLAGS       00000190            RSX$RSXQIOERR    00000158 RG    05   

I_SCRATCH        00000000            RSX$TIMEMAG      00000135 RG    05   

I_STATE          0000014C            RSX$_ACCVIO    = 00068044            

I_TYPE           00000180            RSX$_BADLIBREF = 0006806C            

I_UIC            00000118            RSX$_BADSTACK  = 0006804C            

I_WAIT           00000154            RSX$_BREAK     = 0006800C            

I_WAITSAVE       0000015C            RSX$_EXITSTATUS= 00068180            

LUTC_CR        = 00000005            RSX$_EXTERNABRT= 0006805C            

LUTC_DISK      = 00000002            RSX$_ILLINST   = 0006802C            

LUTC_LP        = 00000004            RSX$_INSFDYNMEM= 00068054            

LUTC_RMS       = 00000000            RSX$_IOT       = 00068014            

LUTC_TAPE      = 00000003            RSX$_LIBNOTFND = 00068074            

LUTC_TRM       = 00000001            RSX$_LOADERROR = 0006807C            

LUTV_CTRLC     = 00000002            RSX$_NONRSXEMT = 0006801C            

RSXSUBROUTINES                                                   22-AUG-1978 00:31:18   VAX-11 MACRO X0.3-11               Page  14

PROGRAM SECTION SYNOPSIS                                                                                                         (8)







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.           00000042      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

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

RSXDEF           000001F0      04     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

RSXCODE          00000176      05     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT BYTE  

RSXPURE          00000018      06     NOPIC   USR   CON   REL   LCL NOSHR NOEXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

17722. BYTES LEFT IN FREE MEMORY POOL.

24. BYTES OF RECLAIMED MEMORY.

OBJ$:RSXSUBROU,LIS$:RSXSUBROU/-SP=SRC$:C,RSXSUBROU

15 MLB DIR RDS - 416 GETS TO DEFINE 14 MACROS. 14 INTER. FILE WRITES. 

