User Tools

Site Tools


cdc:nos2.source:nam5871:csoahl

CSOAHL

Table Of Contents

  • [00005] PROC CSOAHL
  • [00006] CSOAHL - ADD HISTORY LINES
  • [00010] ADD HISTORY LINES.
  • [00035] PROC SSTETS
  • [00036] PROC SSTRTS
  • [00037] PROC MOVE

Source Code

CSOAHL.txt
  1. *DECK CSOAHL
  2. USETEXT TEXTCS;
  3. USETEXT TEXTSS;
  4. USETEXT TXTAPSS
  5. PROC CSOAHL;
  6. # TITLE CSOAHL - ADD HISTORY LINES #
  7.  
  8. BEGIN # CSOAHL #
  9. #
  10. ** CSOAHL - ADD HISTORY LINES.
  11. *
  12. * C. BRION 82/05/19.
  13. * D.K. ENDO 83/02/17 ADD FILTERED HISTORY.
  14. *
  15. * THIS PROCEDURE RECEIVES HISTORY EVENT LINES AND ADDS THEM TO THE
  16. * THE HISTORY BUFFER.
  17. *
  18. * PROC CSOAHL
  19. *
  20. * ENTRY
  21. * WCBWORD[0] = ENTRY WORD COUNT
  22. * MSGBUF[0] = TEXT LINE TO ADDED TO THE HISTORY BUFFER.
  23. *
  24. * EXIT
  25. * HISTORY BUFFER UPDATED WITH NEW TEXT LINE.
  26. *
  27. #
  28.  
  29. #
  30. **** PROC CSOAHL XREF LIST.
  31. #
  32.  
  33. XREF
  34. BEGIN
  35. PROC SSTETS; # SS-ENLARGE TABLE SPACE #
  36. PROC SSTRTS; # SS-RELEASE TABLE SPACE #
  37. PROC MOVE; # MACREL-MOVE MEMORY #
  38. END
  39. #
  40. ****
  41. #
  42.  
  43. #
  44. * PROC CSOAHL ITEMS.
  45. #
  46.  
  47. ITEM ENTCNT I; # ENTRY COUNT #
  48. ITEM NENTLOC U; # LOC OF NEXT ENTRY INTO BUF #
  49. ITEM NENTSIZ U; # NUM WORDS IN NEW ENTRY LINE#
  50.  
  51.  
  52.  
  53.  
  54. #
  55. * PROC CSOAHL EXECUTION STARTS HERE
  56. #
  57.  
  58. #
  59. * HISTORY BUFFER MAY BE FULL. IF SO, REMOVE THE OLDEST EVENT LINE
  60. * ENTRY FROM THE BUFFER.
  61. #
  62.  
  63. ENTCNT = HBFQL/HBFESIZ$;
  64. IF ENTCNT EQ MXHSBLCNT$
  65. THEN
  66. BEGIN
  67.  
  68. #
  69. * BUFFER FULL. REMOVE THE FIRST ENTRY.
  70. #
  71.  
  72. SSTRTS(P<HBFQ>,0,HBFESIZ$); # RELEASE OLDEST ENTRY #
  73. ENTCNT = ENTCNT - 1;
  74. END
  75.  
  76. #
  77. * NOW MUST ADD EVENT LINE IN MSGBUF TO THE HISTORY BUFFER.
  78. * ALLOCATE EXTRA SPACE FOR NEXT ENTRY.
  79. #
  80.  
  81. NENTLOC = HBFQL;
  82. SSTETS(P<HBFQ>,NENTLOC,HBFESIZ$);
  83.  
  84. #
  85. * MOVE NEXT ENTRY LINE INTO BUFFER.
  86. #
  87.  
  88. NENTSIZ = WCB$WC[0] - 2;
  89. ENTCNT = ENTCNT + 1;
  90. MOVE(NENTSIZ,MSGBUF[0],HBFQ[ENTCNT]);
  91.  
  92. #
  93. * SAVE THE AUDIENCE GROUP NUMBER, THE NPUCB ORDINAL, AND THE WORD
  94. * COUNT IN THE ENTRY.
  95. #
  96.  
  97. HBF$AGRP[ENTCNT] = ABHADR[0];
  98. HBF$NORD[ENTCNT] = ABHABN[0];
  99. HBF$WC[ENTCNT] = NENTSIZ;
  100.  
  101. END # CSOAHL #
  102.  
  103. TERM
cdc/nos2.source/nam5871/csoahl.txt · Last modified: 2023/08/05 17:21 by Site Administrator