Trailing-Edge
-
PDP-10 Archives
-
BB-R595B-SM_11-9-85
-
mcb/nsp/nsp.lst
There is 1 other file named nsp.lst in the archive. Click here to see a list.
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 1
30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (1)
; 0001 Module NSP (
; 0002 ident = 'X01160'
; 0003 ) =
; 0004 begin
; 0005
; 0006 !
; 0007 ! COPYRIGHT (c) 1980, 1981, 1982
; 0008 ! DIGITAL EQUIPMENT CORPORATION
; 0009 ! Maynard, Massachusetts
; 0010 !
; 0011 ! This software is furnished under a license and may be used
; 0012 ! and copied only in accordance with the terms of such license
; 0013 ! and with the inclusion of the above copyright notice. This
; 0014 ! software or any other copies thereof may not be provided or
; 0015 ! otherwise made available to any other person. No title to
; 0016 ! and ownership of the software is hereby transferred.
; 0017 !
; 0018 ! The information in this software is subject to change
; 0019 ! without notice and should not be construed as a commitment
; 0020 ! by DIGITAL EQUIPMENT CORPORATION.
; 0021 !
; 0022 ! DIGITAL assumes no responsibility for the use or reliability
; 0023 ! of its software on equipment which is not supplied by
; 0024 ! DIGITAL.
; 0025 !
; 0026
; 0027 !++
; 0028 !
; 0029 ! FACILITY: Network Services Layer
; 0030 !
; 0031 ! ABSTRACT: This module contains the interfaces to Session Control. All
; 0032 ! CCB's enter NSP through this module. The NSP timers are
; 0033 ! maintained in this module.
; 0034 !
; 0035 ! ENVIRONMENT: MCB
; 0036 !
; 0037 ! AUTHOR: Ron Platukis CREATION DATE: 9-june-80
; 0038 !
; 0039 ! MODIFIED BY:
; 0040 !
; 0041 ! 01 Alan Peckham,Ron Platukis 22-Oct-80
; 0042 ! - Move NDB bind in CCB_RETRN.
; 0043 ! Clear C_STS before sending CCB to XPT in XPT_XMIT.
; 0044 ! Set C_PRM4 to PDB address or -1 if Reserve Port in XPT_XMIT.
; 0045 !
; 0046 ! 02 Ron Platukis 23-oct-80
; 0047 ! - Set PORTstate negative if Reserved Port.
; 0048 !
; 0049 ! 03 Ron Platukis 12-nov-80
; 0050 ! - Fix bind in ONCE_A_SECOND for reserve ports.
; 0051 !
; 0052 ! 04 Ron Platukis 20-nov-80
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 2
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (1)
; 0053 ! -Add protection in RCV_DISPATCH for hostile L_DSTADDR.
; 0054 !
; 0055 ! 05 Ron Platukis 1-dec-80
; 0056 ! -Add CMP_LSS and CMP_LEQ macros to perform 12-bit arith.
; 0057 !
; 0058 ! 06 Ron Platukis 3-dec-80
; 0059 ! -Add timer support for V3.1.
; 0060 !
; 0061 ! 07 Ron Platukis 24-dec-80
; 0062 ! -Add routine NSP_INI.
; 0063 !
; 0064 ! 08 Ron Platukis 12-jan-81
; 0065 ! -Change linkages to BLISS, add access for NSP Data Base address.
; 0066 !
; 0067 ! 09 Ron Platukis 20-jan-81
; 0068 ! -Add Network Management event logging code.
; 0069 !
; 0070 ! 10 Ron Platukis 25-mar-81
; 0071 ! -Allow data timers in routine CLOCK to also run in DI state.
; 0072 !
; 0073 ! 11 Ron Platukis 22-april-81
; 0074 ! -Shorten endless loop in routine QUEUE_MSG.
; 0075 !
; 0076 ! 12 Ron Platukis 4-september-81
; 0077 ! -fix dot bug in routine ABORT.
; 0078 !
; 0079 ! 13 Ron Platukis 6-october-81
; 0080 ! -fix sign bug in routine C_XMIT.
; 0081 !
; 0082 ! 14 Ron Platukis 28-october-81
; 0083 ! a) -in routine D_REQST allow data requests in DI state also.
; 0084 ! b) -in routine PDB_INIT add initilization of timer variables.
; 0085 !
; 0086 ! 15 Ron Platukis 8-june-82
; 0087 ! a) -clear out ADDRrem variable in PBD_INIT( a debug aide).
; 0088 ! b) -release DSR in XCP_CI if returned status is CE_RTE.
; 0089 !
; 0090 ! 16 Alan Peckham 22-november-82
; 0091 ! -Eliminate event buffer allocation (no longer used).
; 0092 ! -Add call to NDB_GET for NSPself in CCP_COMPLETE to
; 0093 ! establish seconds-since-last-zeroed for executor.
; 0094 !
; 0095 !--
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 3
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (2)
; 0096 !
; 0097 ! INCLUDE FILES:
; 0098 !
; 0099 library
; 0100 'mcb:XPORTx';
; 0101 library
; 0102 'MCB:MCBLIB';
; 0103 library
; 0104 'mcb:nmxlib';
; 0105 require
; 0106 'NSPBLI:NSPDATA';
; 0592 require
; 0593 'NSPBLI:NSINFO';
; 0705
; 0706
; 0707 %if %bliss (bliss36) %then require 'BED:NETPAR'; %fi
; 0708
; 0709
; 0710 !
; 0711 ! TABLE OF CONTENTS:
; 0712 !
; 0713 forward routine
; 0714 ABORT: novalue, !Abort logical link
; 0715 CCB_GET:,
; 0716 CCB_HDR_GET:,
; 0717 CCB_RETRN: novalue,
; 0718 CCP_COMPLETE: MCB_CCB_MOD novalue, !TRANSPORT-OPEN complete
; 0719 CLOCK: novalue, !NSP timer control
; 0720 CLS_PORT: novalue, !Close a Session Control port
; 0721 CONN_REXMT: novalue, !Connect retransmission
; 0722 C_ACC: novalue, !Accept remote connection
; 0723 C_REJ: novalue, !Reject remote connection
; 0724 C_XMIT: novalue, !Initiate a remote connection
; 0725 DADD: novalue,
; 0726 DATA_RCEV: novalue, !Supply receive buffer
; 0727 DATA_SND: novalue, !Xmit normal data segments
; 0728 DISCONNECT: novalue, !Synchronous disconnect
; 0729 D_REQST: novalue, !Request data segments
; 0730 INTR_REQ: novalue, !Request interrupt message
; 0731 INTR_SND: novalue, !Xmit interrupt data
; 0732 NSP_DISPATCH: MCB_CCB_MOD novalue, !Main CCB dispatch
; 0733 NSP_INI: novalue, !Turn on NSP
; 0734 OPEN_PORT: novalue, !Open Session Control port
; 0735 PDB_INIT: novalue,
; 0736 PIN_SETUP: novalue, !Process Initilization
; 0737 QUEUE_MSG: novalue, !Queue up a segment
; 0738 RCV_DISPATCH: MCB_CCB_MOD novalue, !Dispatch on msg type
; 0739 STATE_PORT: novalue, !Return state of port
; 0740 SC_RETRN: MCB_CCB_MOD novalue, !Recv enables from SC
; 0741 STATUS_NSP: novalue, !Get status of NSP
; 0742 TIMER: MCB_CCB_MOD novalue, !Timer function dispatch
; 0743 TIMEOUT:, !Count other retransmissions
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 4
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (2)
; 0744 TO_NM: MCB_CCB_MOD novalue, ! NM dispatch to NS2
; 0745 XME_COMPLETE: MCB_CCB_MOD novalue, !Xmit complete dispatch
; 0746 XCP_CI: novalue, !CONNECT-XMT complete
; 0747 XCP_CONN: novalue, !ACCEPT, REJECT, ABORT, DISCONNECT complete
; 0748 XCP_DATA: novalue, !DATA-XMT complete
; 0749 XCP_OTH: novalue; !Other-Data xmit complete
; 0750
; 0751
; 0752 !
; 0753 ! MACROS:
; 0754 !
; L 0755 %if %bliss (bliss36)
; U 0756 %then
; U 0757 macro
; U 0758 PXX_PRESET (LENGTH) [] =
; U 0759 [%count, PORTstate] = N$SCL,
; U 0760 [%count, ADDRloc] = %count,
; U 0761 [%count, INTtail] = PXX [%count, INThead],
; U 0762 [%count, MSGtail] = PXX [%count, MSGhead],
; U 0763 [%count, INTRtail] = PXX [%count, INTRhead],
; U 0764 [%count, DATRtail] = PXX [%count, DATRhead],
; U 0765 [%count, ACKtail] = PXX [%count, ACKhead],
; U 0766 [%count, OTHtail] = PXX [%count, OTHhead],
; U 0767 [%count, BUFFtail] = PXX [%count, BUFFhead],
; U 0768 [%count, RCVtail] = PXX [%count, RCVhead]
; U 0769 %if %count lss LENGTH-1
; U 0770 %then ,PXX_PRESET (LENGTH)
; U 0771 %fi %,
; U 0772
; U 0773 NXX_PRESET (LENGTH) [] =
; U 0774 [%count, NDaddr] = 0
; U 0775 %if %count lss LENGTH-1
; U 0776 %then ,NXX_PRESET (LENGTH)
; U 0777 %fi %,
; U 0778
; U 0779 RXX_PRESET (LENGTH) [] =
; U 0780 [%count, MSGtyp] = MSG_NONE
; U 0781 %if %count lss LENGTH-1
; U 0782 %then ,RXX_PRESET (LENGTH)
; U 0783 %fi %;
; U 0784
; 0785 %fi
; 0786
; 0787 !
; 0788 ! EQUATED SYMBOLS:
; 0789 !
; 0790
; 0791 !
; 0792 ! OWN STORAGE:
; 0793
; L 0794 %if %bliss (bliss36)
; U 0795 %then
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 5
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (2)
; U 0796 own
; U 0797 PXX: blockvector [NS_TPT, PDB_SIZE] field (PORT_FIELDS)
; U 0798 preset (PXX_PRESET (NS_TPT)),
; U 0799
; U 0800 RXX: blockvector [NS_TRS, RDB_SIZE] field (PORT_FIELDS)
; U 0801 preset (RXX_PRESET (NS_TRS)),
; U 0802
; U 0803 NXX: blockvector [XP_NN, ND_SIZE] field (NODE_FIELDS)
; U 0804 preset (NXX_PRESET (XP_NN));
; U 0805
; U 0806
; U 0807 global
; U 0808 NSP$DB: block [NSP_SIZE] field (NSP_FIELDS)
; U 0809 preset (
; U 0810 [NSPself] = NS_slf,
; U 0811 [NSPact_tim] = NS_act,
; U 0812 [NSPdelay] = NS_dly,
; U 0813 [NSPweight] = NS_wgt,
; U 0814 [NSPretrans] = NS_ret,
; U 0815 [NSPtotal] = NS_tpt,
; U 0816 [NSPt_rsv] = NS_trs,
; U 0817 [NSPt_nodes] = XP_nn,
; U 0818 [NSPbuf] = NS_buf,
; U 0819 [ADDRports] = PXX,
; U 0820 [ADDRnodes] = NXX,
; U 0821 [ADDRresv] = RXX);
; 0822 %fi
; 0823
; 0824
; 0825 !
; 0826
; 0827 !
; 0828 ! EXTERNAL REFERENCES:
; 0829 external
; 0830 %name('.crdat'): vector[2],
; 0831 $DSPCR;
; 0832
; 0833 bind DB = %name('.crdat')[1]: ref block field(NSP_fields);
; 0834
; 0835 !
; 0836 !
; 0837 !++
; 0838 !
; 0839 !NETWORK SERVICES DISPATCH VECTOR
; 0840 !
; 0841 !All CCB's enter NSP through a dispatch off this table
; 0842 !
; 0843 !--
; P 0844 bind $NSPLL = TABLE$( $DSPCR, FC_CCP, (FC_XME, NSP_DISPATCH),
; P 0845 (FC_RCE, SC_RETRN), (FC_CTL, TO_NM),
; P 0846 (FC_TIM, TIMER), (FC_XCP, XME_COMPLETE),
; 0847 (FC_RCP, RCV_DISPATCH), (FC_CCP, CCP_COMPLETE));
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 6
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (2)
; 0848
; 0849
; 0850 $MCB_PROCESS( name = NSP, llc_dispatch = $NSPLL)
; 0851
; 0852
; 0853
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 7
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (3)
; 0854 routine ABORT ( CCB, PDB) : novalue = !
; 0855
; 0856 !++
; 0857 ! FUNCTIONAL DESCRIPTION:
; 0858 ! This routine processes the Session Control ABORT call.
; 0859 !
; 0860 ! FORMAL PARAMETERS:
; 0861 ! CCB = CCB address
; 0862 ! PDB = Port Data Base address
; 0863 !
; 0864 ! IMPLICIT INPUTS:
; 0865 ! DB = NSP data base address
; 0866 !
; 0867 ! IMPLICIT OUTPUTS:
; 0868 ! None
; 0869 !
; 0870 ! ROUTINE VALUE:
; 0871 ! COMPLETION CODES:
; 0872 ! None
; 0873 !
; 0874 ! SIDE EFFECTS:
; 0875 ! None
; 0876 !--
; 0877
; 0878 begin
; 0879 map CCB: ref block field(C_fields);
; 0880 map PDB: ref block field(PORT_fields);
; 0881
; 0882 local
; 0883 NDB : ref block field(NODE_fields);
; 0884
; 0885 NDB = .PDB[NODElnk];
; 0886 If .PDB[PORTstate] eql N$SRUN
; 0887 Then
; 0888 begin
; 0889 PDB[PORTstate] = N$SDI;
; 0890 PDB[NUMhigh] = .PDB[ACKrcv_dat];
; 0891 PDB[DATres] = false;
; 0892 PDB[OTHres] = false;
; 0893 PDB[DELAYstr_tim] = 0;
; 0894 PDB[TIMERdat] = 0;
; 0895 PDB[TIMERoth] = 0;
; 0896 MAP$( .DB[BIASnodes]);
; 0897 DADD( NDB[NDb_xmt], .CCB[C_CNT]);
; 0898 MAP$( .DB[BIASports]);
; 0899 CALL$E(FLUSH_QUEUES, .DB[NSPns2_pix], .PDB, N$EABL);
; 0900
; 0901 If CCB_HDR_GET( .CCB, CCB, .PDB)
; 0902 Then
; 0903 CALL$E(DI_BLD, .DB[NSPns2_pix], .CCB, .PDB)
; 0904 Else
; 0905 begin
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 8
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (3)
; 0906 CMQIN$( PDB[MSG_queue], .CCB);
; 0907 PDB[OTHres] = true
; 0908 end;
; 0909 return;
; 0910 end
; 0911 Else
; 0912 begin
; 0913 If (.PDB[PORTstate] eql N$SCN) or
; 0914 (.PDB[PORTstate] eql N$SDN)
; 0915 Then
; 0916 CCB[C_STS] = N$EABR
; 0917 Else
; 0918 CCB[C_STS] = N$ESTE;
; 0919 end;
; 0920 CCB[C_FNC] = FC_XCP;
; 0921 LLCRS$( .CCB)
; 0922 end;
.TITLE NSP
.IDENT /X01160/
000000 .PSECT ......, D
000000 055210 ; HEADER
U.45: .RAD50 /NSP/
000002 000403 .WORD 403
000004 000000 .WORD 0
000006 000000 .WORD 0
000010 000000 .WORD 0
000012 000000' .WORD U.44
000014 000000G .WORD .DSPCR
000016 000000G .WORD .DSPCR
000020 000000G .WORD MCB$V0
000022 000000G .WORD MCB$V1
000024 140310 .WORD 140310
000026 143716 .WORD 143716
000030 001400 .WORD 1400
000032 000000 .WORD 0
000034 000000 .WORD 0
000036 000000 .WORD 0
000000 .PSECT $PLIT$, RO , D
000000 000000G P.AAA: .WORD $DSPCR
000002 000000V .WORD U.25
000004 000000V .WORD U.33
000006 000000G .WORD $DSPCR
000010 000000V .WORD U.37
000012 000000V .WORD U.35
000014 000000V .WORD U.38
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 9
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (3)
000016 000000V .WORD U.31
000020 000000G .WORD $DSPCR
000022 000000V .WORD U.11
.GLOBL .CRDAT, $DSPCR, .DSPCR, MCB$V0
.GLOBL MCB$V1, KISAR6, FLUSH.QUEUES, $CALLE
.GLOBL DI.BLD, $CMQIN, $SCHED
073470 ; SC
U.1= 73470
055210 ; NSP
U.2= 55210
114224 ; XPT
U.3= 114224
114205 ; XPE
U.4= 114205
055227 ; NS1
U.5= 55227
055230 ; NS2
U.6= 55230
000000' ; $NSPLL
U.44= P.AAA
.SBTTL ABORT
000000 .PSECT $CODE$, RO
000000 004167 000000G ; ABORT
U.7: JSR R1,$SAVE4 ; 0854
000004 016601 000014 MOV 14(SP),R1 ; PDB,* 0885
000010 016104 000010 MOV 10(R1),R4 ; *,NDB
000014 016603 000016 MOV 16(SP),R3 ; CCB,* 0897
000020 121127 000013 CMPB (R1),#13 ; 0886
000024 001126 BNE 3$
000026 112711 000014 MOVB #14,(R1) ; 0889
000032 016161 000034 000026 MOV 34(R1),26(R1) ; 0890
000040 005061 000066 CLR 66(R1) ; 0891
000044 005061 000070 CLR 70(R1) ; 0892
000050 005061 000062 CLR 62(R1) ; 0893
000054 005061 000012 CLR 12(R1) ; 0894
000060 005061 000014 CLR 14(R1) ; 0895
000064 016700 000002G MOV .CRDAT+2,R0 ; 0896
000070 016067 000030 000000G MOV 30(R0),KISAR6
000076 010446 MOV R4,-(SP) ; NDB,* 0897
000100 062716 000014 ADD #14,(SP)
000104 016346 000022 MOV 22(R3),-(SP)
000110 004767 000000V JSR PC,U.18
000114 016700 000002G MOV .CRDAT+2,R0 ; 0898
000120 016067 000014 000000G MOV 14(R0),KISAR6
000126 012716 177764 MOV #-14,(SP) ; 0899
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 10
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (3)
000132 010146 MOV R1,-(SP)
000134 012746 000002 MOV #2,-(SP)
000140 012746 000000G MOV #FLUSH.QUEUES,-(SP)
000144 016700 000002G MOV .CRDAT+2,R0
000150 005046 CLR -(SP)
000152 116016 000047 MOVB 47(R0),(SP)
000156 004767 000000G JSR PC,$CALLE
000162 010316 MOV R3,(SP) ; 0901
000164 012746 000034 MOV #34,-(SP)
000170 060616 ADD SP,(SP) ; CCB,*
000172 010146 MOV R1,-(SP)
000174 004767 000000V JSR PC,U.9
000200 022626 CMP (SP)+,(SP)+
000202 006000 ROR R0
000204 103021 BCC 1$
000206 010116 MOV R1,(SP) ; 0903
000210 016646 000032 MOV 32(SP),-(SP) ; CCB,*
000214 012746 000002 MOV #2,-(SP)
000220 012746 000000G MOV #DI.BLD,-(SP)
000224 016700 000002G MOV .CRDAT+2,R0
000230 005046 CLR -(SP)
000232 116016 000047 MOVB 47(R0),(SP)
000236 004767 000000G JSR PC,$CALLE
000242 062706 000010 ADD #10,SP
000246 000412 BR 2$ ; 0901
000250 012703 000102 1$: MOV #102,R3 ; 0906
000254 060103 ADD R1,R3
000256 016604 000032 MOV 32(SP),R4 ; CCB,*
000262 004767 000000G JSR PC,$CMQIN
000266 012761 000001 000070 MOV #1,70(R1) ; 0907
000274 062706 000014 2$: ADD #14,SP ; 0886
000300 000207 RTS PC ; 0888
000302 121127 000020 3$: CMPB (R1),#20 ; 0913
000306 001403 BEQ 4$
000310 121127 000016 CMPB (R1),#16 ; 0914
000314 001004 BNE 5$
000316 012763 177773 000014 4$: MOV #-5,14(R3) ; 0916
000324 000403 BR 6$ ; 0913
000326 012763 177775 000014 5$: MOV #-3,14(R3) ; 0918
000334 016600 000016 6$: MOV 16(SP),R0 ; CCB,* 0920
000340 112760 000014 000012 MOVB #14,12(R0)
000346 010004 MOV R0,R4 ; CCB,* 0921
000350 004767 000000G JSR PC,$SCHED
000354 000207 RTS PC ; 0854
; Routine Size: 119 words, Routine Base: $CODE$ + 0000
; Maximum stack depth per invocation: 16 words
; 0923
; 0924
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 11
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (4)
; 0925 routine CCB_GET (CCB, PDB) = !
; 0926
; 0927 !++
; 0928 ! FUNCTIONAL DESCRIPTION:
; 0929 ! This routine allocates a CCB.
; 0930 !
; 0931 ! FORMAL PARAMETERS:
; 0932 ! CCB = CCB address
; 0933 ! PDB = Port Data Base address
; 0934 !
; 0935 ! IMPLICIT INPUTS:
; 0936 ! None
; 0937 !
; 0938 ! IMPLICIT OUTPUTS:
; 0939 ! None
; 0940 !
; 0941 ! ROUTINE VALUE:
; 0942 ! COMPLETION CODES:
; 0943 ! None
; 0944 !
; 0945 ! SIDE EFFECTS:
; 0946 ! None
; 0947 !--
; 0948
; 0949
; 0950 begin
; 0951 map PDB: ref block field(PORT_fields);
; 0952
; 0953 local
; 0954 LCCB: ref block field(C_fields);
; 0955
; 0956 If not CCBGT$(LCCB)
; 0957 Then
; 0958 return false;
; 0959 LCCB[C_STK] = 0;
; 0960 LCCB[C_CHN] = 0;
; 0961 LCCB[C_BIAS] = 0;
; 0962 LCCB[C_ADDR] = 0;
; 0963 LCCB[C_PRM1] = 0;
; 0964 LCCB[C_PRM2] = 0;
; 0965 LCCB[C_PRM3] = 0;
; 0966 LCCB[C_PRM4] = 0;
; 0967 LCCB[C_PRM5] = 0;
; 0968
; 0969 If .PDB neq -1
; 0970 Then
; 0971 PDB[COUNTres] = .PDB[COUNTres] + 1;
; 0972 .CCB = .LCCB;
; 0973 return true;
; 0974 end;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 12
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (4)
.GLOBL $CCBGT
.SBTTL CCB.GET
000000 010446 ; CCB.GET
U.8: MOV R4,-(SP) ; 0925
000002 004767 000000G JSR PC,$CCBGT ; 0956
000006 103437 BLO 2$ ; 0958
000010 005064 000004 CLR 4(R4) ; *(LCCB) 0959
000014 005064 000002 CLR 2(R4) ; *(LCCB) 0960
000020 005064 000016 CLR 16(R4) ; *(LCCB) 0961
000024 005064 000020 CLR 20(R4) ; *(LCCB) 0962
000030 005064 000024 CLR 24(R4) ; *(LCCB) 0963
000034 005064 000026 CLR 26(R4) ; *(LCCB) 0964
000040 005064 000030 CLR 30(R4) ; *(LCCB) 0965
000044 005064 000032 CLR 32(R4) ; *(LCCB) 0966
000050 005064 000034 CLR 34(R4) ; *(LCCB) 0967
000054 026627 000004 177777 CMP 4(SP),#-1 ; PDB,* 0969
000062 001404 BEQ 1$
000064 016600 000004 MOV 4(SP),R0 ; PDB,* 0971
000070 005260 000054 INC 54(R0)
000074 010476 000006 1$: MOV R4,@6(SP) ; LCCB,CCB 0972
000100 012700 000001 MOV #1,R0 ; 0950
000104 000401 BR 3$
000106 005000 2$: CLR R0 ; 0925
000110 012604 3$: MOV (SP)+,R4
000112 000207 RTS PC
; Routine Size: 38 words, Routine Base: $CODE$ + 0356
; Maximum stack depth per invocation: 2 words
; 0975
; 0976
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 13
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (5)
; 0977 routine CCB_HDR_GET ( CCB, LCCB, PDB ) = !
; 0978
; 0979 !++
; 0980 ! FUNCTIONAL DESCRIPTION:
; 0981 ! This routine allocates a CCB and a header buffer from DSR space.
; 0982 !
; 0983 ! FORMAL PARAMETERS:
; 0984 ! CCB = CCB address
; 0985 ! LCCB = CCB Address to stack
; 0986 ! PDB = Port Data Base address
; 0987 !
; 0988 ! IMPLICIT INPUTS:
; 0989 ! None
; 0990 !
; 0991 ! IMPLICIT OUTPUTS:
; 0992 ! None
; 0993 !
; 0994 ! ROUTINE VALUE:
; 0995 ! COMPLETION CODES:
; 0996 ! None
; 0997 !
; 0998 ! SIDE EFFECTS:
; 0999 ! None
; 1000 !--
; 1001
; 1002
; 1003 begin
; 1004 map CCB: ref block field(C_fields);
; 1005 map PDB: ref block field(PORT_fields);
; 1006 map LCCB: ref block field(C_fields);
; 1007
; 1008
; 1009 If not CCBGT$(.LCCB)
; 1010 Then
; 1011 return false;
; 1012 begin
; 1013 bind XCCB = .LCCB: ref block field(C_fields);
; 1014 XCCB[C_STK] = 0;
; 1015 XCCB[C_CHN] = 0;
; 1016 XCCB[C_PRM1] = 0;
; 1017 XCCB[C_PRM2] = 0;
; 1018 XCCB[C_PRM3] = 0;
; 1019 XCCB[C_PRM4] = 0;
; 1020 XCCB[C_PRM5] = 0;
; 1021 XCCB[C_BIAS] = 0;
; 1022
; 1023 If not $MCB_GET_DSR( hdb_size, XCCB[C_ADDR])
; 1024 Then
; 1025 begin
; 1026 CCBRT$(..LCCB);
; 1027 return false;
; 1028 end;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 14
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (5)
; 1029
; 1030 If .CCB neq 0
; 1031 Then
; 1032 XCCB[C_STK] = .CCB;
; 1033 end;
; 1034
; 1035 If .PDB neq -1
; 1036 Then
; 1037 PDB[COUNTres] = .PDB[COUNTres] + 1;
; 1038 return true;
; 1039 end;
.GLOBL $DSRGT, $CCBRT
.SBTTL CCB.HDR.GET
000000 004167 000000G ; CCB.HDR.GET
U.9: JSR R1,$SAVE4 ; 0977
000004 004767 000000G JSR PC,$CCBGT ; 1009
000010 103460 BCS 5$
000012 010476 000016 MOV R4,@16(SP) ; $MCB$R4,LCCB
000016 010402 MOV R4,R2 ; LCCB,* 1014
000020 005062 000004 CLR 4(R2)
000024 005062 000002 CLR 2(R2) ; 1015
000030 005062 000024 CLR 24(R2) ; 1016
000034 005062 000026 CLR 26(R2) ; 1017
000040 005062 000030 CLR 30(R2) ; 1018
000044 005062 000032 CLR 32(R2) ; 1019
000050 005062 000034 CLR 34(R2) ; 1020
000054 005062 000016 CLR 16(R2) ; 1021
000060 012701 000014 MOV #14,R1 ; 1023
000064 004767 000000G JSR PC,$DSRGT
000070 103403 BCS 1$
000072 010062 000020 MOV R0,20(R2) ; $MCB$R0,*
000076 000405 BR 2$
000100 017604 000016 1$: MOV @16(SP),R4 ; LCCB,* 1026
000104 004767 000000G JSR PC,$CCBRT
000110 000420 BR 5$ ; 1025
000112 016600 000020 2$: MOV 20(SP),R0 ; CCB,* 1030
000116 001402 BEQ 3$
000120 010062 000004 MOV R0,4(R2) ; 1032
000124 026627 000014 177777 3$: CMP 14(SP),#-1 ; PDB,* 1035
000132 001404 BEQ 4$
000134 016600 000014 MOV 14(SP),R0 ; PDB,* 1037
000140 005260 000054 INC 54(R0)
000144 012700 000001 4$: MOV #1,R0 ; 1003
000150 000207 RTS PC
000152 005000 5$: CLR R0 ; 0977
000154 000207 RTS PC
; Routine Size: 55 words, Routine Base: $CODE$ + 0472
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 15
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (5)
; Maximum stack depth per invocation: 6 words
; 1040
; 1041
; 1042
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 16
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (6)
; 1043 routine CCB_RETRN ( CCB, PDB): novalue = !
; 1044
; 1045 !++
; 1046 ! FUNCTIONAL DESCRIPTION:
; 1047 ! This routine deallocates a CCB.
; 1048 !
; 1049 ! FORMAL PARAMETERS:
; 1050 ! CCB = CCB address
; 1051 ! PDB = Port Data Base address
; 1052 !
; 1053 ! IMPLICIT INPUTS:
; 1054 ! None
; 1055 !
; 1056 ! IMPLICIT OUTPUTS:
; 1057 ! None
; 1058 !
; 1059 ! ROUTINE VALUE:
; 1060 ! COMPLETION CODES:
; 1061 ! None
; 1062 !
; 1063 ! SIDE EFFECTS:
; 1064 ! None
; 1065 !--
; 1066
; 1067
; 1068 begin
; 1069 map PDB: ref block field(PORT_fields);
; 1070
; 1071 local
; 1072 temp,
; 1073 NDB : ref block field(NODE_fields),
; 1074 CLZ_CCB: ref block field(C_fields);
; 1075
; 1076
; 1077 CCBRT$( .CCB);
; 1078
; 1079 If .PDB neq -1
; 1080 Then
; 1081 begin
; 1082 PDB[COUNTres] = .PDB[COUNTres] - 1;
; 1083
; 1084 If .PDB[PORTstate] eql N$SCL and
; 1085 .PDB[COUNTres] eql 0
; 1086 Then
; 1087 begin
; 1088 NDB = .PDB[NODElnk];
; 1089 PDB[FLAGinuse] = false;
; 1090 CMQRM$( PDB[MSG_queue], CLZ_CCB);
; 1091 CLZ_CCB[C_FNC] = FC_XCP;
; 1092 CLZ_CCB[C_STS] = N$SSUC;
; 1093 LLCRS$( .CLZ_CCB);
; 1094 end;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 17
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (6)
; 1095 End;
; 1096 end;
.GLOBL $CMQRM
.SBTTL CCB.RETRN
000000 004167 000000G ; CCB.RETRN
U.10: JSR R1,$SAVE4 ; 1043
000004 016604 000016 MOV 16(SP),R4 ; CCB,* 1077
000010 004767 000000G JSR PC,$CCBRT
000014 016603 000014 MOV 14(SP),R3 ; PDB,* 1079
000020 020327 177777 CMP R3,#-1
000024 001431 BEQ 1$
000026 005363 000054 DEC 54(R3) ; 1082
000032 121327 000017 CMPB (R3),#17 ; 1084
000036 001024 BNE 1$
000040 005763 000054 TST 54(R3) ; 1085
000044 001021 BNE 1$
000046 016304 000010 MOV 10(R3),R4 ; *,NDB 1088
000052 142763 000001 000042 BICB #1,42(R3) ; 1089
000060 062703 000102 ADD #102,R3 ; 1090
000064 004767 000000G JSR PC,$CMQRM
000070 112764 000014 000012 MOVB #14,12(R4) ; *,*(CLZ.CCB) 1091
000076 012764 000001 000014 MOV #1,14(R4) ; *,*(CLZ.CCB) 1092
000104 004767 000000G JSR PC,$SCHED ; 1093
000110 000207 1$: RTS PC ; 1043
; Routine Size: 37 words, Routine Base: $CODE$ + 0650
; Maximum stack depth per invocation: 6 words
; 1097
; 1098
; 1099
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 18
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (7)
; 1100 routine CCP_COMPLETE ( CCB, FCM) : MCB_CCB_MOD novalue = !
; 1101
; 1102 !++
; 1103 ! FUNCTIONAL DESCRIPTION:
; 1104 ! This routine processes completes for the Network Management Interface
; 1105 ! calls.
; 1106 !
; 1107 ! FORMAL PARAMETERS:
; 1108 ! CCB = CCB address
; 1109 ! FCM = FC_MOD of CCB
; 1110 !
; 1111 ! IMPLICIT INPUTS:
; 1112 ! DB = NSP data base address
; 1113 !
; 1114 ! IMPLICIT OUTPUTS:
; 1115 ! None
; 1116 !
; 1117 ! ROUTINE VALUE:
; 1118 ! COMPLETION CODES:
; 1119 ! None
; 1120 !
; 1121 ! SIDE EFFECTS:
; 1122 ! None
; 1123 !--
; 1124
; 1125 begin
; 1126 map CCB: ref block field(C_fields);
; 1127
; 1128 bind PORT = .DB[ADDRports]: blockvector[0, PDB_size] field(PORT_fields);
; 1129
; 1130 local
; 1131 temp,
; 1132 STK_CCB: ref block field(C_fields);
; 1133
; 1134 STK_CCB = .CCB[C_STK];
; 1135
; 1136 If .CCB[C_STS] eql CE_ERR
; 1137 Then
; 1138 STK_CCB[C_STS] = N$ETRN
; 1139 Else
; 1140 begin
; 1141 DB[NSPrunning] = true;
; 1142 STK_CCB[C_STS] = N$SSUC;
; 1143 STK_CCB[C_CNT] = .DB[NSPbuf];
; 1144 STK_CCB[C_PRM1] = .DB[NSPself];
; 1145 begin
; 1146 bind NDB = temp: ref block field(NODE_fields);
; 1147 CALL$E( NDB_GET, .DB[NSPns2_pix], .STK_CCB, NDB);
; 1148 NDB[NDactive] = .NDB[NDactive] - 1;
; 1149 end;
; 1150 $mcb_enable_long_timer( );
; 1151 db[nsptimer] = .db[nsptimer] + 1;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 19
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (7)
; 1152 MAP$( .DB[BIASports]);
; 1153
; 1154 Incr J from 0 to (.DB[NSPtotal] - 1) do
; 1155 begin
; 1156 bind PDB = PORT[.J,0,0,0,0]: block field(PORT_fields);
; 1157 PDB[ADDran] = RND$( 256);
; 1158 end
; 1159 end;
; 1160 STK_CCB[C_FNC] = FC_XCP;
; 1161 LLCRS$( .STK_CCB);
; 1162 CCB_RETRN( .CCB, -1);
; 1163 end;
.GLOBL NDB.GET, $LTMEN, $RND
.SBTTL CCP.COMPLETE
000000 005746 ; CCP.COMPLETE
U.11: TST -(SP) ; 1100
000002 010405 MOV R4,R5 ; *,CCB
000004 016700 000002G MOV .CRDAT+2,R0 ; 1128
000010 016046 000016 MOV 16(R0),-(SP) ; 1125
000014 016504 000004 MOV 4(R5),R4 ; *(CCB),STK.CCB 1134
000020 026527 000014 177760 CMP 14(R5),#-20 ; *(CCB),* 1136
000026 001004 BNE 1$
000030 012764 177762 000014 MOV #-16,14(R4) ; *,*(STK.CCB) 1138
000036 000471 BR 4$ ; 1136
000040 152760 000004 000072 1$: BISB #4,72(R0) ; 1141
000046 012764 000001 000014 MOV #1,14(R4) ; *,*(STK.CCB) 1142
000054 016064 000042 000022 MOV 42(R0),22(R4) ; *,*(STK.CCB) 1143
000062 016064 000002 000024 MOV 2(R0),24(R4) ; *,*(STK.CCB) 1144
000070 012746 000004 MOV #4,-(SP) ; 1147
000074 060616 ADD SP,(SP) ; NDB,*
000076 010446 MOV R4,-(SP) ; STK.CCB,*
000100 012746 000002 MOV #2,-(SP)
000104 012746 000000G MOV #NDB.GET,-(SP)
000110 005046 CLR -(SP)
000112 116016 000047 MOVB 47(R0),(SP)
000116 004767 000000G JSR PC,$CALLE
000122 016600 000014 MOV 14(SP),R0 ; NDB,* 1148
000126 005360 000002 DEC 2(R0)
000132 004767 000000G JSR PC,$LTMEN ; 1150
000136 016700 000002G MOV .CRDAT+2,R0 ; 1151
000142 005210 INC (R0)
000144 016067 000014 000000G MOV 14(R0),KISAR6 ; 1152
000152 016001 000020 MOV 20(R0),R1 ; 1154
000156 005002 CLR R2 ; J
000160 000414 BR 3$
000162 010203 2$: MOV R2,R3 ; J,* 1156
000164 070327 000140 MUL #140,R3
000170 066603 000012 ADD 12(SP),R3
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 20
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (7)
000174 012700 000400 MOV #400,R0 ; 1157
000200 004767 000000G JSR PC,$RND
000204 110063 000005 MOVB R0,5(R3)
000210 005202 INC R2 ; J 1154
000212 020201 3$: CMP R2,R1 ; J,*
000214 002762 BLT 2$
000216 062706 000012 ADD #12,SP ; 1140
000222 112764 000014 000012 4$: MOVB #14,12(R4) ; *,*(STK.CCB) 1160
000230 004767 000000G JSR PC,$SCHED ; 1161
000234 010546 MOV R5,-(SP) ; CCB,* 1162
000236 012746 177777 MOV #-1,-(SP)
000242 004767 177420 JSR PC,U.10
000246 062706 000010 ADD #10,SP ; 1100
000252 000207 RTS PC
; Routine Size: 86 words, Routine Base: $CODE$ + 0762
; Maximum stack depth per invocation: 8 words
; 1164
; 1165
; 1166
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 21
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (8)
; 1167 routine CLOCK : novalue = !
; 1168
; 1169 !++
; 1170 ! FUNCTIONAL DESCRIPTION:
; 1171 ! This routine is called every second to provide timer support.
; 1172 !
; 1173 ! FORMAL PARAMETERS:
; 1174 ! None
; 1175 !
; 1176 ! IMPLICIT INPUTS:
; 1177 ! DB = NSP data base address
; 1178 !
; 1179 ! IMPLICIT OUTPUTS:
; 1180 ! None
; 1181 !
; 1182 ! ROUTINE VALUE:
; 1183 ! COMPLETION CODES:
; 1184 ! None
; 1185 !
; 1186 ! SIDE EFFECTS:
; 1187 ! None
; 1188 !--
; 1189
; 1190 begin
; 1191
; 1192 bind PORT = .DB[ADDRports]: blockvector[0, PDB_SIZE] field(PORT_fields);
; 1193 local
; 1194 CCB: ref block field(C_fields);
; 1195
; 1196 MAP$( .DB[BIASports]);
; 1197
; 1198 Incr J from 0 to (.DB[NSPtotal] - 1) do
; 1199 begin
; 1200 bind PDB = PORT[.J,0,0,0,0]: block field(PORT_fields);
; 1201
; 1202 If .PDB[FLAGinuse]
; 1203 Then
; 1204 begin
; 1205 If .PDB[DELAYstr_tim] neq 0
; 1206 Then
; 1207 PDB[DELAYstr_tim] = .PDB[DELAYstr_tim] + 1;
; 1208 Select .PDB[PORTstate] of
; 1209 Set
; 1210 [N$SCC, N$SDR, N$SDI]:
; 1211
; 1212 begin
; 1213 If .PDB[TIMERcon] gtr 0
; 1214 Then
; 1215 begin
; 1216 PDB[TIMERcon] = .PDB[TIMERcon] -1;
; 1217
; 1218 If .PDB[TIMERcon] eql 0
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 22
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (8)
; 1219 Then
; 1220 begin
; 1221 PDB[DELAYstr_tim] = 1;
; 1222 PDB[COUNToth_retrans] = .PDB[COUNToth_retrans] + 1;
; 1223
; 1224 If not TIMEOUT( PDB, .PDB[COUNToth_retrans])
; 1225 Then
; 1226 PDB[TIMERcon] = 1
; 1227 Else
; 1228 CONN_REXMT( PDB);
; 1229 end;
; 1230 end;
; 1231 end;
; 1232
; 1233 [N$SRUN, N$SDI]:
; 1234
; 1235 begin
; 1236 If .PDB[TIMERoth] gtr 0
; 1237 Then
; 1238 begin
; 1239 PDB[TIMERoth] = .PDB[TIMERoth] -1;
; 1240
; 1241 If .PDB[TIMERoth] eql 0
; 1242 Then
; 1243 begin
; 1244 PDB[OTHstate] = OTHtimeout;
; 1245 PDB[COUNToth_retrans] = .PDB[COUNToth_retrans] + 1;
; 1246
; 1247 If not TIMEOUT( PDB, .PDB[COUNToth_retrans])
; 1248 Then
; 1249 PDB[TIMERoth] = 1
; 1250 Else
; 1251 CALL$E(SND_INTERRUPT, .DB[NSPns1_pix], PDB)
; 1252 end;
; 1253 end;
; 1254 If .PDB[TIMERdat] gtr 0
; 1255 Then
; 1256 begin
; 1257 PDB[TIMERdat] = .PDB[TIMERdat] -1;
; 1258
; 1259 If .PDB[TIMERdat] eql 0
; 1260 Then
; 1261 begin
; 1262 PDB[COUNTdat_retrans] = .PDB[COUNTdat_retrans] + 1;
; 1263 PDB[FLAGseg] = false;
; 1264
; 1265 If not TIMEOUT( PDB, .PDB[COUNTdat_retrans])
; 1266 Then
; 1267 PDB[TIMERdat] = 1
; 1268 Else
; 1269 CALL$E(SND_ONE_DATA, .DB[NSPns1_pix], PDB)
; 1270 end;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 23
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (8)
; 1271 end;
; 1272 If .PDB[TIMERinact] gtr 0
; 1273 Then
; 1274 begin
; 1275 PDB[TIMERinact] = .PDB[TIMERinact] - 1;
; 1276
; 1277 If .PDB[TIMERinact] eql 0 and
; 1278 .PDB[OTHstate] eql OTHready
; 1279 Then
; 1280 begin
; 1281 If CCB_GET( CCB, PDB)
; 1282 Then
; 1283 begin
; 1284 CCB[C_FNC] = FC_XME;
; 1285 CCB[C_MOD] = N_XDRQ;
; 1286 CCB[C_LIX] = .PDB[PID];
; 1287 CCB[C_PIX] = .DB[NSPns0_pix];
; 1288 CCB[C_PRM1] = 0;
; 1289 CCB[C_PRM4] = PDB;
; 1290 LLCRS$( .CCB);
; 1291 end
; 1292 Else
; 1293 PDB[TIMERinact] = 1;
; 1294 end
; 1295
; 1296 end
; 1297 end;
; 1298 Tes;
; 1299 end;
; 1300 end;
; 1301
; 1302 end;
.GLOBL SND.INTERRUPT, SND.ONE.DATA
.SBTTL CLOCK
000000 004167 000000G ; CLOCK
U.12: JSR R1,$SAVE5 ; 1167
000004 005746 TST -(SP)
000006 016705 000002G MOV .CRDAT+2,R5 ; 1192
000012 016567 000014 000000G MOV 14(R5),KISAR6 ; 1196
000020 016546 000020 MOV 20(R5),-(SP) ; 1198
000024 005003 CLR R3 ; J
000026 000167 000552 JMP 13$
000032 010301 1$: MOV R3,R1 ; J,* 1200
000034 070127 000140 MUL #140,R1
000040 066501 000016 ADD 16(R5),R1
000044 132761 000001 000042 BITB #1,42(R1) ; 1202
000052 001002 BNE 2$
000054 000167 000522 JMP 12$
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 24
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (8)
000060 012700 000062 2$: MOV #62,R0 ; 1205
000064 060100 ADD R1,R0
000066 005710 TST (R0)
000070 001401 BEQ 3$
000072 005210 INC (R0) ; 1207
000074 111104 3$: MOVB (R1),R4 ; 1208
000076 020427 000003 CMP R4,#3
000102 001406 BEQ 4$
000104 020427 000005 CMP R4,#5
000110 001403 BEQ 4$
000112 020427 000014 CMP R4,#14
000116 001033 BNE 6$
000120 012702 000016 4$: MOV #16,R2 ; 1213
000124 060102 ADD R1,R2
000126 005712 TST (R2)
000130 003426 BLE 6$
000132 005312 DEC (R2) ; 1216
000134 001024 BNE 6$ ; 1218
000136 012710 000001 MOV #1,(R0) ; 1221
000142 105261 000053 INCB 53(R1) ; 1222
000146 010146 MOV R1,-(SP) ; 1224
000150 005046 CLR -(SP)
000152 116116 000053 MOVB 53(R1),(SP)
000156 004767 000000V JSR PC,U.36
000162 022626 CMP (SP)+,(SP)+
000164 006000 ROR R0
000166 103403 BLO 5$
000170 012712 000001 MOV #1,(R2) ; 1226
000174 000404 BR 6$ ; 1224
000176 010146 5$: MOV R1,-(SP) ; 1228
000200 004767 000000V JSR PC,U.14
000204 005726 TST (SP)+
000206 020427 000013 6$: CMP R4,#13 ; 1208
000212 002573 BLT 12$
000214 020427 000014 CMP R4,#14
000220 003170 BGT 12$
000222 012702 000014 MOV #14,R2 ; 1236
000226 060102 ADD R1,R2
000230 005712 TST (R2)
000232 003441 BLE 8$
000234 005312 DEC (R2) ; 1239
000236 001037 BNE 8$ ; 1241
000240 112761 000002 000064 MOVB #2,64(R1) ; 1244
000246 105261 000053 INCB 53(R1) ; 1245
000252 010146 MOV R1,-(SP) ; 1247
000254 005046 CLR -(SP)
000256 116116 000053 MOVB 53(R1),(SP)
000262 004767 000000V JSR PC,U.36
000266 022626 CMP (SP)+,(SP)+
000270 006000 ROR R0
000272 103403 BLO 7$
000274 012712 000001 MOV #1,(R2) ; 1249
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 25
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (8)
000300 000416 BR 8$ ; 1247
000302 010146 7$: MOV R1,-(SP) ; 1251
000304 012746 000001 MOV #1,-(SP)
000310 012746 000000G MOV #SND.INTERRUPT,-(SP)
000314 016700 000002G MOV .CRDAT+2,R0
000320 005046 CLR -(SP)
000322 116016 000046 MOVB 46(R0),(SP)
000326 004767 000000G JSR PC,$CALLE
000332 062706 000010 ADD #10,SP
000336 012702 000012 8$: MOV #12,R2 ; 1254
000342 060102 ADD R1,R2
000344 005712 TST (R2)
000346 003441 BLE 10$
000350 005312 DEC (R2) ; 1257
000352 001037 BNE 10$ ; 1259
000354 105261 000052 INCB 52(R1) ; 1262
000360 142761 000040 000042 BICB #40,42(R1) ; 1263
000366 010146 MOV R1,-(SP) ; 1265
000370 005046 CLR -(SP)
000372 116116 000052 MOVB 52(R1),(SP)
000376 004767 000000V JSR PC,U.36
000402 022626 CMP (SP)+,(SP)+
000404 006000 ROR R0
000406 103403 BLO 9$
000410 012712 000001 MOV #1,(R2) ; 1267
000414 000416 BR 10$ ; 1265
000416 010146 9$: MOV R1,-(SP) ; 1269
000420 012746 000001 MOV #1,-(SP)
000424 012746 000000G MOV #SND.ONE.DATA,-(SP)
000430 016700 000002G MOV .CRDAT+2,R0
000434 005046 CLR -(SP)
000436 116016 000046 MOVB 46(R0),(SP)
000442 004767 000000G JSR PC,$CALLE
000446 062706 000010 ADD #10,SP
000452 012702 000036 10$: MOV #36,R2 ; 1272
000456 060102 ADD R1,R2
000460 105712 TSTB (R2)
000462 001447 BEQ 12$
000464 105312 DECB (R2) ; 1275
000466 001045 BNE 12$ ; 1277
000470 105761 000064 TSTB 64(R1) ; 1278
000474 001042 BNE 12$
000476 012746 000004 MOV #4,-(SP) ; 1281
000502 060616 ADD SP,(SP) ; CCB,*
000504 010146 MOV R1,-(SP)
000506 004767 176406 JSR PC,U.8
000512 022626 CMP (SP)+,(SP)+
000514 006000 ROR R0
000516 103027 BCC 11$
000520 016604 000002 MOV 2(SP),R4 ; CCB,* 1284
000524 112764 000002 000012 MOVB #2,12(R4)
000532 112764 000030 000013 MOVB #30,13(R4) ; 1285
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 26
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (8)
000540 116164 000004 000010 MOVB 4(R1),10(R4) ; 1286
000546 016700 000002G MOV .CRDAT+2,R0 ; 1287
000552 116064 000045 000011 MOVB 45(R0),11(R4)
000560 005064 000024 CLR 24(R4) ; 1288
000564 010164 000032 MOV R1,32(R4) ; 1289
000570 004767 000000G JSR PC,$SCHED ; 1290
000574 000402 BR 12$ ; 1281
000576 112712 000001 11$: MOVB #1,(R2) ; 1293
000602 005203 12$: INC R3 ; J 1198
000604 020316 13$: CMP R3,(SP) ; J,*
000606 002002 BGE 14$
000610 000167 177216 JMP 1$
000614 022626 14$: CMP (SP)+,(SP)+ ; 1167
000616 000207 RTS PC
; Routine Size: 200 words, Routine Base: $CODE$ + 1236
; Maximum stack depth per invocation: 13 words
; 1303
; 1304
; 1305
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 27
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (9)
; 1306 routine CLS_PORT ( CCB, PDB) : novalue = !
; 1307
; 1308 !++
; 1309 ! FUNCTIONAL DESCRIPTION:
; 1310 ! This routine processes the Session Control Interface Call CLOSE.
; 1311 !
; 1312 ! FORMAL PARAMETERS:
; 1313 ! CCB = CCB address
; 1314 ! PDB = Port Data Base address
; 1315 !
; 1316 ! IMPLICIT INPUTS:
; 1317 ! DB = NSP data base address
; 1318 !
; 1319 ! IMPLICIT OUTPUTS:
; 1320 ! None
; 1321 !
; 1322 ! ROUTINE VALUE:
; 1323 ! COMPLETION CODES:
; 1324 ! None
; 1325 !
; 1326 ! SIDE EFFECTS:
; 1327 ! None
; 1328 !--
; 1329
; 1330 begin
; 1331 map CCB: ref block field(C_fields);
; 1332 map PDB: ref block field(PORT_fields);
; 1333
; 1334
; 1335 local
; 1336 NDB : ref block field(NODE_fields);
; 1337
; 1338 NDB = .PDB[NODElnk];
; 1339
; 1340 If .PDB[FLAGinuse]
; 1341 Then
; 1342 begin
; 1343 PDB[PORTstate] = N$SCL;
; 1344 PDB[DATres] = false;
; 1345 PDB[OTHres] = false;
; 1346 DB[NSPmax] = .DB[NSPmax] - 1;
; 1347 CALL$E( FLUSH_QUEUES, .DB[NSPns2_pix], .PDB, N$ECLS);
; 1348
; 1349 ! these next few lines of code are to prevent Transport from
; 1350 ! filling up it's intercept data base, since the plug can
; 1351 ! be pulled from our end without sending any DI's or DC's( which
; 1352 ! really screws Transport up when playing intercept to a phase 2
; 1353 ! node). hopefully an engineered solution will replace this.
; 1354 ! BEGINNING OF HACK........................................
; 1355
; 1356 if .PDB[VERSIONrem] eql V3_1
; 1357 then
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 28
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (9)
; 1358 begin
; 1359 local xpepix;
; 1360 PDVID$( XPE, xpepix);
; 1361 Call$p( $xpecln, .xpepix, .DB[NSPself], .PDB[ADDRloc]);
; 1362 end;
; 1363 !.............................................. END OF HACK
; 1364
; 1365 Do (PDB[ADDran] = .PDB[ADDran] + 1)
; 1366 While .PDB[ADDran] eql 0;
; 1367 MAP$( .DB[BIASnodes]);
; 1368 NDB[NDactive] = .NDB[NDactive] -1;
; 1369 MAP$( .DB[BIASports]);
; 1370
; 1371 IF .PDB[COUNTres] eql 0
; 1372 Then
; 1373 begin
; 1374 PDB[FLAGinuse] = false;
; 1375 CCB[C_STS] = N$SSUC;
; 1376 CCB[C_FNC] = FC_XCP;
; 1377 LLCRS$( .CCB);
; 1378 end
; 1379 Else
; 1380 CMQIN$(PDB[MSG_queue], .CCB)
; 1381 end
; 1382 Else
; 1383 begin
; 1384 CCB[C_STS] = N$ESTE;
; 1385 CCB[C_FNC] = FC_XCP;
; 1386 LLCRS$( .CCB)
; 1387 end;
; 1388 end;
.GLOBL P.DTGT, $CALLI, $XPECLN, $CALLP
.SBTTL CLS.PORT
000000 004167 000000G ; CLS.PORT
U.13: JSR R1,$SAVE5 ; 1306
000004 005746 TST -(SP)
000006 016602 000020 MOV 20(SP),R2 ; PDB,* 1338
000012 016205 000010 MOV 10(R2),R5 ; *,NDB
000016 016604 000022 MOV 22(SP),R4 ; CCB,* 1375
000022 012746 000042 MOV #42,-(SP) ; 1340
000026 060216 ADD R2,(SP)
000030 132776 000001 000000 BITB #1,@0(SP)
000036 001550 BEQ 6$
000040 112712 000017 MOVB #17,(R2) ; 1343
000044 005062 000066 CLR 66(R2) ; 1344
000050 005062 000070 CLR 70(R2) ; 1345
000054 016700 000002G MOV .CRDAT+2,R0 ; 1346
000060 005360 000012 DEC 12(R0)
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 29
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (9)
000064 012746 177766 MOV #-12,-(SP) ; 1347
000070 010246 MOV R2,-(SP)
000072 012746 000002 MOV #2,-(SP)
000076 012746 000000G MOV #FLUSH.QUEUES,-(SP)
000102 005046 CLR -(SP)
000104 116016 000047 MOVB 47(R0),(SP)
000110 004767 000000G JSR PC,$CALLE
000114 117600 000012 MOVB @12(SP),R0 ; 1356
000120 042700 177763 BIC #177763,R0
000124 020027 000004 CMP R0,#4
000130 001042 BNE 2$
000132 012716 000014 MOV #14,(SP) ; 1360
000136 060616 ADD SP,(SP) ; $MCB$MY.INDEX,*
000140 012746 114205 MOV #-63573,-(SP)
000144 012746 000002 MOV #2,-(SP)
000150 012746 000000G MOV #P.DTGT,-(SP)
000154 004767 000000G JSR PC,$CALLI
000160 062706 000006 ADD #6,SP
000164 010001 MOV R0,R1 ; *,$MCB$STATUS
000166 006000 ROR R0
000170 103002 BCC 1$
000172 016600 000014 MOV 14(SP),R0 ; $MCB$MY.INDEX,$MCB$HANDLE
000176 006001 1$: ROR R1 ; $MCB$STATUS
000200 016216 000004 MOV 4(R2),(SP) ; 1361
000204 016703 000002G MOV .CRDAT+2,R3
000210 016346 000002 MOV 2(R3),-(SP)
000214 012746 000002 MOV #2,-(SP)
000220 012746 000000G MOV #$XPECLN,-(SP)
000224 010046 MOV R0,-(SP) ; XPEPIX,*
000226 004767 000000G JSR PC,$CALLP
000232 062706 000010 ADD #10,SP ; 1358
000236 012700 000004 2$: MOV #4,R0 ; 1365
000242 060200 ADD R2,R0
000244 105260 000001 3$: INCB 1(R0)
000250 001775 BEQ 3$ ; 1366
000252 016700 000002G MOV .CRDAT+2,R0 ; 1367
000256 016067 000030 000000G MOV 30(R0),KISAR6
000264 005365 000002 DEC 2(R5) ; *(NDB) 1368
000270 016700 000002G MOV .CRDAT+2,R0 ; 1369
000274 016067 000014 000000G MOV 14(R0),KISAR6
000302 005762 000054 TST 54(R2) ; 1371
000306 001014 BNE 4$
000310 142776 000001 000012 BICB #1,@12(SP) ; 1374
000316 012764 000001 000014 MOV #1,14(R4) ; 1375
000324 112764 000014 000012 MOVB #14,12(R4) ; 1376
000332 004767 000000G JSR PC,$SCHED ; 1377
000336 000405 BR 5$ ; 1371
000340 012703 000102 4$: MOV #102,R3 ; 1380
000344 060203 ADD R2,R3
000346 004767 000000G JSR PC,$CMQIN
000352 062706 000012 5$: ADD #12,SP ; 1342
000356 000410 BR 7$ ; 1340
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 30
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (9)
000360 012764 177775 000014 6$: MOV #-3,14(R4) ; 1384
000366 112764 000014 000012 MOVB #14,12(R4) ; 1385
000374 004767 000000G JSR PC,$SCHED ; 1386
000400 022626 7$: CMP (SP)+,(SP)+ ; 1306
000402 000207 RTS PC
; Routine Size: 130 words, Routine Base: $CODE$ + 2056
; Maximum stack depth per invocation: 18 words
; 1389
; 1390
; 1391
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 31
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (10)
; 1392 routine CONN_REXMT ( PDB) : novalue = !
; 1393
; 1394 !++
; 1395 ! FUNCTIONAL DESCRIPTION:
; 1396 ! This routine retransmits Connect/Disconnect messages for whose
; 1397 ! timers have expired.
; 1398 !
; 1399 ! FORMAL PARAMETERS:
; 1400 ! PDB = Port Data Base address
; 1401 !
; 1402 ! IMPLICIT INPUTS:
; 1403 ! DB = NSP data base address
; 1404 !
; 1405 ! IMPLICIT OUTPUTS:
; 1406 ! None
; 1407 !
; 1408 ! ROUTINE VALUE:
; 1409 ! COMPLETION CODES:
; 1410 ! None
; 1411 !
; 1412 ! SIDE EFFECTS:
; 1413 ! None
; 1414 !--
; 1415
; 1416
; 1417 begin
; 1418 map PDB: ref block field(PORT_fields);
; 1419
; 1420 local
; 1421 NDB : ref block field(NODE_fields),
; 1422 CCB: ref block field(C_fields);
; 1423
; 1424 NDB = .PDB[NODElnk];
; 1425
; 1426 If CCB_HDR_GET( .PDB[MSGhead], CCB, .PDB)
; 1427 Then
; 1428 begin
; 1429 MAP$( .DB[BIASnodes]);
; 1430 NDB[NDtimeout] = .NDB[NDtimeout] + 1;
; 1431 MAP$( .DB[BIASports]);
; 1432 CMQRM$( PDB[MSG_queue], CCB[C_CHN]);
; 1433 PDB[DELAYstr_tim] = 1;
; 1434
; 1435 If .PDB[PORTstate] eql N$SCC
; 1436 Then
; 1437 CALL$E(CC_BLD, .DB[NSPns2_pix], .CCB, .PDB)
; 1438 Else
; 1439 CALL$E(DI_BLD, .DB[NSPns2_pix], .CCB, .PDB);
; 1440 end
; 1441 Else
; 1442 begin
; 1443 PDB[OTHres] = true;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 32
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (10)
; 1444 PDB[TIMERcon] = 1;
; 1445 end;
; 1446
; 1447 end;
.GLOBL CC.BLD
.SBTTL CONN.REXMT
000000 004167 000000G ; CONN.REXMT
U.14: JSR R1,$SAVE4 ; 1392
000004 005746 TST -(SP)
000006 016601 000016 MOV 16(SP),R1 ; PDB,* 1424
000012 016103 000010 MOV 10(R1),R3 ; *,NDB
000016 016146 000102 MOV 102(R1),-(SP) ; 1426
000022 012746 000004 MOV #4,-(SP)
000026 060616 ADD SP,(SP) ; CCB,*
000030 010146 MOV R1,-(SP)
000032 004767 175752 JSR PC,U.9
000036 062706 000006 ADD #6,SP
000042 006000 ROR R0
000044 103064 BCC 4$
000046 016700 000002G MOV .CRDAT+2,R0 ; 1429
000052 016067 000030 000000G MOV 30(R0),KISAR6
000060 005263 000036 INC 36(R3) ; *(NDB) 1430
000064 016700 000002G MOV .CRDAT+2,R0 ; 1431
000070 016067 000014 000000G MOV 14(R0),KISAR6
000076 012703 000102 MOV #102,R3 ; 1432
000102 060103 ADD R1,R3
000104 004767 000000G JSR PC,$CMQRM
000110 103403 BCS 1$
000112 011600 MOV (SP),R0 ; CCB,*
000114 010460 000002 MOV R4,2(R0) ; $MCB$R4,*
000120 012761 000001 000062 1$: MOV #1,62(R1) ; 1433
000126 016700 000002G MOV .CRDAT+2,R0 ; 1437
000132 121127 000005 CMPB (R1),#5 ; 1435
000136 001010 BNE 2$
000140 010146 MOV R1,-(SP) ; 1437
000142 016646 000002 MOV 2(SP),-(SP) ; CCB,*
000146 012746 000002 MOV #2,-(SP)
000152 012746 000000G MOV #CC.BLD,-(SP)
000156 000407 BR 3$
000160 010146 2$: MOV R1,-(SP) ; 1439
000162 016646 000002 MOV 2(SP),-(SP) ; CCB,*
000166 012746 000002 MOV #2,-(SP)
000172 012746 000000G MOV #DI.BLD,-(SP)
000176 005046 3$: CLR -(SP)
000200 116016 000047 MOVB 47(R0),(SP)
000204 004767 000000G JSR PC,$CALLE
000210 062706 000012 ADD #12,SP ; 1428
000214 000406 BR 5$ ; 1426
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 33
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (10)
000216 012761 000001 000070 4$: MOV #1,70(R1) ; 1443
000224 012761 000001 000016 MOV #1,16(R1) ; 1444
000232 005726 5$: TST (SP)+ ; 1392
000234 000207 RTS PC
; Routine Size: 79 words, Routine Base: $CODE$ + 2462
; Maximum stack depth per invocation: 12 words
; 1448
; 1449
; 1450
; 1451
; 1452
; 1453
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 34
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (11)
; 1454 routine C_REJ ( CCB, PDB) : novalue = !
; 1455
; 1456 !++
; 1457 ! FUNCTIONAL DESCRIPTION:
; 1458 ! This routine processes the Session Control REJECT call.
; 1459 !
; 1460 ! FORMAL PARAMETERS:
; 1461 ! CCB = CCB address
; 1462 ! PDB = Port Data Base address
; 1463 !
; 1464 ! IMPLICIT INPUTS:
; 1465 ! DB = NSP data base address
; 1466 !
; 1467 ! IMPLICIT OUTPUTS:
; 1468 ! None
; 1469 !
; 1470 ! ROUTINE VALUE:
; 1471 ! COMPLETION CODES:
; 1472 ! None
; 1473 !
; 1474 ! SIDE EFFECTS:
; 1475 ! None
; 1476 !--
; 1477
; 1478 begin
; 1479 map CCB: ref block field(C_fields);
; 1480 map PDB: ref block field(PORT_fields);
; 1481
; 1482 local
; 1483 NDB : ref block field(NODE_fields);
; 1484
; 1485 NDB = .PDB[NODElnk];
; 1486
; 1487 If .PDB[PORTstate] eql N$SCR
; 1488 Then
; 1489 begin
; 1490 MAP$( .DB[BIASnodes]);
; 1491 DADD( NDB[NDb_xmt], .CCB[C_CNT]);
; 1492 MAP$( .DB[BIASports]);
; 1493 PDB[PORTstate] = N$SDR;
; 1494
; 1495 If CCB_HDR_GET( .CCB, CCB, .PDB)
; 1496 Then
; 1497 CALL$E(DI_BLD, .DB[NSPns2_pix], .CCB, .PDB)
; 1498 Else
; 1499 begin
; 1500 CMQIN$( PDB[MSG_queue], .CCB);
; 1501 PDB[OTHres] = true
; 1502 end;
; 1503 return;
; 1504 end
; 1505 Else
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 35
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (11)
; 1506 CCB[C_STS] = N$este;
; 1507 CCB[C_FNC] = FC_XCP;
; 1508 LLCRS$( .CCB);
; 1509 end;
.SBTTL C.REJ
000000 004167 000000G ; C.REJ
U.16: JSR R1,$SAVE4 ; 1454
000004 016601 000014 MOV 14(SP),R1 ; PDB,* 1485
000010 016104 000010 MOV 10(R1),R4 ; *,NDB
000014 016603 000016 MOV 16(SP),R3 ; CCB,* 1491
000020 121127 000002 CMPB (R1),#2 ; 1487
000024 001072 BNE 3$
000026 016700 000002G MOV .CRDAT+2,R0 ; 1490
000032 016067 000030 000000G MOV 30(R0),KISAR6
000040 010446 MOV R4,-(SP) ; NDB,* 1491
000042 062716 000014 ADD #14,(SP)
000046 016346 000022 MOV 22(R3),-(SP)
000052 004767 000000V JSR PC,U.18
000056 016700 000002G MOV .CRDAT+2,R0 ; 1492
000062 016067 000014 000000G MOV 14(R0),KISAR6
000070 112711 000003 MOVB #3,(R1) ; 1493
000074 010316 MOV R3,(SP) ; 1495
000076 012746 000024 MOV #24,-(SP)
000102 060616 ADD SP,(SP) ; CCB,*
000104 010146 MOV R1,-(SP)
000106 004767 175440 JSR PC,U.9
000112 022626 CMP (SP)+,(SP)+
000114 006000 ROR R0
000116 103021 BCC 1$
000120 010116 MOV R1,(SP) ; 1497
000122 016646 000022 MOV 22(SP),-(SP) ; CCB,*
000126 012746 000002 MOV #2,-(SP)
000132 012746 000000G MOV #DI.BLD,-(SP)
000136 016700 000002G MOV .CRDAT+2,R0
000142 005046 CLR -(SP)
000144 116016 000047 MOVB 47(R0),(SP)
000150 004767 000000G JSR PC,$CALLE
000154 062706 000010 ADD #10,SP
000160 000412 BR 2$ ; 1495
000162 012703 000102 1$: MOV #102,R3 ; 1500
000166 060103 ADD R1,R3
000170 016604 000022 MOV 22(SP),R4 ; CCB,*
000174 004767 000000G JSR PC,$CMQIN
000200 012761 000001 000070 MOV #1,70(R1) ; 1501
000206 022626 2$: CMP (SP)+,(SP)+ ; 1487
000210 000207 RTS PC ; 1489
000212 012763 177775 000014 3$: MOV #-3,14(R3) ; 1506
000220 016600 000016 MOV 16(SP),R0 ; CCB,* 1507
000224 112760 000014 000012 MOVB #14,12(R0)
000232 010004 MOV R0,R4 ; CCB,* 1508
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 36
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (11)
000234 004767 000000G JSR PC,$SCHED
000240 000207 RTS PC ; 1454
; Routine Size: 81 words, Routine Base: $CODE$ + 2720
; Maximum stack depth per invocation: 12 words
; 1510
; 1511
; 1512
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 37
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (12)
; 1513 routine C_ACC ( CCB, PDB) : novalue = !
; 1514
; 1515 !++
; 1516 ! FUNCTIONAL DESCRIPTION:
; 1517 ! This routine processes the Session Control ACCEPT call.
; 1518 !
; 1519 ! FORMAL PARAMETERS:
; 1520 ! CCB = CCB address
; 1521 ! PDB = Port Data Base address
; 1522 !
; 1523 ! IMPLICIT INPUTS:
; 1524 ! DB = NSP data base address
; 1525 !
; 1526 ! IMPLICIT OUTPUTS:
; 1527 ! None
; 1528 !
; 1529 ! ROUTINE VALUE:
; 1530 ! COMPLETION CODES:
; 1531 ! None
; 1532 !
; 1533 ! SIDE EFFECTS:
; 1534 ! None
; 1535 !--
; 1536
; 1537 begin
; 1538 map CCB: ref block field(C_fields);
; 1539 map PDB: ref block field(PORT_fields);
; 1540
; 1541 local
; 1542 NDB : ref block field(NODE_fields);
; 1543
; 1544 NDB = .PDB[NODElnk];
; 1545
; 1546 If .PDB[PORTstate] eql N$SCR
; 1547 Then
; 1548 begin
; 1549 MAP$( .DB[BIASnodes]);
; 1550 DADD( NDB[NDb_xmt], .CCB[C_CNT]);
; 1551 MAP$( .DB[BIASports]);
; 1552 PDB[PORTstate] = N$SCC;
; 1553 PDB[FLOWloc_typ] = .CCB[C_PRM1];
; 1554
; 1555 If CCB_HDR_GET( .CCB, CCB, .PDB)
; 1556 Then
; 1557 CALL$E(CC_BLD, .DB[NSPns2_pix], .CCB, .PDB)
; 1558 Else
; 1559 begin
; 1560 CMQIN$( PDB[MSG_queue], .CCB);
; 1561 PDB[OTHres] = true
; 1562 end;
; 1563 return;
; 1564 end
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 38
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (12)
; 1565 Else
; 1566 CCB[C_STS] = N$este;
; 1567 CCB[C_FNC] = FC_XCP;
; 1568 LLCRS$( .CCB);
; 1569 end;
.SBTTL C.ACC
000000 004167 000000G ; C.ACC
U.15: JSR R1,$SAVE4 ; 1513
000004 016601 000014 MOV 14(SP),R1 ; PDB,* 1544
000010 016104 000010 MOV 10(R1),R4 ; *,NDB
000014 016603 000016 MOV 16(SP),R3 ; CCB,* 1550
000020 121127 000002 CMPB (R1),#2 ; 1546
000024 001105 BNE 3$
000026 016700 000002G MOV .CRDAT+2,R0 ; 1549
000032 016067 000030 000000G MOV 30(R0),KISAR6
000040 010446 MOV R4,-(SP) ; NDB,* 1550
000042 062716 000014 ADD #14,(SP)
000046 016346 000022 MOV 22(R3),-(SP)
000052 004767 000000V JSR PC,U.18
000056 016700 000002G MOV .CRDAT+2,R0 ; 1551
000062 016067 000014 000000G MOV 14(R0),KISAR6
000070 112711 000005 MOVB #5,(R1) ; 1552
000074 016300 000024 MOV 24(R3),R0 ; 1553
000100 072027 000010 ASH #10,R0
000104 042700 176377 BIC #176377,R0
000110 042761 001400 000040 BIC #1400,40(R1)
000116 050061 000040 BIS R0,40(R1)
000122 010316 MOV R3,(SP) ; 1555
000124 012746 000024 MOV #24,-(SP)
000130 060616 ADD SP,(SP) ; CCB,*
000132 010146 MOV R1,-(SP)
000134 004767 175150 JSR PC,U.9
000140 022626 CMP (SP)+,(SP)+
000142 006000 ROR R0
000144 103021 BCC 1$
000146 010116 MOV R1,(SP) ; 1557
000150 016646 000022 MOV 22(SP),-(SP) ; CCB,*
000154 012746 000002 MOV #2,-(SP)
000160 012746 000000G MOV #CC.BLD,-(SP)
000164 016700 000002G MOV .CRDAT+2,R0
000170 005046 CLR -(SP)
000172 116016 000047 MOVB 47(R0),(SP)
000176 004767 000000G JSR PC,$CALLE
000202 062706 000010 ADD #10,SP
000206 000412 BR 2$ ; 1555
000210 012703 000102 1$: MOV #102,R3 ; 1560
000214 060103 ADD R1,R3
000216 016604 000022 MOV 22(SP),R4 ; CCB,*
000222 004767 000000G JSR PC,$CMQIN
000226 012761 000001 000070 MOV #1,70(R1) ; 1561
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 39
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (12)
000234 022626 2$: CMP (SP)+,(SP)+ ; 1546
000236 000207 RTS PC ; 1548
000240 012763 177775 000014 3$: MOV #-3,14(R3) ; 1566
000246 016600 000016 MOV 16(SP),R0 ; CCB,* 1567
000252 112760 000014 000012 MOVB #14,12(R0)
000260 010004 MOV R0,R4 ; CCB,* 1568
000262 004767 000000G JSR PC,$SCHED
000266 000207 RTS PC ; 1513
; Routine Size: 92 words, Routine Base: $CODE$ + 3162
; Maximum stack depth per invocation: 12 words
; 1570
; 1571
; 1572
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 40
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (13)
; 1573 routine C_XMIT (CCB, dummy): novalue = !
; 1574
; 1575 !++
; 1576 ! FUNCTIONAL DESCRIPTION:
; 1577 !This routine processes the SC CONNECT-XMT call.
; 1578 !
; 1579 ! FORMAL PARAMETERS:
; 1580 ! CCB = CCB address
; 1581 !
; 1582 ! IMPLICIT INPUTS:
; 1583 ! DB = NSP data base address
; 1584 !
; 1585 ! IMPLICIT OUTPUTS:
; 1586 ! None
; 1587 !
; 1588 ! ROUTINE VALUE:
; 1589 ! COMPLETION CODES:
; 1590 ! None
; 1591 !
; 1592 ! SIDE EFFECTS:
; 1593 ! None
; 1594 !--
; 1595
; 1596 begin
; 1597 map CCB: ref block field(C_fields);
; 1598 bind NODE = .DB[ADDRnodes]: blockvector[0,ND_SIZE] field(NODE_fields);
; 1599
; 1600 local
; 1601 port: ref blockvector[0,pdb_size] field(PORT_fields),
; 1602 temp;
; 1603
; 1604 PORT = .DB[ADDRports];
; 1605
; 1606 If .CCB[C_PRM2] eql N$FSEG or
; 1607 .CCB[C_PRM2] eql N$FMES
; 1608 Then
; 1609 begin
; 1610 If
; 1611 begin
; 1612 CCB[C_LIX] = (Incr j from 0 to .DB[NSPtotal]-1 do
; 1613 begin
; 1614 bind PDB = PORT[.j,0,0,%bpval,0]: block field(PORT_fields);
; 1615 if (.PDB[PORTstate] eql N$SCL) and
; 1616 not .PDB[FLAGinuse]
; 1617 then exitloop .j
; 1618 end);
; 1619 if .CCB[C_LIX] eql 255
; 1620 then
; 1621 FALSE
; 1622 else
; 1623 TRUE
; 1624 end
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 41
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (13)
; 1625
; 1626 and
; 1627 begin
; 1628 If CALL$E( NDB_GET, .DB[NSPns2_pix], .CCB, temp)
; 1629 Then
; 1630 begin
; 1631 bind NDB = .temp:block field(NODE_fields);
; 1632 MAP$( .DB[BIASnodes]);
; 1633 DADD( NDB[NDb_xmt], .CCB[C_CNT]);
; 1634 MAP$( .DB[BIASports]);
; 1635 TRUE
; 1636 end
; 1637 Else
; 1638 FALSE
; 1639 end
; 1640 Then
; 1641 begin
; 1642 bind PDB = PORT[.CCB[C_LIX],0,0,%bpval,0]: block field(PORT_fields);
; 1643 PDB_INIT( PDB);
; 1644 PDB[PORTstate] = N$SCI;
; 1645 PDB[CHANNEL] = .CCB[C_PRM3];
; 1646 PDB[NODElnk] = .temp;
; 1647 PDB[NODErem] = .CCB[C_PRM1];
; 1648 PDB[FLOWloc_typ] = .CCB[C_PRM2];
; 1649 DB[NSPmax] = .DB[NSPmax] + 1;
; 1650
; 1651 If CCB_HDR_GET( .CCB, CCB, PDB)
; 1652 Then
; 1653 CALL$E(CI_BLD, .DB[NSPns2_pix], .CCB, PDB)
; 1654 Else
; 1655 begin
; 1656 CMQIN$( PDB[MSG_queue], .CCB);
; 1657 PDB[OTHres] = true
; 1658 end;
; 1659 return;
; 1660 end
; 1661 Else
; 1662 CCB[C_STS] = N$ERES;
; 1663 end
; 1664 Else
; 1665 CCB[C_STS] = N$ERMO;
; 1666
; 1667 CCB[C_FNC] = FC_XCP;
; 1668 LLCRS$( .CCB);
; 1669 end;
.GLOBL CI.BLD
.SBTTL C.XMIT
000000 004167 000000G ; C.XMIT
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 42
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (13)
U.17: JSR R1,$SAVE5 ; 1573
000004 005746 TST -(SP)
000006 016702 000002G MOV .CRDAT+2,R2 ; 1598
000012 016205 000016 MOV 16(R2),R5 ; *,PORT 1604
000016 016604 000022 MOV 22(SP),R4 ; CCB,* 1606
000022 026427 000026 000001 CMP 26(R4),#1
000030 001406 BEQ 1$
000032 026427 000026 000002 CMP 26(R4),#2 ; 1607
000040 001402 BEQ 1$
000042 000167 000430 JMP 9$
000046 012701 000010 1$: MOV #10,R1 ; 1612
000052 060401 ADD R4,R1
000054 005000 CLR R0 ; J
000056 000414 BR 4$
000060 010003 2$: MOV R0,R3 ; J,* 1614
000062 070327 000140 MUL #140,R3
000066 060503 ADD R5,R3 ; PORT,*
000070 121327 000017 CMPB (R3),#17 ; 1615
000074 001004 BNE 3$
000076 132763 000001 000042 BITB #1,42(R3) ; 1616
000104 001406 BEQ 5$ ; 1617
000106 005200 3$: INC R0 ; J 1612
000110 020062 000020 4$: CMP R0,20(R2) ; J,*
000114 002761 BLT 2$
000116 012700 177777 MOV #-1,R0
000122 110011 5$: MOVB R0,(R1)
000124 120027 000377 CMPB R0,#377 ; 1619
000130 001556 BEQ 8$
000132 012746 000002 MOV #2,-(SP) ; 1628
000136 060616 ADD SP,(SP) ; TEMP,*
000140 010446 MOV R4,-(SP)
000142 012746 000002 MOV #2,-(SP)
000146 012746 000000G MOV #NDB.GET,-(SP)
000152 005046 CLR -(SP)
000154 116216 000047 MOVB 47(R2),(SP)
000160 004767 000000G JSR PC,$CALLE
000164 062706 000012 ADD #12,SP
000170 032700 000001 BIT #1,R0
000174 001534 BEQ 8$
000176 016700 000002G MOV .CRDAT+2,R0 ; 1632
000202 016067 000030 000000G MOV 30(R0),KISAR6
000210 011646 MOV (SP),-(SP) ; TEMP,* 1633
000212 062716 000014 ADD #14,(SP)
000216 016446 000022 MOV 22(R4),-(SP)
000222 004767 000000V JSR PC,U.18
000226 022626 CMP (SP)+,(SP)+
000230 016700 000002G MOV .CRDAT+2,R0 ; 1634
000234 016067 000014 000000G MOV 14(R0),KISAR6
000242 005003 CLR R3 ; 1642
000244 151103 BISB (R1),R3
000246 070327 000140 MUL #140,R3
000252 010301 MOV R3,R1
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 43
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (13)
000254 060501 ADD R5,R1 ; PORT,*
000256 010146 MOV R1,-(SP) ; 1643
000260 004767 000000V JSR PC,U.28
000264 112711 000006 MOVB #6,(R1) ; 1644
000270 116461 000030 000001 MOVB 30(R4),1(R1) ; 1645
000276 016661 000002 000010 MOV 2(SP),10(R1) ; TEMP,* 1646
000304 016461 000024 000002 MOV 24(R4),2(R1) ; 1647
000312 016400 000026 MOV 26(R4),R0 ; 1648
000316 072027 000010 ASH #10,R0
000322 042700 176377 BIC #176377,R0
000326 042761 001400 000040 BIC #1400,40(R1)
000334 050061 000040 BIS R0,40(R1)
000340 016700 000002G MOV .CRDAT+2,R0 ; 1649
000344 005260 000012 INC 12(R0)
000350 010416 MOV R4,(SP) ; 1651
000352 012746 000026 MOV #26,-(SP)
000356 060616 ADD SP,(SP) ; CCB,*
000360 010146 MOV R1,-(SP)
000362 004767 174432 JSR PC,U.9
000366 022626 CMP (SP)+,(SP)+
000370 006000 ROR R0
000372 103021 BCC 6$
000374 010116 MOV R1,(SP) ; 1653
000376 016646 000024 MOV 24(SP),-(SP) ; CCB,*
000402 012746 000002 MOV #2,-(SP)
000406 012746 000000G MOV #CI.BLD,-(SP)
000412 016700 000002G MOV .CRDAT+2,R0
000416 005046 CLR -(SP)
000420 116016 000047 MOVB 47(R0),(SP)
000424 004767 000000G JSR PC,$CALLE
000430 062706 000010 ADD #10,SP
000434 000412 BR 7$ ; 1651
000436 010103 6$: MOV R1,R3 ; 1656
000440 062703 000102 ADD #102,R3
000444 016604 000024 MOV 24(SP),R4 ; CCB,*
000450 004767 000000G JSR PC,$CMQIN
000454 012761 000001 000070 MOV #1,70(R1) ; 1657
000462 005726 7$: TST (SP)+ ; 1610
000464 000417 BR 11$ ; 1641
000466 012764 177777 000014 8$: MOV #-1,14(R4) ; 1662
000474 000403 BR 10$ ; 1606
000476 012764 177771 000014 9$: MOV #-7,14(R4) ; 1665
000504 016600 000022 10$: MOV 22(SP),R0 ; CCB,* 1667
000510 112760 000014 000012 MOVB #14,12(R0)
000516 010004 MOV R0,R4 ; CCB,* 1668
000520 004767 000000G JSR PC,$SCHED
000524 005726 11$: TST (SP)+ ; 1573
000526 000207 RTS PC
; Routine Size: 172 words, Routine Base: $CODE$ + 3452
; Maximum stack depth per invocation: 13 words
; 1670
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 44
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (13)
; 1671
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 45
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (14)
; 1672 routine DADD ( double_word, value ) :novalue = !
; 1673
; 1674 !++
; 1675 ! FUNCTIONAL DESCRIPTION:
; 1676 ! This routine performs double percision arithemitic.
; 1677 !
; 1678 ! FORMAL PARAMETERS:
; 1679 ! DOUBLE_WORD = address to add VALUE to
; 1680 ! VALUE = value to add to DOUBLE_WORD
; 1681 !
; 1682 ! IMPLICIT INPUTS:
; 1683 ! None
; 1684 !
; 1685 ! IMPLICIT OUTPUTS:
; 1686 ! None
; 1687 !
; 1688 ! ROUTINE VALUE:
; 1689 ! COMPLETION CODES:
; 1690 ! None
; 1691 !
; 1692 ! SIDE EFFECTS:
; 1693 ! None
; 1694 !--
; 1695
; 1696
; 1697 begin
; 1698 builtin ROT;
; 1699 map double_word: ref block field(long_word);
; 1700
; 1701 if rot(double_word[low] = .double_word[low] + .value, 1)
; 1702 then
; 1703 begin
; 1704 if rot(double_word[hi] = .double_word[hi] + 1, 1)
; 1705 then
; 1706 begin
; 1707 double_word[low] = -1;
; 1708 double_word[hi] = -1;
; 1709 end
; 1710 end
; 1711 end;
.SBTTL DADD
000000 010146 ; DADD
U.18: MOV R1,-(SP) ; 1672
000002 016601 000006 MOV 6(SP),R1 ; DOUBLE.WORD,* 1701
000006 011100 MOV (R1),R0
000010 066600 000004 ADD 4(SP),R0 ; VALUE,*
000014 010011 MOV R0,(R1)
000016 103013 BCC 1$
000020 016100 000002 MOV 2(R1),R0 ; 1704
000024 062700 000001 ADD #1,R0
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 46
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (14)
000030 010061 000002 MOV R0,2(R1)
000034 103004 BCC 1$
000036 012711 177777 MOV #-1,(R1) ; 1707
000042 011161 000002 MOV (R1),2(R1) ; 1708
000046 012601 1$: MOV (SP)+,R1 ; 1672
000050 000207 RTS PC
; Routine Size: 21 words, Routine Base: $CODE$ + 4202
; Maximum stack depth per invocation: 2 words
; 1712
; 1713
; 1714
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 47
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (15)
; 1715 routine DATA_RCEV ( CCB, PDB) : novalue = !
; 1716
; 1717 !++
; 1718 ! FUNCTIONAL DESCRIPTION:
; 1719 ! This routine processes the Session Control Interface Call DATA-RCV.
; 1720 !
; 1721 ! FORMAL PARAMETERS:
; 1722 ! CCB = CCB address
; 1723 ! PDB = Port Data Base address
; 1724 !
; 1725 ! IMPLICIT INPUTS:
; 1726 ! DB = NSP data base address
; 1727 !
; 1728 ! IMPLICIT OUTPUTS:
; 1729 ! None
; 1730 !
; 1731 ! ROUTINE VALUE:
; 1732 ! COMPLETION CODES:
; 1733 ! None
; 1734 !
; 1735 ! SIDE EFFECTS:
; 1736 ! None
; 1737 !--
; 1738
; 1739 begin
; 1740 map CCB: ref block field(C_fields);
; 1741 map PDB: ref block field(PORT_fields);
; 1742
; 1743 If ((.PDB[PORTstate] eql N$SRUN) or
; 1744 ((.PDB[PORTstate] eql N$SDI) and
; 1745 (CMP_NEQ(.PDB[NUMhigh], .PDB[ACKrcv_dat]))))
; 1746 Then
; 1747 begin
; 1748 If .PDB[FLOWloc_typ] eql N$FMES
; 1749 Then
; 1750 begin
; 1751 CMQIN$( PDB[DATR_queue], .CCB);
; 1752 CALL$E(SND_MSG, .DB[NSPns1_pix], .PDB);
; 1753 return;
; 1754 end
; 1755 Else
; 1756 CCB[C_STS] = N$ERMO;
; 1757 end
; 1758 Else
; 1759 begin
; 1760 If (.PDB[PORTstate] eql N$SCN) or
; 1761 (.PDB[PORTstate] eql N$SDN)
; 1762 Then
; 1763 CCB[C_STS] = N$EABR
; 1764 Else
; 1765 CCB[C_STS] = N$ESTE;
; 1766 end;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 48
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (15)
; 1767 CCB[C_FNC] = FC_XCP;
; 1768 LLCRS$( .CCB)
; 1769
; 1770 end;
.GLOBL SND.MSG
.SBTTL DATA.RCEV
000000 004167 000000G ; DATA.RCEV
U.19: JSR R1,$SAVE4 ; 1715
000004 016604 000016 MOV 16(SP),R4 ; CCB,* 1751
000010 016600 000014 MOV 14(SP),R0 ; PDB,* 1743
000014 121027 000013 CMPB (R0),#13
000020 001412 BEQ 1$
000022 121027 000014 CMPB (R0),#14 ; 1744
000026 001046 BNE 3$
000030 016003 000034 MOV 34(R0),R3 ; 1745
000034 166003 000026 SUB 26(R0),R3
000040 032703 007777 BIT #7777,R3
000044 001437 BEQ 3$
000046 016003 000040 1$: MOV 40(R0),R3 ; 1748
000052 042703 176377 BIC #176377,R3
000056 020327 001000 CMP R3,#1000
000062 001024 BNE 2$
000064 012703 000112 MOV #112,R3 ; 1751
000070 060003 ADD R0,R3
000072 004767 000000G JSR PC,$CMQIN
000076 010046 MOV R0,-(SP) ; 1752
000100 012746 000001 MOV #1,-(SP)
000104 012746 000000G MOV #SND.MSG,-(SP)
000110 016700 000002G MOV .CRDAT+2,R0
000114 005046 CLR -(SP)
000116 116016 000046 MOVB 46(R0),(SP)
000122 004767 000000G JSR PC,$CALLE
000126 062706 000010 ADD #10,SP ; 1748
000132 000207 RTS PC ; 1750
000134 012764 177771 000014 2$: MOV #-7,14(R4) ; 1756
000142 000415 BR 6$ ; 1743
000144 121027 000020 3$: CMPB (R0),#20 ; 1760
000150 001403 BEQ 4$
000152 121027 000016 CMPB (R0),#16 ; 1761
000156 001004 BNE 5$
000160 012764 177773 000014 4$: MOV #-5,14(R4) ; 1763
000166 000403 BR 6$ ; 1760
000170 012764 177775 000014 5$: MOV #-3,14(R4) ; 1765
000176 112764 000014 000012 6$: MOVB #14,12(R4) ; 1767
000204 004767 000000G JSR PC,$SCHED ; 1768
000210 000207 RTS PC ; 1715
; Routine Size: 69 words, Routine Base: $CODE$ + 4254
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 49
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (15)
; Maximum stack depth per invocation: 10 words
; 1771
; 1772
; 1773
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 50
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (16)
; 1774 routine DATA_SND ( CCB, PDB) : novalue = !
; 1775
; 1776 !++
; 1777 ! FUNCTIONAL DESCRIPTION:
; 1778 ! This routine processes the Session Control Interface Call DATA-XMT.
; 1779 !
; 1780 ! FORMAL PARAMETERS:
; 1781 ! CCB = CCB address
; 1782 ! PDB = Port Data Base address
; 1783 !
; 1784 ! IMPLICIT INPUTS:
; 1785 ! DB = NSP data base address
; 1786 !
; 1787 ! IMPLICIT OUTPUTS:
; 1788 ! None
; 1789 !
; 1790 ! ROUTINE VALUE:
; 1791 ! COMPLETION CODES:
; 1792 ! None
; 1793 !
; 1794 ! SIDE EFFECTS:
; 1795 ! None
; 1796 !--
; 1797
; 1798 begin
; 1799 map CCB: ref block field(C_fields);
; 1800 map PDB: ref block field(PORT_fields);
; 1801
; 1802 If .PDB[PORTstate] eql N$SRUN
; 1803 Then
; 1804 begin
; 1805 QUEUE_MSG( .CCB, .PDB);
; 1806 CALL$E(SND_MSG, .DB[NSPns1_pix], .PDB);
; 1807 return;
; 1808 end
; 1809 Else
; 1810 begin
; 1811 If (.PDB[PORTstate] eql N$SCN) or
; 1812 (.PDB[PORTstate] eql N$SDN)
; 1813 Then
; 1814 CCB[C_STS] = N$EABR
; 1815 Else
; 1816 CCB[C_STS] = N$ESTE;
; 1817 end;
; 1818 CCB[C_FNC] = FC_XCP;
; 1819 LLCRS$( .CCB)
; 1820 end;
.SBTTL DATA.SND
000000 004167 000000G ; DATA.SND
U.20: JSR R1,$SAVE4 ; 1774
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 51
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (16)
000004 016604 000016 MOV 16(SP),R4 ; CCB,* 1805
000010 016601 000014 MOV 14(SP),R1 ; PDB,* 1802
000014 121127 000013 CMPB (R1),#13
000020 001023 BNE 1$
000022 010446 MOV R4,-(SP) ; 1805
000024 010146 MOV R1,-(SP)
000026 004767 000000V JSR PC,U.30
000032 010116 MOV R1,(SP) ; 1806
000034 012746 000001 MOV #1,-(SP)
000040 012746 000000G MOV #SND.MSG,-(SP)
000044 016700 000002G MOV .CRDAT+2,R0
000050 005046 CLR -(SP)
000052 116016 000046 MOVB 46(R0),(SP)
000056 004767 000000G JSR PC,$CALLE
000062 062706 000012 ADD #12,SP ; 1802
000066 000207 RTS PC ; 1804
000070 121127 000020 1$: CMPB (R1),#20 ; 1811
000074 001403 BEQ 2$
000076 121127 000016 CMPB (R1),#16 ; 1812
000102 001004 BNE 3$
000104 012764 177773 000014 2$: MOV #-5,14(R4) ; 1814
000112 000403 BR 4$ ; 1811
000114 012764 177775 000014 3$: MOV #-3,14(R4) ; 1816
000122 112764 000014 000012 4$: MOVB #14,12(R4) ; 1818
000130 004767 000000G JSR PC,$SCHED ; 1819
000134 000207 RTS PC ; 1774
; Routine Size: 47 words, Routine Base: $CODE$ + 4466
; Maximum stack depth per invocation: 11 words
; 1821
; 1822
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 52
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (17)
; 1823 routine DISCONNECT ( CCB, PDB) : novalue = !
; 1824
; 1825 !++
; 1826 ! FUNCTIONAL DESCRIPTION:
; 1827 ! This routine processes the Session Control DISCONNECT call.
; 1828 !
; 1829 ! FORMAL PARAMETERS:
; 1830 ! CCB = CCB address
; 1831 ! PDB = Port Data Base address
; 1832 !
; 1833 ! IMPLICIT INPUTS:
; 1834 ! DB = NSP data base address
; 1835 !
; 1836 ! IMPLICIT OUTPUTS:
; 1837 ! None
; 1838 !
; 1839 ! ROUTINE VALUE:
; 1840 ! COMPLETION CODES:
; 1841 ! None
; 1842 !
; 1843 ! SIDE EFFECTS:
; 1844 ! None
; 1845 !--
; 1846
; 1847 begin
; 1848 map CCB: ref block field(C_fields);
; 1849 map PDB: ref block field(PORT_fields);
; 1850
; 1851 local
; 1852 NDB : ref block field(NODE_fields);
; 1853
; 1854 NDB = .PDB[NODElnk];
; 1855
; 1856 If .PDB[PORTstate] eql N$SRUN
; 1857 Then
; 1858 begin
; 1859 PDB[PORTstate] = N$SDI;
; 1860 MAP$( .DB[BIASnodes]);
; 1861 DADD( NDB[NDb_xmt], .CCB[C_CNT]);
; 1862 MAP$( .DB[BIASports]);
; 1863
; 1864 If .PDB[NUMhigh] eql .PDB[ACKrcv_dat]
; 1865 Then
; 1866 begin
; 1867 If CCB_HDR_GET( .CCB, CCB, .PDB)
; 1868 Then
; 1869 CALL$E(DI_BLD, .DB[NSPns2_pix], .CCB, .PDB)
; 1870 Else
; 1871 begin
; 1872 CMQIN$( PDB[MSG_queue], .CCB);
; 1873 PDB[OTHres] = true
; 1874 end;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 53
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (17)
; 1875 return;
; 1876 end
; 1877 Else
; 1878 begin
; 1879 PDB[BUFFsync_dsc] = .CCB;
; 1880 return
; 1881 end;
; 1882 end
; 1883 Else
; 1884 begin
; 1885 If (.PDB[PORTstate] eql N$SCN) or
; 1886 (.PDB[PORTstate] eql N$SDN)
; 1887 Then
; 1888 CCB[C_STS] = N$EABR
; 1889 Else
; 1890 CCB[C_STS] = N$ESTE;
; 1891 end;
; 1892 CCB[C_FNC] = FC_XCP;
; 1893 LLCRS$( .CCB)
; 1894 end;
.SBTTL DISCONNECT
000000 004167 000000G ; DISCONNECT
U.21: JSR R1,$SAVE4 ; 1823
000004 016601 000014 MOV 14(SP),R1 ; PDB,* 1854
000010 016104 000010 MOV 10(R1),R4 ; *,NDB
000014 016603 000016 MOV 16(SP),R3 ; CCB,* 1861
000020 121127 000013 CMPB (R1),#13 ; 1856
000024 001101 BNE 4$
000026 112711 000014 MOVB #14,(R1) ; 1859
000032 016700 000002G MOV .CRDAT+2,R0 ; 1860
000036 016067 000030 000000G MOV 30(R0),KISAR6
000044 010446 MOV R4,-(SP) ; NDB,* 1861
000046 062716 000014 ADD #14,(SP)
000052 016346 000022 MOV 22(R3),-(SP)
000056 004767 177274 JSR PC,U.18
000062 016700 000002G MOV .CRDAT+2,R0 ; 1862
000066 016067 000014 000000G MOV 14(R0),KISAR6
000074 026161 000026 000034 CMP 26(R1),34(R1) ; 1864
000102 001046 BNE 2$
000104 010316 MOV R3,(SP) ; 1867
000106 012746 000024 MOV #24,-(SP)
000112 060616 ADD SP,(SP) ; CCB,*
000114 010146 MOV R1,-(SP)
000116 004767 173524 JSR PC,U.9
000122 022626 CMP (SP)+,(SP)+
000124 006000 ROR R0
000126 103021 BCC 1$
000130 010116 MOV R1,(SP) ; 1869
000132 016646 000022 MOV 22(SP),-(SP) ; CCB,*
000136 012746 000002 MOV #2,-(SP)
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 54
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (17)
000142 012746 000000G MOV #DI.BLD,-(SP)
000146 016700 000002G MOV .CRDAT+2,R0
000152 005046 CLR -(SP)
000154 116016 000047 MOVB 47(R0),(SP)
000160 004767 000000G JSR PC,$CALLE
000164 062706 000010 ADD #10,SP
000170 000415 BR 3$ ; 1867
000172 012703 000102 1$: MOV #102,R3 ; 1872
000176 060103 ADD R1,R3
000200 016604 000022 MOV 22(SP),R4 ; CCB,*
000204 004767 000000G JSR PC,$CMQIN
000210 012761 000001 000070 MOV #1,70(R1) ; 1873
000216 000402 BR 3$ ; 1864
000220 010361 000044 2$: MOV R3,44(R1) ; 1879
000224 022626 3$: CMP (SP)+,(SP)+ ; 1856
000226 000207 RTS PC ; 1858
000230 121127 000020 4$: CMPB (R1),#20 ; 1885
000234 001403 BEQ 5$
000236 121127 000016 CMPB (R1),#16 ; 1886
000242 001004 BNE 6$
000244 012763 177773 000014 5$: MOV #-5,14(R3) ; 1888
000252 000403 BR 7$ ; 1885
000254 012763 177775 000014 6$: MOV #-3,14(R3) ; 1890
000262 016600 000016 7$: MOV 16(SP),R0 ; CCB,* 1892
000266 112760 000014 000012 MOVB #14,12(R0)
000274 010004 MOV R0,R4 ; CCB,* 1893
000276 004767 000000G JSR PC,$SCHED
000302 000207 RTS PC ; 1823
; Routine Size: 98 words, Routine Base: $CODE$ + 4624
; Maximum stack depth per invocation: 12 words
; 1895
; 1896
; 1897
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 55
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (18)
; 1898 routine D_REQST ( CCB, PDB) : novalue = !
; 1899
; 1900 !++
; 1901 ! FUNCTIONAL DESCRIPTION:
; 1902 ! This routine processes the Session Control Interface Call DATA-REQUEST.
; 1903 ! These requests can come from Session Control or from NSP( if its
; 1904 ! inactivity timer has expired. This explains why a test is made in this
; 1905 ! routine for either a segment-flow link( in case from SC) or if the
; 1906 ! C_PIX is equal to NSP( in case of inactivity timer)...euch!!!!
; 1907 !
; 1908 ! FORMAL PARAMETERS:
; 1909 ! CCB = CCB address
; 1910 ! PDB = Port Data Base address
; 1911 !
; 1912 ! IMPLICIT INPUTS:
; 1913 ! DB = NSP data base address
; 1914 !
; 1915 ! IMPLICIT OUTPUTS:
; 1916 ! None
; 1917 !
; 1918 ! ROUTINE VALUE:
; 1919 ! COMPLETION CODES:
; 1920 ! None
; 1921 !
; 1922 ! SIDE EFFECTS:
; 1923 ! None
; 1924 !--
; 1925
; 1926 begin
; 1927 map CCB: ref block field(C_fields);
; 1928 map PDB: ref block field(PORT_fields);
; 1929
; 1930
; 1931 If ((.PDB[PORTstate] eql N$SRUN) or
; 1932 ((.PDB[PORTstate] eql N$SDI) and
; 1933 (CMP_NEQ(.PDB[NUMhigh], .PDB[ACKrcv_dat]))))
; 1934 Then
; 1935 begin
; 1936 If (.PDB[FLOWloc_typ] eql N$FSEG) or
; 1937 (.CCB[C_PIX] eql .DB[NSPns0_pix])
; 1938 Then
; 1939 begin
; 1940 CMQIN$( PDB[DATR_queue], .CCB);
; 1941 CALL$E(SND_MSG, .DB[NSPns1_pix], .PDB);
; 1942 return;
; 1943 end
; 1944 Else
; 1945 CCB[C_STS] = N$ERMO;
; 1946 end
; 1947 Else
; 1948 begin
; 1949 If (.PDB[PORTstate] eql N$SCN) or
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 56
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (18)
; 1950 (.PDB[PORTstate] eql N$SDN)
; 1951 Then
; 1952 CCB[C_STS] = N$EABR
; 1953 Else
; 1954 CCB[C_STS] = N$ESTE;
; 1955 end;
; 1956 CCB[C_FNC] = FC_XCP;
; 1957 LLCRS$( .CCB)
; 1958
; 1959 end;
.SBTTL D.REQST
000000 004167 000000G ; D.REQST
U.22: JSR R1,$SAVE4 ; 1898
000004 016604 000016 MOV 16(SP),R4 ; CCB,* 1940
000010 016601 000014 MOV 14(SP),R1 ; PDB,* 1931
000014 121127 000013 CMPB (R1),#13
000020 001412 BEQ 1$
000022 121127 000014 CMPB (R1),#14 ; 1932
000026 001056 BNE 4$
000030 016100 000034 MOV 34(R1),R0 ; 1933
000034 166100 000026 SUB 26(R1),R0
000040 032700 007777 BIT #7777,R0
000044 001447 BEQ 4$
000046 016100 000040 1$: MOV 40(R1),R0 ; 1936
000052 042700 176377 BIC #176377,R0
000056 020027 000400 CMP R0,#400
000062 001410 BEQ 2$
000064 016603 000016 MOV 16(SP),R3 ; CCB,* 1937
000070 016700 000002G MOV .CRDAT+2,R0
000074 126360 000011 000045 CMPB 11(R3),45(R0)
000102 001024 BNE 3$
000104 012703 000112 2$: MOV #112,R3 ; 1940
000110 060103 ADD R1,R3
000112 004767 000000G JSR PC,$CMQIN
000116 010146 MOV R1,-(SP) ; 1941
000120 012746 000001 MOV #1,-(SP)
000124 012746 000000G MOV #SND.MSG,-(SP)
000130 016700 000002G MOV .CRDAT+2,R0
000134 005046 CLR -(SP)
000136 116016 000046 MOVB 46(R0),(SP)
000142 004767 000000G JSR PC,$CALLE
000146 062706 000010 ADD #10,SP ; 1936
000152 000207 RTS PC ; 1939
000154 012764 177771 000014 3$: MOV #-7,14(R4) ; 1945
000162 000415 BR 7$ ; 1931
000164 121127 000020 4$: CMPB (R1),#20 ; 1949
000170 001403 BEQ 5$
000172 121127 000016 CMPB (R1),#16 ; 1950
000176 001004 BNE 6$
000200 012764 177773 000014 5$: MOV #-5,14(R4) ; 1952
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 57
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (18)
000206 000403 BR 7$ ; 1949
000210 012764 177775 000014 6$: MOV #-3,14(R4) ; 1954
000216 112764 000014 000012 7$: MOVB #14,12(R4) ; 1956
000224 004767 000000G JSR PC,$SCHED ; 1957
000230 000207 RTS PC ; 1898
; Routine Size: 77 words, Routine Base: $CODE$ + 5130
; Maximum stack depth per invocation: 10 words
; 1960
; 1961
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 58
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (19)
; 1962 routine INTR_REQ ( CCB, PDB) : novalue = !
; 1963
; 1964 !++
; 1965 ! FUNCTIONAL DESCRIPTION:
; 1966 ! This routine processes the Session Control Interface Call INTERRUPT-
; 1967 ! REQUEST.
; 1968 !
; 1969 ! FORMAL PARAMETERS:
; 1970 ! CCB = CCB address
; 1971 ! PDB = Port Data Base address
; 1972 !
; 1973 ! IMPLICIT INPUTS:
; 1974 ! DB = NSP data base address
; 1975 !
; 1976 ! IMPLICIT OUTPUTS:
; 1977 ! None
; 1978 !
; 1979 ! ROUTINE VALUE:
; 1980 ! COMPLETION CODES:
; 1981 ! None
; 1982 !
; 1983 ! SIDE EFFECTS:
; 1984 ! None
; 1985 !--
; 1986
; 1987 begin
; 1988 map CCB: ref block field(C_fields);
; 1989 map PDB: ref block field(PORT_fields);
; 1990
; 1991 If .PDB[PORTstate] eql N$SRUN
; 1992 Then
; 1993 begin
; 1994 CMQIN$( PDB[INTR_queue], .CCB);
; 1995 CALL$E(SND_MSG, .DB[NSPns1_pix], .PDB);
; 1996 return
; 1997 end
; 1998 Else
; 1999 begin
; 2000 If (.PDB[PORTstate] eql N$SCN) or
; 2001 (.PDB[PORTstate] eql N$SDN)
; 2002 Then
; 2003 CCB[C_STS] = N$EABR
; 2004 Else
; 2005 CCB[C_STS] = N$ESTE;
; 2006 end;
; 2007 CCB[C_FNC] = FC_XCP;
; 2008 LLCRS$( .CCB)
; 2009 end;
.SBTTL INTR.REQ
000000 004167 000000G ; INTR.REQ
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 59
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (19)
U.23: JSR R1,$SAVE4 ; 1962
000004 016604 000016 MOV 16(SP),R4 ; CCB,* 1994
000010 016600 000014 MOV 14(SP),R0 ; PDB,* 1991
000014 121027 000013 CMPB (R0),#13
000020 001024 BNE 1$
000022 012703 000106 MOV #106,R3 ; 1994
000026 060003 ADD R0,R3
000030 004767 000000G JSR PC,$CMQIN
000034 010046 MOV R0,-(SP) ; 1995
000036 012746 000001 MOV #1,-(SP)
000042 012746 000000G MOV #SND.MSG,-(SP)
000046 016700 000002G MOV .CRDAT+2,R0
000052 005046 CLR -(SP)
000054 116016 000046 MOVB 46(R0),(SP)
000060 004767 000000G JSR PC,$CALLE
000064 062706 000010 ADD #10,SP ; 1991
000070 000207 RTS PC ; 1993
000072 121027 000020 1$: CMPB (R0),#20 ; 2000
000076 001403 BEQ 2$
000100 121027 000016 CMPB (R0),#16 ; 2001
000104 001004 BNE 3$
000106 012764 177773 000014 2$: MOV #-5,14(R4) ; 2003
000114 000403 BR 4$ ; 2000
000116 012764 177775 000014 3$: MOV #-3,14(R4) ; 2005
000124 112764 000014 000012 4$: MOVB #14,12(R4) ; 2007
000132 004767 000000G JSR PC,$SCHED ; 2008
000136 000207 RTS PC ; 1962
; Routine Size: 48 words, Routine Base: $CODE$ + 5362
; Maximum stack depth per invocation: 10 words
; 2010
; 2011
; 2012
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 60
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (20)
; 2013 routine INTR_SND ( CCB, PDB) : novalue = !
; 2014
; 2015 !++
; 2016 ! FUNCTIONAL DESCRIPTION:
; 2017 ! This routine processes the Session Control Interface Call INTERRUPT-
; 2018 ! XMT.
; 2019 !
; 2020 ! FORMAL PARAMETERS:
; 2021 ! CCB = CCB address
; 2022 ! PDB = Port Data Base address
; 2023 !
; 2024 ! IMPLICIT INPUTS:
; 2025 ! DB = NSP data base address
; 2026 !
; 2027 ! IMPLICIT OUTPUTS:
; 2028 ! None
; 2029 !
; 2030 ! ROUTINE VALUE:
; 2031 ! COMPLETION CODES:
; 2032 ! None
; 2033 !
; 2034 ! SIDE EFFECTS:
; 2035 ! None
; 2036 !--
; 2037
; 2038 begin
; 2039 map CCB: ref block field(C_fields);
; 2040 map PDB: ref block field(PORT_fields);
; 2041
; 2042 local
; 2043 NDB : ref block field(NODE_fields);
; 2044
; 2045 NDB = .PDB[NODElnk];
; 2046
; 2047 If .PDB[PORTstate] eql N$SRUN
; 2048 Then
; 2049 begin
; 2050 If .PDB[INT_queue] eql 0
; 2051 Then
; 2052 begin
; 2053 MAP$( .DB[BIASnodes]);
; 2054 DADD( NDB[NDb_xmt], .CCB[C_CNT]);
; 2055 MAP$( .DB[BIASports]);
; 2056 CMQIN$( PDB[INT_queue], .CCB);
; 2057 CALL$E(SND_MSG, .DB[NSPns1_pix], .PDB);
; 2058 return;
; 2059 end
; 2060 Else
; 2061 CCB[C_STS] = N$ETMI;
; 2062 end
; 2063 Else
; 2064 begin
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 61
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (20)
; 2065 If (.PDB[PORTstate] eql N$SCN) or
; 2066 (.PDB[PORTstate] eql N$SDN)
; 2067 Then
; 2068 CCB[C_STS] = N$EABR
; 2069 Else
; 2070 CCB[C_STS] = N$ESTE;
; 2071 end;
; 2072 CCB[C_FNC] = FC_XCP;
; 2073 LLCRS$( .CCB)
; 2074 end;
.SBTTL INTR.SND
000000 004167 000000G ; INTR.SND
U.24: JSR R1,$SAVE4 ; 2013
000004 016601 000014 MOV 14(SP),R1 ; PDB,* 2045
000010 016102 000010 MOV 10(R1),R2 ; *,NDB
000014 016604 000016 MOV 16(SP),R4 ; CCB,* 2054
000020 121127 000013 CMPB (R1),#13 ; 2047
000024 001053 BNE 2$
000026 012703 000076 MOV #76,R3 ; 2050
000032 060103 ADD R1,R3
000034 005713 TST (R3)
000036 001042 BNE 1$
000040 016700 000002G MOV .CRDAT+2,R0 ; 2053
000044 016067 000030 000000G MOV 30(R0),KISAR6
000052 010246 MOV R2,-(SP) ; NDB,* 2054
000054 062716 000014 ADD #14,(SP)
000060 016446 000022 MOV 22(R4),-(SP)
000064 004767 176370 JSR PC,U.18
000070 016700 000002G MOV .CRDAT+2,R0 ; 2055
000074 016067 000014 000000G MOV 14(R0),KISAR6
000102 004767 000000G JSR PC,$CMQIN ; 2056
000106 010116 MOV R1,(SP) ; 2057
000110 012746 000001 MOV #1,-(SP)
000114 012746 000000G MOV #SND.MSG,-(SP)
000120 016700 000002G MOV .CRDAT+2,R0
000124 005046 CLR -(SP)
000126 116016 000046 MOVB 46(R0),(SP)
000132 004767 000000G JSR PC,$CALLE
000136 062706 000012 ADD #12,SP ; 2050
000142 000207 RTS PC ; 2052
000144 012764 177772 000014 1$: MOV #-6,14(R4) ; 2061
000152 000415 BR 5$ ; 2047
000154 121127 000020 2$: CMPB (R1),#20 ; 2065
000160 001403 BEQ 3$
000162 121127 000016 CMPB (R1),#16 ; 2066
000166 001004 BNE 4$
000170 012764 177773 000014 3$: MOV #-5,14(R4) ; 2068
000176 000403 BR 5$ ; 2065
000200 012764 177775 000014 4$: MOV #-3,14(R4) ; 2070
000206 112764 000014 000012 5$: MOVB #14,12(R4) ; 2072
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 62
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (20)
000214 004767 000000G JSR PC,$SCHED ; 2073
000220 000207 RTS PC ; 2013
; Routine Size: 73 words, Routine Base: $CODE$ + 5522
; Maximum stack depth per invocation: 11 words
; 2075
; 2076
; 2077
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 63
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (21)
; 2078 routine NSP_DISPATCH ( CCB, FCM) : MCB_CCB_MOD novalue = !
; 2079
; 2080 !++
; 2081 ! FUNCTIONAL DESCRIPTION:
; 2082 ! This routine dispatches to the appropriate routines based on the
; 2083 ! value of FCM.
; 2084 !
; 2085 ! FORMAL PARAMETERS:
; 2086 ! None
; 2087 !
; 2088 ! IMPLICIT INPUTS:
; 2089 ! CCB = CCB address
; 2090 ! FCM = FC_MOD of the CCB
; 2091 !
; 2092 ! IMPLICIT OUTPUTS:
; 2093 ! DB = NSP data base address
; 2094 !
; 2095 ! ROUTINE VALUE:
; 2096 ! COMPLETION CODES:
; 2097 ! None
; 2098 !
; 2099 ! SIDE EFFECTS:
; 2100 ! None
; 2101 !--
; 2102
; 2103 begin
; 2104
; 2105 map CCB: ref block field(C_fields);
; 2106
; P 2107 bind XMEDSP = TABLE$( $DSPCR, N_XINI, (N_GSTS, STATUS_NSP),
; P 2108 (N_POPN, OPEN_PORT), (N_PCLS, CLS_PORT),
; P 2109 (N_GSTA, STATE_PORT), (N_XCON, C_XMIT),
; P 2110 (N_XACC, C_ACC), (N_XREJ, C_REJ),
; P 2111 (N_XDSC, DISCONNECT), (N_XABT, ABORT),
; P 2112 (N_XDAT, DATA_SND), (N_XINT, INTR_SND),
; P 2113 (N_XIRQ, INTR_REQ), (N_XDRQ, D_REQST),
; 2114 (N_XBUF, DATA_RCEV), (N_XINI, NSP_INI));
; 2115
; 2116
; 2117 bind PORT = .DB[ADDRports]: blockvector[0, PDB_SIZE] field(PORT_fields);
; 2118 bind PDB = PORT[.CCB[C_LIX], 0, 0, 0, 0]: block field(PORT_fields);
; 2119
; 2120 MAP$( .DB[BIASports]);
; 2121 DISPATCH$ (.FCM, XMEDSP, ( .CCB, PDB));
; 2122 end;
000024 .PSECT $PLIT$, RO , D
000024 000000V P.AAB: .WORD U.34
000026 000000V .WORD U.27
000030 002056' .WORD U.13
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 64
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (21)
000032 000000V .WORD U.32
000034 003452' .WORD U.17
000036 003162' .WORD U.15
000040 002720' .WORD U.16
000042 004624' .WORD U.21
000044 000000' .WORD U.7
000046 004466' .WORD U.20
000050 005522' .WORD U.24
000052 005362' .WORD U.23
000054 005130' .WORD U.22
000056 004254' .WORD U.19
000060 000000V .WORD U.26
000024' ; XMEDSP
U.86= P.AAB
.SBTTL NSP.DISPATCH
005744 .PSECT $CODE$, RO
000000 016700 000002G ; NSP.DISPATCH
U.25: MOV .CRDAT+2,R0 ; 2117
000004 005001 CLR R1 ; 2118
000006 156401 000010 BISB 10(R4),R1 ; *(CCB),*
000012 070127 000140 MUL #140,R1
000016 066001 000016 ADD 16(R0),R1
000022 016700 000002G MOV .CRDAT+2,R0 ; 2120
000026 016067 000014 000000G MOV 14(R0),KISAR6
000034 010446 MOV R4,-(SP) ; CCB,* 2121
000036 010146 MOV R1,-(SP)
000040 004773 000024' JSR PC,@U.86(R3) ; *,*(FCM)
000044 022626 CMP (SP)+,(SP)+ ; 2103
000046 000207 RTS PC ; 2078
; Routine Size: 20 words, Routine Base: $CODE$ + 5744
; Maximum stack depth per invocation: 3 words
; 2123
; 2124
; 2125
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 65
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (22)
; 2126 routine NSP_INI (CCB, PDB) : novalue = !
; 2127
; 2128 !++
; 2129 ! FUNCTIONAL DESCRIPTION:
; 2130 ! This routine processes the Session Control INITILIZE call.
; 2131 !
; 2132 ! FORMAL PARAMETERS:
; 2133 ! CCB = CCB address
; 2134 ! PDB = Port data base address
; 2135 !
; 2136 ! IMPLICIT INPUTS:
; 2137 ! DB = NSP Data Base Address
; 2138 !
; 2139 ! IMPLICIT OUTPUTS:
; 2140 ! None
; 2141 !
; 2142 ! ROUTINE VALUE:
; 2143 ! COMPLETION CODES:
; 2144 ! None
; 2145 !
; 2146 ! SIDE EFFECTS:
; 2147 ! None
; 2148 !--
; 2149
; 2150 begin
; 2151 map CCB: ref block field(C_fields);
; 2152
; 2153 local
; 2154 CTL_CCB: ref block field(C_FIELDS);
; 2155
; 2156 If .DB[NSPrunning]
; 2157 Then
; 2158 CCB[C_STS] = N$ERUN
; 2159 Else
; 2160 begin
; 2161 If CCB_GET( CTL_CCB, -1)
; 2162 Then
; 2163 begin
; 2164 DB[NSPsc_pix] = .CCB[C_PIX];
; 2165 CTL_CCB[C_FNC] = FC_CTL;
; 2166 CTL_CCB[C_MOD] = FM_STR;
; 2167 CTL_CCB[C_PIX] = .DB[NSPxpt_pix];
; 2168 CTL_CCB[C_PRM1] = .DB[NSPself];
; 2169 CTL_CCB[C_STK] = .CCB;
; 2170 LLCRS$( .CTL_CCB);
; 2171 return
; 2172 end
; 2173 Else
; 2174 CCB[C_STS] = N$ERES
; 2175 end;
; 2176 CCB[C_FNC] = FC_XCP;
; 2177 LLCRS$( .CCB)
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 66
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (22)
; 2178 end;
.SBTTL NSP.INI
000000 004167 000000G ; NSP.INI
U.26: JSR R1,$SAVE4 ; 2126
000004 005746 TST -(SP)
000006 016601 000020 MOV 20(SP),R1 ; CCB,* 2158
000012 016700 000002G MOV .CRDAT+2,R0 ; 2156
000016 132760 000004 000072 BITB #4,72(R0)
000024 001404 BEQ 1$
000026 012761 177763 000014 MOV #-15,14(R1) ; 2158
000034 000442 BR 3$ ; 2156
000036 012746 000002 1$: MOV #2,-(SP) ; 2161
000042 060616 ADD SP,(SP) ; CTL.CCB,*
000044 012746 177777 MOV #-1,-(SP)
000050 004767 172266 JSR PC,U.8
000054 022626 CMP (SP)+,(SP)+
000056 006000 ROR R0
000060 103025 BCC 2$
000062 016700 000002G MOV .CRDAT+2,R0 ; 2164
000066 116160 000011 000044 MOVB 11(R1),44(R0)
000074 011604 MOV (SP),R4 ; CTL.CCB,* 2165
000076 112764 000010 000012 MOVB #10,12(R4)
000104 112764 000002 000013 MOVB #2,13(R4) ; 2166
000112 116064 000050 000011 MOVB 50(R0),11(R4) ; 2167
000120 016064 000002 000024 MOV 2(R0),24(R4) ; 2168
000126 010164 000004 MOV R1,4(R4) ; 2169
000132 000407 BR 4$ ; 2170
000134 012761 177777 000014 2$: MOV #-1,14(R1) ; 2174
000142 112761 000014 000012 3$: MOVB #14,12(R1) ; 2176
000150 010104 MOV R1,R4 ; 2177
000152 004767 000000G 4$: JSR PC,$SCHED
000156 005726 TST (SP)+ ; 2126
000160 000207 RTS PC
; Routine Size: 57 words, Routine Base: $CODE$ + 6014
; Maximum stack depth per invocation: 9 words
; 2179
; 2180
; 2181
; 2182
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 67
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (23)
; 2183 routine OPEN_PORT ( CCB, dummy) : novalue = !
; 2184
; 2185 !++
; 2186 ! FUNCTIONAL DESCRIPTION:
; 2187 ! This routine processes the Session Control Interface Call OPEN.
; 2188 !
; 2189 ! FORMAL PARAMETERS:
; 2190 ! CCB = CCB address
; 2191 !
; 2192 ! IMPLICIT INPUTS:
; 2193 ! DB = NSP data base address
; 2194 !
; 2195 ! IMPLICIT OUTPUTS:
; 2196 ! None
; 2197 !
; 2198 ! ROUTINE VALUE:
; 2199 ! COMPLETION CODES:
; 2200 ! None
; 2201 !
; 2202 ! SIDE EFFECTS:
; 2203 ! None
; 2204 !--
; 2205
; 2206 begin
; 2207 map CCB: ref block field(C_fields);
; 2208
; 2209 local
; 2210 port: ref blockvector[0,pdb_size] field(PORT_fields);
; 2211
; 2212 port = .DB[ADDRports];
; 2213 CCB[C_STS] = N$eres;
; 2214 CCB[C_FNC] = FC_XCP;
; 2215 CCB[C_LIX] = (Incr J from 0 to (.DB[NSPtotal] - 1) do
; 2216 begin
; 2217 bind PDB = PORT[.j,0,0,%bpval,0]: block field(PORT_fields);
; 2218
; 2219 If not .PDB[FLAGinuse]
; 2220 Then
; 2221 begin
; 2222 PDB_INIT( PDB);
; 2223 PDB[PORTstate] = N$SO;
; 2224 CCB[C_STS] = N$ssuc;
; 2225 exitloop .j;
; 2226 end;
; 2227 end);
; 2228
; 2229 LLCRS$ (.CCB)
; 2230 end;
.SBTTL OPEN.PORT
000000 004167 000000G ; OPEN.PORT
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 68
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (23)
U.27: JSR R1,$SAVE5 ; 2183
000004 016700 000002G MOV .CRDAT+2,R0 ; 2212
000010 016005 000016 MOV 16(R0),R5 ; *,PORT
000014 016604 000020 MOV 20(SP),R4 ; CCB,* 2213
000020 012764 177777 000014 MOV #-1,14(R4)
000026 112764 000014 000012 MOVB #14,12(R4) ; 2214
000034 016003 000020 MOV 20(R0),R3 ; 2215
000040 005002 CLR R2 ; J
000042 000424 BR 3$
000044 010201 1$: MOV R2,R1 ; J,* 2217
000046 070127 000140 MUL #140,R1
000052 060501 ADD R5,R1 ; PORT,*
000054 132761 000001 000042 BITB #1,42(R1) ; 2219
000062 001013 BNE 2$
000064 010146 MOV R1,-(SP) ; 2222
000066 004767 000000V JSR PC,U.28
000072 112711 000001 MOVB #1,(R1) ; 2223
000076 012764 000001 000014 MOV #1,14(R4) ; 2224
000104 010201 MOV R2,R1 ; J,* 2225
000106 005726 TST (SP)+
000110 000405 BR 4$
000112 005202 2$: INC R2 ; J 2215
000114 020203 3$: CMP R2,R3 ; J,*
000116 002752 BLT 1$
000120 012701 177777 MOV #-1,R1
000124 110164 000010 4$: MOVB R1,10(R4)
000130 004767 000000G JSR PC,$SCHED ; 2229
000134 000207 RTS PC ; 2183
; Routine Size: 47 words, Routine Base: $CODE$ + 6176
; Maximum stack depth per invocation: 8 words
; 2231
; 2232
; 2233
; 2234
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 69
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (24)
; 2235 routine PDB_INIT ( PDB ) : novalue = !
; 2236 !++
; 2237 ! FUNCTIONAL DESCRIPTION:
; 2238 ! This routine initilizes a PDB for use.
; 2239 !
; 2240 ! FORMAL PARAMETERS:
; 2241 ! PDB = Port data base address
; 2242 !
; 2243 ! IMPLICIT INPUTS:
; 2244 ! DB = NSP data base address
; 2245 !
; 2246 ! IMPLICIT OUTPUTS:
; 2247 ! None
; 2248 !
; 2249 ! ROUTINE VALUE:
; 2250 ! COMPLETION CODES:
; 2251 ! None
; 2252 !
; 2253 ! SIDE EFFECTS:
; 2254 ! None
; 2255 !--
; 2256
; 2257 begin
; 2258 map PDB: ref block field(PORT_fields);
; 2259
; 2260
; 2261 PDB[FLAGinuse] = true;
; 2262 PDB[CONFIDENCE] = true;
; 2263 PDB[NUMdat] = 1;
; 2264 PDB[NUMoth] = 1;
; 2265 PDB[NUMhigh] = 0;
; 2266 PDB[NUMsent] = 0;
; 2267 PDB[ACKrcv_dat] = 0;
; 2268 PDB[ACKdat_xmt] = 0;
; 2269 PDB[ACKoth_xmt] = 0;
; 2270 PDB[OTHstate] = OTHready;
; 2271 PDB[FLOWint_rem] = 1;
; 2272 PDB[FLOWdat_rem] = 0;
; 2273 PDB[FLAGsnd_dc] = false;
; 2274 PDB[FLOWsw_rem] = true;
; 2275 PDB[FLAGdat_ack] = false;
; 2276 PDB[FLAGoth_ack] = false;
; 2277 PDB[FLAGseg] = true;
; 2278 PDB[FLAGnew_msg] = true;
; 2279 PDB[TIMERdat] = 0;
; 2280 PDB[TIMERoth] = 0;
; 2281 PDB[TIMERcon] = 0;
; 2282 PDB[TIMERinact] = 0;
; 2283 PDB[DELAYmsg_num] = 0;
; 2284 PDB[DELAYstr_tim] = 0;
; 2285 PDB[DATres] = false;
; 2286 PDB[OTHres] = false;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 70
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (24)
; 2287 PDB[COUNTdat_retrans] = 0;
; 2288 PDB[COUNToth_retrans] = 0;
; 2289 PDB[COUNTloc_int] = 1;
; 2290 PDB[REAS_ptr] = 0;
; 2291 PDB[ADDRrem] = 0;
; 2292 end;
.SBTTL PDB.INIT
000000 004167 000000G ; PDB.INIT
U.28: JSR R1,$SAVE2 ; 2235
000004 016601 000010 MOV 10(SP),R1 ; PDB,* 2261
000010 012702 000042 MOV #42,R2
000014 060102 ADD R1,R2
000016 012761 000001 000020 MOV #1,20(R1) ; 2263
000024 012761 000001 000024 MOV #1,24(R1) ; 2264
000032 005061 000026 CLR 26(R1) ; 2265
000036 005061 000022 CLR 22(R1) ; 2266
000042 005061 000034 CLR 34(R1) ; 2267
000046 005061 000030 CLR 30(R1) ; 2268
000052 005061 000032 CLR 32(R1) ; 2269
000056 105061 000064 CLRB 64(R1) ; 2270
000062 012700 000040 MOV #40,R0 ; 2271
000066 060100 ADD R1,R0
000070 112710 000001 MOVB #1,(R0)
000074 105061 000037 CLRB 37(R1) ; 2272
000100 052710 002000 BIS #2000,(R0) ; 2274
000104 042710 160000 BIC #160000,(R0) ; 2276
000110 152712 000063 BISB #63,(R2) ; 2278
000114 005061 000012 CLR 12(R1) ; 2279
000120 005061 000014 CLR 14(R1) ; 2280
000124 005061 000016 CLR 16(R1) ; 2281
000130 105061 000036 CLRB 36(R1) ; 2282
000134 005061 000060 CLR 60(R1) ; 2283
000140 005061 000062 CLR 62(R1) ; 2284
000144 005061 000066 CLR 66(R1) ; 2285
000150 005061 000070 CLR 70(R1) ; 2286
000154 105061 000052 CLRB 52(R1) ; 2287
000160 105061 000053 CLRB 53(R1) ; 2288
000164 012761 000001 000056 MOV #1,56(R1) ; 2289
000172 005061 000126 CLR 126(R1) ; 2290
000176 005061 000006 CLR 6(R1) ; 2291
000202 000207 RTS PC ; 2235
; Routine Size: 66 words, Routine Base: $CODE$ + 6334
; Maximum stack depth per invocation: 4 words
; 2293
; 2294
; 2295
; 2296
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 71
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (25)
; 2297 routine PIN_SETUP : novalue = !
; 2298
; 2299 !++
; 2300 ! FUNCTIONAL DESCRIPTION:
; 2301 ! This routine handles process initilization.
; 2302 !
; 2303 ! FORMAL PARAMETERS:
; 2304 ! None
; 2305 !
; 2306 ! IMPLICIT INPUTS:
; 2307 ! DB = NSP data base address
; 2308 !
; 2309 ! IMPLICIT OUTPUTS:
; 2310 ! None
; 2311 !
; 2312 ! ROUTINE VALUE:
; 2313 ! COMPLETION CODES:
; 2314 !
; 2315 ! None
; 2316 !
; 2317 ! SIDE EFFECTS:
; 2318 ! None
; 2319 !--
; 2320
; 2321 begin
; 2322
; 2323
; 2324 PDVID$( XPT, DB[NSPxpt_pix]);
; 2325 PDVID$( NSP, DB[NSPns0_pix]);
; 2326 PDVID$( NS1, DB[NSPns1_pix]);
; 2327 PDVID$( NS2, DB[NSPns2_pix]);
; 2328 end;
.SBTTL PIN.SETUP
000000 004167 000000G ; PIN.SETUP
U.29: JSR R1,$SAVE2 ; 2297
000004 162706 000010 SUB #10,SP
000010 012746 000010 MOV #10,-(SP) ; 2324
000014 060616 ADD SP,(SP) ; $MCB$MY.INDEX,*
000016 012746 114224 MOV #-63554,-(SP)
000022 012746 000002 MOV #2,-(SP)
000026 012746 000000G MOV #P.DTGT,-(SP)
000032 004767 000000G JSR PC,$CALLI
000036 062706 000010 ADD #10,SP
000042 010001 MOV R0,R1 ; *,$MCB$STATUS
000044 006000 ROR R0
000046 103002 BCC 1$
000050 016600 000006 MOV 6(SP),R0 ; $MCB$MY.INDEX,$MCB$HANDLE
000054 010102 1$: MOV R1,R2 ; $MCB$STATUS,$MCB$STATUS
000056 006001 ROR R1 ; $MCB$STATUS
000060 103004 BCC 2$
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 72
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (25)
000062 016701 000002G MOV .CRDAT+2,R1
000066 110061 000050 MOVB R0,50(R1) ; $MCB$HANDLE,*
000072 012746 000006 2$: MOV #6,-(SP) ; 2325
000076 060616 ADD SP,(SP) ; $MCB$MY.INDEX,*
000100 012746 055210 MOV #55210,-(SP)
000104 012746 000002 MOV #2,-(SP)
000110 012746 000000G MOV #P.DTGT,-(SP)
000114 004767 000000G JSR PC,$CALLI
000120 062706 000010 ADD #10,SP
000124 010001 MOV R0,R1 ; *,$MCB$STATUS
000126 006000 ROR R0
000130 103002 BCC 3$
000132 016600 000004 MOV 4(SP),R0 ; $MCB$MY.INDEX,$MCB$HANDLE
000136 010102 3$: MOV R1,R2 ; $MCB$STATUS,$MCB$STATUS
000140 006001 ROR R1 ; $MCB$STATUS
000142 103004 BCC 4$
000144 016701 000002G MOV .CRDAT+2,R1
000150 110061 000045 MOVB R0,45(R1) ; $MCB$HANDLE,*
000154 012746 000004 4$: MOV #4,-(SP) ; 2326
000160 060616 ADD SP,(SP) ; $MCB$MY.INDEX,*
000162 012746 055227 MOV #55227,-(SP)
000166 012746 000002 MOV #2,-(SP)
000172 012746 000000G MOV #P.DTGT,-(SP)
000176 004767 000000G JSR PC,$CALLI
000202 062706 000010 ADD #10,SP
000206 010001 MOV R0,R1 ; *,$MCB$STATUS
000210 006000 ROR R0
000212 103002 BCC 5$
000214 016600 000002 MOV 2(SP),R0 ; $MCB$MY.INDEX,$MCB$HANDLE
000220 010102 5$: MOV R1,R2 ; $MCB$STATUS,$MCB$STATUS
000222 006001 ROR R1 ; $MCB$STATUS
000224 103004 BCC 6$
000226 016701 000002G MOV .CRDAT+2,R1
000232 110061 000046 MOVB R0,46(R1) ; $MCB$HANDLE,*
000236 012746 000002 6$: MOV #2,-(SP) ; 2327
000242 060616 ADD SP,(SP) ; $MCB$MY.INDEX,*
000244 012746 055230 MOV #55230,-(SP)
000250 012746 000002 MOV #2,-(SP)
000254 012746 000000G MOV #P.DTGT,-(SP)
000260 004767 000000G JSR PC,$CALLI
000264 062706 000010 ADD #10,SP
000270 010001 MOV R0,R1 ; *,$MCB$STATUS
000272 006000 ROR R0
000274 103001 BCC 7$
000276 011600 MOV (SP),R0 ; $MCB$MY.INDEX,$MCB$HANDLE
000300 010102 7$: MOV R1,R2 ; $MCB$STATUS,$MCB$STATUS
000302 006001 ROR R1 ; $MCB$STATUS
000304 103004 BCC 8$
000306 016701 000002G MOV .CRDAT+2,R1
000312 110061 000047 MOVB R0,47(R1) ; $MCB$HANDLE,*
000316 062706 000010 8$: ADD #10,SP ; 2297
000322 000207 RTS PC
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 73
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (25)
; Routine Size: 106 words, Routine Base: $CODE$ + 6540
; Maximum stack depth per invocation: 12 words
; 2329
; 2330
; 2331
; 2332
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 74
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (26)
; 2333 routine QUEUE_MSG ( CCB, PDB) : novalue = !
; 2334
; 2335 !++
; 2336 ! functional description:
; 2337 ! This routine queues segments on the data queue for transmission to
; 2338 ! a remote NSP.
; 2339 !
; 2340 ! formal parameters:
; 2341 ! CCB = CCB address
; 2342 ! PDB = Port Data Base address
; 2343 !
; 2344 ! implicit inputs:
; 2345 ! DB = NSP data base address
; 2346 !
; 2347 ! implicit outputs:
; 2348 ! none
; 2349 !
; 2350 ! routine value:
; 2351 ! completion codes:
; 2352 ! none
; 2353 !
; 2354 ! side effects:
; 2355 ! none
; 2356 !--
; 2357
; 2358 begin
; 2359 map CCB: ref block field(C_fields);
; 2360 map PDB: ref block field(PORT_fields);
; 2361
; 2362 local
; 2363 temp,
; 2364 CHN_CCB: ref block field(C_fields);
; 2365
; 2366 CCB[C_STS] = 0;
; 2367 temp = (.CCB[C_CNT] + .PDB[SIZEseg] -1) / .PDB[SIZEseg];
; 2368 CHN_CCB = .CCB[C_CHN];
; 2369
; 2370 While .CHN_CCB neq 0 do
; 2371 begin
; 2372 temp = .temp + ((.CHN_CCB[C_CNT] + .PDB[SIZEseg] -1) / .PDB[SIZEseg]);
; 2373 CHN_CCB = .CHN_CCB[C_CHN];
; 2374 end;
; 2375 PDB[NUMhigh] = .PDB[NUMhigh] + .temp;
; 2376
; 2377 If .PDB[MSGhead] eql 0
; 2378 Then
; 2379 PDB[MSG_chain] = .CCB;
; 2380 CMQIN$( PDB[MSG_queue], .CCB);
; 2381 end;
.SBTTL QUEUE.MSG
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 75
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (26)
000000 004167 000000G ; QUEUE.MSG
U.30: JSR R1,$SAVE5 ; 2333
000004 016646 000020 MOV 20(SP),-(SP) ; CCB,* 2366
000010 011600 MOV (SP),R0
000012 005060 000014 CLR 14(R0)
000016 016605 000020 MOV 20(SP),R5 ; PDB,* 2367
000022 016503 000072 MOV 72(R5),R3
000026 010304 MOV R3,R4
000030 066004 000022 ADD 22(R0),R4
000034 010401 MOV R4,R1
000036 005301 DEC R1
000040 006700 SXT R0
000042 071003 DIV R3,R0
000044 010002 MOV R0,R2 ; *,TEMP
000046 011600 MOV (SP),R0 ; 2368
000050 016004 000002 MOV 2(R0),R4 ; *,CHN.CCB
000054 001414 1$: BEQ 2$ ; 2370
000056 010300 MOV R3,R0 ; 2372
000060 066400 000022 ADD 22(R4),R0 ; *(CHN.CCB),*
000064 005300 DEC R0
000066 010001 MOV R0,R1
000070 006700 SXT R0
000072 071003 DIV R3,R0
000074 060200 ADD R2,R0 ; TEMP,*
000076 010002 MOV R0,R2 ; *,TEMP
000100 016404 000002 MOV 2(R4),R4 ; *(CHN.CCB),CHN.CCB 2373
000104 000763 BR 1$ ; 2370
000106 060265 000026 2$: ADD R2,26(R5) ; TEMP,* 2375
000112 012703 000102 MOV #102,R3 ; 2377
000116 060503 ADD R5,R3
000120 005713 TST (R3)
000122 001002 BNE 3$
000124 011665 000074 MOV (SP),74(R5) ; 2379
000130 011604 3$: MOV (SP),R4 ; 2380
000132 004767 000000G JSR PC,$CMQIN
000136 005726 TST (SP)+ ; 2333
000140 000207 RTS PC
; Routine Size: 49 words, Routine Base: $CODE$ + 7064
; Maximum stack depth per invocation: 8 words
; 2382
; 2383
; 2384
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 76
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (27)
; 2385 routine RCV_DISPATCH ( CCB, FCM) :MCB_CCB_MOD novalue = !
; 2386
; 2387 !++
; 2388 ! FUNCTIONAL DESCRIPTION:
; 2389 ! This routine processes CCB's entering from Transport. The message
; 2390 ! header is validated and a dispatch is made to the appropriate
; 2391 ! routine in either NS1 or NS2 process.
; 2392 !
; 2393 ! FORMAL PARAMETERS:
; 2394 ! CCB = CCB address
; 2395 ! FCM = FC_MOD of CCB
; 2396 !
; 2397 ! IMPLICIT INPUTS:
; 2398 ! DB = NSP data base address
; 2399 !
; 2400 ! IMPLICIT OUTPUTS:
; 2401 ! None
; 2402 !
; 2403 ! ROUTINE VALUE:
; 2404 ! COMPLETION CODES:
; 2405 ! None
; 2406 !
; 2407 ! SIDE EFFECTS:
; 2408 ! None
; 2409 !--
; 2410
; 2411 begin
; 2412 map CCB: ref block field(C_fields);
; 2413
; 2414 bind NODE = .DB[ADDRnodes]: blockvector[0, ND_size] field(NODE_fields);
; 2415 bind PORT = .DB[ADDRports]: blockvector[0, PDB_SIZE] field(PORT_FIELDS);
; 2416
; 2417 local
; 2418 PTR,
; 2419 PDB: ref block field(PORT_fields);
; 2420
; 2421 PTR = .CCB[C_ADDR];
; 2422
; 2423 MAP$( .DB[BIASnodes]);
; 2424
; 2425 Incr j from 0 to .DB[NSPt_nodes]-1 do
; 2426 begin
; 2427 bind NDB = NODE[.j,0,0,0,0]: block field(NODE_fields);
; 2428
; 2429 If .NDB[NDaddr] eql .CCB[C_PRM1]
; 2430 Then
; 2431 begin
; 2432 DADD( NDB[NDm_rcv], 1);
; 2433 exitloop
; 2434 end;
; 2435 end;
; 2436
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 77
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (27)
; 2437 MAP$( .CCB[C_BIAS]);
; 2438 DB[MSGFLG] = ch$rchar_a( PTR);
; 2439 DB[L_DSTADDR] = ch$rchar_a( PTR);
; 2440 DB[H_DSTADDR] = ch$rchar_a( PTR);
; 2441 DB[L_SRCADDR] = ch$rchar_a( PTR);
; 2442 DB[H_SRCADDR] = ch$rchar_a( PTR);
; 2443 MAP$( .DB[BIASports]);
; 2444
; 2445 If not (.DB[MSGFLG] eql FLG_NBEOM or
; 2446 .DB[MSGFLG] eql FLG_BOM or
; 2447 .DB[MSGFLG] eql FLG_EOM or
; 2448 .DB[MSGFLG] eql FLG_BEOM or
; 2449 .DB[MSGFLG] eql FLG_CA or
; 2450 .DB[MSGFLG] eql FLG_OTH_ACK or
; 2451 .DB[MSGFLG] eql FLG_INT or
; 2452 .DB[MSGFLG] eql FLG_REQ or
; 2453 .DB[MSGFLG] eql FLG_DAT_ACK or
; 2454 .DB[MSGFLG] eql FLG_NOP or
; 2455 .DB[MSGFLG] eql FLG_CI or
; 2456 .DB[MSGFLG] eql FLG_CC or
; 2457 .DB[MSGFLG] eql FLG_DI or
; 2458 .DB[MSGFLG] eql FLG_DC )
; 2459 Then
; 2460 begin
; 2461 CALL$E( EVENT_LOG, .DB[NSPns2_pix], invmsg, 0, .PDB, .CCB);
; 2462 CCB[C_FNC] = FC_RCE;
; 2463 LLCRS$( .CCB)
; 2464 end
; 2465 Else
; 2466 begin
; 2467 If .DB[MSGFLG] eql FLG_NOP
; 2468 Then
; 2469 begin
; 2470 CCB[C_FNC] = FC_RCE;
; 2471 LLCRS$( .CCB);
; 2472 return
; 2473 end;
; 2474 If .DB[MSGFLG] eql FLG_CI
; 2475 Then
; 2476 begin
; 2477 PDB = (Incr j from 0 to .DB[NSPtotal] -1 do
; 2478 begin
; 2479 bind XX = PORT[.j, 0, 0, 0, 0]: block field(PORT_fields);
; 2480 If .XX[PORTstate] eql N$SO
; 2481 Then
; 2482 exitloop XX;
; 2483 end);
; 2484 end
; 2485 Else
; 2486 begin
; 2487 bind XX = PORT[ .DB[L_DSTADDR], 0, 0, 0, 0]: block field(PORT_fields);
; 2488 If .DB[L_DSTADDR] lss .DB[NSPtotal]
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 78
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (27)
; 2489 Then
; 2490 begin
; 2491 If .XX[NODErem] eql .CCB[C_PRM1]
; 2492 Then
; 2493 begin
; 2494 If .DB[H_DSTADDR] eql .XX[ADDran]
; 2495 Then
; 2496 begin
; 2497 If .DB[L_SRCADDR] eql .XX[L_rem_addr] and
; 2498 .DB[H_SRCADDR] eql .XX[H_rem_addr]
; 2499 Then
; 2500 PDB = XX
; 2501 Else
; 2502 begin
; 2503 If .DB[MSGFLG] eql FLG_CA or
; 2504 .DB[MSGFLG] eql FLG_CC or
; 2505 .DB[MSGFLG] eql FLG_DC or
; 2506 .DB[MSGFLG] eql FLG_DI
; 2507 Then
; 2508 PDB = XX
; 2509 Else
; 2510 PDB = -1
; 2511 end
; 2512 end
; 2513 Else
; 2514 PDB = -1;
; 2515 end
; 2516 Else
; 2517 PDB = -1;
; 2518 end
; 2519 Else
; 2520 PDB = -1;
; 2521 end;
; 2522 If .PDB eql -1
; 2523 Then
; 2524 CALL$E(RESV_PORT, .DB[NSPns2_pix], .CCB)
; 2525 Else
; 2526 begin
; 2527 Selectone .DB[MSGFLG] of
; 2528 Set
; 2529 [FLG_CI]: CALL$E(CI_RCV, .DB[NSPns2_pix], .CCB, .PDB);
; 2530 [FLG_CC]: CALL$E(CC_RCV, .DB[NSPns2_pix], .CCB, .PDB);
; 2531 [FLG_CA]: CALL$E(CA_RCV, .DB[NSPns2_pix], .CCB, .PDB);
; 2532 [FLG_DI]: CALL$E(DI_RCV, .DB[NSPns2_pix], .CCB, .PDB);
; 2533 [FLG_DC]: CALL$E(DC_RCV, .DB[NSPns2_pix], .CCB, .PDB);
; 2534 [OTHERWISE]: CALL$E(MSG_RCV, .DB[NSPns1_pix], .CCB, .PDB);
; 2535 Tes;
; 2536 end;
; 2537 end;
; 2538 end;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 79
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (27)
.GLOBL EVENT.LOG, RESV.PORT, CI.RCV, CC.RCV
.GLOBL CA.RCV, DI.RCV, DC.RCV, MSG.RCV
.SBTTL RCV.DISPATCH
000000 005746 ; RCV.DISPATCH
U.31: TST -(SP) ; 2385
000002 010446 MOV R4,-(SP)
000004 016702 000002G MOV .CRDAT+2,R2 ; 2414
000010 016266 000016 000002 MOV 16(R2),2(SP) ; 2411
000016 010400 MOV R4,R0 ; 2421
000020 016004 000020 MOV 20(R0),R4 ; *,PTR
000024 016267 000030 000000G MOV 30(R2),KISAR6 ; 2423
000032 016205 000036 MOV 36(R2),R5 ; 2425
000036 005001 CLR R1 ; J
000040 000423 BR 3$
000042 010103 1$: MOV R1,R3 ; J,* 2427
000044 070327 000042 MUL #42,R3
000050 066203 000032 ADD 32(R2),R3
000054 011600 MOV (SP),R0 ; 2429
000056 021360 000024 CMP (R3),24(R0)
000062 001011 BNE 2$
000064 012746 000020 MOV #20,-(SP) ; 2432
000070 060316 ADD R3,(SP)
000072 012746 000001 MOV #1,-(SP)
000076 004767 174652 JSR PC,U.18
000102 022626 CMP (SP)+,(SP)+ ; 2433
000104 000403 BR 4$
000106 005201 2$: INC R1 ; J 2425
000110 020105 3$: CMP R1,R5 ; J,*
000112 002753 BLT 1$
000114 011600 4$: MOV (SP),R0 ; 2437
000116 016067 000016 000000G MOV 16(R0),KISAR6
000124 016700 000002G MOV .CRDAT+2,R0 ; 2438
000130 012702 000052 MOV #52,R2
000134 060002 ADD R0,R2
000136 112412 MOVB (R4)+,(R2) ; PTR,*
000140 112462 000001 MOVB (R4)+,1(R2) ; PTR,* 2439
000144 112460 000054 MOVB (R4)+,54(R0) ; PTR,* 2440
000150 112460 000055 MOVB (R4)+,55(R0) ; PTR,* 2441
000154 112460 000056 MOVB (R4)+,56(R0) ; PTR,* 2442
000160 016067 000014 000000G MOV 14(R0),KISAR6 ; 2443
000166 105712 TSTB (R2) ; 2445
000170 001477 BEQ 5$
000172 121227 000040 CMPB (R2),#40 ; 2446
000176 001474 BEQ 5$
000200 121227 000100 CMPB (R2),#100 ; 2447
000204 001471 BEQ 5$
000206 121227 000140 CMPB (R2),#140 ; 2448
000212 001466 BEQ 5$
000214 121227 000044 CMPB (R2),#44 ; 2449
000220 001463 BEQ 5$
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 80
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (27)
000222 121227 000024 CMPB (R2),#24 ; 2450
000226 001460 BEQ 5$
000230 121227 000060 CMPB (R2),#60 ; 2451
000234 001455 BEQ 5$
000236 121227 000020 CMPB (R2),#20 ; 2452
000242 001452 BEQ 5$
000244 121227 000004 CMPB (R2),#4 ; 2453
000250 001447 BEQ 5$
000252 121227 000010 CMPB (R2),#10 ; 2454
000256 001447 BEQ 6$
000260 121227 000030 CMPB (R2),#30 ; 2455
000264 001441 BEQ 5$
000266 121227 000050 CMPB (R2),#50 ; 2456
000272 001436 BEQ 5$
000274 121227 000070 CMPB (R2),#70 ; 2457
000300 001433 BEQ 5$
000302 121227 000110 CMPB (R2),#110 ; 2458
000306 001430 BEQ 5$
000310 011646 MOV (SP),-(SP) ; 2461
000312 010246 MOV R2,-(SP) ; PDB,*
000314 005046 CLR -(SP)
000316 005046 CLR -(SP)
000320 012746 000004 MOV #4,-(SP)
000324 012746 000000G MOV #EVENT.LOG,-(SP)
000330 005046 CLR -(SP)
000332 116016 000047 MOVB 47(R0),(SP)
000336 004767 000000G JSR PC,$CALLE
000342 016600 000016 MOV 16(SP),R0 ; 2462
000346 112760 000004 000012 MOVB #4,12(R0)
000354 010004 MOV R0,R4 ; 2463
000356 004767 000000G JSR PC,$SCHED
000362 062706 000006 ADD #6,SP ; 2460
000366 000536 BR 15$ ; 2445
000370 121227 000010 5$: CMPB (R2),#10 ; 2467
000374 001011 BNE 7$
000376 011600 6$: MOV (SP),R0 ; 2470
000400 112760 000004 000012 MOVB #4,12(R0)
000406 010004 MOV R0,R4 ; 2471
000410 004767 000000G JSR PC,$SCHED
000414 000167 000470 JMP 25$ ; 2469
000420 016705 000002G 7$: MOV .CRDAT+2,R5 ; 2474
000424 005004 CLR R4
000426 156504 000052 BISB 52(R5),R4
000432 020427 000030 CMP R4,#30
000436 001017 BNE 10$
000440 005000 CLR R0 ; J 2477
000442 000411 BR 9$
000444 010003 8$: MOV R0,R3 ; J,* 2479
000446 070327 000140 MUL #140,R3
000452 066603 000002 ADD 2(SP),R3
000456 121327 000001 CMPB (R3),#1 ; 2480
000462 001457 BEQ 12$ ; 2482
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 81
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (27)
000464 005200 INC R0 ; J 2477
000466 020065 000020 9$: CMP R0,20(R5) ; J,*
000472 002764 BLT 8$
000474 000454 BR 13$
000476 005003 10$: CLR R3 ; 2487
000500 156503 000053 BISB 53(R5),R3
000504 070327 000140 MUL #140,R3
000510 066603 000002 ADD 2(SP),R3
000514 005000 CLR R0 ; 2488
000516 156500 000053 BISB 53(R5),R0
000522 020065 000020 CMP R0,20(R5)
000526 002037 BGE 13$
000530 011600 MOV (SP),R0 ; 2491
000532 026360 000002 000024 CMP 2(R3),24(R0)
000540 001032 BNE 13$
000542 126563 000054 000005 CMPB 54(R5),5(R3) ; 2494
000550 001026 BNE 13$
000552 126563 000055 000006 CMPB 55(R5),6(R3) ; 2497
000560 001004 BNE 11$
000562 126563 000056 000007 CMPB 56(R5),7(R3) ; 2498
000570 001414 BEQ 12$ ; 2500
000572 020427 000044 11$: CMP R4,#44 ; 2503
000576 001411 BEQ 12$
000600 020427 000050 CMP R4,#50 ; 2504
000604 001406 BEQ 12$
000606 020427 000110 CMP R4,#110 ; 2505
000612 001403 BEQ 12$
000614 020427 000070 CMP R4,#70 ; 2506
000620 001002 BNE 13$
000622 010302 12$: MOV R3,R2 ; *,PDB 2508
000624 000402 BR 14$ ; 2502
000626 012702 177777 13$: MOV #-1,R2 ; *,PDB 2520
000632 020227 177777 14$: CMP R2,#-1 ; PDB,* 2522
000636 001013 BNE 16$
000640 011646 MOV (SP),-(SP) ; 2524
000642 012746 000001 MOV #1,-(SP)
000646 012746 000000G MOV #RESV.PORT,-(SP)
000652 005046 CLR -(SP)
000654 116516 000047 MOVB 47(R5),(SP)
000660 004767 000000G JSR PC,$CALLE
000664 000507 15$: BR 24$ ; 2522
000666 020427 000030 16$: CMP R4,#30 ; 2527
000672 001010 BNE 17$
000674 010246 MOV R2,-(SP) ; PDB,* 2529
000676 016646 000002 MOV 2(SP),-(SP)
000702 012746 000002 MOV #2,-(SP)
000706 012746 000000G MOV #CI.RCV,-(SP)
000712 000453 BR 21$
000714 020427 000050 17$: CMP R4,#50 ; 2527
000720 001010 BNE 18$
000722 010246 MOV R2,-(SP) ; PDB,* 2530
000724 016646 000002 MOV 2(SP),-(SP)
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 82
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (27)
000730 012746 000002 MOV #2,-(SP)
000734 012746 000000G MOV #CC.RCV,-(SP)
000740 000440 BR 21$
000742 020427 000044 18$: CMP R4,#44 ; 2527
000746 001010 BNE 19$
000750 010246 MOV R2,-(SP) ; PDB,* 2531
000752 016646 000002 MOV 2(SP),-(SP)
000756 012746 000002 MOV #2,-(SP)
000762 012746 000000G MOV #CA.RCV,-(SP)
000766 000425 BR 21$
000770 020427 000070 19$: CMP R4,#70 ; 2527
000774 001010 BNE 20$
000776 010246 MOV R2,-(SP) ; PDB,* 2532
001000 016646 000002 MOV 2(SP),-(SP)
001004 012746 000002 MOV #2,-(SP)
001010 012746 000000G MOV #DI.RCV,-(SP)
001014 000412 BR 21$
001016 020427 000110 20$: CMP R4,#110 ; 2527
001022 001013 BNE 22$
001024 010246 MOV R2,-(SP) ; PDB,* 2533
001026 016646 000002 MOV 2(SP),-(SP)
001032 012746 000002 MOV #2,-(SP)
001036 012746 000000G MOV #DC.RCV,-(SP)
001042 005046 21$: CLR -(SP)
001044 116516 000047 MOVB 47(R5),(SP)
001050 000412 BR 23$
001052 010246 22$: MOV R2,-(SP) ; PDB,* 2534
001054 016646 000002 MOV 2(SP),-(SP)
001060 012746 000002 MOV #2,-(SP)
001064 012746 000000G MOV #MSG.RCV,-(SP)
001070 005046 CLR -(SP)
001072 116516 000046 MOVB 46(R5),(SP)
001076 004767 000000G 23$: JSR PC,$CALLE
001102 005726 TST (SP)+ ; 2526
001104 062706 000010 24$: ADD #10,SP ; 2411
001110 022626 25$: CMP (SP)+,(SP)+ ; 2385
001112 000207 RTS PC
; Routine Size: 294 words, Routine Base: $CODE$ + 7226
; Maximum stack depth per invocation: 10 words
; 2539
; 2540
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 83
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (28)
; 2541 routine STATE_PORT ( CCB, PDB) : novalue = !
; 2542
; 2543 !++
; 2544 ! FUNCTIONAL DESCRIPTION:
; 2545 ! This routine processes the Session Control Interface Call STATE.
; 2546 !
; 2547 ! FORMAL PARAMETERS:
; 2548 ! CCB = CCB address
; 2549 ! PDB = Port Data Base address
; 2550 !
; 2551 ! IMPLICIT INPUTS:
; 2552 ! DB = NSP data base address
; 2553 !
; 2554 ! IMPLICIT OUTPUTS:
; 2555 ! None
; 2556 !
; 2557 ! ROUTINE VALUE:
; 2558 ! COMPLETION CODES:
; 2559 ! None
; 2560 !
; 2561 ! SIDE EFFECTS:
; 2562 ! None
; 2563 !--
; 2564
; 2565 begin
; 2566 map CCB: ref block field(C_fields);
; 2567 map PDB: ref block field(PORT_fields);
; 2568
; 2569 CCB[C_STS] = .PDB[PORTstate];
; 2570 CCB[C_FNC] = FC_XCP;
; 2571 LLCRS$ (.CCB)
; 2572 end;
.SBTTL STATE.PORT
000000 010446 ; STATE.PORT
U.32: MOV R4,-(SP) ; 2541
000002 016604 000006 MOV 6(SP),R4 ; CCB,* 2569
000006 117600 000004 MOVB @4(SP),R0 ; PDB,*
000012 010064 000014 MOV R0,14(R4)
000016 112764 000014 000012 MOVB #14,12(R4) ; 2570
000024 004767 000000G JSR PC,$SCHED ; 2571
000030 012604 MOV (SP)+,R4 ; 2541
000032 000207 RTS PC
; Routine Size: 14 words, Routine Base: $CODE$ + 10342
; Maximum stack depth per invocation: 2 words
; 2573
; 2574
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 84
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (29)
; 2575 routine SC_RETRN ( CCB, FCM) : MCB_CCB_MOD novalue = !
; 2576
; 2577 !++
; 2578 ! FUNCTIONAL DESCRIPTION:
; 2579 ! This routine processes Enables returning from Session Control. Any
; 2580 ! resources owned by NSP are released and Transport resources are
; 2581 ! returned via an Enable.
; 2582 !
; 2583 ! FORMAL PARAMETERS:
; 2584 ! CCB = CCB address
; 2585 ! FCM = FC_MOD of CCB
; 2586 !
; 2587 ! IMPLICIT INPUTS:
; 2588 ! DB = NSP data base address
; 2589 !
; 2590 ! IMPLICIT OUTPUTS:
; 2591 ! None
; 2592 !
; 2593 ! ROUTINE VALUE:
; 2594 ! COMPLETION CODES:
; 2595 ! None
; 2596 !
; 2597 ! SIDE EFFECTS:
; 2598 ! None
; 2599 !--
; 2600
; 2601 begin
; 2602 map CCB: ref block field(C_fields);
; 2603 bind PORT = .DB[ADDRports]: blockvector[0, PDB_SIZE] field(PORT_fields);
; 2604 bind PDB = PORT[.CCB[C_LIX], 0, 0, 0, 0]: block field(PORT_fields);
; 2605
; 2606 local
; 2607 STK_CCB: ref block field(C_fields);
; 2608
; 2609 MAP$( .DB[BIASports]);
; 2610
; 2611 If .CCB[C_STK] neq 0
; 2612 Then
; 2613 begin
; 2614 STK_CCB = .CCB[C_STK];
; 2615 STK_CCB[C_FNC] = FC_RCE;
; 2616 LLCRS$( .STK_CCB);
; 2617 end
; 2618 Else
; 2619 If .CCB[C_ADDR] neq 0
; 2620 Then
; 2621 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 2622 CCB_RETRN( .CCB, PDB);
; 2623 end;
.GLOBL $DSRRT
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 85
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (29)
.SBTTL SC.RETRN
000000 010402 ; SC.RETRN
U.33: MOV R4,R2 ; *,CCB 2575
000002 016700 000002G MOV .CRDAT+2,R0 ; 2603
000006 005001 CLR R1 ; 2604
000010 156201 000010 BISB 10(R2),R1 ; *(CCB),*
000014 070127 000140 MUL #140,R1
000020 010103 MOV R1,R3
000022 066003 000016 ADD 16(R0),R3
000026 016700 000002G MOV .CRDAT+2,R0 ; 2609
000032 016067 000014 000000G MOV 14(R0),KISAR6
000040 016200 000004 MOV 4(R2),R0 ; *(CCB),* 2611
000044 001407 BEQ 1$
000046 010004 MOV R0,R4 ; *,STK.CCB 2614
000050 112764 000004 000012 MOVB #4,12(R4) ; *,*(STK.CCB) 2615
000056 004767 000000G JSR PC,$SCHED ; 2616
000062 000407 BR 2$ ; 2611
000064 016200 000020 1$: MOV 20(R2),R0 ; *(CCB),* 2619
000070 001404 BEQ 2$
000072 012701 000014 MOV #14,R1 ; 2621
000076 004767 000000G JSR PC,$DSRRT
000102 010246 2$: MOV R2,-(SP) ; CCB,* 2622
000104 010346 MOV R3,-(SP)
000106 004767 170140 JSR PC,U.10
000112 022626 CMP (SP)+,(SP)+ ; 2601
000114 000207 RTS PC ; 2575
; Routine Size: 39 words, Routine Base: $CODE$ + 10376
; Maximum stack depth per invocation: 3 words
; 2624
; 2625
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 86
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (30)
; 2626 routine STATUS_NSP ( CCB, PDB) : novalue = !
; 2627
; 2628 !++
; 2629 ! FUNCTIONAL DESCRIPTION:
; 2630 ! This routine processes the Session Control Interface Call STATUS.
; 2631 !
; 2632 ! FORMAL PARAMETERS:
; 2633 ! CCB = CCB address
; 2634 ! PDB = Port Data Base address
; 2635 !
; 2636 ! IMPLICIT INPUTS:
; 2637 ! DB = NSP data base address
; 2638 !
; 2639 ! IMPLICIT OUTPUTS:
; 2640 ! None
; 2641 !
; 2642 ! ROUTINE VALUE:
; 2643 ! COMPLETION CODES:
; 2644 ! None
; 2645 !
; 2646 ! SIDE EFFECTS:
; 2647 ! None
; 2648 !--
; 2649
; 2650 begin
; 2651 map CCB: ref block field(C_fields);
; 2652
; 2653 CCB[C_CNT] = .DB[NSPbuf];
; 2654 CCB[C_PRM1] = .DB[NSPself];
; 2655 CCB[C_STS] = N$SSUC;
; 2656 CCB[C_FNC] = FC_XCP;
; 2657 LLCRS$ (.CCB)
; 2658
; 2659 end;
.SBTTL STATUS.NSP
000000 010446 ; STATUS.NSP
U.34: MOV R4,-(SP) ; 2626
000002 016604 000006 MOV 6(SP),R4 ; CCB,* 2653
000006 016700 000002G MOV .CRDAT+2,R0
000012 016064 000042 000022 MOV 42(R0),22(R4)
000020 016064 000002 000024 MOV 2(R0),24(R4) ; 2654
000026 012764 000001 000014 MOV #1,14(R4) ; 2655
000034 112764 000014 000012 MOVB #14,12(R4) ; 2656
000042 004767 000000G JSR PC,$SCHED ; 2657
000046 012604 MOV (SP)+,R4 ; 2626
000050 000207 RTS PC
; Routine Size: 21 words, Routine Base: $CODE$ + 10514
; Maximum stack depth per invocation: 2 words
; 2660
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 87
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (30)
; 2661
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 88
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (31)
; 2662 routine TIMER ( CCB, FCM) : MCB_CCB_MOD novalue = !
; 2663
; 2664 !++
; 2665 ! FUNCTIONAL DESCRIPTION:
; 2666 ! This routine dispatches on the timer type to the appropriate
; 2667 ! routines.
; 2668 !
; 2669 ! FORMAL PARAMETERS:
; 2670 ! CCB = CCB address
; 2671 ! FCM = FC_MOD of CCB
; 2672 !
; 2673 ! IMPLICIT INPUTS:
; 2674 ! DB = NSP data base address
; 2675 !
; 2676 ! IMPLICIT OUTPUTS:
; 2677 ! None
; 2678 !
; 2679 ! ROUTINE VALUE:
; 2680 ! COMPLETION CODES:
; 2681 ! None
; 2682 !
; 2683 ! SIDE EFFECTS:
; 2684 ! None
; 2685 !--
; 2686
; 2687 begin
; 2688 db[nsptimer] = .db[nsptimer] + 1;
; 2689
; 2690 Case .FCM^-1 from FM_STM^-1 to FM_PIN^-1 of
; 2691 Set
; 2692 [FM_STM^-1]: return;
; 2693 [FM_LTM^-1]: begin
; 2694 CALL$E( ONCE_A_SECOND, .DB[NSPns1_pix]);
; 2695 CLOCK()
; 2696 end;
; 2697 [FM_PWF^-1]: return;
; 2698 [FM_PIN^-1]: PIN_SETUP();
; 2699 Tes;
; 2700 end;
.GLOBL ONCE.A.SECOND
.SBTTL TIMER
000000 005277 000002G ; TIMER
U.35: INC @.CRDAT+2 ; 2688
000004 006203 ASR R3 ; 2690
000006 006303 ASL R3
000010 066307 000062' ADD P.AAC(R3),PC ; Case dispatch
000014 000207 1$: RTS PC ; 2692
000016 005046 2$: CLR -(SP) ; 2694
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 89
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (31)
000020 012746 000000G MOV #ONCE.A.SECOND,-(SP)
000024 016700 000002G MOV .CRDAT+2,R0
000030 005046 CLR -(SP)
000032 116016 000046 MOVB 46(R0),(SP)
000036 004767 000000G JSR PC,$CALLE
000042 004767 170402 JSR PC,U.12 ; 2695
000046 062706 000006 ADD #6,SP ; 2693
000052 000207 RTS PC ; 2690
000054 004767 175672 3$: JSR PC,U.29 ; 2698
000060 000207 4$: RTS PC ; 2662
; Routine Size: 25 words, Routine Base: $CODE$ + 10566
; Maximum stack depth per invocation: 4 words
000062 .PSECT $PLIT$, RO , D
P.AAC: ; CASE Table for TIMER+0010 2690
000062 000044 .WORD 44 ; [4$]
000064 000002 .WORD 2 ; [2$]
000066 000044 .WORD 44 ; [4$]
000070 000040 .WORD 40 ; [3$]
; 2701
; 2702
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 90
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (32)
; 2703 routine TIMEOUT ( PDB, VALUE) : = !
; 2704
; 2705 !++
; 2706 ! FUNCTIONAL DESCRIPTION:
; 2707 ! This routine records any timeout that has occured.
; 2708 !
; 2709 ! FORMAL PARAMETERS:
; 2710 ! PDB = Port Data Base address
; 2711 ! VALUE = Data Base Entry to test
; 2712 !
; 2713 ! IMPLICIT INPUTS:
; 2714 ! DB = NSP data base address
; 2715 !
; 2716 ! IMPLICIT OUTPUTS:
; 2717 ! None
; 2718 !
; 2719 ! ROUTINE VALUE:
; 2720 ! COMPLETION CODES:
; 2721 ! None
; 2722 !
; 2723 ! SIDE EFFECTS:
; 2724 ! None
; 2725 !--
; 2726
; 2727 begin
; 2728 map PDB: ref block field(PORT_fields);
; 2729
; 2730 local
; 2731 GOT_CCB: ref block field(C_fields);
; 2732
; 2733 If (.VALUE eql .DB[NSPretrans]) and .PDB[CONFIDENCE]
; 2734 Then
; 2735 begin
; 2736 If CCB_GET( GOT_CCB, .PDB)
; 2737 Then
; 2738 begin
; 2739 CALL$E( NSP_CONFIDENCE, .DB[NSPns2_pix], .GOT_CCB, .PDB);
; 2740 return true
; 2741 end
; 2742 Else
; 2743 return false
; 2744 end;
; 2745 true
; 2746 end;
.GLOBL NSP.CONFIDENCE
.SBTTL TIMEOUT
010650 .PSECT $CODE$, RO
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 91
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (32)
000000 005746 ; TIMEOUT
U.36: TST -(SP) ; 2703
000002 016700 000002G MOV .CRDAT+2,R0 ; 2733
000006 026660 000004 000010 CMP 4(SP),10(R0) ; VALUE,*
000014 001043 BNE 2$
000016 016600 000006 MOV 6(SP),R0 ; PDB,*
000022 132760 000020 000042 BITB #20,42(R0)
000030 001435 BEQ 2$
000032 012746 000002 MOV #2,-(SP) ; 2736
000036 060616 ADD SP,(SP) ; GOT.CCB,*
000040 010046 MOV R0,-(SP) ; PDB,*
000042 004767 167440 JSR PC,U.8
000046 022626 CMP (SP)+,(SP)+
000050 006000 ROR R0
000052 103022 BCC 1$
000054 016646 000006 MOV 6(SP),-(SP) ; PDB,* 2739
000060 016646 000002 MOV 2(SP),-(SP) ; GOT.CCB,*
000064 012746 000002 MOV #2,-(SP)
000070 012746 000000G MOV #NSP.CONFIDENCE,-(SP)
000074 016700 000002G MOV .CRDAT+2,R0
000100 005046 CLR -(SP)
000102 116016 000047 MOVB 47(R0),(SP)
000106 004767 000000G JSR PC,$CALLE
000112 062706 000012 ADD #12,SP ; 2738
000116 000402 BR 2$ ; 2735
000120 005000 1$: CLR R0
000122 000402 BR 3$
000124 012700 000001 2$: MOV #1,R0 ; 2703
000130 005726 3$: TST (SP)+
000132 000207 RTS PC
; Routine Size: 46 words, Routine Base: $CODE$ + 10650
; Maximum stack depth per invocation: 7 words
; 2747
; 2748
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 92
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (33)
; 2749 routine TO_NM ( CCB, FCM) : MCB_CCB_MOD novalue = !
; 2750
; 2751 !++
; 2752 ! FUNCTIONAL DESCRIPTION:
; 2753 ! This routine transfers control to module NS2 to process
; 2754 ! NM interface calls.
; 2755 !
; 2756 ! FORMAL PARAMETERS:
; 2757 ! CCB = CCB address
; 2758 ! FCM = FC_MOD of the CCB
; 2759 !
; 2760 ! IMPLICIT INPUTS:
; 2761 ! DB = NSP data base address
; 2762 !
; 2763 ! IMPLICIT OUTPUTS:
; 2764 ! None
; 2765 !
; 2766 ! ROUTINE VALUE:
; 2767 ! COMPLETION CODES:
; 2768 ! None
; 2769 !
; 2770 ! SIDE EFFECTS:
; 2771 ! None
; 2772 !--
; 2773
; 2774 begin
; 2775 CALL$E( FCCTL, .DB[NSPns2_pix], .CCB, .FCM);
; 2776 end;
.GLOBL FCCTL
.SBTTL TO.NM
000000 010346 ; TO.NM
U.37: MOV R3,-(SP) ; FCM,* 2775
000002 010446 MOV R4,-(SP) ; CCB,*
000004 012746 000002 MOV #2,-(SP)
000010 012746 000000G MOV #FCCTL,-(SP)
000014 016700 000002G MOV .CRDAT+2,R0
000020 005046 CLR -(SP)
000022 116016 000047 MOVB 47(R0),(SP)
000026 004767 000000G JSR PC,$CALLE
000032 062706 000012 ADD #12,SP ; 2774
000036 000207 RTS PC ; 2749
; Routine Size: 16 words, Routine Base: $CODE$ + 11004
; Maximum stack depth per invocation: 6 words
; 2777
; 2778
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 93
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (33)
; 2779
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 94
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (34)
; 2780 routine XME_COMPLETE ( CCB, FCM) : MCB_CCB_MOD novalue = !
; 2781
; 2782 !++
; 2783 ! FUNCTIONAL DESCRIPTION:
; 2784 ! This routine processes Transmit-Completes. A dispatch is made to the
; 2785 ! appropriate routine for which the complete is for.
; 2786 !
; 2787 ! FORMAL PARAMETERS:
; 2788 ! CCB = CCB address
; 2789 ! FCM = FC_MOD of CCB
; 2790 !
; 2791 ! IMPLICIT INPUTS:
; 2792 ! DB = NSP data base address
; 2793 !
; 2794 ! IMPLICIT OUTPUTS:
; 2795 ! None
; 2796 !
; 2797 ! ROUTINE VALUE:
; 2798 ! COMPLETION CODES:
; 2799 ! None
; 2800 !
; 2801 ! SIDE EFFECTS:
; 2802 ! None
; 2803 !--
; 2804
; 2805 begin
; 2806 map CCB: ref block field(C_fields);
; 2807
; 2808 bind PORT = .DB[ADDRports]: blockvector[0, PDB_size] field(PORT_fields);
; 2809
; 2810
; 2811 local
; 2812 PDB: ref block field(PORT_fields),
; 2813 STK_CCB: ref block field(C_fields);
; 2814
; 2815 MAP$( .DB[BIASports]);
; 2816 PDB = .CCB[C_PRM4];
; 2817 STK_CCB = .CCB[C_STK];
; 2818
; 2819
; 2820 If .CCB[C_STS] eql CE_ERR
; 2821 Then
; 2822 SIGNAL_STOP( NSP$_ERR, .CCB);
; 2823
; 2824 If .CCB[C_STS] eql CE_NTE
; 2825 Then
; 2826 SIGNAL_STOP( NSP$_NTE, .CCB);
; 2827
; 2828 If .CCB[C_STK] neq 0
; 2829 Then
; 2830 begin
; 2831 Case .STK_CCB[C_MOD]^-1 from N_XCON^-1 to N_XBUF^-1 of
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 95
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (34)
; 2832 set
; 2833 [N_XCON^-1]: XCP_CI( .CCB, .PDB);
; 2834 [N_XACC^-1]: XCP_CONN( .CCB, .PDB);
; 2835 [N_XREJ^-1]: XCP_CONN( .CCB, .PDB);
; 2836 [N_XDSC^-1]: XCP_CONN( .CCB, .PDB);
; 2837 [N_XABT^-1]: XCP_CONN( .CCB, .PDB);
; 2838 [N_XDAT^-1]: XCP_DATA( .CCB, .PDB);
; 2839 [N_XINT^-1]: XCP_OTH( .CCB, .PDB);
; 2840 [N_XIRQ^-1]: XCP_OTH( .CCB, .PDB);
; 2841 [N_XDRQ^-1]: XCP_OTH( .CCB, .PDB);
; 2842 [N_XBUF^-1]: XCP_OTH( .CCB, .PDB);
; 2843 [OUTRANGE]: SIGNAL_STOP( NSP$_RNG, .STK_CCB);
; 2844 tes;
; 2845 end
; 2846 Else
; 2847 begin
; 2848 If .CCB[C_STS] eql CE_RTE
; 2849 Then
; 2850 SIGNAL( NSP$_RTE, .CCB);
; 2851
; 2852 If .CCB[C_ADDR] neq 0
; 2853 Then
; 2854 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 2855
; 2856 CCB_RETRN( .CCB, .PDB);
; 2857 end;
; 2858
; 2859 end;
.SBTTL XME.COMPLETE
000000 016700 000002G ; XME.COMPLETE
U.38: MOV .CRDAT+2,R0 ; 2815
000004 016067 000014 000000G MOV 14(R0),KISAR6
000012 016402 000032 MOV 32(R4),R2 ; *(CCB),PDB 2816
000016 016401 000004 MOV 4(R4),R1 ; *(CCB),STK.CCB 2817
000022 012703 000014 MOV #14,R3 ; 2820
000026 060403 ADD R4,R3 ; CCB,*
000030 021327 177760 CMP (R3),#-20
000034 001011 BNE 1$
000036 010446 MOV R4,-(SP) ; CCB,* 2822
000040 012746 100004 MOV #-77774,-(SP)
000044 012746 000002 MOV #2,-(SP)
000050 004767 000000G JSR PC,$STOP
000054 062706 000006 ADD #6,SP
000060 021327 177720 1$: CMP (R3),#-60 ; 2824
000064 001011 BNE 2$
000066 010446 MOV R4,-(SP) ; CCB,* 2826
000070 012746 100014 MOV #-77764,-(SP)
000074 012746 000002 MOV #2,-(SP)
000100 004767 000000G JSR PC,$STOP
000104 062706 000006 ADD #6,SP
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 96
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (34)
000110 005764 000004 2$: TST 4(R4) ; *(CCB) 2828
000114 001451 BEQ 8$
000116 005000 CLR R0 ; 2831
000120 156100 000013 BISB 13(R1),R0 ; *(STK.CCB),*
000124 006200 ASR R0
000126 162700 000004 SUB #4,R0
000132 020027 000011 CMP R0,#11
000136 101003 BHI 3$
000140 006300 ASL R0
000142 066007 000072' ADD P.AAD(R0),PC ; Case dispatch
000146 010146 3$: MOV R1,-(SP) ; STK.CCB,* 2843
000150 012746 100024 MOV #-77754,-(SP)
000154 012746 000002 MOV #2,-(SP)
000160 004767 000000G JSR PC,$STOP
000164 005726 TST (SP)+
000166 000453 BR 11$ ; 2831
000170 010446 4$: MOV R4,-(SP) ; CCB,* 2833
000172 010246 MOV R2,-(SP) ; PDB,*
000174 004767 000000V JSR PC,U.39
000200 000446 BR 11$ ; 2831
000202 010446 5$: MOV R4,-(SP) ; CCB,* 2837
000204 010246 MOV R2,-(SP) ; PDB,*
000206 004767 000000V JSR PC,U.40
000212 000441 BR 11$ ; 2831
000214 010446 6$: MOV R4,-(SP) ; CCB,* 2838
000216 010246 MOV R2,-(SP) ; PDB,*
000220 004767 000000V JSR PC,U.41
000224 000434 BR 11$ ; 2831
000226 010446 7$: MOV R4,-(SP) ; CCB,* 2842
000230 010246 MOV R2,-(SP) ; PDB,*
000232 004767 000000V JSR PC,U.42
000236 000427 BR 11$ ; 2828
000240 021327 177730 8$: CMP (R3),#-50 ; 2848
000244 001011 BNE 9$
000246 010446 MOV R4,-(SP) ; CCB,* 2850
000250 012746 100063 MOV #-77715,-(SP)
000254 012746 000002 MOV #2,-(SP)
000260 004767 000000G JSR PC,$IGNAL
000264 062706 000006 ADD #6,SP
000270 016400 000020 9$: MOV 20(R4),R0 ; *(CCB),* 2852
000274 001404 BEQ 10$
000276 012701 000014 MOV #14,R1 ; 2854
000302 004767 000000G JSR PC,$DSRRT
000306 010446 10$: MOV R4,-(SP) ; CCB,* 2856
000310 010246 MOV R2,-(SP) ; PDB,*
000312 004767 167266 JSR PC,U.10
000316 022626 11$: CMP (SP)+,(SP)+ ; 2805
000320 000207 RTS PC ; 2780
; Routine Size: 105 words, Routine Base: $CODE$ + 11044
; Maximum stack depth per invocation: 4 words
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 97
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (34)
000072 .PSECT $PLIT$, RO , D
P.AAD: ; CASE Table for XME.COMPLETE+0142 2831
000072 000022 .WORD 22 ; [4$]
000074 000034 .WORD 34 ; [5$]
000076 000034 .WORD 34 ; [5$]
000100 000034 .WORD 34 ; [5$]
000102 000034 .WORD 34 ; [5$]
000104 000046 .WORD 46 ; [6$]
000106 000060 .WORD 60 ; [7$]
000110 000060 .WORD 60 ; [7$]
000112 000060 .WORD 60 ; [7$]
000114 000060 .WORD 60 ; [7$]
; 2860
; 2861
; 2862 !
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 98
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (35)
; 2863 routine XCP_CI ( CCB, PDB) : novalue = !
; 2864
; 2865 !++
; 2866 ! FUNCTIONAL DESCRIPTION:
; 2867 ! This routine processes a complete from Transport for the Session
; 2868 ! Control CONNECT-XMT call.
; 2869 !
; 2870 ! FORMAL PARAMETERS:
; 2871 ! CCB = CCB address
; 2872 ! PDB = Port Data Base address
; 2873 !
; 2874 ! IMPLICIT INPUTS:
; 2875 ! DB = NSP data base address
; 2876 !
; 2877 ! IMPLICIT OUTPUTS:
; 2878 ! None
; 2879 !
; 2880 ! ROUTINE VALUE:
; 2881 ! COMPLETION CODES:
; 2882 ! None
; 2883 !
; 2884 ! SIDE EFFECTS:
; 2885 ! None
; 2886 !--
; 2887
; 2888 begin
; 2889 map CCB: ref block field(C_fields);
; 2890 map PDB: ref block field(PORT_fields);
; 2891
; 2892 local
; 2893 STK_CCB: ref block field(C_fields);
; 2894
; 2895 If .CCB[C_STS] eql CE_RTE
; 2896 Then
; 2897 begin
; 2898 SIGNAL( NSP$_RTE, .CCB);
; 2899 CMQIN$( PDB[MSG_queue], .CCB[C_STK]);
; 2900 PDB[OTHres] = true;
; 2901 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 2902 CCB_RETRN( .CCB, .PDB);
; 2903 return
; 2904 end
; 2905 Else
; 2906 begin
; 2907 STK_CCB = .CCB[C_STK];
; 2908 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 2909
; 2910 If .CCB[C_STS] eql CS_SUC
; 2911 Then
; 2912 STK_CCB[C_STS] = N$SSUC
; 2913 Else
; 2914 STK_CCB[C_STS] = N$ENUR;
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 99
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (35)
; 2915 STK_CCB[C_FNC] = FC_XCP;
; 2916 LLCRS$( .CCB[C_STK]);
; 2917 CCB_RETRN( .CCB, .PDB);
; 2918 end;
; 2919 end;
.SBTTL XCP.CI
011366 .PSECT $CODE$, RO
000000 004167 000000G ; XCP.CI
U.39: JSR R1,$SAVE5 ; 2863
000004 016605 000020 MOV 20(SP),R5 ; CCB,* 2895
000010 016602 000016 MOV 16(SP),R2 ; PDB,* 2899
000014 026527 000014 177730 CMP 14(R5),#-50 ; 2895
000022 001036 BNE 1$
000024 010546 MOV R5,-(SP) ; 2898
000026 012746 100063 MOV #-77715,-(SP)
000032 012746 000002 MOV #2,-(SP)
000036 004767 000000G JSR PC,$IGNAL
000042 010203 MOV R2,R3 ; 2899
000044 062703 000102 ADD #102,R3
000050 016504 000004 MOV 4(R5),R4
000054 004767 000000G JSR PC,$CMQIN
000060 012762 000001 000070 MOV #1,70(R2) ; 2900
000066 016500 000020 MOV 20(R5),R0 ; 2901
000072 012701 000014 MOV #14,R1
000076 004767 000000G JSR PC,$DSRRT
000102 010516 MOV R5,(SP) ; 2902
000104 010246 MOV R2,-(SP)
000106 004767 167150 JSR PC,U.10
000112 062706 000010 ADD #10,SP ; 2895
000116 000207 RTS PC ; 2897
000120 016503 000004 1$: MOV 4(R5),R3 ; *,STK.CCB 2907
000124 016500 000020 MOV 20(R5),R0 ; 2908
000130 012701 000014 MOV #14,R1
000134 004767 000000G JSR PC,$DSRRT
000140 026527 000014 000001 CMP 14(R5),#1 ; 2910
000146 001004 BNE 2$
000150 012763 000001 000014 MOV #1,14(R3) ; *,*(STK.CCB) 2912
000156 000403 BR 3$ ; 2910
000160 012763 177765 000014 2$: MOV #-13,14(R3) ; *,*(STK.CCB) 2914
000166 112763 000014 000012 3$: MOVB #14,12(R3) ; *,*(STK.CCB) 2915
000174 016504 000004 MOV 4(R5),R4 ; 2916
000200 004767 000000G JSR PC,$SCHED
000204 010546 MOV R5,-(SP) ; 2917
000206 010246 MOV R2,-(SP)
000210 004767 167046 JSR PC,U.10
000214 022626 CMP (SP)+,(SP)+ ; 2906
000216 000207 RTS PC ; 2863
; Routine Size: 72 words, Routine Base: $CODE$ + 11366
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 100
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (35)
; Maximum stack depth per invocation: 11 words
; 2920
; 2921 !
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 101
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (36)
; 2922 routine XCP_CONN ( CCB, PDB) : novalue = !
; 2923
; 2924 !++
; 2925 ! FUNCTIONAL DESCRIPTION:
; 2926 ! This routine processes completes from Transport for the Session
; 2927 ! Control calls ACCEPT, REJECT, ABORT, DISCONNECT.
; 2928 !
; 2929 ! FORMAL PARAMETERS:
; 2930 ! CCB = CCB address
; 2931 ! PDB = Port Data Base address
; 2932 !
; 2933 ! IMPLICIT INPUTS:
; 2934 ! DB = NSP data base address
; 2935 !
; 2936 ! IMPLICIT OUTPUTS:
; 2937 ! None
; 2938 !
; 2939 ! ROUTINE VALUE:
; 2940 ! COMPLETION CODES:
; 2941 ! None
; 2942 !
; 2943 ! SIDE EFFECTS:
; 2944 ! None
; 2945 !--
; 2946
; 2947 begin
; 2948 map CCB: ref block field(C_fields);
; 2949 map PDB: ref block field(PORT_fields);
; 2950
; 2951
; 2952 local
; 2953 temp,
; 2954 NDB : ref block field(NODE_fields),
; 2955 STK_CCB: ref block field(C_fields);
; 2956
; 2957 NDB = .PDB[NODElnk];
; 2958 STK_CCB = .CCB[C_STK];
; 2959
; 2960 If .PDB[PORTstate] eql N$SCL or
; 2961 .PDB[PORTstate] eql N$SCN
; 2962 Then
; 2963 begin
; 2964 If .PDB[PORTstate] eql N$SCL
; 2965 Then
; 2966 STK_CCB[C_STS] = N$ECLS
; 2967 Else
; 2968 STK_CCB[C_STS] = N$EABR;
; 2969 STK_CCB[C_FNC] = FC_XCP;
; 2970 LLCRS$( .CCB[C_STK]);
; 2971 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 2972 CCB_RETRN( .CCB, .PDB);
; 2973 return
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 102
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (36)
; 2974 end;
; 2975 If .CCB[C_STS] eql CE_RTE
; 2976 Then
; 2977 SIGNAL( NSP$_RTE, .CCB);
; 2978
; 2979 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR] );
; 2980
; 2981 If .PDB[PORTstate] eql N$SDI or
; 2982 .PDB[PORTstate] eql N$SDR or
; 2983 .PDB[PORTstate] eql N$SCC
; 2984 Then
; 2985 begin
; 2986 MAP$( .DB[BIASnodes]);
; 2987 temp = .NDB[NDdelay];
; 2988 MAP$( .DB[BIASports]);
; 2989
; 2990 If .temp eql 0
; 2991 Then
; 2992 PDB[TIMERcon] = 5
; 2993 Else
; 2994 PDB[TIMERcon] = .temp + .DB[NSPdelay]
; 2995 end;
; 2996 If .PDB[PORTstate] eql N$SRUN or
; 2997 .PDB[PORTstate] eql N$SDIC
; 2998 Then
; 2999 begin
; 3000 STK_CCB[C_STS] = N$SSUC;
; 3001 STK_CCB[C_FNC] = FC_XCP;
; 3002 LLCRS$( .STK_CCB);
; 3003 end
; 3004 Else
; 3005 CMQIN$( PDB[MSG_queue], .CCB[C_STK]);
; 3006
; 3007 If .PDB[VERSIONrem] eql V3_1 and
; 3008 .CCB[C_STS] eql CE_DIS and .PDB[CONFIDENCE]
; 3009 Then
; 3010 begin
; 3011 PDB[TIMERcon] = 0;
; 3012 CALL$E( NSP_CONFIDENCE, .DB[NSPns2_pix], .CCB, .PDB);
; 3013 end
; 3014 Else
; 3015 CCB_RETRN( .CCB, .PDB);
; 3016
; 3017 end;
.SBTTL XCP.CONN
000000 004167 000000G ; XCP.CONN
U.40: JSR R1,$SAVE5 ; 2922
000004 016605 000016 MOV 16(SP),R5 ; PDB,* 2957
000010 016503 000010 MOV 10(R5),R3 ; *,NDB
000014 016602 000020 MOV 20(SP),R2 ; CCB,* 2958
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 103
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (36)
000020 016246 000004 MOV 4(R2),-(SP) ; *,STK.CCB
000024 005000 CLR R0 ; 2960
000026 121527 000017 CMPB (R5),#17
000032 001002 BNE 1$
000034 005200 INC R0
000036 000403 BR 2$
000040 121527 000020 1$: CMPB (R5),#20 ; 2961
000044 001032 BNE 5$
000046 006000 2$: ROR R0 ; 2964
000050 103005 BCC 3$
000052 011600 MOV (SP),R0 ; STK.CCB,* 2966
000054 012760 177766 000014 MOV #-12,14(R0) ; *,*(STK.CCB)
000062 000404 BR 4$ ; 2964
000064 011600 3$: MOV (SP),R0 ; STK.CCB,* 2968
000066 012760 177773 000014 MOV #-5,14(R0) ; *,*(STK.CCB)
000074 011600 4$: MOV (SP),R0 ; STK.CCB,* 2969
000076 112760 000014 000012 MOVB #14,12(R0) ; *,*(STK.CCB)
000104 016204 000004 MOV 4(R2),R4 ; 2970
000110 004767 000000G JSR PC,$SCHED
000114 016200 000020 MOV 20(R2),R0 ; 2971
000120 012701 000014 MOV #14,R1
000124 004767 000000G JSR PC,$DSRRT
000130 000554 BR 13$ ; 2972
000132 026227 000014 177730 5$: CMP 14(R2),#-50 ; 2975
000140 001011 BNE 6$
000142 010246 MOV R2,-(SP) ; 2977
000144 012746 100063 MOV #-77715,-(SP)
000150 012746 000002 MOV #2,-(SP)
000154 004767 000000G JSR PC,$IGNAL
000160 062706 000006 ADD #6,SP
000164 016200 000020 6$: MOV 20(R2),R0 ; 2979
000170 012701 000014 MOV #14,R1
000174 004767 000000G JSR PC,$DSRRT
000200 121527 000014 CMPB (R5),#14 ; 2981
000204 001406 BEQ 7$
000206 121527 000003 CMPB (R5),#3 ; 2982
000212 001403 BEQ 7$
000214 121527 000005 CMPB (R5),#5 ; 2983
000220 001027 BNE 9$
000222 016700 000002G 7$: MOV .CRDAT+2,R0 ; 2986
000226 016067 000030 000000G MOV 30(R0),KISAR6
000234 016301 000040 MOV 40(R3),R1 ; *(NDB),TEMP 2987
000240 016067 000014 000000G MOV 14(R0),KISAR6 ; 2988
000246 005701 TST R1 ; TEMP 2990
000250 001004 BNE 8$
000252 012765 000005 000016 MOV #5,16(R5) ; 2992
000260 000407 BR 9$ ; 2990
000262 116065 000006 000016 8$: MOVB 6(R0),16(R5) ; 2994
000270 105065 000017 CLRB 17(R5)
000274 060165 000016 ADD R1,16(R5) ; TEMP,*
000300 121527 000013 9$: CMPB (R5),#13 ; 2996
000304 001403 BEQ 10$
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 104
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (36)
000306 121527 000015 CMPB (R5),#15 ; 2997
000312 001013 BNE 11$
000314 011600 10$: MOV (SP),R0 ; STK.CCB,* 3000
000316 012760 000001 000014 MOV #1,14(R0) ; *,*(STK.CCB)
000324 112760 000014 000012 MOVB #14,12(R0) ; *,*(STK.CCB) 3001
000332 010004 MOV R0,R4 ; STK.CCB,* 3002
000334 004767 000000G JSR PC,$SCHED
000340 000407 BR 12$ ; 2996
000342 012703 000102 11$: MOV #102,R3 ; 3005
000346 060503 ADD R5,R3
000350 016204 000004 MOV 4(R2),R4
000354 004767 000000G JSR PC,$CMQIN
000360 116500 000042 12$: MOVB 42(R5),R0 ; 3007
000364 042700 177763 BIC #177763,R0
000370 020027 000004 CMP R0,#4
000374 001032 BNE 13$
000376 026227 000014 177520 CMP 14(R2),#-260 ; 3008
000404 001026 BNE 13$
000406 132765 000020 000042 BITB #20,42(R5)
000414 001422 BEQ 13$
000416 005065 000016 CLR 16(R5) ; 3011
000422 010546 MOV R5,-(SP) ; 3012
000424 010246 MOV R2,-(SP)
000426 012746 000002 MOV #2,-(SP)
000432 012746 000000G MOV #NSP.CONFIDENCE,-(SP)
000436 016700 000002G MOV .CRDAT+2,R0
000442 005046 CLR -(SP)
000444 116016 000047 MOVB 47(R0),(SP)
000450 004767 000000G JSR PC,$CALLE
000454 062706 000006 ADD #6,SP ; 3010
000460 000404 BR 14$ ; 3007
000462 010246 13$: MOV R2,-(SP) ; 3015
000464 010546 MOV R5,-(SP)
000466 004767 166350 JSR PC,U.10
000472 062706 000006 14$: ADD #6,SP ; 2922
000476 000207 RTS PC
; Routine Size: 160 words, Routine Base: $CODE$ + 11606
; Maximum stack depth per invocation: 13 words
; 3018
; 3019
; 3020
; 3021
; 3022 !
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 105
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (37)
; 3023 routine XCP_DATA ( CCB, PDB) : novalue = !
; 3024
; 3025 !++
; 3026 ! FUNCTIONAL DESCRIPTION:
; 3027 ! This routine processes completes from Transport for the Session Control
; 3028 ! call DATA-XMT.
; 3029 !
; 3030 ! FORMAL PARAMETERS:
; 3031 ! CCB = CCB address
; 3032 ! PDB = Port Data Base address
; 3033 !
; 3034 ! IMPLICIT INPUTS:
; 3035 ! DB = NSP data base address
; 3036 !
; 3037 ! IMPLICIT OUTPUTS:
; 3038 ! None
; 3039 !
; 3040 ! ROUTINE VALUE:
; 3041 ! COMPLETION CODES:
; 3042 ! None
; 3043 !
; 3044 ! SIDE EFFECTS:
; 3045 ! None
; 3046 !--
; 3047
; 3048 begin
; 3049 map CCB: ref block field(C_fields);
; 3050 map PDB: ref block field(PORT_fields);
; 3051
; 3052
; 3053 local
; 3054 c : ref block field(C_fields),
; 3055 cp : ref block field(C_fields),
; 3056 q_temp,
; 3057 c_temp: ref block field(C_fields),
; 3058 temp,
; 3059 NDB : ref block field(NODE_fields),
; 3060 STK_CCB: ref block field(C_fields);
; 3061
; 3062 NDB = .PDB[NODElnk];
; 3063 STK_CCB = .CCB[C_STK];
; 3064
; 3065 If .PDB[PORTstate] eql N$SCL or
; 3066 .PDB[PORTstate] eql N$SCN or
; 3067 .PDB[PORTstate] eql N$SDN or
; 3068 (.PDB[PORTstate] eql N$SDI and
; 3069 (CMP_EQL( .PDB[NUMhigh], .PDB[ACKrcv_dat])))
; 3070 Then
; 3071 begin
; 3072 If (.STK_CCB[C_PRM3] and N$FCMP) neq 0
; 3073 Then
; 3074 begin
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 106
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (37)
; 3075 bind SC_CCB = .STK_CCB[C_STK]: block field(C_fields);
; 3076
; 3077 If .PDB[PORTstate] eql N$SCL
; 3078 Then
; 3079 SC_CCB[C_STS] = N$ECLS
; 3080 Else
; 3081 SC_CCB[C_STS] = N$EABR;
; 3082 SC_CCB[C_FNC] = FC_XCP;
; 3083 LLCRS$( SC_CCB);
; 3084 end;
; 3085 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 3086 CCB_RETRN( .CCB[C_STK], .PDB);
; 3087 CCB_RETRN( .CCB, .PDB);
; 3088 return
; 3089 end;
; 3090
; 3091 If .CCB[C_STS] eql CE_RTE
; 3092 Then
; 3093 SIGNAL( NSP$_RTE, .CCB);
; 3094
; 3095
; 3096 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 3097 If .STK_CCB[C_STS] eql ((.PDB[ACKrcv_dat] + 1) and %o'7777')
; 3098 Then
; 3099 begin
; 3100 MAP$( .DB[BIASnodes]);
; 3101 temp = .NDB[NDdelay];
; 3102 MAP$( .DB[BIASports]);
; 3103 PDB[TIMERdat] = .temp * .DB[NSPdelay]
; 3104 end;
; 3105
; 3106 C = PDB[ACK_queue];
; 3107 While ( CP = .C; C = .C[C_LNK]) neq 0 do
; 3108 begin
; 3109 If (CMP_LSS(( .STK_CCB[C_STS] and %o'7777'), (.C[C_STS] and %o'7777')))
; 3110 Then
; 3111 exitloop;
; 3112 end;
; 3113 STK_CCB[C_LNK] = .CP[C_LNK];
; 3114 CP[C_LNK] = .CCB[C_STK];
; 3115
; 3116 If CMP_LSS( .PDB[NUMsent], (.STK_CCB[C_STS] and %o'7777'))
; 3117 Then
; 3118 PDB[NUMsent] = .STK_CCB[C_STS];
; 3119
; 3120 q_temp = .PDB[ACK_queue];
; 3121
; 3122 While (CMQPT$( q_temp, c_temp)) do
; 3123 begin
; 3124 If CMP_LEQ( .c_temp[C_STS], .PDB[ACKrcv_dat])
; 3125 Then
; 3126 begin
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 107
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (37)
; 3127 c_temp = .PDB[ACK_queue];
; 3128 PDB[ACK_queue] = .c_temp[c_lnk];
; 3129
; 3130 If (.c_temp[C_PRM3] and N$FCMP) neq 0
; 3131 Then
; 3132 begin
; 3133 bind SC_CCB = .c_temp[C_STK]: block field(C_fields);
; 3134 SC_CCB[C_FNC] = FC_XCP;
; 3135 SC_CCB[C_STS] = N$SSUC;
; 3136 LLCRS$( SC_CCB);
; 3137
; 3138 If .PDB[FLOWtyp_rem] eql FLOWmsg
; 3139 Then
; 3140 PDB[FLOWdat_rem] = .PDB[FLOWdat_rem] - 1;
; 3141 end;
; 3142 CCB_RETRN( .c_temp, .PDB);
; 3143 end;
; 3144 end;
; 3145 If .PDB[VERSIONrem] eql V3_1 and
; 3146 .CCB[C_STS] eql CE_DIS and .PDB[CONFIDENCE]
; 3147 Then
; 3148 begin
; 3149 PDB[TIMERdat] = 0;
; 3150 CALL$E( NSP_CONFIDENCE, .DB[NSPns2_pix], .CCB, .PDB);
; 3151 end
; 3152 Else
; 3153 CCB_RETRN( .CCB, .PDB);
; 3154
; 3155 end;
.SBTTL XCP.DATA
000000 004167 000000G ; XCP.DATA
U.41: JSR R1,$SAVE5 ; 3023
000004 016646 000016 MOV 16(SP),-(SP) ; PDB,* 3062
000010 011600 MOV (SP),R0
000012 016003 000010 MOV 10(R0),R3 ; *,NDB
000016 016605 000022 MOV 22(SP),R5 ; CCB,* 3063
000022 016502 000004 MOV 4(R5),R2 ; *,STK.CCB
000026 005001 CLR R1 ; 3065
000030 121027 000017 CMPB (R0),#17
000034 001002 BNE 1$
000036 005201 INC R1
000040 000424 BR 2$
000042 127627 000000 000020 1$: CMPB @0(SP),#20 ; 3066
000050 001420 BEQ 2$
000052 127627 000000 000016 CMPB @0(SP),#16 ; 3067
000060 001414 BEQ 2$
000062 127627 000000 000014 CMPB @0(SP),#14 ; 3068
000070 001061 BNE 6$
000072 011604 MOV (SP),R4 ; 3069
000074 016400 000034 MOV 34(R4),R0
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 108
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (37)
000100 166400 000026 SUB 26(R4),R0
000104 032700 007777 BIT #7777,R0
000110 001051 BNE 6$
000112 032762 000004 000030 2$: BIT #4,30(R2) ; *,*(STK.CCB) 3072
000120 001420 BEQ 5$
000122 016204 000004 MOV 4(R2),R4 ; *(STK.CCB),* 3074
000126 006001 ROR R1 ; 3077
000130 103004 BCC 3$
000132 012764 177766 000014 MOV #-12,14(R4) ; 3079
000140 000403 BR 4$ ; 3077
000142 012764 177773 000014 3$: MOV #-5,14(R4) ; 3081
000150 112764 000014 000012 4$: MOVB #14,12(R4) ; 3082
000156 004767 000000G JSR PC,$SCHED ; 3083
000162 016500 000020 5$: MOV 20(R5),R0 ; 3085
000166 012701 000014 MOV #14,R1
000172 004767 000000G JSR PC,$DSRRT
000176 016546 000004 MOV 4(R5),-(SP) ; 3086
000202 016646 000002 MOV 2(SP),-(SP)
000206 004767 166130 JSR PC,U.10
000212 010516 MOV R5,(SP) ; 3087
000214 016646 000004 MOV 4(SP),-(SP)
000220 004767 166116 JSR PC,U.10
000224 062706 000006 ADD #6,SP ; 3065
000230 000167 000556 JMP 17$ ; 3071
000234 026527 000014 177730 6$: CMP 14(R5),#-50 ; 3091
000242 001011 BNE 7$
000244 010546 MOV R5,-(SP) ; 3093
000246 012746 100063 MOV #-77715,-(SP)
000252 012746 000002 MOV #2,-(SP)
000256 004767 000000G JSR PC,$IGNAL
000262 062706 000006 ADD #6,SP
000266 016500 000020 7$: MOV 20(R5),R0 ; 3096
000272 012701 000014 MOV #14,R1
000276 004767 000000G JSR PC,$DSRRT
000302 011601 MOV (SP),R1 ; 3097
000304 016100 000034 MOV 34(R1),R0
000310 005200 INC R0
000312 010004 MOV R0,R4
000314 042704 170000 BIC #170000,R4
000320 016201 000014 MOV 14(R2),R1 ; *(STK.CCB),*
000324 020104 CMP R1,R4
000326 001021 BNE 8$
000330 016700 000002G MOV .CRDAT+2,R0 ; 3100
000334 016067 000030 000000G MOV 30(R0),KISAR6
000342 016301 000040 MOV 40(R3),R1 ; *(NDB),TEMP 3101
000346 016067 000014 000000G MOV 14(R0),KISAR6 ; 3102
000354 005003 CLR R3 ; 3103
000356 156003 000006 BISB 6(R0),R3
000362 070103 MUL R3,R1
000364 011604 MOV (SP),R4
000366 010164 000012 MOV R1,12(R4)
000372 012700 000116 8$: MOV #116,R0 ; 3106
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 109
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (37)
000376 061600 ADD (SP),R0
000400 010003 MOV R0,R3
000402 010301 MOV R3,R1 ; *,C
000404 010104 9$: MOV R1,R4 ; C,CP 3107
000406 011101 MOV (R1),R1 ; C,C
000410 001420 BEQ 10$
000412 016246 000014 MOV 14(R2),-(SP) ; *(STK.CCB),* 3109
000416 042716 170000 BIC #170000,(SP)
000422 016100 000014 MOV 14(R1),R0 ; *(C),*
000426 042700 170000 BIC #170000,R0
000432 162600 SUB (SP)+,R0
000434 062700 004000 ADD #4000,R0
000440 042700 170000 BIC #170000,R0
000444 020027 004000 CMP R0,#4000
000450 101755 BLOS 9$
000452 011412 10$: MOV (R4),(R2) ; CP,STK.CCB 3113
000454 016514 000004 MOV 4(R5),(R4) ; *,CP 3114
000460 016200 000014 MOV 14(R2),R0 ; *(STK.CCB),* 3116
000464 042700 170000 BIC #170000,R0
000470 011601 MOV (SP),R1
000472 166100 000022 SUB 22(R1),R0
000476 062700 004000 ADD #4000,R0
000502 042700 170000 BIC #170000,R0
000506 020027 004000 CMP R0,#4000
000512 101404 BLOS 11$
000514 010100 MOV R1,R0 ; 3118
000516 016260 000014 000022 MOV 14(R2),22(R0) ; *(STK.CCB),*
000524 011301 11$: MOV (R3),R1 ; *,Q.TEMP 3120
000526 010102 12$: MOV R1,R2 ; Q.TEMP,C.TEMP 3122
000530 011201 MOV (R2),R1 ; C.TEMP,Q.TEMP
000532 005702 TST R2 ; C.TEMP
000534 001455 BEQ 14$
000536 011604 MOV (SP),R4 ; 3124
000540 016400 000034 MOV 34(R4),R0
000544 166200 000014 SUB 14(R2),R0 ; *(C.TEMP),*
000550 062700 004000 ADD #4000,R0
000554 042700 170000 BIC #170000,R0
000560 020027 004000 CMP R0,#4000
000564 103760 BLO 12$
000566 011302 MOV (R3),R2 ; *,C.TEMP 3127
000570 011213 MOV (R2),(R3) ; C.TEMP,* 3128
000572 032762 000004 000030 BIT #4,30(R2) ; *,*(C.TEMP) 3130
000600 001424 BEQ 13$
000602 016204 000004 MOV 4(R2),R4 ; *(C.TEMP),* 3132
000606 112764 000014 000012 MOVB #14,12(R4) ; 3134
000614 012764 000001 000014 MOV #1,14(R4) ; 3135
000622 004767 000000G JSR PC,$SCHED ; 3136
000626 011604 MOV (SP),R4 ; 3138
000630 016400 000040 MOV 40(R4),R0
000634 042700 163777 BIC #163777,R0
000640 020027 010000 CMP R0,#10000
000644 001002 BNE 13$
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 110
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (37)
000646 105364 000037 DECB 37(R4) ; 3140
000652 010246 13$: MOV R2,-(SP) ; C.TEMP,* 3142
000654 016646 000002 MOV 2(SP),-(SP)
000660 004767 165456 JSR PC,U.10
000664 022626 CMP (SP)+,(SP)+ ; 3126
000666 000717 BR 12$ ; 3122
000670 011601 14$: MOV (SP),R1 ; 3145
000672 116100 000042 MOVB 42(R1),R0
000676 042700 177763 BIC #177763,R0
000702 020027 000004 CMP R0,#4
000706 001033 BNE 15$
000710 026527 000014 177520 CMP 14(R5),#-260 ; 3146
000716 001027 BNE 15$
000720 010100 MOV R1,R0
000722 132760 000020 000042 BITB #20,42(R0)
000730 001422 BEQ 15$
000732 005060 000012 CLR 12(R0) ; 3149
000736 010146 MOV R1,-(SP) ; 3150
000740 010546 MOV R5,-(SP)
000742 012746 000002 MOV #2,-(SP)
000746 012746 000000G MOV #NSP.CONFIDENCE,-(SP)
000752 016700 000002G MOV .CRDAT+2,R0
000756 005046 CLR -(SP)
000760 116016 000047 MOVB 47(R0),(SP)
000764 004767 000000G JSR PC,$CALLE
000770 062706 000006 ADD #6,SP ; 3148
000774 000405 BR 16$ ; 3145
000776 010546 15$: MOV R5,-(SP) ; 3153
001000 016646 000002 MOV 2(SP),-(SP)
001004 004767 165332 JSR PC,U.10
001010 022626 16$: CMP (SP)+,(SP)+ ; 3048
001012 005726 17$: TST (SP)+ ; 3023
001014 000207 RTS PC
; Routine Size: 263 words, Routine Base: $CODE$ + 12306
; Maximum stack depth per invocation: 13 words
; 3156
; 3157
; 3158 !
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 111
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (38)
; 3159 routine XCP_OTH ( CCB, PDB) : novalue = !
; 3160
; 3161 !++
; 3162 ! FUNCTIONAL DESCRIPTION:
; 3163 ! This routine processes completes from Transport for the Session
; 3164 ! Control calls INTERRUPT-XMT, DATA-REQUEST, DATA-RCV.
; 3165 !
; 3166 ! FORMAL PARAMETERS:
; 3167 ! CCB = CCB address
; 3168 ! PDB = Port Data Base address
; 3169 !
; 3170 ! IMPLICIT INPUTS:
; 3171 ! DB = NSP data base address
; 3172 !
; 3173 ! IMPLICIT OUTPUTS:
; 3174 ! None
; 3175 !
; 3176 ! ROUTINE VALUE:
; 3177 ! COMPLETION CODES:
; 3178 ! None
; 3179 !
; 3180 ! SIDE EFFECTS:
; 3181 ! None
; 3182 !--
; 3183
; 3184 begin
; 3185 map CCB: ref block field(C_fields);
; 3186 map PDB: ref block field(PORT_fields);
; 3187
; 3188
; 3189 local
; 3190 temp,
; 3191 NDB : ref block field(NODE_fields),
; 3192 STK_CCB: ref block field(C_fields);
; 3193
; 3194 STK_CCB = .CCB[C_STK];
; 3195 NDB = .PDB[NODElnk];
; 3196
; 3197 If .PDB[PORTstate] eql N$SCL or
; 3198 .PDB[PORTstate] eql N$SCN or
; 3199 .PDB[PORTstate] eql N$SDN or
; 3200 (.PDB[PORTstate] eql N$SDI and
; 3201 .PDB[NUMhigh] eql .PDB[ACKrcv_dat])
; 3202 Then
; 3203 begin
; 3204 If .PDB[PORTstate] eql N$SCL
; 3205 Then
; 3206 STK_CCB[C_STS] = N$ECLS
; 3207 Else
; 3208 STK_CCB[C_STS] = N$EABR;
; 3209 STK_CCB[C_FNC] = FC_XCP;
; 3210 LLCRS$( .CCB[C_STK]);
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 112
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (38)
; 3211 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 3212 CCB_RETRN( .CCB, .PDB);
; 3213 return
; 3214 end;
; 3215
; 3216 If .CCB[C_STS] eql CE_RTE
; 3217 Then
; 3218 SIGNAL( NSP$_RTE, .CCB);
; 3219
; 3220 PDB[FLAGoth_ack] = false;
; 3221 $MCB_RETURN_DSR( hdb_size, .CCB[C_ADDR]);
; 3222
; 3223 If .STK_CCB[C_STS] eql ((.PDB[NUMoth] -1) and %o'7777')
; 3224 Then
; 3225 begin
; 3226 PDB[OTHstate] = OTHready;
; 3227 If .STK_CCB[C_MOD] eql N_XBUF
; 3228 Then
; 3229 begin
; 3230 STK_CCB[C_STS] = N$SSUC;
; 3231 CMQIN$( PDB[BUFF_queue], .CCB[C_STK]);
; 3232 end
; 3233 Else
; 3234 begin
; 3235 STK_CCB[C_FNC] = FC_XCP;
; 3236 STK_CCB[C_STS] = N$SSUC;
; 3237 LLCRS$( .CCB[C_STK]);
; 3238 end
; 3239 end
; 3240 Else
; 3241 begin
; 3242 MAP$( .DB[BIASnodes]);
; 3243 temp = .NDB[NDdelay];
; 3244 MAP$( .DB[BIASports]);
; 3245 PDB[TIMERoth] = .temp * .DB[NSPdelay];
; 3246 CMQIN$( PDB[OTHack_queue], .CCB[C_STK]);
; 3247 end;
; 3248 If .PDB[VERSIONrem] eql V3_1 and
; 3249 .CCB[C_STS] eql CE_DIS and .PDB[CONFIDENCE]
; 3250 Then
; 3251 begin
; 3252 PDB[TIMERoth] = 0;
; 3253 CALL$E( NSP_CONFIDENCE, .DB[NSPns2_pix], .CCB, .PDB);
; 3254 end
; 3255 Else
; 3256 CCB_RETRN( .CCB, .PDB);
; 3257
; 3258 end;
.SBTTL XCP.OTH
000000 004167 000000G ; XCP.OTH
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 113
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (38)
U.42: JSR R1,$SAVE5 ; 3159
000004 016605 000020 MOV 20(SP),R5 ; CCB,* 3194
000010 012746 000004 MOV #4,-(SP)
000014 060516 ADD R5,(SP)
000016 017603 000000 MOV @0(SP),R3 ; *,STK.CCB
000022 016602 000020 MOV 20(SP),R2 ; PDB,* 3195
000026 016246 000010 MOV 10(R2),-(SP) ; *,NDB
000032 005000 CLR R0 ; 3197
000034 121227 000017 CMPB (R2),#17
000040 001002 BNE 1$
000042 005200 INC R0
000044 000415 BR 2$
000046 121227 000020 1$: CMPB (R2),#20 ; 3198
000052 001412 BEQ 2$
000054 121227 000016 CMPB (R2),#16 ; 3199
000060 001407 BEQ 2$
000062 121227 000014 CMPB (R2),#14 ; 3200
000066 001033 BNE 5$
000070 026262 000026 000034 CMP 26(R2),34(R2) ; 3201
000076 001027 BNE 5$
000100 006000 2$: ROR R0 ; 3204
000102 103004 BCC 3$
000104 012763 177766 000014 MOV #-12,14(R3) ; *,*(STK.CCB) 3206
000112 000403 BR 4$ ; 3204
000114 012763 177773 000014 3$: MOV #-5,14(R3) ; *,*(STK.CCB) 3208
000122 112763 000014 000012 4$: MOVB #14,12(R3) ; *,*(STK.CCB) 3209
000130 017604 000002 MOV @2(SP),R4 ; 3210
000134 004767 000000G JSR PC,$SCHED
000140 016500 000020 MOV 20(R5),R0 ; 3211
000144 012701 000014 MOV #14,R1
000150 004767 000000G JSR PC,$DSRRT
000154 000560 BR 11$ ; 3212
000156 026527 000014 177730 5$: CMP 14(R5),#-50 ; 3216
000164 001011 BNE 6$
000166 010546 MOV R5,-(SP) ; 3218
000170 012746 100063 MOV #-77715,-(SP)
000174 012746 000002 MOV #2,-(SP)
000200 004767 000000G JSR PC,$IGNAL
000204 062706 000006 ADD #6,SP
000210 042762 040000 000040 6$: BIC #40000,40(R2) ; 3220
000216 016500 000020 MOV 20(R5),R0 ; 3221
000222 012701 000014 MOV #14,R1
000226 004767 000000G JSR PC,$DSRRT
000232 012701 000014 MOV #14,R1 ; 3223
000236 060301 ADD R3,R1 ; STK.CCB,*
000240 016200 000024 MOV 24(R2),R0
000244 005300 DEC R0
000246 010046 MOV R0,-(SP)
000250 042716 170000 BIC #170000,(SP)
000254 011104 MOV (R1),R4
000256 020426 CMP R4,(SP)+
000260 001025 BNE 8$
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 114
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (38)
000262 105062 000064 CLRB 64(R2) ; 3226
000266 126327 000013 000032 CMPB 13(R3),#32 ; *(STK.CCB),* 3227
000274 001005 BNE 7$
000276 012711 000001 MOV #1,(R1) ; 3230
000302 012703 000130 MOV #130,R3 ; 3231
000306 000435 BR 9$
000310 112763 000014 000012 7$: MOVB #14,12(R3) ; *,*(STK.CCB) 3235
000316 012711 000001 MOV #1,(R1) ; 3236
000322 017604 000002 MOV @2(SP),R4 ; 3237
000326 004767 000000G JSR PC,$SCHED
000332 000430 BR 10$ ; 3223
000334 016700 000002G 8$: MOV .CRDAT+2,R0 ; 3242
000340 016067 000030 000000G MOV 30(R0),KISAR6
000346 011603 MOV (SP),R3 ; NDB,* 3243
000350 016301 000040 MOV 40(R3),R1 ; *(NDB),TEMP
000354 016067 000014 000000G MOV 14(R0),KISAR6 ; 3244
000362 005003 CLR R3 ; 3245
000364 156003 000006 BISB 6(R0),R3
000370 070103 MUL R3,R1
000372 010162 000014 MOV R1,14(R2)
000376 012703 000122 MOV #122,R3 ; 3246
000402 060203 9$: ADD R2,R3
000404 017604 000002 MOV @2(SP),R4
000410 004767 000000G JSR PC,$CMQIN
000414 116200 000042 10$: MOVB 42(R2),R0 ; 3248
000420 042700 177763 BIC #177763,R0
000424 020027 000004 CMP R0,#4
000430 001032 BNE 11$
000432 026527 000014 177520 CMP 14(R5),#-260 ; 3249
000440 001026 BNE 11$
000442 132762 000020 000042 BITB #20,42(R2)
000450 001422 BEQ 11$
000452 005062 000014 CLR 14(R2) ; 3252
000456 010246 MOV R2,-(SP) ; 3253
000460 010546 MOV R5,-(SP)
000462 012746 000002 MOV #2,-(SP)
000466 012746 000000G MOV #NSP.CONFIDENCE,-(SP)
000472 016700 000002G MOV .CRDAT+2,R0
000476 005046 CLR -(SP)
000500 116016 000047 MOVB 47(R0),(SP)
000504 004767 000000G JSR PC,$CALLE
000510 062706 000006 ADD #6,SP ; 3251
000514 000404 BR 12$ ; 3248
000516 010546 11$: MOV R5,-(SP) ; 3256
000520 010246 MOV R2,-(SP)
000522 004767 164576 JSR PC,U.10
000526 062706 000010 12$: ADD #10,SP ; 3159
000532 000207 RTS PC
; Routine Size: 174 words, Routine Base: $CODE$ + 13324
; Maximum stack depth per invocation: 14 words
; 3259
NSP 25-Jan-1983 11:00:52 TOPS-20 Bliss-16 2A(530) Page 115
X01160 30-Dec-1982 20:40:45 NETPKG:<NSP>NSP.BLI.8 (38)
; 3260
; 3261 end
; 3262
; 3263 eludom
; OTS external references
.GLOBL $SAVE5, $SAVE4, $SAVE2, $STOP
.GLOBL $IGNAL
; PSECT SUMMARY
;
; Psect Name Words Attributes
; $PLIT$ 39 RO , D , LCL, REL, CON
; ...... 16 RW , D , LCL, REL, CON
; $CODE$ 3096 RO , I , LCL, REL, CON
; LIBRARY STATISTICS
;
; -------- Symbols -------- Blocks
; File Total Loaded Percent Read
;
; NETPKG:<MCB>XPORTX.L16.15 599 35 5 0
; NETPKG:<MCB>MCBLIB.L16.15 372 84 22 0
; NETPKG:<MCB>NMXLIB.L16.13 200 1 0 0
; 3264
; Size: 3096 code + 55 data words
; Run Time: 01:06.7
; Elapsed Time: 03:59.1
; Memory Used: 78 pages
; Compilation Complete