.TITLE ENDJOB .IDENT /V1.01/ .NLIST TOC,SYM .ENABL LC ; Part of Sira Paper Tape Punch Despooler. ; ; COPYRIGHT(C) 1981,1982 Sira Institute Ltd., ; South Hill, Chislehurst, Kent, BR7 5EH, England. ; ; Author: C.J. Doran ; ; Assemble as: ; >MAC PPPENDJOB=LB:[1,1]RUNMAC/ML,SY:[g,m]PPPENDJOB ;+ ; Process end-of-job packet from Queue Manager. If a job is being punched, ; this is an instruction to abort it. If not, just return to idle state. ;- ; MODIFICATIONS RECORD ; ==================== ; V1.01 14-Jul-82 CJD ; Clear TI: UCB address at end of job to say we don't have a submitter ; any more. .MCALL QIOW$R,CLOSE$ .PSECT CODE,I,RO ENDJOB::CMPB STATE,#S.FILE ; Job active? BHI 10$ ; S.ACTV>S.FILE => file being processed BEQ 20$ ; S.FILE means no file open TSTB STATE ; Idle? BEQ 20$ ; That's OK too JSR PC,ILLCMD ; Anything else is illegal 10$: CLOSE$ #FDB,FCSERR ; Close file if necessary (don't delete it) 20$: QIOW$R PPQIOW,#IO.DET ; Detach punch MOVB IOSTAT,%1 ; See if it worked BPL 30$ ; Yes, OK CMPB %1,#IE.DNA ; Not attached in the first place? BEQ 30$ ; Yes, don't report that JSR PC,QIOERR ; Else error 30$: CLRB STATE ; Despooler now started, but idle CLR TIUCB ; No submitter to report errors to MOV (PC)+,%0 ; Load start of reply to QMG .BYTE QM.DUN,QM.JOB ; Done, job JMP SNDQMG ; Send message and return to wait for message .END