Trailing-Edge
-
PDP-10 Archives
-
bb-jr93g-bb
-
7,6/ap015/hbsc.c15
There are 10 other files named hbsc.c15 in the archive. Click here to see a list.
REP 188/2 ;15C1
VHBSC=074
WIT
; 4(075) TPW 8-May-1986
; HASP: Check on buffer resources before starting to receive.
; 4(076) TPW 14-May-1986
; HASP: Correct the line idling exchange.
; 4(077) TPW 11-June-1986
; HASP: Validate device number before continuing to process
; a Request Input Permission RCB in HSRQMS
VHBSC=077
INS 48/30 ;15C2
;@HSPLIN 10$+4
CALL INFLO ;[075]Enough chunks to start accepting?
BCS 14$ ;[075]No, don't accept bid
REP 3/31 ;15C3
HSRECV: CALL INFLO ;check on line flow control thresholds
BR HSPXM5 ;yes - go try to send something
WIT
HSRECV: CALL INFLO ;[075]Are there sufficient chunks to receive?
BCC HSPXM5 ;[075]yes, take some input
DSCHED #EBQCHK,#5 ;[075]chunk threshold too low - wait and
BR HSPXM5 ;[075] see if the situation improves
REP 52/33 ;15C4
15$: DSCHED #EBINTR!EBQCHK!EBQMSG,#JIFSEC ;wait for something to happen
WIT
15$: DSCHED ,#JIFSEC ;[076]wait the proverbial second
INS 37/41 ;15C5
;@HSCDOT+11
TST TCMSG1(R5) ;[076]Check if messages for this task.
BEQ 22$ ;[076]None
REP 42/41 ;15C6
BIT #LF.SIM,LB.FGS(R4) ; simulation mode ?
WIT
;@HSCDOT 11$+4
22$: BIT #LF.SIM,LB.FGS(R4) ;[076] simulation mode ?
REP 9/47 ;15C7
ASL R1 ;dev no * 2
WIT
;@HSRQMS+4
CMPB R1,LB.NTC(R4) ;[077]is device within limits
BLOS 10$ ;[077]yes, go process the RCB
STOPCD HDO ;[077]invalid device number
10$: ASL R1 ;[077]dev no * 2
REP 23/47 ;15C8
11$: ASR R1 ;get back the device number
CMPB R1,LB.NTC(R4) ;if out of limit, check for rcb
BHI 20$ ;yes, its out of limits
CMPB TCSRCB(R5),TCCTP(R2) ;does it match the rcb?
WIT
;@HSRQMS 11$
11$: CMPB TCSRCB(R5),TCCTP(R2) ;[077]is this the device we want?
REP 29/56 ;15C9
INFLO: SAVE <R0,R4> ;check line flow control thresholds
; and do universal suspend/unspend accordingly
WIT
INFLO: SAVE <R0,R1,R4> ;[075]check line flow control thresholds
CLC ;[075]
REP 46/56 ;15C10
10$: BIT #FCSUNV,TCTFCS(R5) ;check if already suspended
BNE 35$ ;yes - don't bother
BIS #FCSUNV,TCTFCS(R5) ;set suspend
BIS #TCHGST,TCST2(R5) ;indicate status chnge
; here if there are enough chunks to receive data
20$:
CMP R0,#CHSRPL ;have we got enough to restart line
BLT 35$ ;let current state ride
BIT #FCSUNV,TCTFCS(R5) ; check if already clear
BEQ 25$ ;yes - don't do again
BIC #FCSUNV,TCTFCS(R5) ;unsuspend hasp data
BIS #TCHGST,TCST2(R5) ;set up to receive
.ENDC ;.IF EQ,FT.HSP
25$: ;on the input
WIT
;@INFLO 10$
10$:
BIT #LF.SIM,LB.FGS(R4) ;[075]Check what mode we're in.
BEQ 40$ ;[075]Termination
MOV #FCSADS,R0 ;[075]Get suspension FCS
MOV TCTFCS(R5),R1 ;[075]Get status of emulation devices
XOR R0,R1 ;[075]Are they suspended already?
BEQ 30$ ;[075]Yes, just return unsuccessfully
MOV #FCSADS,TCTFCS(R5) ;[075]No, suspend on a per device basis
BR 41$ ;[075]Note the change
40$: BIT #FCSUNV,TCTFCS(R5) ;[075]Termination, already suspended?
BNE 30$ ;[075]Yes, just return unsuccessfully
BIS #FCSUNV,TCTFCS(R5) ;[075]No, do a system-wide suspend
41$: BIS #TCHGST,TCST2(R5) ;[075]Indicate status change
BR 30$ ;[075] and return showing there is a problem.
; here if there are enough chunks to receive data
20$: CMP R0,#CHSRPL ;have we got enough to restart line
BLT 35$ ;let current state ride
;@INFLO 20$+2
BIT #LF.SIM,LB.FGS(R4) ;[075]Check what mode we're in.
BEQ 42$ ;[075]Termination
MOV #FCSAGO,R0 ;[075]Get All Devices Go sequence
MOV TCTFCS(R5),R1 ;[075]Get status of emulation devices
XOR R0,R1 ;[075]Unsuspended already?
BEQ INPON ;[075]yes - don't do again
MOV #FCSAGO,TCTFCS(R5) ;[075] Set all HASP devices go.
BR 25$ ;[075] Return success.
42$: BIT #FCSUNV,TCTFCS(R5) ;[075] check if already clear
BEQ INPON ;[075]yes - don't do again
BIC #FCSUNV,TCTFCS(R5) ;unsuspend hasp data
.ENDC ;.IF EQ,FT.HSP
25$: BIS #TCHGST,TCST2(R5) ;[075]Note a status change
INPON: CLC ;[075]Turn on input
DEL 68/56 ;15C11
INPON: CLC
REP 73/56 ;15C12
BGE 25$ ;yes
WIT
;@INFLO 29$+1
BGE INPON ;[075]yes
REP 85/56 ;15C13
35$: RESTOR <R4,R0> ;flush the resource calc
WIT
;@INPOFF 35$
35$: RESTOR <R4,R1,R0> ;[075]flush the resource calc
SUM 251473