User Tools

Site Tools


cdc:nos2.source:nam5871:kpclnup

KPCLNUP

Table Of Contents

  • [00012] PRGM KPCLNUP
  • [00072] PROC BLINK
  • [00073] PROC CONSOL
  • [00074] PROC OSCHAPP
  • [00075] PROC MRELS
  • [00076] PROC MGETS
  • [00077] PROC XTRACE

Source Code

KPCLNUP.txt
  1. *DECK KPCLNUP
  2. USETEXT NIPDEF
  3. USETEXT AHEADER
  4. USETEXT AT
  5. USETEXT PT
  6. USETEXT DRHDR
  7. USETEXT DISTAIL
  8. USETEXT KDIS
  9. USETEXT KHDRX
  10. USETEXT KINITBF
  11. USETEXT SUPMSG
  12. PRGM KPCLNUP ;
  13. STARTIMS;
  14. #
  15. *1DC KPCLNUP
  16. *
  17. * 1. PROC NAME AUTHOR DATE
  18. * KPCLNUP A. BEN-ARTZI 81/12/02
  19. *
  20. * 2. FUNCTIONAL DESCRIPTION.
  21. *
  22. * CLEANS UP WHATEVER IS LEFT AFTER QUITING FROM K-DISPLAY.
  23. *
  24. * RELEASE ALL GARBAGE BUFFERS,INITIATE THE SCREEN (SEE IKDIS)
  25. *
  26. * 3. METHOD USED
  27. *
  28. * GET THE CHAIN POINTERS FROM KDIS. GO OVER POINTERS AND
  29. * RELEASE BUFFERS. THEN REQUEST NEW BUFFER TO INITIATE BLANK
  30. * SCREEN.
  31. *
  32. * 4. ENTRY PARAMETERS
  33. *
  34. * NONE.
  35. *
  36. * 5. EXIT PARAMETERS
  37. *
  38. * NONE.
  39. *
  40. * 6. COMDECKS CALLED AND SYMPL TEXT USED
  41. *
  42. * NIPDEF DRHDR KDIS KINITBF
  43. * SUPMSG AHEADER AT PT
  44. * DISTAIL KHDRX OSSIZE
  45. *
  46. * 7. ROUTINES AND OVERLAYS CALLED
  47. *
  48. * CONSOL - EXECUTE NOS CONSOLE MACRO
  49. * MRELS - RELEASE BUFFER SPACE
  50. * BLINK - LINK MESSAGE ON DATA RING
  51. * OSCHAPP - SCHEDULE APPLICATION
  52. * MGETS - ALLOCATE BUFFER
  53. * XTRACE - TRACE PROCEDURE CALL
  54. *
  55. *
  56. *
  57. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  58. *
  59. * THIS SECONDARY OVERLAY IS CALLED BY KPTYPIN.
  60. * W A R N I N G-THIS PROGRAM CANNOT EXCEED THE SECONDARY
  61. *CALL OSSIZE
  62. *
  63. *
  64. *
  65.  #
  66. STOPIMS;
  67. #
  68.   EXTERNAL VARIABLES
  69. #
  70. XREF
  71. BEGIN
  72. PROC BLINK ;
  73. PROC CONSOL; # EXECUTE NOS CONSOLE MACRO #
  74. PROC OSCHAPP ;
  75. PROC MRELS;
  76. PROC MGETS;
  77. PROC XTRACE;
  78. LABEL RJMAIN ;
  79. END
  80. ITEM KINDEX I = 0 ; # LOCAL COUNTER #
  81. ITEM KBLANK C(10) = O"55555555555555550000"; # BLANK #
  82. ITEM KNEXT U;
  83. ITEM KADDR I; # HOLDS THE ADDRESS OF A NEW BUFFER #
  84. BEGIN
  85.  
  86. CONTROL IFEQ DEBUG,1;
  87. XTRACE("KPCLN");
  88. CONTROL FI;
  89.  
  90. KDAPNM[0] = "NAM";
  91. KREPEAT[0]=" ";
  92. #
  93.   AND UPDATE ALL STATUS FLAGS TO RESET STATE
  94. #
  95. KDBK[0]=FALSE;
  96. KDNI[0]=TRUE;
  97. KDST[0]=FALSE;
  98. IF KDDAYF[0]
  99. THEN # K-DISPLAY TYPEINS ARE NOT BEING DAYFILED#
  100. BEGIN
  101. KDDAYF[0] = FALSE; # CHANGE BACK TO DAYFILING K-DISPLY TYPEIN#
  102. CONSOL(KDWDCON); # EXECUTE CONSOLE MACRO #
  103. END
  104. KDIS$STAT = 0; # CLEAR STATUS DISPLAY UPDATE INDICATOR #
  105. KDIS$RT = KDST[0] AND KFAST[0];
  106. #
  107.   BASE ON ORIGINAL BUFFER TO RE-FORMAT AND USE IT
  108. #
  109. BEGIN
  110. IF KDORIG[0]
  111. THEN # WE DID NOT RELEASED IT YET FROM RING #
  112. BEGIN
  113. IF NOT KDAM[0]
  114. THEN # NUM MODE - BLANK BUFFER AT BOTTOM #
  115. KADDR = KDBP[0] ;
  116. ELSE # APPLICATION MODE - BUFFER ON TOP #
  117. KADDR = KDFP[0] ;
  118. END
  119. ELSE
  120. KADDR = KORIGFP[0] ; # RESTORE IT FROM WHERE WE SAVED IT #
  121. END
  122. #
  123.   NOW BEFORE WE UPDATE KDFP AND KDBP TO THE NEW BUFFER WE USE THEM
  124.   FOR THE BUFFER COLLECTION.
  125. #
  126. FOR KINDEX = 0 WHILE KDFP[0] NQ LOC(KDFP[0]) DO
  127. BEGIN
  128. P<DRHDRWD> = KDFP[0];
  129. KNEXT = NEXTPTR[0]; # SAVE LOCATION OF NEXT DATA BUFFER #
  130. IF KDFP[0] NQ LOC(KHDRBP[0]) # NOT HEADER BLOCK #
  131. AND KDFP[0] NQ KADDR # NOT ORIGINAL BUFFER #
  132. THEN
  133. MRELS(KDFP[0]);
  134. KDFP[0] = KNEXT;
  135. END
  136. #
  137.   NOW RELEASE RIGHT KDISPLAY BUFFERS
  138. #
  139. FOR KINDEX = 0 WHILE KDRFP[0] NQ LOC(KDRFP[0]) AND KDRFP[0] NQ 0 DO
  140. BEGIN
  141. P<DRHDRWD> = KDRFP[0];
  142. KNEXT = NEXTPTR[0]; # SAVE LOCATION OF NEXT DATA BUFFER #
  143. MRELS(KDRFP[0]); # RELEASE BUFFER #
  144. KDRFP[0]=KNEXT;
  145. END
  146. KDRFP[0]=0;
  147. KDRBP[0]=0;
  148. KDRSTOP[0]=0;
  149. KDETAIL[0]=FALSE;
  150. KSHOW[0]=TRUE;
  151. KDRNXT[0]=1;
  152. #
  153.   PUT POINTERS IN HEADER
  154. #
  155. KDORIG[0]=TRUE;
  156. P<DRHDRWD> = KADDR;
  157. # #
  158. BLKID[0] = KDISIDVALUE ;
  159. BACKPTR[0] = LOC(KDBP[0]);
  160. NEXTPTR[0] = LOC(KDFP[0]);
  161. #
  162.   PUT INITIAL VALUES IN NEW BUFFER
  163. #
  164. P<KINITBF> = KADDR + BLKHSIZE+KHDRSIZE ;
  165. KERROR[KLSIZE-KERRL-2] = " ";
  166. KWORD[KLSIZE-3] = KBLANK ;
  167. K311[KLSIZE-2] = " ";
  168. KREADY[KLSIZE-2] = "READY..";
  169. K312[KLSIZE-2] = 0;
  170. KDSTAIL[KLSIZE-1] = LOC(KDTLNAM)+1;
  171. K7777[KLSIZE-1] = O"7777" ;
  172. #
  173.   POINT WITH START-OF-DATA-POINTER TO TOP SCREEN
  174. #
  175. KDLSTOP[0] = KADDR + BLKHSIZE+KHDRSIZE ;
  176. # #
  177. KDFP[0] = KADDR;
  178. KDBP[0] = KADDR;
  179. # #
  180. IF KDAM[0]
  181. THEN
  182. BEGIN
  183. KDAM[0]=FALSE;# BACK TO NAM MODE #
  184.  
  185. IF ATACBA[KDAN[0]] NQ 0 # APPLICATION STILL THERE #
  186. AND NOT ATNVFN[KDAN[0]] # APPLICATION NOT NETOFFED #
  187. AND NOT ATNVFF[KDAN[0]] # APPLICATION NOT FAILED #
  188. THEN # LINK HOP/END TO TERMINATE K DISPLAY ASSIGNMENT #
  189. BEGIN
  190. MGETS(LHOPEND+BLKHSIZE+ABHSIZE,KADDR,TRUE) ;
  191. #
  192.   BUILD THE HOP/END BLOCK
  193. #
  194. P<SUPMSG>=KADDR+BLKHSIZE+ABHSIZE;
  195. P<AHEADER> = KADDR+BLKHSIZE;# BASE APPLICATION HEADER #
  196. PFCSFC[0] = HOPENDD ; # SET FUNCTION CODE #
  197. ABHTLC[0]=LHOPEND; # LENGTH OF MESSAGE #
  198. ABHABT[0]=APPCMD; # THIS IS A COMMAND BLOCK #
  199. ABHACT[0]=CT60TRANS; #CHARACTER TYPE #
  200. ABHABN[0]=0;
  201. ABHADR[0]=0;
  202. HOPBN[0] = KLASTBN[0]; # LAST ABN FROM HOP/DIS/U #
  203. KLASTBN[0] = 0 ;
  204. BLINK(KADDR,ATACBA[KDAN[0]]) ;
  205. OSCHAPP (ATACBA[KDAN[0]]) ;
  206. END
  207. END
  208. KDAN[0] = 0 ;
  209. GOTO RJMAIN ;
  210. END
  211. TERM
cdc/nos2.source/nam5871/kpclnup.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator