<< LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION>>               00000001
  U MIT MPE:                                                   <<H1541>>00380000
     C.01.01.00 - ON'ICS definition. The integer comparation   <<H1541>>00381000
                  emits by ( tos <= x <= tos ) is modified to  <<H1541>>00382000
                  a logical comparation for the case where     <<H1541>>00383000
                  QI and ZI are not lay in the same half bank  <<H1541>>00384000
                  of memory.                                   <<H1541>>00385000
                                                               <<H1541>>00386000
     C.01.02.00 - ABORTTIMER procedure. Fixed the SF 621 from  <<T1604>>00387000
                  AbortTimer because TCP is writing to the     <<T1604>>00388000
                  system PORT DST.                             <<T1604>>00389000
                                                               <<T1604>>00390000
UB MIT MPE:                                                    <<T2077>>00391000
                                                               <<T2077>>00392000
   D.01.01.00 - PORTDISPATCHER procedure. ExchangeDB back to   <<T2077>>00393000
                OldDst if it was <> 0 before returning from    <<T2077>>00394000
                PortDispatcher.                                <<T2077>>00395000
                                                               <<T2077>>00396000
              - UPDATEHEADTIME procedure. Set Timeheaddelta to <<T2077>>00397000
                zero if it becomes negative.This is to prevent <<T2077>>00398000
                the case where timer can be negative and would <<T2077>>00399000
                cause the system to hang.                      <<T2077>>00400000
                                                               <<T2077>>00401000
   ==================== end of version history =============== <<T2077>>00402000
;                                                              <<T2077>>00403000
                                                               <<T2077>>00404000
   define port'versionid = "d0101000"#;                        <<T2077>>01006000
             %6             APPC                               <<T1604>>01043100
             %10            DIA TP from IND IBM Data Comm lab. <<T1604>>01043200
                                                               <<H1541>>01070200
LOGICAL XLOG = X;   <<TO USE IN ICS DEFINITION>>               <<H1541>>01070300
                                                               <<H1541>>01070400
   ls1     = s-1,                                              <<61863>>01109500
      if LS0 >= xlog and LS1 <= xlog   <<  ZI >= X >= QI >>    <<61863>>01343000
        Asmb (delb,delb); <<delete QI and ZI from tos>>        <<61863>>01345200
            if Old'Dst <> 0 then exchangedb(Old'Dst);          <<T2077>>02517100
  if PortCB'free then Suddendeath(Badportcall);                <<S1144>>02684500
  if PortCB'free then Suddendeath(Badportcall);                <<S1144>>02810500
  if PortCB'free then Suddendeath(Badportcall);                <<S1144>>02866500
  if PortCB'free then Suddendeath(Badportcall);                <<S1144>>02889500
  if PortCB'free then Suddendeath(Badportcall);                <<S1144>>02953500
    if Timehead <> 0 then Suddendeath(BadPortCall);            <<S1144>>03695500
         badDST   = 2,                                         <<D9743>>03784500
  if PortDST <= 0 then begin Result := badDST;goto exit;end;   <<D9743>>03805100
  <<goto exit if can not obtain a data segment>>               <<D9743>>03805200
      if timeheaddelta < 0D then timeheaddelta := 0D;          <<T2077>>04278100
  double sys'ppp'id;                                           <<T1604>>04372100
  integer Subqueue,                                            <<T1604>>04378000
          ole'dst,                                             <<T1604>>04378100
          sys'ppp'dst = sys'ppp'id;                            <<T1604>>04378200
                  next,                                        <<T1604>>04380000
                  mesg,                                        <<T1604>>04380100
                  prev'mesg,                                   <<T1604>>04380200
                  sys'ppp'portcb = sys'ppp'id + 1;             <<T1604>>04380300
  define timer'pending = (2:1)#;                               <<T1604>>04383100
  equate timer'qhead = 10,                                     <<T1604>>04386100
         timer'qtail = timer'qhead + 1;                        <<T1604>>04386200
    if @TimerCB = TimeHead then begin                          <<T1604>>04404000
                                                               <<T1604>>04404010
<<***********************************************************>><<T1604>>04404020
<<                                                           >><<T1604>>04404030
<<   Algorithm is as follows:                                >><<T1604>>04404040
<<                                                           >><<T1604>>04404050
<<     1) Find port id of the system port server             >><<T1604>>04404060
<<     2) Exchange DB to the Msg Harbor table                >><<T1604>>04404070
<<     3) Find the message, corresponding to the timer       >><<T1604>>04404080
<<        in this DST, that MAYBE has popped.                >><<T1604>>04404090
<<     4) If there is a request that has poped then          >><<T1604>>04404100
<<        a) Take the message off the recieve queue.         >><<T1604>>04404101
<<        b) Put the message on the free queue.              >><<T1604>>04404102
<<     5) Exchange DB back to the Port DST.                  >><<T1604>>04404103
<<                                                           >><<T1604>>04404104
<<***********************************************************>><<T1604>>04404105
                                                               <<T1604>>04404106
       sys'ppp'id := FindProcessPort(SysPort'pin);             <<T1604>>04404107
          << Can't use ExchangeDB, Try this way >>             <<T1604>>04404108
       x := sys'ppp'dst & lsl(2);                              <<T1604>>04404109
       tos := dst(x := x + 2);                                 <<T1604>>04404110
       tos := dst(x := x + 1);                                 <<T1604>>04404111
       asmb( xchd );                                           <<T1604>>04404113
       if sys'ppp'portcb.timer'pending = 1 then begin          <<T1604>>04404114
          @mesg := sys'ppp'portcb(timer'qhead);                <<T1604>>04404115
          @prev'mesg := 0;                                     <<T1604>>04404116
          while (@mesg <> 0) and mesg(2) <> TimerDST do begin  <<T1604>>04404117
             @prev'mesg := @mesg;                              <<T1604>>04404118
             @mesg := mesg;                                    <<T1604>>04404119
          end;                                                 <<T1604>>04404120
          if @mesg <> 0 then begin                             <<T1604>>04404121
             if @prev'mesg = 0 then                            <<T1604>>04404122
                sys'ppp'portcb(timer'qhead) := mesg            <<T1604>>04404123
             else                                              <<T1604>>04404310
                prev'mesg := mesg;                             <<T1604>>04404320
                                                               <<T1604>>04404330
             if sys'ppp'portcb(timer'qtail) = @mesg then begin <<T1604>>04404340
                sys'ppp'portcb(timer'qtail) := @prev'mesg;     <<T1604>>04404350
                sys'ppp'portcb.timer'pending := @prev'mesg<>0; <<T1604>>04404360
             end;                                              <<T1604>>04404370
             mesg := 0;                                        <<T1604>>04404380
             if @MsgPoolHead <> 0 then begin                   <<T1604>>04404390
                @MsgPoolTail := MsgPoolTail := @mesg;          <<T1604>>04404400
             end                                               <<T1604>>04404410
             else begin                                        <<T1604>>04404420
                @MsgPoolHead := @MsgPoolTail := @mesg;         <<T1604>>04404430
             end;                                              <<T1604>>04404440
             PoolCnt := PoolCnt + 1;                           <<T1604>>04404450
          end;                                                 <<T1604>>04404460
       end;                                                    <<T1604>>04404470
       asmb( xchd );                                           <<T1604>>04404480
       asmb( subs 2 );                                         <<T1604>>04404490
       UpdateHeadTime;                                         <<T1604>>04404500
    end;                                                       <<T1604>>04404510
                                                               <<T1604>>04404520
    prev := TimerCB;  << delink request >>                     <<T1604>>04404530
$edit void=04405999                                            <<T1604>>04404540
$include INCLMEAS                                              <<M1723>>05483100
$include INCLMIFT                                              <<M1723>>05483200
    OR (ABSOLUTE(SYSDISPAWAKEMSG).PAUSEDFLAG) THEN             <<M1723>>05578000
       BEGIN                                                   <<M1723>>05578010
       << Measure STOP event if process is running >>          <<M1723>>05578020
       IF (ABSOLUTE(CPCB) <> 0) THEN                           <<M1723>>05578030
          BEGIN                                                <<M1723>>05578040
          IF GCLASSENABLEDMASK.CLASS0 THEN                     <<M1723>>05578050
             BEGIN  <<MEASURE PREEMPTION EVENT>>               <<M1723>>05578060
             TOS:=MEASSTATXDSBANK;                             <<M1723>>05578070
             TOS:=MEASSTATXDSBASE;                             <<M1723>>05578080
             TOS:=TOS+C0SUB0'SEGRELOFF+C'PREEMPT;              <<M1723>>05578090
             ASMB(LSEA);                                       <<M1723>>05578100
             TOS:=TOS+1;                                       <<M1723>>05578110
             ASMB(SSEA;DDEL);                                  <<M1723>>05578120
             END;                                              <<M1723>>05578130
          IF GCLASSENABLEDMASK.CLASS15 THEN                    <<M1723>>05578140
             BEGIN <<PROCESS LEVEL PREEMPTION>>                <<M1723>>05578150
             TOS:=MEASPROCXDSBANK;                             <<M1723>>05578160
             TOS:=MEASPROCXDSBASE;                             <<M1723>>05578170
             TOS := TOS + (ABSOLUTE(CPCB)/PCBSIZE) *           <<M1723>>05578180
                  CLASS15'SUB0SIZE+CP'STOPPREEMPTED;           <<M1723>>05578190
             ASMB(LSEA);                                       <<M1723>>05578200
             TOS:=TOS+1;                                       <<M1723>>05578210
             ASMB(SSEA;DDEL);                                  <<M1723>>05578220
             END;                                              <<M1723>>05578230
        <<STUFF AWAY REASON STOPPED IN PCBX OF IMPEDED PROCES>><<M1723>>05578240
        <<DONE UNCONDITIONALLY FOR HISTORY FOR MEAS INTERFACE>><<M1723>>05578250
        <<WAITTODISPMSG.PREEMPTEDFLAG:=1;   >>                 <<M1723>>05578260
          END;                                                 <<M1723>>05578270
       ASMB(DISP);                                             <<M1723>>05578280
       END;                                                    <<M1723>>05578290
$EDIT VOID = 5998190                                           <<D1863>>05998010
  begin                                                        <<S1144>>06038100
  if function = 0 then DictExit(table'full)                    <<S1144>>06038200
  else <<only Sysfail for Update,Find,Delete,and Send>>        <<S1144>>06038300
  end;                                                         <<S1144>>06039100
$EDIT VOID = 6186600                                           <<D1863>>06186500
      exchangedb(Old'DST);                                     <<61863>>06186900
      exchangedb(Port'Dict'DSTN);                              <<61863>>06187500
      Exchangedb (Old'DST);                                    <<D1863>>06195000
      exchangedb(Port'Dict'DSTN);                              <<D1863>>06197000
$edit                                                          <<D1863>>06198100
Dictexit(Ok); <<Update/Find/Delete>>                           <<P1486>>06203000
$edit                                                          <<D1863>>06204100
      if tos > (dst(x)&dst'seglen) then go out'of'bounds;      <<A9884>>06615000
