.TITLE DATA AREA .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 PPPDATA=LB:[200,200]RSXMC/PA;1,SY:[g,m]PPPDATA ;+ ; Common data area. ;- ; MODIFICATIONS RECORD ; ==================== ; V1.01 CJD 12-Jul-82 ; Add EIA forms options. ; Change error messages to start PP0, and in lower case, for V4 ; compatibility. .MCALL QIOW$,SDAT$,FDBDF$,FDRC$A,FDOP$A,NMBLK$,FSRSZ$,ALUN$ .PSECT DATA,D,RW,GBL .NLIST BEX TRUE==-1 FILLUN==1 ; Input file LUN FILFLG==1 ; and event flag ERLUN==2 ; Error message LUN ERFLG==2 ; and event flag PPLUN==3 ; The punch itself PPFLG==3 ; Words TSKBUF::.BLKW 2 ; Received task name PACKET::.BLKW 13. ; Received data RPYPKT::.WORD 0,0,0,0,0,0,0,0,0,0,0,0,0 ; Reply packet. Mostly zeroes FILES:: .BLKW 1 ; No of files in job FILUIC::.BLKW 1 ; File UIC FILACC::.BLKW 1 ; File access permit bits JOBUIC::.BLKW 1 ; Job UIC TIUCB:: .BLKW 1 ; UCB address of submitting terminal SPSAVE::.BLKW 1 ; Initial stack pointer ; Table of "PP0" entry addresses in message strings MESAGS::.WORD QIOMSG+1,FCSMSG+1,FRMMSG+1,DSWMSG+1,ILLMSG+1 .WORD 0 ; Terminator to table CHKSUM::.BLKB 8. ; Longitudinal bit checksums ; Bytes and strings. STATE:: .BYTE S.DORM ; Despooler state S.DORM==-1 ; Not started S.IDLE==0 ; Waiting for instructions S.JOB1==1 ; 1st job packet received, waiting for second S.FILE==2 ; 2nd job packet received S.ACTV==3 ; Punching active TAPE:: .BLKB 1 ; Tape type: T.8==0 ; 8-track T.5==1 ; 5-track T.7==2 ; 7-track QMFORM::.BLKB 1 ; Form type received from Queue Manager FORM:: .BLKB 1 ; Output form (MUST follow QMFORM): F.DFLT==0 ; 0=default: F.EVEN for 8-track tape, F.MURR for 5 F.EVEN==1 ; ASCII, even parity (default) F.ODD==2 ; ASCII, odd parity F.CLR==3 ; ASCII, parity clear F.SET==4 ; ASCII, parity set F.ASCI==4 ; Maximum ASCII code F.IMAG==5 ; Image mode F.BINA==6 ; Formatted binary F.MURR==7 ; Murray converted output E.EVEN==10 ; EIA, even parity E.ODD==11 ; EIA, odd parity (default) E.CLR==12 ; EIA, parity clear E.SET==13 ; EIA, parity set F.EIA==13 ; Maximum EIA code F.MAX==13 ; Maximum form number FLAGS:: .BLKB 1 ; Number of "flag" pages UCLC:: .BLKB 1 ; 0=UC only, 1=upper/lower case ATTRIB::.BLKB 1 ; File attributes. QP.ADE set to force file deletion COPIES::.BLKB 1 ; No of copies of file reqd LINE1:: .BYTE TRUE ; TRUE if this is first line of file STPSTA::.BYTE 1 ; Punch QIO status at STOP. -ve if punch error SHIFT:: .BYTE SH.LET ; Current shift for Murray output ; SH.LET==100 ; Bit mask for Murray letters shift (defined in MURRAY) ; SH.FIG==200 ; Bit mask for Murray figures shift INTRPT::.BLKB 1 ; Receive data interrupt flag ; "Flag pages" HEADER::.BLKB 35. ; File name DATIM:: .ASCII " " ; 4 spaces after filename TIME:: .ASCII "hh:mm " ; Time, hour & minute DAY:: .ASCII "dd-mmm-yy " ; Date ENDTIM::.ASCII "COPYRIGHT (C) 19" ; Copyright message YEAR:: .ASCII "?? " ; Last 2 figs of copyright year ; Insert name of copyright holder as an ASCII string .ASCII "SIRA INSTITUTE LTD." .ASCIZ " " ; Trailer ; Operator messages. The PP0's will be replaced by appropriate device code. ; The starting bell must be on an odd byte. .IF GE V$$RSN-40 .ODD QIOMSG::.ASCII <7>"PP0 -- *DIAG*-QIO error " QIONO::.BLKB 4 .ODD FCSMSG::.ASCII <7>"PP0 -- *FATAL*-File error " FCSNO:: .BLKB 4 .ODD FRMMSG::.ASCII <7>"PP0 -- *DIAG*-Illegal form No " FRMNO:: .BLKB 3 .ODD DSWMSG::.ASCII <7>"PP0 -- *DIAG*-Directive error " DSWNO:: .BLKB 4 .ODD ILLMSG::.ASCII <7>"PP0: -- *FATAL*-Command " ILLNO1::.ASCII "n at state " ILLNO2::.BLKB 1 ILLLEN==.-ILLMSG .IFF ; RSX V3.2 .ODD QIOMSG::.ASCII <7>"PPP0 -- *DIAG*-QIO ERROR " QIONO::.BLKB 4 .ODD FCSMSG::.ASCII <7>"PPP0 -- *FATAL*-FILE ERROR " FCSNO:: .BLKB 4 .ODD FRMMSG::.ASCII <7>"PPP0 -- *DIAG*-ILLEGAL FORM NO " FRMNO:: .BLKB 3 .ODD DSWMSG::.ASCII <7>"PPP0 -- *DIAG*-DIRECTIVE ERROR " DSWNO:: .BLKB 4 .ODD ILLMSG::.ASCII <7>"PPP0: -- *FATAL*-COMMAND " ILLNO1::.ASCII "n AT STATE " ILLNO2::.BLKB 1 ILLLEN==.-ILLMSG .ENDC ; DPB's .EVEN REPLY:: SDAT$ QMG...,RPYPKT ; Send data to Queue Manager ;;REPLY:: SDAT$ DUMQMG,RPYPKT ; Send data to dummy Queue Manager ; Error messages ERQIOW::QIOW$ IO.WBT,ERLUN,ERFLG,,IOSTAT,,<,,40> ; Assign error LUN AERLUN::ALUN$ ERLUN,CO,0 ; Punch output PPQIOW::QIOW$ IO.WAL,PPLUN,PPFLG,,IOSTAT ; Get file header info (See "The Multi-Tasker", v12 No 5 237-249, June 1980) RATQIO::QIOW$ IO.RAT,FILLUN,FILFLG,,IOSTAT,, RATATT::.BYTE 0,0 ; Read file information .WORD BUFFER ; To buffer .BYTE 0 .EVEN IOSTAT::.BLKW 2 ; Status block for all QIO's ; File control FSRSZ$ 1,,DATA ; 1 file FDB:: FDBDF$ FDRC$A ,BUFFER,512. FDOP$A FILLUN,,,FO.RD ; I/O buffers AUXBUF::.BLKB 512. ; Could need this much for Murray expansions BUFFER::.BLKB 512. ; Main buffer .BLKB 10. ; Guard space .END