JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)      39  DECLARATIONS

   (2)      58  RECORD ALLOCATE

   (3)     102  RECORD DEALLOCATE

   (4)     140  FREE A JOB AND CLEANUP AFTER THE JOB AS NECESSA

   (5)     203  INSERT JOB IN QUEUE

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   1

V01                                                                                                                              (1)



                                     0000     1 

                                     0000     2 	.TITLE	JBCQUEMAN - QUEUE MANAGEMENT ROUTINES

                                     0000     3 	.IDENT	/V01/

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

                                     0000    26 ; FACILITY:	STARLET JOB CONTROLLER/SYMBIONT MANAGER

                                     0000    27 ;

                                     0000    28 ; ABSTRACT:	SYMBIONT MANAGER QUEUE MANAGEMENT ROUTINES

                                     0000    29 ;

                                     0000    30 ; ENVIRONMENT:	NATIVE NON-PRIVLEGED USER MODE CODE

                                     0000    31 ;

                                     0000    32 ; AUTHOR:  	W.H.BROWN, CREATION DATE: 3-MAR-77

                                     0000    33 ;

                                     0000    34 ; MODIFIED BY:

                                     0000    35 ;

                                     0000    36 ;	, : VERSION

                                     0000    37 ; 01	- 

                                     0000    38 ;--

                                     0000    39 	.SBTTL	DECLARATIONS

                                     0000    40 ;

                                     0000    41 ; INCLUDE FILES:

                                     0000    42 ;

                                     0000    43 ;	[235,10]J/ML

                                     0000    44 ;

                                     0000    45 ; MACROS:

                                     0000    46 ;

                                     0000    47 ;

                                     0000    48 ; EQUATED SYMBOLS:

                                     0000    49 ;

                                     0000    50 	JBCPARDEF			; DEFINE JOB CONTROLLER PARAMETERS

                                     0000    51 	JBCQUEDEF			; DEFINE QUEUE OFFSETS

                                     0000    52 	$MSGDEF				; DEFINE SYSTEM WIDE MESSAGE CODES

                                     0000    53 ;

                                     0000    54 ; OWN STORAGE:	THIS MODULE HAS NO LOCAL STORAGE

                                     0000    55 ;

                                     0000    56 

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   2

V01             RECORD ALLOCATE                                                                                                  (2)



                                     0000    58 	.SBTTL	RECORD ALLOCATE

                                     0000    59 ;++

                                     0000    60 ; FUNCTIONAL DESCRIPTION:

                                     0000    61 ;

                                     0000    62 ;	THIS ROUTINE IS CALLED TO ALLOCATE A RECORD FROM THE QUEUE

                                     0000    63 ;

                                     0000    64 ; CALLING SEQUENCE:

                                     0000    65 ;

                                     0000    66 ;	BSB	SYM$ALLRECORD		; ALLOCATE A RECORD

                                     0000    67 ;

                                     0000    68 ; INPUT PARAMETERS:

                                     0000    69 ;

                                     0000    70 ;	R10 HAS BASE OF SYSTEM QUEUE SPACE

                                     0000    71 ;

                                     0000    72 ; OUTPUT PARAMETERS:

                                     0000    73 ;

                                     0000    74 ;	R2 HAS ADDRESS OF RECORD ALLOCATED

                                     0000    75 ;

                                     0000    76 ; COMPLETION CODES:

                                     0000    77 ;

                                     0000    78 ;	R0 IS 1 IF RECORD IS SUCESSFULLY ALLOCATED,ELSE 0

                                     0000    79 ;

                                     0000    80 ; SIDE EFFECTS:		NONE

                                     0000    81 ;--

                                     0000    82 	PURE_SECTION

                                     0000    83 

                                     0000    84 SYM$ALLRECORD::

            51         40 8F     9A  0000    85 	MOVZBL	#SYM$K_RECSIZE,R1	; GET SIZE OF RECORD

            52            6A     D0  0004    86 	MOVL	(R10),R2		; GET INDEX TO FIRST RECORD IN FREE LIST

                          15     12  0007    87 	BNEQ	10$			; BR IF RECORD IN FREE LIST

                                     0009    88 	SETSTAT	NOQUESPACE		; SET ERROR CODE

         10 AA         0C AA     D1  000C    89 	CMPL	SQH$L_NEXTREC(R10),SQH$L_LASTREC(R10) ; HAVE ALL RECORDS BEEN ALOCATED?

                          1E     1E  0011    90 	BGEQU	30$			; BR IF NO MORE-RETURN FAILURE STATUS

            5A         0C AA     C1  0013    91 	ADDL3	SQH$L_NEXTREC(R10),R10,R2 ; FIND ADDRESS OF NEXT FREE RECORD

                          52         0017       

         0C AA            51     C0  0018    92 	ADDL	R1,SQH$L_NEXTREC(R10)	; UPDATE POINTER TO NEXT RECORD

                          06     11  001C    93 	BRB	20$			; JOIN COMMON EXIT

            52            5A     C0  001E    94 10$:	ADDL	R10,R2			; FIX UP TO REAL ADDRESS

            6A            62     D0  0021    95 	MOVL	(R2),(R10)		; CLOSE UP LIST

                          3C     BB  0024    96 20$:	PUSHR	#^M<R2,R3,R4,R5>	; SAVE IMPORTANT REGISTERS

            62            00     2C  0026    97 	MOVC5	#0,(R2),#0,R1,(R2)	; ZERO THE BUFFER

            51            00         0029       

                          62         002B       

                          3C     BA  002C    98 	POPR	#^M<R2,R3,R4,R5>	; RESTORE SAVED REGISTERS

                                     002E    99 	SETSTAT	NORMAL		; INDICATE RECORD ALLOCATED

                                 05  0031   100 30$:	RSB				;

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   3

V01             RECORD DEALLOCATE                                                                                                (3)



                                     0032   102 	.SBTTL	RECORD DEALLOCATE

                                     0032   103 ;++

                                     0032   104 ; FUNCTIONAL DESCRIPTION:

                                     0032   105 ;

                                     0032   106 ; THIS ROUTINE IS CALLED TO DEALLOCATE A RECORD TO THE QUEUE

                                     0032   107 ;

                                     0032   108 ; CALLING SEQUENCE:

                                     0032   109 ;

                                     0032   110 ;	BSB	SYM$DEARECORD		; DEALLOCATE A RECORD

                                     0032   111 ;

                                     0032   112 ; INPUT PARAMETERS:

                                     0032   113 ;

                                     0032   114 ;	R0 IS ADDRESS TO RECORD TO RELEASE

                                     0032   115 ;	R10 HAS BASE OF SYSTEM QUEUE SPACE

                                     0032   116 ;

                                     0032   117 ; OUTPUT PARAMETERS:	NONE

                                     0032   118 ;

                                     0032   119 ; IMPLICIT OUTPUTS:

                                     0032   120 ;

                                     0032   121 ;	RECORD IS RELEASED, MAKING IT AVAILIABLE FOR REUSE

                                     0032   122 ;

                                     0032   123 ; COMPLETION CODES:	NONE

                                     0032   124 ;

                                     0032   125 ; SIDE EFFECTS:

                                     0032   126 ;

                                     0032   127 ;	R1 IS MODIFIED

                                     0032   128 ;

                                     0032   129 ;--

                                     0032   130 

                                     0032   131 SYM$DEARECORD::

            51            08     D0  0032   132 	MOVL	#SYM$K_RECSIZE/8,R1	; NUMBER OF QUAD WORDS

                          80     7C  0035   133 10$:	CLRQ	(R0)+			; ZERO CONTENTS

            FB            51     F5  0037   134 	SOBGTR	R1,10$			; CLEAR THE ENTIRE RECORD

            50         C0 A0     DE  003A   135 	MOVAL	-SYM$K_RECSIZE(R0),R0	; RESET ADDRESS TO TOP OF RECORD

            60            6A     D0  003E   136 	MOVL	(R10),(R0)		; BUT OLD FIRST AS SECOND

            50            5A     C3  0041   137 	SUBL3	R10,R0,(R10)		; STORE INDEX TO FIRST FREE RECORD

                          6A         0044       

                                 05  0045   138 	RSB				; ALL DONE

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   4

V01             FREE A JOB AND CLEANUP AFTER THE JOB AS NECESSA                                                                  (4)



                                     0046   140 	.SBTTL	FREE A JOB AND CLEANUP AFTER THE JOB AS NECESSARY

                                     0046   141 ;++

                                     0046   142 ; FUNCTIONAL DESCRIPTION:

                                     0046   143 ;

                                     0046   144 ;	THIS ROUTINE IS CALLED TO FREE ALL RECORDS ASSOCIATED WITH A

                                     0046   145 ;	PRINT OR BATCH JOB AFTER SENDING THE FINAL STATUS OF THE JOB TO

                                     0046   146 ;	A WAITING PROCESS, IF ANY.

                                     0046   147 ;

                                     0046   148 ; CALLING SEQUENCE:

                                     0046   149 ;

                                     0046   150 ;	BSB/JSB	SYM$FREEJOB

                                     0046   151 ;

                                     0046   152 ; INPUT PARAMETERS:

                                     0046   153 ;

                                     0046   154 ;	FOR FREEJOB:

                                     0046   155 ;

                                     0046   156 ;	R0 IS BATCH JOB FINAL STATUS

                                     0046   157 ;	R7 IS THE ADDRESS OF THE JOB HEADRER

                                     0046   158 ;	R10 CONTAINS THE ADDRESS OF THE PRINT QUEUE HEADER

                                     0046   159 ;

                                     0046   160 ;	FOR FREEPRTJOB:

                                     0046   161 ;

                                     0046   162 ;	R0 IS ADDRESS OF JOB TO RELEASE

                                     0046   163 ;

                                     0046   164 ; OUTPUT PARAMETERS:

                                     0046   165 ;

                                     0046   166 ;	IF THERE IS A MAILBOX CHANNEL ASSIGNED, A RESPONCE IS SENT WITH

                                     0046   167 ;	THE FINAL STATUS, THE JOB ID AND NAME.

                                     0046   168 ;

                                     0046   169 ; COMPLETION CODES:	NONE

                                     0046   170 ;

                                     0046   171 ; SIDE EFFECTS:		NONE

                                     0046   172 ;--

                                     0046   173 	.ENABL	LSB

                                     0046   174 SYM$FREEJOB::				;

            56         06 A7     3C  0046   175 	MOVZWL	SJH$W_QINDEX(R7),R6	; GET OFFSET TO QUEUE

            56            5A     C0  004A   176 	ADDL	R10,R6			;FIND OFFSET IN THE QUEUE

         08 A6            01     E1  004D   177 	BBC	#SMQ$V_DETJOB,SMQ$B_FLAGS(R6),30$ ; BR IF NOT A BATCH QUEUE

                          36         0051       

                          6B     DD  0052   178 	PUSHL	JCD_W_TMPCHAN(R11)	; SAVE CURRENT MAILBOX IF ANY

                                 B0  0054   179 	MOVW	SJH$W_MBCHAN(R7),-	; COPY SYNC MAILBOX CHANNEL

            6B         0D A7         0055   180 		JCD_W_TMPCHAN(R11)	; TO THE WORK AREA

                          1F     13  0058   181 	BEQL	10$			; BR IF NO ONE IS WAITING FOR THIS JOB

            53         0C BB     9E  005A   182 	MOVAB	@JCD_A_LBUFADR(R11),R3	; POINT AT LINE BUFFER

            83            20     9B  005E   183 	MOVZBW	#MSG$_SMBRSP,(R3)+	; SET MESSAGE TYPE

            83         04 A7     B0  0061   184 	MOVW	SJH$W_JOBSEQ(R7),(R3)+	; SET JOB ID FIELD

            83            50     D0  0065   185 	MOVL	R0,(R3)+		; INSERT FINAL STATUS

            83         34 A7     7D  0068   186 	MOVQ	SJH$Q_JOBNAME(R7),(R3)+	; AND THE JOB NAME

                          FF91'  30  006C   187 	BSBW	JBC$SNDRESP		; SEND THAT TO REQUESTING PROCESS

                                     006F   188 	$DASSGN_S JCD_W_TMPCHAN(R11)	; RELEASE THAT CHANNEL

            6B            8E     F7  0079   189 10$:	CVTLW	(SP)+,JCD_W_TMPCHAN(R11); RESTORE PREVIOUS CHANNEL NUMBER

            50         3C A7     D0  007C   190 	MOVL	SJH$L_PARMBLK(R7),R0	; FIND ASSOCIATED PARAMETER BLOCK

                          06     13  0080   191 	BEQL	30$			; BR IF NO PARAMETER BLOCK

            50            5A     C0  0082   192 	ADDL	R10,R0			; FIND THE REAL ADDRESS OF PARAM BLOCK

                          FFAA   30  0085   193 	BSBW	SYM$DEARECORD		; RELEASE THE RECORD

            57            5A     C3  0088   194 30$:	SUBL3	R10,R7,R0		; SET OFFSET TO FIRST RECORD IN THE JOB

                          50         008B       

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   5

V01             FREE A JOB AND CLEANUP AFTER THE JOB AS NECESSA                                                                  (4)



            50            5A     C0  008C   195 40$:	ADDL	R10,R0			; FIND REAL ADDRESS OF RECORD

                                     008F   196 SYM$FREEPRTJOB::			; ALTERNATE ENTRY TO FREE A PRINT JOB

                          60     DD  008F   197 	PUSHL	SJH$L_RECLINK(R0)	; SAVE ADDRESS OF NEXT RECORD

                          FF9E   30  0091   198 	BSBW	SYM$DEARECORD		; RELEASE THE RECORD

            50            8E     D0  0094   199 	MOVL	(SP)+,R0		; GET NEXT RECORD

                          F3     12  0097   200 	BNEQ	40$			; BR WHEN MORE TO DO

                                 05  0099   201 	RSB				; RETURN TO CALLER

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   6

V01             INSERT JOB IN QUEUE                                                                                              (5)



                                     009A   203 	.SBTTL	INSERT JOB IN QUEUE

                                     009A   204 ;++

                                     009A   205 ; FUNCTIONAL DESCRIPTION:

                                     009A   206 ;

                                     009A   207 ;	THIS ROUTINE IS CALLED TO INSERT A PRINT JOB INTO

                                     009A   208 ;	ONE OF THE POSSIBLE LISTS.  IF THE JOB IS READY TO

                                     009A   209 ;	BE PRINT, THEN IT IS INSERTED IN THE PROPER PRINT

                                     009A   210 ;	QUEUE DEPENDING UPON ITS PRIORITY. ELSE IS IS

                                     009A   211 ;	INSERTED INTO THE HOLD LIST FOR THE DEVICE TO

                                     009A   212 ;	TO WHICH IT WAS QUEUED.

                                     009A   213 ;

                                     009A   214 ; CALLING SEQUENCE:

                                     009A   215 ;

                                     009A   216 ;	JSB/BSB	SYM$JOBINSQUE

                                     009A   217 ;

                                     009A   218 ; INPUT PARAMETERS:

                                     009A   219 ;

                                     009A   220 ;	R7 CONTAINS THE JOB HEADER

                                     009A   221 ;

                                     009A   222 ; IMPLICIT INPUTS:

                                     009A   223 ;

                                     009A   224 ;	R10 CONTAINS THE ADDRESS OF THE SYMBIONT QUEUE FILE

                                     009A   225 ;

                                     009A   226 ; OUTPUT PARAMETERS:

                                     009A   227 ;

                                     009A   228 ;	THE JOB IS INSERTED INTO EITHER:

                                     009A   229 ;

                                     009A   230 ;		1) THE TIME QUEUE IF THE HOLD TIME IS SPECIFIED

                                     009A   231 ;		2) THE HOLD QUEUE FOR THE ASSOCIATED DEVICE IF HOLD FLAG ON

                                     009A   232 ;		3) ONE OF THE ACTIVE PRINT QUEUES DEPENDING ON THE PRIORITY

                                     009A   233 ;

                                     009A   234 ; COMPLETION CODES:	NONE

                                     009A   235 ;

                                     009A   236 ; SIDE EFFECTS:

                                     009A   237 ;

                                     009A   238 ;	REGISTERS R0 AND R1 ARE MODIFIED

                                     009A   239 ;	REGISTER R6 IS SET TO THE DEVICE QUEUE HEADER ADDRESS

                                     009A   240 ;

                                     009A   241 ;--

                                     009A   242 	.ENABL	LSB

                                     009A   243 

                                     009A   244 SYM$JOBINSQUE::

                     0000'CF     97  009A   245 	DECB	W^JBC$B_QUEWRT		; COUNT QUEUE MODS

                       08 A7     D4  009E   246 	CLRL	SJH$L_NEXTJOB(R7)	; ZERO LINK INCASE THIS ENDS UP LAST

                                     00A1   247 	CMPQUAD	SJH$Q_TIME(R7),-	; CHECK IF HOLD TIME FOR THE NEW JOB

                                     00A1   248 		JCD_Q_TIME(R11)		; IS GREATER THAN THE CURRENT TIME

                          66     1B  00AD   249 	BLEQU	SYM$INSACTQUE		; INSERT IN ACTIVE QUEUE

            51         18 AA     D0  00AF   250 	MOVL	SQH$L_TIMQUE(R10),R1	; PICK UP OFFSET TO HEAD OF TIMER QUEUE

                          21     13  00B3   251 	BEQL	20$			; BR IF QUEUE IS EMPTY-INSERT THIS FIRST

            51            5A     C1  00B5   252 	ADDL3	R10,R1,R0		; FIND REAL ADDRESS OF FIRST JOB

                          50         00B8       

                                     00B9   253 	CMPQUAD	SJH$Q_TIME(R7),-	; CHECK IF HOLD TIME FOR NEW JOB IS

                                     00B9   254 		SJH$Q_TIME(R0)		; EARLIER THAN THE CURRENT EARLIEST

                          29     1E  00C5   255 	BGEQU	40$			; BR IF NEW TIME NOT EARLIEST

         08 A7            51     D0  00C7   256 	MOVL	R1,SJH$L_NEXTJOB(R7)	; LINK OLD FIRST AS NEXT AFTER NEW JOB

                                     00CB   257 	$CANTIM_S  REQIDT=#JBC_K_PRTIMFLAG ; CANCEL PREVIOUS TIMER

            57            5A     C3  00D6   258 20$:	SUBL3	R10,R7,SQH$L_TIMQUE(R10) ; SET NEW AS FIRST IN TIMER QUEUE

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   7

V01             INSERT JOB IN QUEUE                                                                                              (5)



                       18 AA         00D9       

                                     00DB   259  

                                     00DB   260 SYM$SETIMER::				; EXTERNAL ENTRY TO RESET TIMER

                                     00DB   261 	$SETIMR_S  -			; START TIMER

                                     00DB   262 		ASTADR = SYM$TIMAST,-	; AST PROCESSING ROUTINE

                                     00DB   263 		DAYTIM = SJH$Q_TIME(R7),- ; RELEASE JOB TIME IS THE TIME

                                     00DB   264 		REQIDT = #JBC_K_PRTIMFLAG   ; THE REQUEST ID IS THE EVENT FLAG

                                 05  00EF   265 	RSB				;  * EXIT * INSERT IN TIMER QUEUE

                                     00F0   266  

            51            50     D0  00F0   267 40$:	MOVL	R0,R1			; SAVE LAST JOB ADDRESS

            50         08 A1     D0  00F3   268 	MOVL	SJH$L_NEXTJOB(R1),R0	; FIND INDEX TO NEXT

                          16     13  00F7   269 	BEQL	60$			; BR IF THE END OF THE LIST

            50            5A     C0  00F9   270 	ADDL	R10,R0			; FIND ADDRESS OF CURRENT JOB

                                     00FC   271 	CMPQUAD	SJH$Q_TIME(R7),-	; CHECK IF THE NEW JOB HOLD TIME

                                     00FC   272 		SJH$Q_TIME(R0)		; IS EARLIER THAN THIS JOB

                          E6     1A  0108   273 	BGTRU	40$			; BR IF NEW LATER THAN CURRENT

                                 D0  010A   274 	MOVL	SJH$L_NEXTJOB(R1),-	; SET THIS JOB AS NEXT AFTER

         08 A7         08 A1         010B   275 		SJH$L_NEXTJOB(R7)	; THE NEW JOB

            57            5A     C3  010F   276 60$:	SUBL3	R10,R7,SJH$L_NEXTJOB(R1) ; POINT PREVIOS AT NEW JOB

                       08 A1         0112       

                                 05  0114   277 	RSB				; * EXIT * THE MODULE

                                     0115   278  

                                     0115   279 	.DSABL	LSB

                                     0115   280 ;

                                     0115   281 ; INSERT JOB IN ACTIVE QUEUE

                                     0115   282 ;

                                     0115   283  

                                     0115   284 SYM$INSACTQUE::				; INSERT FILE IN ACTIVE QUEUE

            56         06 A7     3C  0115   285 	MOVZWL	SJH$W_QINDEX(R7),R6	; GET DEVICE QUEUE INDEX

            56            5A     C0  0119   286 	ADDL	R10,R6			; FIND REAL ADDRESS OF QUEUE HEADER

                                 E0  011C   287 	BBS	#SMQ$V_STOPPED,-	; IF DEVICE IS NOT STARTED

         08 A6            03         011D   288 		SMQ$B_FLAGS(R6),80$	; INSERT ALL JOBS IN HOLD LIST

                          74         0120       

                                 E0  0121   289 	BBS	#SJH$V_HOLD,-		; ALSO HOLD ANY JOBS THAT HAVE

         0C A7            00         0122   290 		SJH$B_FLAGS(R7),80$	; PUT ON HOLD BY THE QUEUER

                          6F         0125       

                                     0126   291 	IF_FORM_DIF	80$		; BR IF FORMS DON'T MATCH

            05            00     EF  012C   292 	EXTZV	#0,#5,SJH$B_PRTPRI(R7),R0 ; GET PRINT PRIORITY FOR THE JOB

            50         0F A7         012F       

         0F A7            50     90  0132   293 	MOVB	R0,SJH$B_PRTPRI(R7)	; MAKE SURE THE PRIORITY IS VALID

            50         20 AA40   7E  0136   294 	MOVAQ	SQH$Q_QUEUE(R10)[R0],R0	; FIND PROPER PRIORITY PRINT QUEUE

                          80     D5  013B   295 	TSTL	(R0)+			; ANYTHING IN QUEUE?

                          09     12  013D   296 	BNEQ	10$			; BR IF QUEUE IS NOT EMPTY

            57            5A     C3  013F   297 	SUBL3	R10,R7,(R0)		; QUEUE IS EMPTY-INSERT AS FIRST

                          60         0142       

            70            60     D0  0143   298 	MOVL	(R0),-(R0)		; AND LAST

                          3C     11  0146   299 	BRB	60$			; COMMON EXIT

            60            5A     C1  0148   300 10$:	ADDL3	R10,(R0),R1		; FIND ADDRESS OF LAST ENTRY IN QUEUE

                          51         014B       

                                     014C   301 	CMPQUAD	SJH$Q_TIME(R7),-	; CHECK IF QUEUE TIME FOR THE NEW JOB IS

                                     014C   302 		SJH$Q_TIME(R1)		; GREATER THAN THE TIME FOR OLD LAST

                          21     1E  0158   303 	BGEQU	40$			; IF SAME FOR GREATER INSERT NEW AS LAST

            50            70     DE  015A   304 	MOVAL	-(R0),R0		; GET ADDRESS OF FORWARD LINK

            5A            60     C1  015D   305 20$:	ADDL3	(R0),R10,R1		; FIND ADDRESS OF NEXT JOB

                          51         0160       

                                     0161   306 	CMPQUAD	SJH$Q_TIME(R7),-	; CHECK IF QUEUE TIME FOR THE NEW JOB

                                     0161   307 		SJH$Q_TIME(R1)		; IS GREATER THAN THE TIME OF THIS

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   8

V01             INSERT JOB IN QUEUE                                                                                              (5)



                          06     1F  016D   308 	BLSSU	30$			; BR IF NEW WAS QUEUED EARLIER

            50         08 A1     DE  016F   309 	MOVAL	SJH$L_NEXTJOB(R1),R0	; SET THREAD WORD ADDRESS TO NEXT JOB

                          E8     11  0173   310 	BRB	20$			; LOOK FOR OLDER ENTRY

         08 A7            60     D0  0175   311 30$:	MOVL	(R0),SJH$L_NEXTJOB(R7)	; OPEN LINK FROM PREVIOUS TO OLD NEXT

                          05     11  0179   312 	BRB	50$			; FINSH IN COMMON CODE

            57            5A     C3  017B   313 40$:	SUBL3	R10,R7,SJH$L_NEXTJOB(R1) ; SET NEW AS NEXT AFTER PREVIOUS LAST

                       08 A1         017E       

            57            5A     C3  0180   314 50$:	SUBL3	R10,R7,(R0)		; SET LINK TO NEW JOB

                          60         0183       

            50            02     9A  0184   315 60$:	MOVZBL	#JBC_V_SYMINIREQ,R0	; SET BIT FOR PRINT QUEUES

         08 A6            01     E1  0187   316 	BBC	#SMQ$V_DETJOB,SMQ$B_FLAGS(R6),70$ ; BR IF QUEUE IS PRINT QUEUE

                          03         018B       

            50            03     9A  018C   317 	MOVZBL	#JBC_V_CREJOBREQ,R0	; SET BIT FOR DETACHED JOB

                                     018F   318 70$:	SETBIT	R0,JCD_W_FLAGS(R11)	; SET PROPER FLAG

                                 05  0194   319 	RSB				; * EXIT *

                                     0195   320  

                                     0195   321 ;

                                     0195   322 ; THIS FILE IS INSERTED IN THE HOLD QUEUE.  NOTE THAT THE

                                     0195   323 ; HOLD QUEUE IS ORDERED LAST IN, FIRST OUT FOR SIMPLICITY.

                                     0195   324 ;

                                 D0  0195   325 80$:	MOVL	SMQ$L_HOLDLST(R6),-	; LINK THE PREVIOUS FIRST AFTER

         08 A7         04 A6         0196   326 		SJH$L_NEXTJOB(R7) 	; THE NEW JOB

            57            5A     C3  019A   327 	SUBL3	R10,R7,SMQ$L_HOLDLST(R6) ; LINK NEW JOB THIS AS CURRENT FIRST

                       04 A6         019D       

                                 05  019F   328 	RSB				; *** EXIT ***

                                     01A0   329  

                                     01A0   330 ;+

                                     01A0   331 ; SYM$TIMAST - TIMER AST ROUTINE

                                     01A0   332 ;

                                     01A0   333 ; THIS ROUTINE IS ENTERED WHEN THE TIME QUEUE ENTRY COMES DUE.

                                     01A0   334 ; A FLAG IS SET TO CAUSE THE MAIN LINE TO SERVICE THE TIME QUEUE.

                                     01A0   335 ;-

                                     01A0   336  

                                     01A0   337 SYM$TIMAST:				;

                               0000  01A0   338 	.WORD	0			;

       0004'CF            10     A8  01A2   339 	BISW	#JBC_M_SRVTIMQUE,W^JBC$T_DATABLK+JCD_W_FLAGS ; SET THE FLAG

                                     01A7   340 	$WAKE_S				; START THE MAINLINE

                                 04  01B2   341 	RET				; DISMISS THE AST

                                     01B3   342  

                                     01B3   343 	.END				;

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page   9

SYMBOL TABLE                                                                                                                     (5)



ACM$B_PROCPRI    00000024            JBC$_SYMBCRE   = 000484D8            MSG$_CONNECT   = 00000032            

ACM$L_PROCID     FFFFFFFC            JBC$_SYMBDSAB  = 00048078            MSG$_CRUNSOLIC = 00000002            

ACM$L_UIC        0000000C            JBC$_SYMBWRT   = 00048448            MSG$_DELPROC   = 00000003            

ACM$Q_ACNTNAM    0000001C            JBC$_SYMDEL    = 00048470            MSG$_DELSMB    = 00000014            

ACM$Q_PRVMSK     00000004            JBC$_UAFOPN    = 000484A0            MSG$_DEVOFFLIN = 00000005            

ACM$T_DATA       00000028            JBC$_UNESYMMSG = 000484C0            MSG$_DEVONLIN  = 00000007            

ACM$T_USERNAM    00000010            JBC$_USERVAL   = 00048498            MSG$_DISCON    = 00000033            

ACM$W_MAILBOX    00000002            JBC_K_MAXBUFR  = 00000004            MSG$_EXIT      = 00000034            

ACM$W_TYPE       00000000            JBC_K_PRTIMFLAG= 00000002            MSG$_INIOPR    = 00000010            

ACM$W_USERREQ    00000026            JBC_K_SYNCFLAG = 00000001            MSG$_INTMSG    = 00000035            

BIT...         = 0000003B            JBC_K_UPDFLG   = 00000008            MSG$_OPREPLY   = 00000009            

GBL...         = 00000000            JBC_M_CREJOBREQ= 00000008            MSG$_OPRQST    = 00000008            

JBC$B_QUEWRT     ********   X   03   JBC_M_MBREADREQ= 00000001            MSG$_PATHLOST  = 00000036            

JBC$SNDRESP      ********   X   03   JBC_M_SRVTIMQUE= 00000010            MSG$_PROTOCOL  = 00000037            

JBC$T_DATABLK    ********   X   03   JBC_M_SYMCREREQ= 00000002            MSG$_REJECT    = 00000038            

JBC$_ACMINVOP  = 00048088            JBC_M_SYMINIREQ= 00000004            MSG$_RESOPR    = 00000013            

JBC$_ACNTOPN   = 00048478            JBC_V_CREJOBREQ= 00000003            MSG$_SCANBAD   = 00000028            

JBC$_ACNTWRT   = 00048480            JBC_V_MBREADREQ= 00000000            MSG$_SCANRSP   = 00000029            

JBC$_ENTQUE    = 000484A8            JBC_V_SRVTIMQUE= 00000004            MSG$_SMBDON    = 00000009            

JBC$_ILLDEVNAM = 00048000            JBC_V_SYMCREREQ= 00000001            MSG$_SMBINI    = 00000008            

JBC$_ILLDEVTYP = 00048008            JBC_V_SYMINIREQ= 00000002            MSG$_SMBRSP    = 00000020            

JBC$_ILLFILNAM = 00048010            JCD_A_LBUFADR    0000000C            MSG$_SNDACC    = 0000000A            

JBC$_ILLQUENAM = 00048018            JCD_A_QUEBASE    00000018            MSG$_SNDSMB    = 00000004            

JBC$_INPASGN   = 00048488            JCD_B_CURPDEV    0000001D            MSG$_SUSOPR    = 00000012            

JBC$_INPREAD   = 00048490            JCD_B_CURSYMB    0000001C            MSG$_THIRDPARTY= 00000039            

JBC$_INVMSG    = 00048418            JCD_G_LISTS      00000000            MSG$_TIMEOUT   = 0000003A            

JBC$_INVSCT    = 00048468            JCD_G_WLEND      FFFFFFF0            MSG$_TRMHANGUP = 00000006            

JBC$_JOBABORT  = 00048080            JCD_G_WORKLIST   FFFFFFD0            MSG$_TRMUNSOLIC= 00000001            

JBC$_JOBCRD    = 000484B0            JCD_K_SIZE     = 000000FC            MSG$_XM_ATTN   = 0000000D            

JBC$_LOSTREC   = 00048438            JCD_L_SMBPID     FFFFFFCC            MSG$_XM_DATAVL = 0000000B            

JBC$_MBASGN    = 00048400            JCD_Q_ACNTFIL    FFFFFFE8            MSG$_XM_SHUTDN = 0000000C            

JBC$_MBDEAS    = 00048460            JCD_Q_FREEBUFR   FFFFFFF0            SJH$B_COPYCNT    0000000E            

JBC$_MBREAD    = 00048408            JCD_Q_LBUFDES    00000008            SJH$B_FLAGS      0000000C            

JBC$_MBSETAST  = 000484C8            JCD_Q_PROCDEL    FFFFFFE0            SJH$B_FORMS      0000000D            

JBC$_MBWRITE   = 000484D0            JCD_Q_SYMBMAN    FFFFFFD8            SJH$B_PRTPRI     0000000F            

JBC$_MULTREC   = 00048430            JCD_Q_SYMBSRV    FFFFFFD0            SJH$L_NEXTJOB    00000008            

JBC$_NOOPENJOB = 00048048            JCD_Q_SYMBWAIT   FFFFFFF8            SJH$L_PARMBLK    0000003C            

JBC$_NOPRIV    = 00048020            JCD_Q_TIME       FFFFFFC4            SJH$L_PROCID     00000010            

JBC$_NOQUEHDR  = 00048028            JCD_Q_TMPDESC    00000010            SJH$L_RECLINK    00000000            

JBC$_NOQUESPACE= 00048030            JCD_T_INDEX0     00000000            SJH$L_UIC        00000014            

JBC$_NORMAL    = 00040001            JCD_T_LINBFE     000000C0            SJH$M_HOLD     = 00000001            

JBC$_NOSUCHJOB = 00048040            JCD_T_LINBUF     0000001E            SJH$M_JOBABORT = 00000004            

JBC$_NOSUCHQUE = 00048038            JCD_T_START      FFFFFFC4            SJH$M_LOWER    = 00000002            

JBC$_PASSCRD   = 000484B8            JCD_W_FLAGS      00000004            SJH$Q_ACNTNAM    00000024            

JBC$_PRCREAT   = 00048410            JCD_W_JOBSEQ     00000006            SJH$Q_JOBNAME    00000034            

JBC$_PRINTOUT  = 000484E0            JCD_W_LBUFCNT    00000008            SJH$Q_TIME       0000002C            

JBC$_QUECNT    = 00048428            JCD_W_LBUFSIZ    0000000A            SJH$T_USERNAM    00000018            

JBC$_QUEERR    = 00048458            JCD_W_MBCHAN     00000002            SJH$V_HOLD     = 00000000            

JBC$_QUENOSTOP = 00048050            JCD_W_TMPCHAN    00000000            SJH$V_JOBABORT = 00000002            

JBC$_QUEUPD    = 000484E8            JCM_K_SIZE       000000C0            SJH$V_LOWER    = 00000001            

JBC$_SCTERR    = 00048450            JCM_Q_IOSB       00000008            SJH$W_JOBSEQ     00000004            

JBC$_SMINVOPR  = 00048058            JCM_Q_LINKS      00000000            SJH$W_MBCHAN     0000000D            

JBC$_SMINVOPT  = 00048060            JCM_T_MSGDATA    00000010            SJH$W_QINDEX     00000006            

JBC$_SMINVREQ  = 00048068            MSG$_ABOOPR    = 00000011            SMQ$B_CHAR       0000000A            

JBC$_SMZEROJOB = 00048070            MSG$_ABORT     = 00000030            SMQ$B_FLAGS      00000008            

JBC$_SNDRESP   = 00048420            MSG$_ACCRSP    = 00000021            SMQ$B_FORMS      00000009            

JBC$_SYMBASN   = 00048440            MSG$_CONFIRM   = 00000031            SMQ$B_JOBCNT     00000009            

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page  10

SYMBOL TABLE                                                                                                                     (5)



SMQ$B_JOBLIM     0000000B            SQH$L_TIMQUE     00000018            

SMQ$C_SIZE       00000020            SQH$Q_QUEUE      00000020            

SMQ$K_SIZE       00000020            SQH$W_QUESEQ     0000001C            

SMQ$L_ASNSCT     0000000C            SQR$B_COPYCNT    00000039            

SMQ$L_CURRENT    00000000            SQR$B_FLAGS      00000038            

SMQ$L_HOLDLST    00000004            SQR$L_RECLINK    00000000            

SMQ$M_CREPND   = 00000004            SQR$M_BRSTPAG  = 00000004            

SMQ$M_DEFBRST  = 00000002            SQR$M_DELETE   = 00000001            

SMQ$M_DEFFLAG  = 00000001            SQR$M_DOUBLE   = 00000008            

SMQ$M_DETJOB   = 00000002            SQR$M_FLAGPAG  = 00000002            

SMQ$M_GENDEV   = 00000010            SQR$M_NOFEED   = 00000010            

SMQ$M_INIPRI   = 0000000F            SQR$M_PAGHDR   = 00000020            

SMQ$M_INUSE    = 00000001            SQR$T_FILNAM     00000024            

SMQ$M_LOWER    = 00000008            SQR$T_VOLNAM     00000008            

SMQ$M_NOGENERIC= 00000020            SQR$V_BRSTPAG  = 00000002            

SMQ$M_NOSWAP   = 00000010            SQR$V_DELETE   = 00000000            

SMQ$M_PAUSED   = 00000004            SQR$V_DOUBLE   = 00000003            

SMQ$M_REDIRECT = 00000010            SQR$V_FLAGPAG  = 00000001            

SMQ$M_STOPPED  = 00000008            SQR$V_NOFEED   = 00000004            

SMQ$M_TRMDEV   = 00000004            SQR$V_PAGHDR   = 00000005            

SMQ$S_INIPRI   = 00000004            SQR$W_DIRNUM     0000001E            

SMQ$T_NAME       00000010            SQR$W_DIRSEQ     00000020            

SMQ$V_CREPND   = 00000002            SQR$W_DIRVOL     00000022            

SMQ$V_DEFBRST  = 00000001            SQR$W_FILNUM     00000018            

SMQ$V_DEFFLAG  = 00000000            SQR$W_FILSEQ     0000001A            

SMQ$V_DETJOB   = 00000001            SQR$W_JOBSEQ     00000004            

SMQ$V_GENDEV   = 00000004            SQR$W_PAGCNT     0000003A            

SMQ$V_INIPRI   = 00000000            SQR$W_RECID      00000006            

SMQ$V_INUSE    = 00000000            SQR$W_RELVOL     0000001C            

SMQ$V_LOWER    = 00000003            SYM$ALLRECORD    00000000 RG    03   

SMQ$V_NOGENERIC= 00000005            SYM$CMPFORMS     ********   X   03   

SMQ$V_NOSWAP   = 00000004            SYM$C_RECSIZE    00000040            

SMQ$V_PAUSED   = 00000002            SYM$DEARECORD    00000032 RG    03   

SMQ$V_REDIRECT = 00000004            SYM$FREEJOB      00000046 RG    03   

SMQ$V_STOPPED  = 00000003            SYM$FREEPRTJOB   0000008F RG    03   

SMQ$V_TRMDEV   = 00000002            SYM$INSACTQUE    00000115 RG    03   

SMR$B_PROCPRI    00000024            SYM$JOBINSQUE    0000009A RG    03   

SMR$L_PROCID     FFFFFFFC            SYM$K_RECSIZE    00000040            

SMR$L_UIC        0000000C            SYM$SETIMER      000000DB RG    03   

SMR$Q_ACNTNAM    0000001C            SYM$TIMAST       000001A0 R     03   

SMR$Q_PRVMSK     00000004            SYM_K_MAXDEVNAM= 0000000F            

SMR$T_DATA       00000028            SYM_K_MAXFILNAM= 00000013            

SMR$T_USERNAM    00000010            SYM_K_MAXSYMB  = 00000010            

SMR$W_MAILBOX    00000002            SYM_K_NUMQUEUE = 0000001F            

SMR$W_TYPE       00000000            SYM_K_NUMRECORD= 00000400            

SMR$W_USERREQ    00000026            SYM_K_PRTPRI   = 00000020            

SQH$B_FLAGS      00000004            SYM_K_QUENAM   = 0000000F            

SQH$B_MAXQUE     00000006            SYS$CANTIM       ********   X   03   

SQH$B_NUMQUE     00000005            SYS$DASSGN       ********   X   03   

SQH$B_SPARE      00000007            SYS$SETIMR       ********   X   03   

SQH$C_SIZE       00000120            SYS$WAKE         ********   X   03   

SQH$K_SIZE       00000120            _$$$_          = 0000000C            

SQH$L_FIRSTREC   00000008            _$$_           = 00000050            

SQH$L_FREEREC    00000000            

SQH$L_LASTREC    00000010            

SQH$L_NEXTREC    0000000C            

SQH$L_OPENJOB    00000014            

JBCQUEMAN       - QUEUE MANAGEMENT ROUTINES                      22-AUG-1978 00:46:36   VAX-11 MACRO X0.3-11               Page  11

PROGRAM SECTION SYNOPSIS                                                                                                         (5)







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

JBC_PURE         000001B3      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

15926. BYTES LEFT IN FREE MEMORY POOL.

136. BYTES OF RECLAIMED MEMORY.

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

44 MLB DIR RDS - 547 GETS TO DEFINE 29 MACROS. 32 INTER. FILE WRITES. 

