User Tools

Site Tools


cdc:nos2.source:nam5871:ns_pag

NS$PAG

Table Of Contents

  • [00006] PROC NS$PAG(ERRCODE)
  • [00007] NS$PAG - PROCESS HOP/PAGE COMMAND.
  • [00011] PROCESS HOP/PAGE COMMAND.
  • [00048] PROC NS$DBG
  • [00054] PROC EXREDUC
  • [00055] PROC MOVEOK
  • [00056] FUNC NS$FEC U
  • [00057] PROC NS$TKD
  • [00058] PROC TSBINFO

Source Code

NS$PAG.txt
  1. *DECK NS$PAG
  2. USETEXT COM$NS
  3. USETEXT ERR$NS
  4. USETEXT KDS$NS
  5. USETEXT SMB$NS
  6. PROC NS$PAG(ERRCODE); # PROCESS HOP/PAGE #
  7. # TITLE NS$PAG - PROCESS HOP/PAGE COMMAND. #
  8.  
  9. BEGIN # NS$PAG #
  10. #
  11. ** NS$PAG - PROCESS HOP/PAGE COMMAND.
  12. *
  13. * J.C. LEE 1981
  14. *
  15. * THIS ROUTINE PROCESS HOP/PAGE COMMAND.
  16. *
  17. * PROC NS$PAG(ERRCODE)
  18. *
  19. * ENTRY:
  20. * NONE.
  21. *
  22. * EXIT:
  23. * ERRCODE.
  24. *
  25. * METHOD:
  26. * IF K-DISPLAY ASSIGNED:
  27. * IF HOP CHARACTER = "-":
  28. * SET PAGE-WAIT TO FALSE.
  29. * IF HOP CHARACTER = "+":
  30. * SET PAGE-WAIT TO TRUE.
  31. * ELSE, FLAG ERROR.
  32. * IF ERRCODE = 0:
  33. * ACCESS PAGE-WAIT BUFFER.
  34. * IF PAGE-WAIT BUFFER LINE COUNT NQ 0:
  35. * SEND LINES TO K-DISPLAY BUFFER.
  36. * UPDATE PAGE-WAIT BUFFER WORD-COUNT.
  37. * CALL TSB MANAGER TO REDUCE PAGE-WAIT BUFFER
  38. * SIZE BY NUMBER OF WORDS SENT TO K-DISPLAY.
  39. * ELSE, FLAG ERROR.
  40. *
  41. #
  42.  
  43. ITEM ERRCODE U; # ERROR CODE #
  44.  
  45. $BEGIN
  46. XREF
  47. BEGIN
  48. PROC NS$DBG; # TRACE PROC CALL #
  49. END
  50. $END
  51.  
  52. XREF
  53. BEGIN
  54. PROC EXREDUC; # REDUCE TSB SIZE #
  55. PROC MOVEOK; # ALLOW MOVE #
  56. FUNC NS$FEC U; # FORMAT ERROR CODE #
  57. PROC NS$TKD; # MANAGE K-DISPLAY #
  58. PROC TSBINFO; # TSB INFORMATION #
  59. END
  60.  
  61. DEF CHAR$MINUS # "-" #;# MINUS IN DISPLAY CODE #
  62. DEF CHAR$PLUS # "+" #;# PLUS IN DISPLAY CODE #
  63.  
  64. ITEM PWBLC U; # PAGE WAIT BUFFER LINE COUNT #
  65. ITEM PWBTSBN U; # PAGE WAIT BUFFER TSB NUMBER #
  66. ITEM PWBWC U; # PAGE WAIT BUFFER WORD COUNT #
  67. ITEM TSBFWA U; # TSB FWA #
  68. ITEM TSBSIZE U; # TSB SIZE #
  69.  
  70. BASED ARRAY PWB[0:0]P(1);
  71. BEGIN # PAGE WAIT BUFFER #
  72. ITEM PWBLINES U(00,00,60);
  73. END
  74.  
  75. CONTROL EJECT;
  76.  
  77. $BEGIN
  78. NS$DBG("PAG"); # TRACE CALL #
  79. $END
  80.  
  81. IF DCW$F$ASS[0]
  82. THEN # K-DISPLAY IS ASSIGNED #
  83. BEGIN
  84. IF HOPPC[0] EQ CHAR$MINUS
  85. THEN # HOP PAGE CHARACTER IS "-" #
  86. DCW$F$PWM[0] = FALSE; # TURN PAGE WAIT TO OFF #
  87.  
  88. ELSE
  89. BEGIN
  90. IF HOPPC[0] EQ CHAR$PLUS
  91. THEN # HOP PAGE CHARACTER IS "+" #
  92. DCW$F$PWM[0] = TRUE; # TURN PAGE WAIT TO ON #
  93.  
  94. ELSE # NAM ERROR, ILLEGAL PAGE CHARACTER #
  95. ERRCODE = NS$FEC(EC"ERR$SM", SMEC"HSM$HOPSM");
  96. END
  97.  
  98. IF ERRCODE EQ 0
  99. THEN
  100. BEGIN # TURN PAGE VIA PAGE WAIT BUFFER #
  101. DCW$F$PAGE[0] = FALSE; # CLEAR PAGE FULL FLAG #
  102. DCW$LC[0] = 0; # SET NAM K DISPLAY LINE COUNT TO ZERO #
  103. PWBTSBN = DCW$PWBTSB[0]; # PAGE WAIT BUFFER TSB NUMBER #
  104. TSBINFO(TSBSIZE,TSBFWA,PWBTSBN); # LOACATE PAGE WAIT BUFFER #
  105. P<PWB$BUFFER> = 0;
  106. PWBLC = PWB$LC[TSBFWA]; # PAGE WAIT BUFFER LINE COUNT #
  107. PWBWC = PWB$WC[TSBFWA] - PWB$HDRL; # PWB WORD COUNT #
  108.  
  109. IF PWBLC NQ 0
  110. THEN # LINES EXIST IN PAGE WAIT BUFFER #
  111. BEGIN # MOVE LINES TO K DISPLAY BUFFER KDB #
  112. P<PWB> = TSBFWA + PWB$HDRL; # FWA OF FIRST LINE IN PWB #
  113. NS$TKD(PWB,PWBWC,PWBLC);
  114. EXREDUC(PWBWC,PWBTSBN,FALSE,TSBFWA);
  115. PWB$LC[TSBFWA] = 0; # PWB NOW HAS A HEADER ONLY #
  116. PWB$WC[TSBFWA] = PWB$HDRL;
  117. END
  118.  
  119. MOVEOK(PWBTSBN); # ALLOW PAGE WAIT BUFFER TO MOVE #
  120. END
  121.  
  122. END
  123.  
  124. ELSE
  125. BEGIN # K-DISPLAY NOT ASSIGNED - SET ERROR CODE #
  126. ERRCODE = NS$FEC(EC"ERR$SM", SMEC"HSM$HOPSM");
  127. END
  128.  
  129. RETURN;
  130. END # HS$PAG PROC #
  131.  
  132. TERM
cdc/nos2.source/nam5871/ns_pag.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator