.MCALL .MODULE .MODULE RESJOB,VERSION=3,COMMENT=,IDENT=NO ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. ;++ ; ; Edit Who Date Description of modification ; ---- --- ---- --------------------------- ; 001 WLD 13-NOV-90 Eliminated C1.SJFB (FBMON$) ; reference. ;-- ; Edit History: ; 001 George Stevens Overlaid version of RESORC. Created from RESORC ; Version 97 .NLIST .INCLUDE /SRC:RESPFX.MAC/ .LIST .SBTTL JOBS - List the current jobs ;+ ; This routine will output information ; on the jobs currently in the system. ;- ORIGIN RESJOB .ENABL LSB JOBS:: JSR R5,$SAVRG ;PRESERVE ALL REGISTERS .PRINT #CRLF ;SKIP LINE .PRINT #JBHD ;PRINT HEADER MOV #BUFF,R2 ;R2 -> GTJB BLOCK CLR R4 ;PREPARE TO GET # OF JOB SLOTS BISB $JOBS(R5),R4 ; GET NUMBER OF JOB SLOTS BR 20$ 10$: MOV R4,R3 ;R3=LEVEL ASL R3 ;R3=JOB NUMBER .GTJB #AREA,R2,R3 ;GET INFO BCC 30$ ;IF CC THERE IS A JOB 20$: JMP 130$ ;MERGE BELOW 30$: MOV #RUN,R1 ;DEFAULT TO RUNNING MOV 10(R2),R0 ;R0->IMPURE AREA BIT #,I.BLK(R0) ;IS JOB DONE? BEQ 40$ ;IF EQ NO MOV #DONE,R1 ;R1 -> STATE BR 50$ ;MERGE BELOW 40$: BIT #,I.BLK(R0) ;SUSPENDED? BEQ 50$ ;IF EQ NO MOV #SSPD,R1 ;SAY SUSPENDED 50$: TST R4 ;BACKGROUND? BNE 60$ ;IF NE NO MOV #RESRC,R0 ;R0 -> POINT TO NAME BR 80$ ;MERGE 60$: BIT #SY.SJB,$SYSGN(R5) ;SYSTEM TASKING? BNE 70$ ;IF NE YES MOV #FORE,R0 ;SAY FOREGROUND BR 80$ ;MERGE BELOW 70$: MOV R2,R0 ;POINT TO GTJB BLOCK ADD #22,R0 ;POINT TO JOBNAME 80$: FORMAT #BUFFER,<[O2] [S]>, MOV R0,-(SP) ;SAVE R0 90$: TSTB -(R0) ;NULL BYTE? BNE 100$ ;IF NE NO MOVB #BLANK,@R0 ;MAKE IT A BLANK BR 90$ ;CONTINUE 100$: MOV (SP)+,R0 ;RESTORE FORMAT R0,< [O] [O] [S] [B] >,<12(R2),R4,R1,#7,4(R2)> FORMAT R0,<[B] >,<2(R2)> ;ADD JOB HIGH LIMIT FORMAT R0,<[B]>,<10(R2)> ;INCLUDE IMPURE .PRINT #BUFFER ;OUTPUT IT 130$: DEC R4 ;DEC LOOP COUNTER BMI 140$ ;IF EQ DONE JMP 10$ ;CONTINUE 140$: RETURN ;RETURN .DSABL LSB .END