Trailing-Edge
-
PDP-10 Archives
-
TOPS-20_V6.1_DECnetSrc_7-23-85
-
mcb/nmx/nmxeve.lst
There is 1 other file named nmxeve.lst in the archive. Click here to see a list.
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 1
4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (1)
; 0001 module NMXEVE ( ! Event Processor for MCB
; 0002 ident = 'X01130'
; 0003 ) =
; 0004 begin
; 0005 !
; 0006 ! COPYRIGHT (c) 1980, 1981, 1982
; 0007 ! DIGITAL EQUIPMENT CORPORATION
; 0008 ! Maynard, Massachusetts
; 0009 !
; 0010 ! This software is furnished under a license and may be used
; 0011 ! and copied only in accordance with the terms of such license
; 0012 ! and with the inclusion of the above copyright notice. This
; 0013 ! software or any other copies thereof may not be provided or
; 0014 ! otherwise made available to any other person. No title to
; 0015 ! and ownership of the software is hereby transferred.
; 0016 !
; 0017 ! The information in this software is subject to change
; 0018 ! without notice and should not be construed as a commitment
; 0019 ! by DIGITAL EQUIPMENT CORPORATION.
; 0020 !
; 0021 ! DIGITAL assumes no responsibility for the use or reliability
; 0022 ! of its software on equipment which is not supplied by
; 0023 ! DIGITAL.
; 0024 !
; 0025
; 0026 !++
; 0027 !
; 0028 ! FACILITY: MCB Network Management
; 0029 !
; 0030 ! ABSTRACT:
; 0031 !
; 0032 ! Event Preprocessing and conversion of Network Event Items is
; 0033 ! accomplished here. SIGNALed events are filtered before passing
; 0034 ! to a higher user.
; 0035 !
; 0036 !
; 0037 ! ENVIRONMENT: MCB V3.0
; 0038 !
; 0039 ! AUTHOR: Scott G. Robinson CREATION DATE: 14-OCT-80
; 0040 !
; 0041 ! MODIFIED BY:
; 0042 !
; 0043 ! 01 - Support MCB V3.1 Signal Dispatch
; 0044 ! 02 - Update to MCB V3.2 Naming Conventions
; 0045 ! 03 - Add support for MCB Event Logging
; 0046 ! 04 - LOG_EVENT: log EVENTS_LOST_EVENT if NMX event queue exceeds a max length
; 0047 ! 05 - Move def of MAX_EVENT_QUEUE_DEPTH to NMXPAR
; 0048 ! 06 - Change line/circuit references to common link block
; 0049 ! 07 - Use new event queue data block
; 0050 ! 08 - Use new event filter masks
; 0051 ! 09 - Fix un-mapping bug (return without re-map to OLD_BIAS) in LOG_EVENT.
; 0052 ! Alan D. Peckham, 14-Apr-82
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 2
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (1)
; 0053 ! 10 - Complete rework of NM support.
; 0054 ! Construct event message at QIO time.
; 0055 ! 11 - Fix length bug in TRY_SOME_EVENTS.
; 0056 ! 12 - Change message format for events going to NML.
; 0057 ! Update EVENTS_PROCESSED when an event is transferred to an IOP.
; 0058 ! Change event CCB buffer de-allocation in order to handle access msg.
; 0059 ! 13 - Update EVENT_QUEUE_COUNT and EVENTS_PROCESSED only on event.
; 0060 !--
; 0061
; 0062 !
; 0063 ! INCLUDE FILES:
; 0064 !
; 0065
; 0066 library 'XPORTX';
; 0067
; 0068 library 'MCBLIB';
; 0069
; 0070 library 'NMXPAR';
; 0071
; 0072 library 'NMXLIB';
; 0073
; 0074 !
; 0075 ! TABLE OF CONTENTS:
; 0076 !
; 0077
; 0078 forward routine
; 0079 EVPRLB : NMX$LKG_UCB_IOP novalue,
; 0080 EVPWAT : MCB_DB_CCB novalue,
; 0081 $NMEVT,
; 0082 LOG_EVENT : CALL$ novalue,
; 0083 TRY_SOME_EVENTS : LINKAGE_DB novalue;
; 0084
; 0085 !
; 0086 ! Literal values
; 0087 !
; 0088
; 0089 literal
; 0090 EVENTS_LOST_EVENT = 0^0 + 0,
; 0091 PARAMETER_COUNT = 0,
; 0092 SIGNAL_CODE = 1,
; 0093 EVENT_CODE = 2,
; 0094 EVENT_ENTITY = 3,
; 0095 EVENT_BUFFER_PTR = 4;
; 0096
; 0097 !
; 0098
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 3
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (2)
; 0099 global routine EVPRLB (UCB, IOP) : NMX$LKG_UCB_IOP novalue =
; 0100
; 0101 !++
; 0102 ! FUNCTIONAL DESCRIPTION:
; 0103 !
; 0104 !
; 0105 !
; 0106 ! FORMAL PARAMETERS:
; 0107 !
; 0108 ! None
; 0109 !
; 0110 ! IMPLICIT INPUTS:
; 0111 !
; 0112 ! None
; 0113 !
; 0114 ! IMPLICIT OUTPUTS:
; 0115 !
; 0116 ! None
; 0117 !
; 0118 ! ROUTINE VALUE:
; 0119 !
; 0120 ! None
; 0121 !
; 0122 ! SIDE EFFECTS:
; 0123 !
; 0124 ! None
; 0125 !--
; 0126
; 0127 begin
; 0128
; 0129 map
; 0130 IOP : ref NMX_IOP_BLOCK;
; 0131
; 0132 local
; 0133 NMXDB : ref NMXDB_BLOCK;
; 0134
; 0135 $MCB_RSX_TO_MCB (.UCB, NMXDB);
; 0136 !
; 0137 ! Add the IOP to the queue and try to process an Event Buffer
; 0138 !
; 0139 $NMX_ENQUEUE (NMXDB [NMX_EVENT_IOPS], .IOP);
; 0140 TRY_SOME_EVENTS (NMXDB [NMX_BASE]);
; 0141 $MCB_MCB_TO_RSX (NMXDB [NMX_BASE]);
; 0142 end; !of EVPRLB
.TITLE NMXEVE
.IDENT /X01130/
.GLOBL $MCB, $RSX
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 4
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (2)
.SBTTL EVPRLB
000000 .PSECT $CODE$, RO
000000 010546 EVPRLB::MOV R5,-(SP) ; 0099
000002 004767 000000G JSR PC,$MCB ; 0135
000006 005011 CLR (R1) ; IOP 0139
000010 010175 000134 MOV R1,@134(R5) ; IOP,*(NMXDB)
000014 010165 000134 MOV R1,134(R5) ; IOP,*(NMXDB)
000020 004767 000000V JSR PC,TRY.SOME.EVENTS ; 0140
000024 004767 000000G JSR PC,$RSX ; 0141
000030 012605 MOV (SP)+,R5 ; 0099
000032 000207 RTS PC
; Routine Size: 14 words, Routine Base: $CODE$ + 0000
; Maximum stack depth per invocation: 2 words
; 0143
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 5
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (3)
; 0144 global routine EVPWAT (NMXDB, CCB) : MCB_DB_CCB novalue =
; 0145
; 0146 !++
; 0147 ! FUNCTIONAL DESCRIPTION:
; 0148 !
; 0149 !
; 0150 !
; 0151 ! FORMAL PARAMETERS:
; 0152 !
; 0153 ! None
; 0154 !
; 0155 ! IMPLICIT INPUTS:
; 0156 !
; 0157 ! None
; 0158 !
; 0159 ! IMPLICIT OUTPUTS:
; 0160 !
; 0161 ! None
; 0162 !
; 0163 ! ROUTINE VALUE:
; 0164 !
; 0165 ! None
; 0166 !
; 0167 ! SIDE EFFECTS:
; 0168 !
; 0169 ! None
; 0170 !--
; 0171
; 0172 begin
; 0173
; 0174 map
; 0175 CCB : ref block field (C_NM_FIELDS),
; 0176 NMXDB : ref NMXDB_BLOCK;
; 0177
; 0178 CCB [C_STS] = $NM$ERR_URC; ! Unrecognized Entity Applies Here
; 0179 !
; 0180 ! Not ready for this
; 0181 !
; 0182 $NMX_RETURN_NMX_CCB (.CCB);
; 0183 end; ! of EVPWAT
.GLOBL NX.RTC
.SBTTL EVPWAT
000000 012764 177770 000014 EVPWAT::MOV #-10,14(R4) ; *,*(CCB) 0178
000006 004767 000000G JSR PC,NX.RTC ; 0182
000012 000207 RTS PC ; 0144
; Routine Size: 6 words, Routine Base: $CODE$ + 0034
; Maximum stack depth per invocation: 1 word
; 0184
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 6
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (4)
; 0185 global routine $NMEVT (SIGV, MV, NMXDB) = !Signal Event Processor
; 0186
; 0187 !++
; 0188 ! FUNCTIONAL DESCRIPTION:
; 0189 !
; 0190 ! This routine is dispatched by the MCB from the Secondary Signal Vector.
; 0191 ! If the Signal was for CE$EVT then we process the signal otherwise we let
; 0192 ! it fall through to other service routines.
; 0193 !
; 0194 !
; 0195 ! FORMAL PARAMETERS:
; 0196 !
; 0197 ! MV - the mechanism vector
; 0198 ! SIGV - the Signal Parameter vector
; 0199 ! NMXDB - the Enable Vector (which points at NMXs data base)
; 0200 !
; 0201 ! IMPLICIT INPUTS:
; 0202 !
; 0203 ! Misc NMXDB items
; 0204 !
; 0205 ! IMPLICIT OUTPUTS:
; 0206 !
; 0207 ! Misc NMXDB items
; 0208 !
; 0209 ! ROUTINE VALUE:
; 0210 !
; 0211 ! true - if we processed the Signal
; 0212 ! false - if we didn't process the Signal
; 0213 !
; 0214 ! SIDE EFFECTS:
; 0215 !
; 0216 ! Can call itself (NMX) with a process synchronous call.
; 0217 !--
; 0218
; 0219 begin
; 0220
; 0221 map
; 0222 MV : ref vector, ! Mechanism Vector
; 0223 SIGV : ref vector, ! Signal Vector
; 0224 NMXDB : ref NMXDB_BLOCK; ! NMX Data Base
; 0225
; 0226 !
; 0227 ! Return true if for us otherwise false
; 0228 !
; 0229
; 0230 if .SIGV [SIGNAL_CODE] neq CE$EVT then return false;
; 0231
; 0232 if .SIGV [PARAMETER_COUNT] neq 4 then return false;
; 0233
; 0234 if .SIGV [EVENT_CODE] neq ((96 + 5)^6 + 13)
; 0235 then
; 0236 begin
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 7
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (4)
; 0237
; 0238 local
; 0239 EV_ADR : ref vector,
; 0240 EV_WORD;
; 0241
; 0242 NMXDB [NMX_EVENTS_SIGNALED] = .NMXDB [NMX_EVENTS_SIGNALED] + 1;
; 0243
; 0244 selectoneu (EV_ADR = .(SIGV [EVENT_CODE]) <6, 9, 0>) of
; 0245 set
; 0246 [0 to 6] :
; 0247 begin
; 0248 EV_ADR = .EV_ADR*NMX_FILTER_ALLOCATION;
; 0249 EV_ADR = .EV_ADR + NMXDB [NMX_EVENT_FILTERS];
; 0250 end;
; 0251 [96 to 127] :
; 0252 EV_ADR = NMXDB [NMX_SYSTEM_FILTERS];
; 0253 [otherwise] :
; 0254 return true;
; 0255 tes;
; 0256
; 0257 EV_WORD = .EV_ADR [0];
; 0258 EV_ADR = EV_ADR [1]; %(force auto-increment)%
; 0259
; 0260 if .(SIGV [EVENT_CODE]) <4, 1> neq 0
; 0261 then
; 0262 EV_WORD = .EV_ADR [0];
; 0263
; 0264 EV_WORD = .EV_WORD^-.(SIGV [EVENT_CODE]) <0, 4>;
; 0265
; 0266 if .EV_WORD then CALL$P (LOG_EVENT, .NMXDB [NMX_NMX_PIX], .SIGV);
; 0267
; 0268 end
; 0269 else
; 0270 CALL$P (LOG_EVENT, .NMXDB [NMX_NMX_PIX], SIGV [0]);
; 0271
; 0272 true
; 0273 end; !of $NMEVT
.GLOBL $CALLP
.SBTTL $NMEVT
000000 004167 000000G $NMEVT::JSR R1,$SAVE4 ; 0185
000004 016603 000020 MOV 20(SP),R3 ; SIGV,* 0230
000010 026327 000002 000173 CMP 2(R3),#173
000016 001003 BNE 1$
000020 021327 000004 CMP (R3),#4 ; 0232
000024 001402 BEQ 2$
000026 005000 1$: CLR R0
000030 000207 RTS PC
000032 016602 000014 2$: MOV 14(SP),R2 ; NMXDB,* 0242
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 8
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (4)
000036 012704 000004 MOV #4,R4 ; 0234
000042 060304 ADD R3,R4
000044 021427 014515 CMP (R4),#14515
000050 001447 BEQ 6$
000052 005262 000136 INC 136(R2) ; 0242
000056 011401 MOV (R4),R1 ; *,EV.ADR 0244
000060 072127 177772 ASH #-6,R1 ; *,EV.ADR
000064 042701 177000 BIC #177000,R1 ; *,EV.ADR
000070 020127 000006 CMP R1,#6 ; EV.ADR,*
000074 101010 BHI 3$
000076 006301 ASL R1 ; EV.ADR 0248
000100 006301 ASL R1 ; EV.ADR
000102 010200 MOV R2,R0 ; 0249
000104 060100 ADD R1,R0 ; EV.ADR,*
000106 010001 MOV R0,R1 ; *,EV.ADR
000110 062701 000060 ADD #60,R1 ; *,EV.ADR
000114 000411 BR 4$ ; 0244
000116 020127 000140 3$: CMP R1,#140 ; EV.ADR,*
000122 103436 BLO 7$
000124 020127 000177 CMP R1,#177 ; EV.ADR,*
000130 101033 BHI 7$
000132 012701 000114 MOV #114,R1 ; *,EV.ADR 0252
000136 060201 ADD R2,R1 ; *,EV.ADR
000140 012100 4$: MOV (R1)+,R0 ; EV.ADR,EV.WORD 0257
000142 132714 000020 BITB #20,(R4) ; 0260
000146 001401 BEQ 5$
000150 011100 MOV (R1),R0 ; EV.ADR,EV.WORD 0262
000152 111401 5$: MOVB (R4),R1 ; 0264
000154 042701 177760 BIC #177760,R1
000160 005401 NEG R1
000162 072001 ASH R1,R0
000164 006000 ROR R0 ; EV.WORD 0266
000166 103014 BCC 7$
000170 010346 6$: MOV R3,-(SP) ; 0270
000172 012746 000001 MOV #1,-(SP)
000176 012746 000000V MOV #LOG.EVENT,-(SP)
000202 005046 CLR -(SP)
000204 116216 000003 MOVB 3(R2),(SP)
000210 004767 000000G JSR PC,$CALLP
000214 062706 000010 ADD #10,SP
000220 012700 000001 7$: MOV #1,R0 ; 0185
000224 000207 RTS PC
; Routine Size: 75 words, Routine Base: $CODE$ + 0050
; Maximum stack depth per invocation: 10 words
; 0274
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 9
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (5)
; 0275 routine LOG_EVENT (SIGV) : CALL$ novalue = !Log an Event
; 0276
; 0277 !++
; 0278 ! FUNCTIONAL DESCRIPTION:
; 0279 !
; 0280 ! LOG_EVENT is called to actually build an Event Buffer and queue it
; 0281 ! for processing by an RSX Task. Event queue lengths are monitored to
; 0282 ! handle lost events.
; 0283 !
; 0284 !
; 0285 ! FORMAL PARAMETERS:
; 0286 !
; 0287 ! .SIGV - Address of the Signal Parameter Vector
; 0288 !
; 0289 ! IMPLICIT INPUTS:
; 0290 !
; 0291 ! Various NMXDB items
; 0292 !
; 0293 ! IMPLICIT OUTPUTS:
; 0294 !
; 0295 ! Various NMXDB items
; 0296 !
; 0297 ! COMPLETION CODES:
; 0298 !
; 0299 ! None
; 0300 !
; 0301 ! SIDE EFFECTS:
; 0302 !
; 0303 ! I/O Packets could be completed to RSX.
; 0304 !--
; 0305
; 0306 begin
; 0307
; 0308 map
; 0309 SIGV : ref vector; ! Signal Vector
; 0310
; 0311 stacklocal
; 0312 OLD_MAP;
; 0313
; 0314 local
; 0315 CCB : ref block field (C_NM_FIELDS);
; 0316
; 0317 external
; 0318 MCB$GAW_PROCESS_DATA_BASE : vector [2];
; 0319
; 0320 bind
; 0321 NMXDB = MCB$GAW_PROCESS_DATA_BASE [1] : ref NMXDB_BLOCK,
; 0322 EVTDB = NMXDB[NMX_EVENT_QUEUE] : NMX_EVENT_BLOCK;
; 0323
; 0324 SMAP$ (OLD_MAP);
; 0325 NMXDB [NMX_EVENTS_LOGGED] = .NMXDB [NMX_EVENTS_LOGGED] + 1;
; 0326
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 10
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (5)
; 0327 !
; 0328 ! Check queue depth: if full, discard signal and count a lost event.
; 0329 ! then call try_some_events to unload the queue
; 0330 ! then return
; 0331 !
; 0332 if .EVTDB[EVENT_QUEUE_COUNT] eql .EVTDB[EVENT_QUEUE_LENGTH]
; 0333 then
; 0334 begin
; 0335 EVTDB[EVENTS_LOST] = .EVTDB[EVENTS_LOST] + 1;
; 0336 MAP$ (.OLD_MAP);
; 0337 return;
; 0338 end;
; 0339
; 0340 !
; 0341 ! If logging this event would fill the queue, change the event to a lost_event
; 0342 !
; 0343 EVTDB [EVENT_QUEUE_COUNT] = .EVTDB [EVENT_QUEUE_COUNT] + 1;
; 0344
; 0345 if .EVTDB[EVENT_QUEUE_COUNT] eql .EVTDB[EVENT_QUEUE_LENGTH]
; 0346 then
; 0347 begin
; 0348
; 0349 field
; 0350 LAST_CCB = [1, 0, %bpaddr, 0];
; 0351
; 0352 CCB = .EVTDB [$sub_field (EVENT_QUEUE, LAST_CCB)];
; 0353
; 0354 if .CCB neqa 0
; 0355 then
; 0356
; 0357 if (.CCB [C_PRM1] neq 0) and
; 0358 (.CCB [C_PRM2] eql EVENTS_LOST_EVENT)
; 0359 then
; 0360 begin
; 0361 EVTDB[EVENT_QUEUE_COUNT] = .EVTDB[EVENT_QUEUE_COUNT] - 1;
; 0362 EVTDB [EVENTS_LOST] = .EVTDB [EVENTS_LOST] + 1;
; 0363 MAP$ (.OLD_MAP);
; 0364 return;
; 0365 end;
; 0366
; 0367 EVTDB[EVENTS_LOST] = .EVTDB[EVENTS_LOST] + 1;
; 0368 SIGV [EVENT_CODE] = EVENTS_LOST_EVENT;
; 0369 SIGV [EVENT_ENTITY] = 0;
; 0370 end;
; 0371
; 0372 !
; 0373 ! Try to allocate a CCB and a buffer if failed update a counter;
; 0374 ! If successful then the CCB Buffer is mapped
; 0375 !
; 0376
; 0377 if not $MCB_GET_CCB (CCB)
; 0378 then
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 11
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (5)
; 0379 begin
; 0380 EVTDB [EVENT_QUEUE_COUNT] = .EVTDB [EVENT_QUEUE_COUNT] - 1;
; 0381
; 0382 if .SIGV [EVENT_CODE] neq EVENTS_LOST_EVENT
; 0383 then
; 0384 EVTDB [EVENTS_LOST] = .EVTDB [EVENTS_LOST] + 1;
; 0385
; 0386 MAP$ (.OLD_MAP);
; 0387 return;
; 0388 end;
; 0389
; 0390 CCB [C_PRM1] = 1; ! Event message
; 0391 CCB [C_PRM3] = 0; ! No entity type
; 0392 CCB [C_PRM5] = 0; ! No buffer at present
; 0393
; 0394 if (CCB [C_PRM2] = .SIGV [EVENT_CODE]) gtr 0
; 0395 then
; 0396 begin ! LINE, CIRCUIT, or MODULE entity
; 0397
; 0398 if (CCB [C_PRM4] = .SIGV [EVENT_ENTITY]) gtr 0
; 0399 then
; 0400 (CCB [C_PRM3])<0, 8> = .(CCB [C_PRM4])<8, 8>;
; 0401
; 0402 CCB [C_PRM3] = .CCB [C_PRM3] - 1;
; 0403 end
; 0404 else
; 0405 begin ! NODE or NO entity
; 0406 (CCB [C_PRM2])<15, 1> = 0;
; 0407
; 0408 if (CCB [C_PRM4] = .SIGV [EVENT_ENTITY]) eql 0
; 0409 then
; 0410 CCB [C_PRM3] = .CCB [C_PRM3] - 1;
; 0411
; 0412 end;
; 0413
; 0414 begin
; 0415
; 0416 local
; 0417 CNT,
; 0418 PTR;
; 0419
; 0420 PTR = .SIGV [EVENT_BUFFER_PTR];
; 0421 CNT = ch$rchar_a (PTR);
; 0422
; 0423 if (CCB [C_CNT] = .CNT) neq 0
; 0424 then
; 0425 begin
; 0426
; 0427 local
; 0428 BUF;
; 0429
; 0430 if $MCB_GET_BUFFER (.CNT, BUF)
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 12
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (5)
; 0431 then
; 0432 begin
; 0433 CCB [C_ADDR] = .BUF;
; 0434 SMAP$ (CCB [C_BIAS]);
; 0435 CCB [C_PRM5] = .CNT;
; 0436 $MCB_MOVE_BUFFER_TO_BUFFER (.CNT, .PTR, .BUF);
; 0437 end
; 0438 else
; 0439 CCB [C_CNT] = 0;
; 0440
; 0441 end;
; 0442
; 0443 end;
; 0444 !
; 0445 ! We have the Event Buffer. Queue the CCB into the Event Queue and try to
; 0446 ! notify an RSX user.
; 0447 !
; 0448 $MCB_QUEUE_CCB (EVTDB [EVENT_QUEUE], .CCB);
; 0449 TRY_SOME_EVENTS (NMXDB [NMX_BASE]);
; 0450 MAP$ (.OLD_MAP);
; 0451 end; !of LOG_EVENT
.GLOBL .CRDAT, KISAR6, $CCBGT, $CORGT
.GLOBL $CMQIN
.SBTTL LOG.EVENT
000000 016703 000002G LOG.EVENT:
MOV .CRDAT+2,R3 ; 0322
000004 062703 000120 ADD #120,R3
000010 016746 000000G MOV KISAR6,-(SP) ; *,OLD.MAP 0324
000014 016700 000002G MOV .CRDAT+2,R0 ; 0325
000020 005260 000140 INC 140(R0)
000024 012701 000004 MOV #4,R1 ; 0332
000030 060301 ADD R3,R1
000032 121161 000001 CMPB (R1),1(R1)
000036 001003 BNE 2$
000040 005263 000010 1$: INC 10(R3) ; 0335
000044 000546 BR 12$ ; 0336
000046 105211 2$: INCB (R1) ; 0343
000050 121161 000001 CMPB (R1),1(R1) ; 0345
000054 001023 BNE 4$
000056 016302 000002 MOV 2(R3),R2 ; *,CCB 0352
000062 001410 BEQ 3$ ; 0354
000064 005762 000024 TST 24(R2) ; *(CCB) 0357
000070 001405 BEQ 3$
000072 005762 000026 TST 26(R2) ; *(CCB) 0358
000076 001002 BNE 3$
000100 105311 DECB (R1) ; 0361
000102 000756 BR 1$ ; 0362
000104 005263 000010 3$: INC 10(R3) ; 0367
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 13
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (5)
000110 016500 000002 MOV 2(R5),R0 ; SIGV(.AP.),* 0368
000114 005060 000004 CLR 4(R0)
000120 005060 000006 CLR 6(R0) ; 0369
000124 004767 000000G 4$: JSR PC,$CCBGT ; 0377
000130 103402 BCS 5$
000132 010402 MOV R4,R2 ; $MCB$R4,CCB
000134 000407 BR 6$
000136 105311 5$: DECB (R1) ; 0380
000140 016500 000002 MOV 2(R5),R0 ; SIGV(.AP.),* 0382
000144 005760 000004 TST 4(R0)
000150 001504 BEQ 12$
000152 000732 BR 1$ ; 0384
000154 012762 000001 000024 6$: MOV #1,24(R2) ; *,*(CCB) 0390
000162 012704 000030 MOV #30,R4 ; 0391
000166 060204 ADD R2,R4 ; CCB,*
000170 005014 CLR (R4)
000172 005062 000034 CLR 34(R2) ; *(CCB) 0392
000176 012700 000032 MOV #32,R0 ; 0398
000202 060200 ADD R2,R0 ; CCB,*
000204 016505 000002 MOV 2(R5),R5 ; SIGV(.AP.),* 0394
000210 012701 000026 MOV #26,R1
000214 060201 ADD R2,R1 ; CCB,*
000216 016511 000004 MOV 4(R5),(R1)
000222 003406 BLE 7$
000224 016510 000006 MOV 6(R5),(R0) ; 0398
000230 003410 BLE 8$
000232 116014 000001 MOVB 1(R0),(R4) ; 0400
000236 000405 BR 8$ ; 0402
000240 042711 100000 7$: BIC #100000,(R1) ; 0406
000244 016510 000006 MOV 6(R5),(R0) ; 0408
000250 001001 BNE 9$
000252 005314 8$: DEC (R4) ; 0410
000254 016504 000010 9$: MOV 10(R5),R4 ; *,PTR 0420
000260 005001 CLR R1 ; CNT 0421
000262 152401 BISB (R4)+,R1 ; PTR,CNT
000264 012705 000022 MOV #22,R5 ; 0423
000270 060205 ADD R2,R5 ; CCB,*
000272 010115 MOV R1,(R5) ; CNT,*
000274 001423 BEQ 11$
000276 004767 000000G JSR PC,$CORGT ; 0430
000302 103417 BCS 10$
000304 010062 000020 MOV R0,20(R2) ; BUF,*(CCB) 0433
000310 016762 000000G 000016 MOV KISAR6,16(R2) ; *,*(CCB) 0434
000316 010162 000034 MOV R1,34(R2) ; CNT,*(CCB) 0435
000322 010146 MOV R1,-(SP) ; CNT,* 0436
000324 010446 MOV R4,-(SP) ; PTR,*
000326 010046 MOV R0,-(SP) ; BUF,*
000330 004767 000000G JSR PC,BL$MOV
000334 062706 000006 ADD #6,SP ; 0432
000340 000401 BR 11$ ; 0430
000342 005015 10$: CLR (R5) ; 0439
000344 010204 11$: MOV R2,R4 ; CCB,* 0448
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 14
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (5)
000346 004767 000000G JSR PC,$CMQIN
000352 016705 000002G MOV .CRDAT+2,R5 ; 0449
000356 004767 000000V JSR PC,TRY.SOME.EVENTS
000362 012667 000000G 12$: MOV (SP)+,KISAR6 ; OLD.MAP,* 0450
000366 000207 RTS PC ; 0275
; Routine Size: 124 words, Routine Base: $CODE$ + 0276
; Maximum stack depth per invocation: 5 words
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 15
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (6)
; 0452 routine TRY_SOME_EVENTS (NMXDB) : LINKAGE_DB novalue =
; 0453
; 0454 !++
; 0455 ! FUNCTIONAL DESCRIPTION:
; 0456 !
; 0457 ! TRY_SOME_EVENTS tries to give some events from the Event Queue to
; 0458 ! an RSX task.
; 0459 !
; 0460 ! FORMAL PARAMETERS:
; 0461 !
; 0462 ! None
; 0463 !
; 0464 ! IMPLICIT INPUTS:
; 0465 !
; 0466 ! NMXDB EVENT and IOP Queues
; 0467 !
; 0468 ! IMPLICIT OUTPUTS:
; 0469 !
; 0470 ! NMXDB EVENT and IOP Queues
; 0471 !
; 0472 ! COMPLETION CODES:
; 0473 !
; 0474 ! None
; 0475 !
; 0476 ! SIDE EFFECTS:
; 0477 !
; 0478 ! This routine must be called in MCB mode!
; 0479 !--
; 0480
; 0481 begin
; 0482
; 0483 map
; 0484 NMXDB : ref NMXDB_BLOCK;
; 0485
; 0486 bind
; 0487 EVTDB = NMXDB [NMX_EVENT_QUEUE] : NMX_EVENT_BLOCK,
; 0488 IOPQ = NMXDB [NMX_EVENT_IOPS] : vector;
; 0489
; 0490 while true do
; 0491 begin
; 0492
; 0493 label
; 0494 FILL_BUFFER;
; 0495
; 0496 stacklocal
; 0497 ERROR_CODE;
; 0498
; 0499 local
; 0500 AMOUNT,
; 0501 CCB : ref block field (C_NM_FIELDS),
; 0502 IOP : ref NMX_IOP_BLOCK;
; 0503
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 16
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (6)
; 0504 bind
; 0505 LEFT = ERROR_CODE,
; 0506 PTR = AMOUNT;
; 0507
; 0508 !
; 0509 ! Look for waiting event and IOP to transfer it to
; 0510 !
; 0511
; 0512 if (IOP = .IOPQ [0]) eqla 0 then exitloop;
; 0513
; 0514 if (CCB = .vector [EVTDB [EVENT_QUEUE], 0]) eqla 0 then exitloop;
; 0515
; 0516 !
; 0517 ! Construct message in IOP buffer from CCB
; 0518 !
; 0519 FILL_BUFFER :
; 0520 begin ! FILL_BUFFER
; 0521 MAP$ (.IOP [I_NMX_BIAS]);
; 0522 PTR = .IOP [I_NMX_ADDR];
; 0523 LEFT = .IOP [I_NMX_CNT];
; 0524
; 0525 if (LEFT = .LEFT - 1) lss 0
; 0526 then leave FILL_BUFFER with ERROR_CODE = $NM$ERR_OCM;
; 0527
; 0528 ch$wchar (.CCB [C_PRM1], .PTR); ! Message type
; 0529
; 0530 if ch$rchar_a (PTR) eql 1
; 0531 then
; 0532 begin
; 0533 EVTDB [EVENT_QUEUE_COUNT] = .EVTDB [EVENT_QUEUE_COUNT] - 1;
; 0534 EVTDB [EVENTS_PROCESSED] = .EVTDB [EVENTS_PROCESSED] + 1;
; 0535
; 0536 if (LEFT = .LEFT - 4) lss 0
; 0537 then leave FILL_BUFFER with ERROR_CODE = $NM$ERR_OCM;
; 0538
; 0539 PUTW (CCB [C_PRM2], PTR); ! Event Class and Type (2 bytes)
; 0540 !
; 0541 ! Now the EVENT ENTITY
; 0542 !
; 0543 begin ! EVENT ENTITY
; 0544 PUTW (CCB [C_PRM3], PTR); ! ENTITY TYPE
; 0545
; 0546 case .CCB [C_PRM3] from 0 to 4 of ! ENTITY ID
; 0547 set
; 0548 [0] : ! NODE entity
; 0549 begin
; 0550
; 0551 if (LEFT = .LEFT - 2) lss 0 then leave FILL_BUFFER with ERROR_CODE = $NM$ERR_OCM;
; 0552
; 0553 PUTW (CCB [C_PRM4], PTR);
; 0554 end;
; 0555 [1, 3, 4] : ! LINE, CIRCUIT, or MODULE entity
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 17
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (6)
; 0556 begin
; 0557
; 0558 local
; 0559 ENTITY_BLOCK : ref block field (NMX_GENERAL_FIELDS);
; 0560
; 0561 if (ENTITY_BLOCK = $NMX_MAP_NMXID (.CCB [C_PRM4])) neqa 0
; 0562 then
; 0563 begin
; 0564
; 0565 bind
; 0566 ID_LEN = .ENTITY_BLOCK [GENERAL_NAME_LENGTH] + 1,
; 0567 ID_PTR = byt$ptr (ENTITY_BLOCK [GENERAL_NAME_LENGTH]);
; 0568
; 0569 if (LEFT = .LEFT - ID_LEN) lss 0 then leave FILL_BUFFER with ERROR_CODE = $NM$ERR_OCM;
; 0570
; P 0571 $MCB_MOVE_BUFFER_TO_BUFFER (ID_LEN, ID_PTR,
; 0572 (.IOP [I_NMX_BIAS], .PTR));
; 0573 PTR = ch$plus (.PTR, ID_LEN);
; 0574 end
; 0575 else
; 0576 begin ! Bad NMXID
; 0577 PTR = ch$plus (.PTR, -2);
; 0578 PUTV (-1, PTR);
; 0579 end;
; 0580
; 0581 MAP$ (.IOP [I_NMX_BIAS]);
; 0582 end;
; 0583 [inrange, outrange] :
; 0584 0; ! NO entity
; 0585 tes;
; 0586
; 0587 end;
; 0588 end;
; 0589 !
; 0590 ! Now the EVENT DATA
; 0591 !
; 0592
; 0593 if (LEFT = .LEFT - .CCB [C_CNT]) lss 0 then leave FILL_BUFFER with ERROR_CODE = $NM$ERR_OCM;
; 0594
; 0595 $MCB_MOVE_BUFFER_TO_BUFFER (.CCB [C_CNT], (.CCB [C_BIAS], .CCB [C_ADDR]), .PTR);
; 0596 PTR = ch$plus (.PTR, .CCB [C_CNT]);
; 0597 ERROR_CODE = NM$SUC;
; 0598 end; ! FILL_BUFFER
; 0599 PTR = ch$diff (.PTR, .IOP [I_NMX_ADDR]);
; 0600 AMOUNT = .PTR;
; 0601 !
; 0602 ! Complete IOP
; 0603 !
; 0604 $NMX_DEQUEUE (IOPQ, IOP); ! Dequeue IOP
; 0605 $NMX_RETURN_RSX_IOP (.IOP, .ERROR_CODE, .AMOUNT);
; 0606 !
; 0607 ! Return resources
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 18
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (6)
; 0608 !
; 0609 $MCB_DEQUEUE_CCB (EVTDB [EVENT_QUEUE], CCB); ! Dequeue Event
; 0610 MAP$ (.CCB [C_BIAS]);
; 0611
; 0612 if .CCB [C_PRM5] neq 0
; 0613 then
; 0614 $MCB_RETURN_BUFFER (.CCB [C_PRM5], .CCB [C_ADDR]);
; 0615
; 0616 $MCB_RETURN_CCB (.CCB);
; 0617 end;
; 0618
; 0619 end; !of TRY_SOME_EVENTS
; WARN#099
; Simultaneously allocated two quantities to Register 5
.GLOBL NM.NMX, $MVTBF, $MVFBF, $QRMVF
.GLOBL $IOFIN, $CMQRM, $CORRT, $CCBRT
.SBTTL TRY.SOME.EVENTS
000000 004167 000000G TRY.SOME.EVENTS:
JSR R1,$SAVE5 ; 0452
000004 162706 000014 SUB #14,SP
000010 010566 000004 MOV R5,4(SP)
000014 012700 000120 MOV #120,R0 ; 0481
000020 060500 ADD R5,R0
000022 010066 000002 MOV R0,2(SP)
000026 016600 000004 1$: MOV 4(SP),R0 ; 0512
000032 016004 000132 MOV 132(R0),R4 ; *,IOP
000036 001403 BEQ 2$
000040 017666 000002 000006 MOV @2(SP),6(SP) ; *,CCB 0514
000046 001002 2$: BNE 3$
000050 000167 000642 JMP 15$
000054 016405 000024 3$: MOV 24(R4),R5 ; *(IOP),* 0521
000060 010567 000000G MOV R5,KISAR6
000064 016466 000026 000010 MOV 26(R4),10(SP) ; *(IOP),PTR 0522
000072 016466 000030 000012 MOV 30(R4),12(SP) ; *(IOP),LEFT 0523
000100 005366 000012 DEC 12(SP) ; LEFT 0525
000104 100575 BMI 10$ ; 0526
000106 016600 000006 MOV 6(SP),R0 ; CCB,* 0528
000112 116076 000024 000010 MOVB 24(R0),@10(SP) ; *(CCB),PTR
000120 005266 000010 INC 10(SP) ; PTR 0530
000124 016600 000010 MOV 10(SP),R0 ; PTR,*
000130 126027 177777 000001 CMPB -1(R0),#1 ; *(PTR),*
000136 001151 BNE 9$
000140 016601 000002 MOV 2(SP),R1 ; 0533
000144 105361 000004 DECB 4(R1)
000150 010100 MOV R1,R0 ; 0534
000152 005260 000006 INC 6(R0)
000156 162766 000004 000012 SUB #4,12(SP) ; *,LEFT 0536
000164 100545 BMI 10$ ; 0537
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 19
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (6)
000166 016600 000006 MOV 6(SP),R0 ; CCB,* 0539
000172 116076 000026 000010 MOVB 26(R0),@10(SP) ; *(CCB),PTR
000200 005266 000010 INC 10(SP) ; PTR
000204 016600 000006 MOV 6(SP),R0 ; CCB,*
000210 116076 000027 000010 MOVB 27(R0),@10(SP) ; *(CCB),PTR
000216 005266 000010 INC 10(SP) ; PTR
000222 012701 000030 MOV #30,R1 ; 0544
000226 066601 000006 ADD 6(SP),R1 ; CCB,*
000232 010100 MOV R1,R0
000234 111076 000010 MOVB (R0),@10(SP) ; *,PTR
000240 005266 000010 INC 10(SP) ; PTR
000244 116076 000001 000010 MOVB 1(R0),@10(SP) ; *,PTR
000252 005266 000010 INC 10(SP) ; PTR
000256 011000 MOV (R0),R0 ; 0546
000260 020027 000004 CMP R0,#4
000264 101076 BHI 9$
000266 006300 ASL R0
000270 066007 000000' ADD P.AAA(R0),PC ; Case dispatch
000274 000472 4$: BR 9$
000276 162766 000002 000012 5$: SUB #2,12(SP) ; *,LEFT 0551
000304 100475 BMI 10$
000306 016600 000006 MOV 6(SP),R0 ; CCB,* 0553
000312 116076 000032 000010 MOVB 32(R0),@10(SP) ; *(CCB),PTR
000320 005266 000010 INC 10(SP) ; PTR
000324 016600 000006 MOV 6(SP),R0 ; CCB,*
000330 116076 000033 000010 MOVB 33(R0),@10(SP) ; *(CCB),PTR
000336 005266 000010 INC 10(SP) ; PTR
000342 000447 BR 9$ ; 0546
000344 016600 000006 6$: MOV 6(SP),R0 ; CCB,* 0561
000350 016001 000032 MOV 32(R0),R1 ; *(CCB),*
000354 004767 000000G JSR PC,NM.NMX
000360 005700 TST R0 ; ENTITY.BLOCK
000362 001420 BEQ 7$
000364 111001 MOVB (R0),R1 ; ENTITY.BLOCK,* 0566
000366 005201 INC R1
000370 160166 000012 SUB R1,12(SP) ; *,LEFT 0569
000374 100441 BMI 10$
000376 010546 MOV R5,-(SP) ; 0572
000400 016646 000012 MOV 12(SP),-(SP) ; PTR,*
000404 010002 MOV R0,R2 ; ENTITY.BLOCK,*
000406 010103 MOV R1,R3
000410 004767 000000G JSR PC,$MVTBF
000414 060166 000014 ADD R1,14(SP) ; *,PTR 0573
000420 022626 CMP (SP)+,(SP)+ ; 0563
000422 000415 BR 8$ ; 0561
000424 162766 000002 000010 7$: SUB #2,10(SP) ; *,PTR 0577
000432 112776 000377 000010 MOVB #377,@10(SP) ; *,PTR 0578
000440 005266 000010 INC 10(SP) ; PTR
000444 112776 000377 000010 MOVB #377,@10(SP) ; *,PTR
000452 005266 000010 INC 10(SP) ; PTR
000456 010567 000000G 8$: MOV R5,KISAR6 ; 0581
000462 016601 000006 9$: MOV 6(SP),R1 ; CCB,* 0593
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 20
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (6)
000466 016100 000022 MOV 22(R1),R0 ; *(CCB),*
000472 160066 000012 SUB R0,12(SP) ; *,LEFT
000476 100005 BPL 11$
000500 012766 177774 000012 10$: MOV #-4,12(SP) ; *,ERROR.CODE
000506 024646 CMP -(SP),-(SP)
000510 000420 BR 12$
000512 016601 000006 11$: MOV 6(SP),R1 ; CCB,* 0595
000516 016146 000016 MOV 16(R1),-(SP) ; *(CCB),*
000522 016146 000020 MOV 20(R1),-(SP) ; *(CCB),*
000526 016602 000014 MOV 14(SP),R2 ; PTR,*
000532 010003 MOV R0,R3
000534 004767 000000G JSR PC,$MVFBF
000540 060066 000014 ADD R0,14(SP) ; *,PTR 0596
000544 012766 000001 000016 MOV #1,16(SP) ; *,ERROR.CODE 0597
000552 166466 000026 000014 12$: SUB 26(R4),14(SP) ; *(IOP),PTR 0599
000560 012700 000132 MOV #132,R0 ; 0604
000564 066600 000010 ADD 10(SP),R0
000570 010066 000004 MOV R0,4(SP)
000574 004767 000000G JSR PC,$QRMVF
000600 010104 MOV R1,R4
000602 022626 CMP (SP)+,(SP)+
000604 004767 000000G JSR PC,$RSX ; 0605
000610 016600 000012 MOV 12(SP),R0 ; ERROR.CODE,*
000614 016601 000010 MOV 10(SP),R1 ; AMOUNT,*
000620 010403 MOV R4,R3 ; IOP,*
000622 004767 000000G JSR PC,$IOFIN
000626 004767 000000G JSR PC,$MCB
000632 016603 000002 MOV 2(SP),R3 ; 0609
000636 004767 000000G JSR PC,$CMQRM
000642 103402 BCS 13$
000644 010466 000006 MOV R4,6(SP) ; $MCB$R4,CCB
000650 016600 000006 13$: MOV 6(SP),R0 ; CCB,* 0610
000654 016067 000016 000000G MOV 16(R0),KISAR6 ; *(CCB),*
000662 016001 000034 MOV 34(R0),R1 ; *(CCB),* 0612
000666 001405 BEQ 14$
000670 010002 MOV R0,R2 ; CCB,* 0614
000672 016200 000020 MOV 20(R2),R0 ; *(CCB),*
000676 004767 000000G JSR PC,$CORRT
000702 016604 000006 14$: MOV 6(SP),R4 ; CCB,* 0616
000706 004767 000000G JSR PC,$CCBRT
000712 000167 177110 JMP 1$ ; 0490
000716 062706 000014 15$: ADD #14,SP ; 0452
000722 000207 RTS PC
; Routine Size: 234 words, Routine Base: $CODE$ + 0666
; Maximum stack depth per invocation: 15 words
000000 .PSECT $PLIT$, RO , D
P.AAA: ; CASE Table for TRY.SOME.EVENTS+0270 0546
000000 000002 .WORD 2 ; [5$]
000002 000050 .WORD 50 ; [6$]
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 21
X01130 4-Jan-1983 09:27:37 NETPKG:<NMX>NMXEVE.BLI.7 (6)
000004 000166 .WORD 166 ; [9$]
000006 000050 .WORD 50 ; [6$]
000010 000050 .WORD 50 ; [6$]
; 0620
; 0621 end
; 0622
; 0623 eludom
; OTS external references
.GLOBL $SAVE5, $SAVE4, BL$MOV
; PSECT SUMMARY
;
; Psect Name Words Attributes
; $CODE$ 453 RO , I , LCL, REL, CON
; $PLIT$ 5 RO , D , LCL, REL, CON
; LIBRARY STATISTICS
;
; -------- Symbols -------- Blocks
; File Total Loaded Percent Read
;
; NETPKG:<MCB>XPORTX.L16.15 599 4 0 0
; NETPKG:<MCB>MCBLIB.L16.15 372 50 13 0
; NETPKG:<NMX>NMXPAR.L16.30 968 190 19 0
; NETPKG:<MCB>NMXLIB.L16.13 200 12 6 0
; Information: 0
; Warnings: 1
; Errors: 0
; 0624 ! Local Modes:
; 0625 ! Comment Column:36
; 0626 ! Comment Start:!
; 0627 ! Mode:BLISS
; 0628 ! Auto Save Mode:2
; 0629 ! End:
; Size: 453 code + 5 data words
; Run Time: 00:10.4
; Elapsed Time: 00:30.3
NMXEVE 25-Jan-1983 09:28:09 TOPS-20 Bliss-16 3(552) Page 22
X01130
; Memory Used: 65 pages
; Compilation Complete