Trailing-Edge
-
PDP-10 Archives
-
bb-bt99m-bb
-
dnptp.p11
There are 4 other files named dnptp.p11 in the archive. Click here to see a list.
.SBTTL DNPTP - PAPER TAPE PUNCH ROUTINES 28 MAR 79
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981,1984 BY DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
VRPTP=006 ;FILE EDIT NUMBER
.IF NE PTPN
DRESET=0
DDBGEN PTP,PP,PTPN,2,<DS.OUT> ;MAKE A DEVICE BLOCK FOR THE PTP
; DB.DCS - DEVICE CONTROL STATUS BITS
; 000001 ;MASTER ERROR
; 000002 ;NO POWER
; 000004 ;END OF TAPE
PTPSER: MOV #PTPMML,DB.MML(J) ;largest size we like
MOVB #1,DB.DVV(J) ;CONTROLLER TYPE 1
JSR PC,DVCCFM ;SEND CONNECT CONFIRM
CLR R1 ;IN CASE NO ERROR
MOV @DB.HDW(J),R0 ;GET PUNCH STATUS
BPL 30$
INC R1 ;MASTER ERROR FLAG
30$: CMP R1,DB.DCS(J) ;DID THAT CHANGE STATUS ?
BEQ 36$
BIS #DS.XDS,@J
MOV R1,DB.DCS(J) ;SAVE UPDATED STATUS
36$: JSR PC,DVXDCS ;SEND STATUS TO THE 10
TST DB.DCS(J)
BNE 60$ ;IF TROUBLE WE ARE DONE
JSR PC,DVXDRQ ;SEND DATA REQUESTS
BIT #DS.ACT,@J ;IS PUNCH ALREADY PUNCHING
BNE 50$ ;IF SO WE ARE DONE
TST DB.OBF(J) ;IS THERE OUTPUT ?
BEQ 64$ ;IF NOT JUST WAIT
MOVB #-5,DB.TIM(J) ;GIVE IT 4-5 SECONDS TO PUNCH
BIS #DS.ACT,@J ;FLAG DEVICE IS ACTIVE
BIS #PP.INE,@DB.HDW(J) ;ENABLE INTERRUPTS
50$: RTS PC
60$: MOVB #-5,DB.TIM(J) ;CHECK PUNCH AGAIN IN A WHILE
64$: BIT #DS.DSC!DS.DIE,@J ;TIME TO QUIT ?
BEQ 50$
JMP DVCCFM ;SEND DISCONNECT MSG
PTPTIM: BIT #DS.ACT,@J ;WAS PUNCH NOT READY ?
BEQ 20$
TWIDDLE @DB.HDW(J) ;COUNT TIMES THIS HAPPENS
BIC #DS.ACT,@J ;NO LONGER ACTIVE
BIC #PP.INE,@DB.HDW(J) ;DISABLE INTERRUPTS
20$: JMP QUEDEV ;QUEUE UP THE DEVICE
DEVINT PTP,PP
PTPINT: SAVE <R0,R1>
TST @DB.HDW(J) ;IS HDW ERROR FLAG UP ?
BMI 20$ ;STOP PUNCHING
10$: JSR PC,DVGBYT ;GET NEXT BYTE TO PUNCH
BR 40$ ;WE GOT ONE
BR 30$ ;GOT MESSAGE TYPE
20$: BIC #PP.INE,@DB.HDW(J) ;DISABLE INTERRUPTS
BIC #DS.ACT,@J ;FLAG NOT ACTIVE
CLRB DB.TIM(J) ;RESET TIMER
JSR PC,QUEDEV
BR 90$
30$: DEC R0 ;DATA ?
BEQ 10$
DEC R0 ;DATA WITH EOR ?
BEQ 10$
.IF EQ DGUTS
TRAP
.IFF
CTYMSG NCL
35$: JSR PC,DVGBYT ;GET NEXT BYTE
BR 35$ ;EAT BAD MSG
BR 30$ ;TRY AGAIN WITH NEXT MSG
BR 20$ ;ALL DONE
.ENDC ;.IF EQ DGUTS
40$: MOVB #-2,DB.TIM(J) ;RESET TIMER
MOVB R0,PP.DAT ;PUNCH DATA
90$: RESTORE <R1,R0,J>
RTI
.ENDC;.IF NE PTPN