.MCALL .MODULE .MODULE SPOOL,VERSION=06,COMMENT=,AUDIT=YES ; 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. .SBTTL Definitions, Macros, Conditionals ;+ ;COND ; V$JOB (0) REL job ; 1 SAV (virtual) job ; ; SP$MLS (=V$JOB) stream(s) ; 0 1 stream ; 1 multiple streams ;- .IIF NDF V$JOB V$JOB =: 0 ; Build REL version by default SP$MLS =: V$JOB ; V-job version has multiple streams ;+ ; Macros: ;- .AUDIT .SPOOL, .SPTASK, .SPINT, .SPINIT .MCALL .EXIT .MACRO ...... .ENDM ;+ ; Definitions: ;- $JSW =: 44 ; Job Status Word address OVLY$ =: 001000 ; Overlayed Job Bit VIRT$ =: 002000 ; Virtual Job Bit .IF NE SP$MLS NUMDEV =: 8. ; Number of SPOOL output devices .IFF; NE SP$MLS NUMDEV =: 1 ; Number of SPOOL output devices .ENDC; NE SP$MLS NQELEM =: NUMDEV+1 ; This MUST be the same as that ; defined in SPINIT. ;+ ; PSECT ordering: ;- .PSECT .QUEE.,D,GBL,REL,CON .PSECT .PURE.,D,GBL,REL,CON .PSECT .ROOT.,I,GBL,REL,CON .PSECT .CODE.,I .PSECT .TEXT.,D .IF NE V$JOB .PSECT .IMPD.,D .IFF; NE V$JOB .PSECT .IMPD.,D,GBL,REL,CON .ENDC; NE V$JOB .IF NE V$JOB .ASECT . = $JSW ; Job Status Word .WORD ; Set VIRTUAL and OVERLAY bits .ENDC; NE V$JOB ; SPOOL Data .PSECT .QUEE.,D QEROOM::.BLKW *10. ; Extra queue element space... ; one for writing to workfile, ; and reading from workfile, ; and outstanding marktime, ; one for each output device, ; (PIX uses one of those allocated ; for all the unused printers) .IF EQ V$JOB ; if not the XM version, .PSECT .IMPD.,D SPFBUF::.BLKW 256. ; SP forwarding buffer .ENDC; EQ V$JOB ; (otherwise, it's in SP handler) ;+ ; USR sensitive completion code is collected in program section .ROOT. ;- ; .PSECT .ROOT.,I .SBTTL SPOOL - Main Entry Point ;+ ; Main SPOOL entry point. ;- .PSECT .CODE.,I SPOOL:: .IF EQ V$JOB CALL SPINIT ; Call the initialization routine. JMP SPTASK ; Go to the task scheduler. ...... .IFF; EQ V$JOB JMP SPINIT ; Start the XM spooler ...... .ENDC; EQ V$JOB .END SPOOL