User Tools

Site Tools


cdc:nos2.source:nam5871:sscatr

SSCATR

Table Of Contents

  • [00003] PROC SSCATR (TRBSS)
  • [00004] SSCATR - ACCEPTS TIMER REQUEST.
  • [00008] ACCEPTS TIMER REQUEST.
  • [00037] TRBSS - TIMER REQUEST BLOCK.
  • [00065] PROC SSCUTD
  • [00066] PROC SSTETS

Source Code

SSCATR.txt
  1. *DECK SSCATR
  2. USETEXT TEXTSS
  3. PROC SSCATR (TRBSS);
  4. # TITLE SSCATR - ACCEPTS TIMER REQUEST. #
  5.  
  6. BEGIN # SSCATR #
  7. #
  8. ** SSCATR - ACCEPTS TIMER REQUEST.
  9. *
  10. * F. HOU. 81/09/10.
  11. *
  12. * THIS PROCEDURE ACCEPTS THE NEW TIMER REQUEST BLOCK - TRBSS.
  13. *
  14. * PROC SSCATR (TRBSS)
  15. *
  16. * ENTRY TRBSS = NEW TIMER REQUEST BLOCK.
  17. *
  18. * EXIT THE TIMER REQUEST HAS BEEN ACCEPTED.
  19. *
  20. * NOTES THE NEW TIMER REQUEST BLOCK - TRBSS.
  21. * THE TIMER REQUEST QUEUE - TRQ1.
  22. * THE CTM COMMON BLOCK - CTM.
  23. *
  24. * METHOD
  25. *
  26. * ASSIGN NEXT TIMER-CANCELLATION-NUMBER AND INSERT INTO
  27. * TIMER REQUEST BLOCK - TRBSS.
  28. * CALL SSCUTD TO UPDATE TIME-OF-DAY.
  29. * COMPUTE TRBSS FTIME BY USING TRBSS DELAY-TIME & CTM TIME-OF-DAY.
  30. * IF(TRBSS FTIME < CTM FIRE-TIME) SET CTM FIRE-TIME TO TRBSS FTIME.
  31. * INSERT TRBSS IN SORT ORDER IN TIMER REQUEST INTO TRQ1.
  32. * RETURN WITH TIMER-CANCELLATION-NUMBER.
  33. *
  34. #
  35.  
  36. #
  37. ** TRBSS - TIMER REQUEST BLOCK.
  38. *
  39. * TRBSS CONTAINS THE TIMER REQUEST BLOCK DESCRIPTION.
  40. *
  41. #
  42.  
  43. DEF TRBLEN #4#; # LENGTH OF TRBSS #
  44.  
  45. ARRAY TRBSS [0:0] S(4);
  46. BEGIN
  47. ITEM TRB$WD0 U(00,00,60); # OVERLAPPING WORD 0 #
  48. ITEM TRB$ENTRY U(00,48,12); # ENTRY SIZE #
  49. ITEM TRB$WD1 U(01,00,60); # OVERLAPPING WORD 1 #
  50. ITEM TRB$CNUM U(01,18,18); # CANCELLATION NUMBER #
  51. ITEM TRB$WD2 U(02,00,60); # OVERLAPPING WORD 2 #
  52. ITEM TRB$FDQ U(03,00,60); # OVERLAPPING WORD 3 #
  53. ITEM TRB$FTIME U(03,00,24); # FIRE TIME #
  54. ITEM TRB$DELAY U(03,24,18); # DELAY TIME #
  55. ITEM TRB$QNUM U(03,42,18); # Q NUMBER #
  56. END
  57.  
  58.  
  59. #
  60. **** PROC SSCATR - XREF LIST.
  61. #
  62.  
  63. XREF
  64. BEGIN
  65. PROC SSCUTD; # UPDATES CURRENT TIME-OF-DAY. #
  66. PROC SSTETS; # ENLARGES TABLE SPACE. #
  67. END
  68.  
  69. #
  70. ****
  71. #
  72.  
  73. ITEM CNUM I=1; # CANCELLATION NUMBER PRESET TO 1. #
  74. ITEM I U; # I IS A LOOP VARIABLE #
  75. ITEM II I; # II=I #
  76.  
  77. CONTROL EJECT;
  78.  
  79. P<TRQ1>=SSTRQ[0]; # SET BASED ARRAY-TRQ1 POINTER #
  80. TRB$CNUM[0]=CNUM; # NEXT TIMER CANCELLATION NUMBER #
  81. CNUM=CNUM+1;
  82.  
  83. SSCUTD; # UPDATE TIME-OF-DAY #
  84.  
  85. TRB$FTIME[0]=TRB$DELAY[0]+CTM$RTSEC[0];
  86. # FIRE-TIME = DELAY-TIME + TIME-OF-DAY #
  87.  
  88. IF(TRB$FTIME[0] LS CTM$FTIME[0])
  89. THEN
  90. BEGIN
  91. CTM$FTIME[0]=TRB$FTIME[0]; # SET CTM FIRE-TIME TO TRBSS FTIME #
  92. END
  93.  
  94. II=0; # INITIAL VALUE FOR II #
  95. FOR I=0 STEP 1 WHILE I LS (SSTRQL[0]/4)
  96. AND (TRB$FTIME[0] GQ TRQ1$FTIME[I])
  97. DO
  98. BEGIN
  99. II=I; # FIND RIGHT POSITION IN TRQ1 FOR TRBSS #
  100. END
  101.  
  102. # I=0 CASE #
  103. IF (II EQ 0) AND
  104. ((SSTRQL[0] EQ 0) OR (TRB$FTIME[0] LS TRQ1$FTIME[0]))
  105. THEN
  106. BEGIN
  107. II=II-1;
  108. END
  109.  
  110. SSTETS (SSITRQ,(II+1)*4,TRB$ENTRY[0]); # ENLARGE TRQ SPACE #
  111.  
  112. P<TRQ1>=SSTRQ[0]; # SET BASED ARRAY-TRQ1 POINTER AGAIN #
  113.  
  114. TRQ1$WD0[II+1]=TRB$WD0[0]; # MOVE TRBSS TO TRQ1 #
  115. TRQ1$WD1[II+1]=TRB$WD1[0];
  116. TRQ1$WD2[II+1]=TRB$WD2[0];
  117. TRQ1$FDQ[II+1]=TRB$FDQ[0];
  118.  
  119. END # SSCATR #
  120.  
  121. TERM
cdc/nos2.source/nam5871/sscatr.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator