User Tools

Site Tools


cdc:nos2.source:nam5871:sstaqe

SSTAQE

Table Of Contents

  • [00003] PROC SSTAQE(P$TABL$,WC,HEAD,ENTRYQ)
  • [00004] SSTAQE - ACCEPT QUEUE ENTRY.
  • [00008] ACCEPT QUEUE ENTRY.
  • [00055] PROC SSTATS
  • [00056] PROC MOVEI
  • [00057] PROC SSSAWR

Source Code

SSTAQE.txt
  1. *DECK SSTAQE
  2. USETEXT TEXTSS
  3. PROC SSTAQE(P$TABL$,WC,HEAD,ENTRYQ);
  4. # TITLE SSTAQE - ACCEPT QUEUE ENTRY. #
  5.  
  6. BEGIN # SSTAQE #
  7. #
  8. ** SSTAQE - ACCEPT QUEUE ENTRY.
  9. *
  10. * F. HOU. 81/09/09.
  11. *
  12. * THIS PROCEDURE ENTERS A NEW ENTRY INTO A FIFO QUEUE AND
  13. * MAKE A WORKLIST REQUEST IF THIS IS THE FIRST ENTRY.
  14. *
  15. * PROC SSTAQE(P$TABL$,WC,HEAD,ENTRYQ)
  16. *
  17. * ENTRY P$TABL$ = BASED ARRAY POINTER FOR TABLE TABL.
  18. * WC = WORD COUNT WORD FOR NEW ENTRY.
  19. * HEAD = HEADER WORD FOR NEW ENTRY.
  20. * ENTRYQ = ARRAY OF WC-2 WORDS TO BE ADDED TO QUEUE.
  21. *
  22. * EXIT A NEW ENTRY HAS BEEN ACCEPTED TO THE QUEUE.
  23. *
  24. * NOTES NONE.
  25. *
  26. * METHOD
  27. *
  28. * ALLOCATES TABLE SPACE FOR NEW ENTRY.
  29. * MOVES THE NEW ENTRY TO THE ALLOCATED TABLE SPACE OF TABL.
  30. * IF TABL WAS EMPTY BEFORE THE MOVE, CALL SSSAWR TO ACCEPT
  31. * WORKLIST REQUEST WITH WORKLIST NUMBER CORRESPONDING TO TABL.
  32. *
  33. #
  34.  
  35. ITEM P$TABL$ I; # BASED ARRAY POINTER FOR QUEUE TABL. #
  36. ITEM HEAD I; # HEADER WORD FOR NEW ENTRY. #
  37.  
  38. ARRAY WC [0:0] S(1); # WORD COUNT WORD FOR NEW ENTRY. #
  39. BEGIN
  40. ITEM WC$WORD U(00,00,60); # OVERLAPPING WORD #
  41. ITEM WC$CNT U(00,48,12); # 12 BIT WORD COUNT #
  42. END
  43.  
  44. ARRAY ENTRYQ[0:0] S(1); # ARRAY OF WC-2 WORDS TO BE ADDED. #
  45. BEGIN
  46. ITEM ENTRYQQ U(00,00,60);
  47. END
  48.  
  49. #
  50. **** PROC SSTAQE - XREF LIST.
  51. #
  52.  
  53. XREF
  54. BEGIN
  55. PROC SSTATS; # ALLOCATE TABLE SPACE. #
  56. PROC MOVEI; # MOVE BLOCK OF CENTRAL MEMORY WORDS. #
  57. PROC SSSAWR; # ACCEPT WORKLIST REQUEST. #
  58. END
  59.  
  60. #
  61. ****
  62. #
  63.  
  64. ITEM COUNT I; # WORD COUNT FOR ENTRY TO MOVE. #
  65. ITEM FROM I; # FIRST WORD ADDRESS OF FROM BLOCK #
  66. ITEM INDEX I; # INDEX OF QWD-QUEUE TO WORKLIST DEF TABLE#
  67. ITEM TABLEN I; # LENGTH OF TABL #
  68. ITEM TO I; # FIRST WORD ADDRESS OF TO BLOCK #
  69. ITEM WLN I; # WORKLIST NUMBER #
  70.  
  71. BASED ARRAY TEMP [0:0] S(2); # TEMP FOR GETTING LENGTH OF TABL #
  72. BEGIN
  73. ITEM TEMP$F U(00,00,60); # FOR WC #
  74. ITEM TEMP$S U(01,00,60); # FOR HEAD #
  75. END
  76.  
  77.  
  78.  
  79.  
  80.  
  81. $BEGIN # INCREMENT COUNT FOR STATISTICS #
  82. SVT$VAL[SVL"AQE"] = SVT$VAL[SVL"AQE"] + 1;
  83. $END
  84.  
  85.  
  86. P<TEMP>=LOC(P$TABL$)+1; # SAVE CURRENT LENGTH OF TABL IN TABLEN #
  87. TABLEN=TEMP$F[0];
  88.  
  89. SSTATS(P$TABL$,WC$CNT[0]); # ALLOCATE TABLE SPACE #
  90.  
  91. P<TEMP>=P$TABL$+TABLEN; # SET TEMP POINTER TO THE END OF TABL #
  92. TEMP$F[0]=WC$WORD[0]; # MOVE WORD COUNT #
  93. TEMP$S[0]=HEAD; # MOVE HEAD #
  94.  
  95. COUNT=WC$CNT[0]-2; # WORD COUNT FOR ENTRY PORTION #
  96. FROM=LOC(ENTRYQ); # FIRST WORD ADDRESS OF FROM BLOCK #
  97. TO=P$TABL$+TABLEN+2; # FIRST WORD ADDRESS OF TO BLOCK #
  98. MOVEI(COUNT,FROM,TO); # MOVE ENTRY PORTION TO QUEUE #
  99.  
  100. IF(TABLEN EQ 0) # EMPTY QUEUE CASE #
  101. THEN
  102. BEGIN
  103. INDEX=(LOC(P$TABL$)-SSMEM)/2-1; #TRANSLATE FROM P$TABL$ TO WLN #
  104. WLN=QWD$WLN[INDEX]; # WORKLIST NUMBER #
  105. SSSAWR(WLN); # ACCEPT WORKLIST REQUEST #
  106. END
  107.  
  108. END # SSTAQE #
  109.  
  110. TERM
cdc/nos2.source/nam5871/sstaqe.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator