JBCSUBR         - COMMON JOB CONTROLLER SUBROUTINES              22-AUG-1978 00:48:19   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)      37  DECLARATIONS

   (2)      50  ASSIGN DEVICE

   (3)     116  BINARY TO ASCII

JBCSUBR         - COMMON JOB CONTROLLER SUBROUTINES              22-AUG-1978 00:48:19   VAX-11 MACRO X0.3-11               Page   1

V01                                                                                                                              (1)



                                     0000     1 	.TITLE	JBCSUBR - COMMON JOB CONTROLLER SUBROUTINES

                                     0000     2 	.IDENT	/V01/

                                     0000     3 

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1977

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     7 ;

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

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

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

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

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

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

                                     0000    14 ; REMAIN IN DEC.

                                     0000    15 ;

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

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

                                     0000    18 ; 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 ;++

                                     0000    24 ; FACILITY:	STARLET JOB CONTROLLER

                                     0000    25 ;

                                     0000    26 ; ABSTRACT:	GENERALLY USED UTILITY SUBROUTINES

                                     0000    27 ;

                                     0000    28 ; ENVIRONMENT:	USER MODE NON-PRIVILEGED CODE

                                     0000    29 ;

                                     0000    30 ; AUTHOR:	W.H.BROWN, CREATION DATE:  28-FEB-77

                                     0000    31 ;

                                     0000    32 ; MODIFIED BY:

                                     0000    33 ;

                                     0000    34 ;	, : VERSION

                                     0000    35 ; 01	- 

                                     0000    36 ;--

                                     0000    37 	.SBTTL	DECLARATIONS

                                     0000    38 ;

                                     0000    39 ; INCLUDE FILES:   [235,10]J/ML

                                     0000    40 ;

                                     0000    41 ; MACROS:

                                     0000    42 ;

                                     0000    43 ; EQUATED SYMBOLS:	NONE

                                     0000    44 ;

                                     0000    45 ; OWN STORAGE:

                                     0000    46 ;

                                     0000    47 ;	NO LOCAL STORAGE IN THIS MODULE

                                     0000    48 

JBCSUBR         - COMMON JOB CONTROLLER SUBROUTINES              22-AUG-1978 00:48:19   VAX-11 MACRO X0.3-11               Page   2

V01             ASSIGN DEVICE                                                                                                    (2)



                                     0000    50 	.SBTTL	ASSIGN DEVICE

                                     0000    51 ;++

                                     0000    52 ; FUNCTIONAL DESCRIPTION:

                                     0000    53 ;

                                     0000    54 ;	THIS ROUTINE IS CALLED TO ASSIGN A SPECIFIED CHANNEL TO

                                     0000    55 ;	A DEVICE. THE ASSIGNMENT IS DONE WITH A PRECEEDING "_"

                                     0000    56 ;	TO INSURE THAT THE DEVICE ASSIGNED IS THE ONE SPECIFIED.

                                     0000    57 ;

                                     0000    58 ; CALLING SEQUENCE:

                                     0000    59 ;

                                     0000    60 ;	BSB/JSB	JBC$ASSIGNDEV		; ASSIGN ANY DEVICE

                                     0000    61 ;	BSB/JSB	JBC$ASSIGNMB		; ASSIGN A MAILBOX

                                     0000    62 ;

                                     0000    63 ; INPUT PARAMETERS:

                                     0000    64 ;

                                     0000    65 ; FOR ASSIGNDEV:

                                     0000    66 ;

                                     0000    67 ;	R0 IS THE ADDRESS AS A COUNTED STRING

                                     0000    68 ;

                                     0000    69 ; FOR ASSIGNMB:

                                     0000    70 ;

                                     0000    71 ;	R0 IS THE BINARY UNIT NUMBER OF MAILBOX TO ASSIGN

                                     0000    72 ;

                                     0000    73 ; EITHER:

                                     0000    74 ;

                                     0000    75 ;	R1 CONTAINS THE ADDRESS OF WORD TO STORE ASSIGNED CHANNEL NUMBER.

                                     0000    76 ;

                                     0000    77 ; OUTPUT PARAMETERS:

                                     0000    78 ;

                                     0000    79 ;	THE SPECIFIED LOCATION CONTAINS THE CHANNEL NUMBER

                                     0000    80 ;	AND THE CHANNEL IS ASSINGED.

                                     0000    81 ;

                                     0000    82 ; COMPLETION CODES:

                                     0000    83 ;

                                     0000    84 ;	R0 RETURNED AS SET BY THE SYSTEM SERVICE ASSIGN CHANNEL.

                                     0000    85 ;

                                     0000    86 ; SIDE EFFECTS:

                                     0000    87 ;

                                     0000    88 ;	R2 IS SCRATCHED

                                     0000    89 ;--

                                     0000    90 	PURE_SECTION

                                     0000    91  

                                     0000    92 JBC$ASSIGNMB::				; ASSIGN A MAILBOX

            52       0000'CF     9E  0000    93 	MOVAB	W^JBC$T_MBOXUNIT,R2	; SET ADDRESS FOR MAILBOX UNIT

                          51     DD  0005    94 	PUSHL	R1			; SAVE CHANNEL WORD ADDRESS

                          0038   30  0007    95 	BSBW	JBC$BIN2ASC		; CONVERT UNIT TO ASCII

                          02     BA  000A    96 	POPR	#^M<R1>			; RESTORE CHANNEL WORD ADDRESS

            50       0001'CF     9E  000C    97 	MOVAB	W^JBC$T_MBOXNAME+1,R0	; GET START OF NAME STRING

            52            50     C2  0011    98 	SUBL	R0,R2			; FIND FINAL LENGTH OF NAME

            70            52     90  0014    99 	MOVB	R2,-(R0)		; SET LENGTH OF FINAL MAILBOX NAME

                                     0017   100  

                                     0017   101 JBC$ASSIGNDEV::				; ENTER WITH JSB/BSB

            5E            14     C2  0017   102 	SUBL	#20,SP			; MAKE DEVICE NAME BUFFER IN STACK

            52            5E     D0  001A   103 	MOVL	SP,R2			; SET BUFFER POINTER

                          06     BB  001D   104 	PUSHR	#^M<R1,R2>		; PUSH BUFFER ADDRESS FOR DESCRIPTOR

                                     001F   105 					; AND SAVE CHANNEL NUMBER ADDRESS

            51            80     9A  001F   106 	MOVZBL	(R0)+,R1		; GET LENGTH OF GENERIC NAME

JBCSUBR         - COMMON JOB CONTROLLER SUBROUTINES              22-AUG-1978 00:48:19   VAX-11 MACRO X0.3-11               Page   3

V01             ASSIGN DEVICE                                                                                                    (2)



            82            80     90  0022   107 10$:	MOVB	(R0)+,(R2)+		; APPEND GENERIC NAME TO UNDERSCORE

            FA            51     F5  0025   108 	SOBGTR	R1,10$			; MOVE ENTIRE NAME

                          02     BA  0028   109 	POPR	#^M<R1>			; RESTORE CHANNEL NUMBER

            52            6E     C3  002A   110 	SUBL3	(SP),R2,-(SP)		; COMPUTE COUNT FOR STRING DESCRIPTOR

                          7E         002D       

            50            5E     D0  002E   111 	MOVL	SP,R0			; GET ADDRESS OF DEVICE NAME DESCRIPTOR

                                     0031   112 	$ASSIGN_S  (R0),(R1)		; NOW ASSIGN THE CHANNEL

            5E            1C     C0  003E   113 	ADDL	#20+8,SP		; CLEAR BUFFER & DESCRIPTOR FROM STACK

                                 05  0041   114 	RSB				; RETURN WITH STATUS

JBCSUBR         - COMMON JOB CONTROLLER SUBROUTINES              22-AUG-1978 00:48:19   VAX-11 MACRO X0.3-11               Page   4

V01             BINARY TO ASCII                                                                                                  (3)



                                     0042   116 	.SBTTL	BINARY TO ASCII

                                     0042   117 ;++

                                     0042   118 ; FUNCTIONAL DESCRIPTION:

                                     0042   119 ;

                                     0042   120 ;	THIS ROUTINE CONVERTS A BINARY NUMBER TO A DECIMAL ASCII.

                                     0042   121 ;

                                     0042   122 ; CALLING SEQUENCE:

                                     0042   123 ;

                                     0042   124 ;	BSB/JSB	JBC$BIN2ASC		; FOR ZERO SUPPRESSED OUTPUT

                                     0042   125 ;

                                     0042   126 ; INPUT PARAMETERS:

                                     0042   127 ;

                                     0042   128 ;	R0 = NUMBER TO CONVERT

                                     0042   129 ;	R2 = ADDRESS OF PLACE TO STORE FIRST BYTE

                                     0042   130 ;

                                     0042   131 ; OUTPUT PARAMETERS:

                                     0042   132 ;

                                     0042   133 ;	NUMBER IS CONVERTED AND STORED

                                     0042   134 ;	R2 IS INCREMENTED PAST LAST BYTE STORED

                                     0042   135 ;

                                     0042   136 ; COMPLETION CODES:	NONE

                                     0042   137 ;

                                     0042   138 ; SIDE EFFECTS:

                                     0042   139 ;

                                     0042   140 ;	R0,R1 ARE RETURNED ZERO.

                                     0042   141 ;--

                                     0042   142 

                                     0042   143 JBC$BIN2ASC::				; ENTER WITH JSB/BSB

                          51     D4  0042   144 	CLRL	R1			; ZERO HI 1/2 OF QUAD WORD

            50            0A     7B  0044   145 20$:	EDIV	#10,R0,R0,-(SP)		; DIVIDE BY DECIMAL RADIX

            7E            50         0047       

            6E            30     C0  0049   146 	ADDL	#^O60,(SP)		; CONVERT TO ASCII

                          50     D5  004C   147 	TSTL	R0			; ANYTHING LEFT TO CONVERT

                          02     13  004E   148 	BEQL	30$			; BR IF NO MORE SIGNIFICANT DIGITS

                          F2     10  0050   149 	BSBB	20$			; RECURSE THRU ASCII CONVERT

            82            8E     F6  0052   150 30$:	CVTLB	(SP)+,(R2)+		; INSERT ASCII UNIT NUMBER

                                 05  0055   151 	RSB				; UNWIND RECURSIVE LOOP

                                     0056   152  

                                     0056   153  

                                     0056   154 	.END				; *** END OF MODULE ***

JBCSUBR         - COMMON JOB CONTROLLER SUBROUTINES              22-AUG-1978 00:48:19   VAX-11 MACRO X0.3-11               Page   5

SYMBOL TABLE                                                                                                                     (3)



$$T1           = 00000001            

JBC$ASSIGNDEV    00000017 RG    02   

JBC$ASSIGNMB     00000000 RG    02   

JBC$BIN2ASC      00000042 RG    02   

JBC$T_MBOXNAME   ********   X   02   

JBC$T_MBOXUNIT   ********   X   02   

SYS$ASSIGN       ********   X   02   





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  

JBC_PURE         00000056      02     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

27696. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:JBCSUBR,LIS$:JBCSUBR/-SP=EXECML$/ML,LIB$:JOBCTL/ML,SRC$:JBCSUBR

8 MLB DIR RDS - 30 GETS TO DEFINE 4 MACROS. 2 INTER. FILE WRITES. 

