User Tools

Site Tools


cdc:nos2.source:nam5871:kright

KRIGHT

Table Of Contents

  • [00007] PRGM KRIGHT
  • [00097] PROC MGETS
  • [00098] PROC XTRACE

Source Code

KRIGHT.txt
  1. *DECK KRIGHT
  2. USETEXT NIPDEF
  3. USETEXT DRHDR
  4. USETEXT KDIS
  5. USETEXT KINITBF
  6. USETEXT KSTTAB
  7. PRGM KRIGHT;
  8. STARTIMS;
  9. #
  10. *1DC KRIGHT
  11. *
  12. * 1.PROC NAME AUTHOR DATE
  13. * KRIGHT M.GIBIAN 84/01/26
  14. *
  15. * 2.FUNCTIONAL DESCRIPTION
  16. * DISPLAY NEXT PAGE OF NIPS RIGHT KDISPLAY
  17. *
  18. * 3.METHOD USED
  19. * IF BUFFER IS NOT IN PLACE YET, GENERATE IT.
  20. * IF HELP WAS ENTERED, COPY DETAILED HELP TO BUFFER
  21. * ELSE COPY SUMMARY HELP TO BUFFER
  22. * INCREMENT NEXT RIGHT LINE TO DISPLAY BY RIGHT PAGE LENGTH
  23. *
  24. * 4.ENTRY PARAMETERS
  25. *
  26. * 5.OUTPUT PARAMETERS
  27. *
  28. * 6.COMDECKS AND TEXTS USED.
  29. * NIPDEF KDIS
  30. *
  31. * 7.ROUTINES CALLED.
  32. *
  33. * 8.DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  34. * MUST FIT IN SECONDARY OVERLAY
  35. *
  36. #
  37. STOPIMS;
  38.  
  39. ITEM KADDR U; # ADDRESS OF NEW BUFFER #
  40. ITEM I I; # LOOP VARIABLE #
  41. ITEM J I;
  42. ITEM K I;
  43.  
  44. BASED ARRAY MOVEIT S(1);
  45. BEGIN
  46. ITEM MOVEWRD C(0,0,10);
  47. END
  48.  
  49. BASED ARRAY GETIT S(1);
  50. BEGIN
  51. ITEM GETWRD C(0,0,10);
  52. END
  53.  
  54. DEF KHELPSZ#31#;
  55.  
  56. ARRAY KHELPARY [1:KHELPSZ] S(6);
  57. BEGIN
  58. ITEM KHELP C(0,0,58)=
  59. [" USING THE NAM K-DISPLAY",
  60. "THE NAM K-DISPLAY IS EITHER IN NAM MODE OR APPLICATION",
  61. "MODE. THE FOLLOWING COMMANDS ARE AVAILABLE IN NAM AND",
  62. "SUPERVISORY (NS,CS,NVF) APPLICATION MODE:",
  63. " *NAM*",
  64. "AP START APPL MODE MO REFRESH SPEED",
  65. "DB DEBUG ON SE SEND MSG TO HOP",
  66. "DE DEBUG OFF ST DISPLAY STATUS",
  67. "DU DUMP MEMORY END EXIT K DISPLAY",
  68. "FL CHANGE MAX FL + PAGE FORWARD",
  69. "IG IGNORE ALERT - PAGE BACKWARD",
  70. "LB BEGIN LOGGING HELP MORE NAM HELP",
  71. "LE END LOGGING ( RIGHT PAGE FORWARD",
  72. "LR RELEASE LOG FILE",
  73. " *CS*",
  74. "CO CONTROL NPU IN DISPLAY NPU INFO",
  75. "DI DISABLE TR/LL//LI/TE LO RESTART NPU",
  76. "DU SET NPU DUMP FLAG SE SEND MSG TO USERS",
  77. "EN ENABLE TR/LL/LI/TE ST STATUS NP/CP/TR/LL/LI/TE",
  78. "GO START NPU TS RUN DIAGNOSTICS",
  79. "HI DISPLAY HISTORY",
  80. " *NS*",
  81. "FI CHANGE LOAD FILE NO NEGATE FI COMMAND",
  82. "HI DISPLAY HISTORY ST STATUS NPU LOAD",
  83. " *NVF*",
  84. "DI DISABLE HOST/APPL HI DISPLAY HISTORY",
  85. "EN ENABLE APPLICATION ST STATUS APP/TE/UNS",
  86. "ID IDLE HOST/APPL",
  87. " *CS,NS,NVF*",
  88. "+ LEFT PAGING ON/TURN PAGE - PAGING OFF ",
  89. "* RETURN TO NAM MODE ( RIGHT PAGE FORWARD"];
  90. END
  91.  
  92. #
  93.   EXTERNAL REFERENCES
  94. #
  95. XREF
  96. BEGIN
  97. PROC MGETS;
  98. PROC XTRACE;
  99. LABEL RJMAIN;
  100. END
  101.  
  102. BEGIN
  103. CONTROL IFEQ DEBUG,1;
  104. XTRACE("KRIGH");
  105. CONTROL FI;
  106.  
  107. IF KDRFP[0] EQ 0 THEN # ALLOCATE RIGHT DISPLAY BUFFER #
  108. BEGIN
  109.  
  110. MGETS((KRSIZE[0]*KSTBLK)+1+BLKHSIZE+KHDRSIZE,KADDR,TRUE);
  111.  
  112. KDRFP[0]=KADDR;
  113. KDRBP[0]=KADDR;
  114. P<DRHDRWD> = KADDR;
  115. BLKID[0] = KDISIDVALUE;
  116. BACKPTR[0] = LOC(KDRBP[0]);
  117. NEXTPTR[0] = LOC(KDRFP[0]);
  118.  
  119. P<KINITBF> = 0;
  120. KDTYPE[KADDR+BLKHSIZE] = KDISTYPE;
  121. KDSTAIL[KADDR+BLKBS[0]-1]=0;
  122. K7777[KADDR+BLKBS[0]-1]=0;
  123. P<KSTTAB> = KADDR+BLKHSIZE+KHDRSIZE;
  124. KDRSTOP[0] = P<KSTTAB>;
  125. END
  126. ELSE
  127. P<KSTTAB> = KDRSTOP[0];
  128.  
  129. #
  130.   NOW DISPLAY NEXT PAGE OF RIGHT DISPLAY LINES
  131. #
  132. FOR I=0 STEP 1 WHILE (I LQ KRSIZE[0]-1) AND (KDRNXT+I LQ KHELPSZ)
  133. DO
  134. BEGIN
  135. P<GETIT>=LOC(KHELP[KDRNXT+I]);
  136. P<MOVEIT>=LOC(KSTDATA[I]);
  137. FOR J=0 STEP 1 UNTIL 5 DO
  138. MOVEWRD[J]=GETWRD[J];
  139. KSTEND[I] = 0;
  140. END
  141. #
  142.   COMPUTE FIRST LINE OF NEXT PAGE
  143. #
  144. KDRNXT[0]=KDRNXT[0]+KRSIZE[0]-1;
  145. IF KDRNXT[0] GQ KHELPSZ THEN
  146. KDRNXT[0]=1;
  147. ELSE
  148. BEGIN
  149. KDRNXT[0]=KDRNXT[0]-2;
  150. I=I-2;
  151. END
  152. #
  153.   BLANK REMAINING PART OF PAGE
  154. #
  155. FOR J=I STEP 1 UNTIL KRSIZE[0]-1 DO
  156. BEGIN
  157. P<MOVEIT>=LOC(KSTDATA[J]);
  158. FOR K=0 STEP 1 UNTIL 5 DO
  159. MOVEWRD[K]=" ";
  160. KSTEND[J]=0;
  161. END
  162. #
  163.   PUT -MORE- ON BOTTOM RIGHT IF NOT LAST PAGE
  164. #
  165. IF KDRNXT[0] NQ 1 THEN
  166. BEGIN
  167. P<MOVEIT>=LOC(KSTDATA[KRSIZE[0]-1]);
  168. MOVEWRD[5]="MORE";
  169. KSTEND[KRSIZE[0]-1]=0;
  170. END
  171.  
  172. KSHOW[0]=FALSE;
  173. GOTO RJMAIN;
  174. END
  175. TERM
cdc/nos2.source/nam5871/kright.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator