User Tools

Site Tools


cdc:nos2.source:nam5871:ssocol

SSOCOL

Table Of Contents

  • [00003] PROC SSOCOL (SWTESS)
  • [00004] SSOCOL - CONTROL OVERLAY LOADING.
  • [00008] CONTROL OVERLAY LOADING.
  • [00041] PROC ABORT
  • [00042] PROC MESSAGE
  • [00043] PROC READ
  • [00044] PROC RECALL
  • [00045] PROC SSSAWR
  • [00046] PROC SSTSDA
  • [00077] OVLST - STATES ALLOWED FOR THE OVERLAY LOADER.

Source Code

SSOCOL.txt
  1. *DECK SSOCOL
  2. USETEXT TEXTSS
  3. PROC SSOCOL (SWTESS);
  4. # TITLE SSOCOL - CONTROL OVERLAY LOADING. #
  5.  
  6. BEGIN # SSOCOL #
  7. #
  8. ** SSOCOL - CONTROL OVERLAY LOADING.
  9. *
  10. * S. H. FISCHER. 82/05/20.
  11. *
  12. * THIS ROUTINE CONTROLS THE LOADING AND EXECUTION OF OVERLAYS.
  13. *
  14. * PROC SSOCOL (SWTESS)
  15. *
  16. * ENTRY:
  17. * SWTESS = STATUS WORKLIST MONITOR ARRAY.
  18. *
  19. * EXIT:
  20. * RETURN PARAMETERS SET DEPENDING ON WHAT EVENT IS TO
  21. * RESTART THIS ROUTINE.
  22. *
  23. * METHOD:
  24. * WHEN AN OVERLAY IS NEEDED TO BE EXECUTED, THE REQUIRED MEMORY
  25. * IS REQUESTED FROM THE TABLE MANAGER, THE OVERLAY LOADED VIA CIO
  26. * FROM THE OVERLAY FILE AND A WORKLIST REQUEST MADE TO EXECUTE
  27. * THE OVERLAY. WHEN THE OVERLAY HAS COMPLETED EXECUTION, ANOTHER
  28. * OVERLAY IS LOADED IF A REQUEST WAS QUEUED OR THE OVERLAY AREA
  29. * RETURNED TO THE TABLE MANAGER.
  30. *
  31. #
  32.  
  33.  
  34.  
  35.  
  36. #
  37. **** PROC SSOCOL - XREF LIST.
  38. #
  39. XREF
  40. BEGIN
  41. PROC ABORT; # ABORT JOB (MACREL) #
  42. PROC MESSAGE; # ISSUE DAYFILE MESSAGE (MACREL) #
  43. PROC READ; # RANDOM READ TO CIO BUFFER #
  44. PROC RECALL; # RETURNS CONTROL WHEN COMPLETE BIT IS SET#
  45. PROC SSSAWR; # ACCEPT WORKLIST REQUESTS #
  46. PROC SSTSDA; # SET DYNAMIC BASE ADDRESS #
  47. END
  48. #
  49. ****
  50. #
  51.  
  52. *CALL SWTESS
  53.  
  54.  
  55. $BEGIN
  56. ARRAY LOADERR [00:00] S(2);
  57. BEGIN
  58. ITEM LE$TEXT C(00,00,18) = ["OVERLAY LOAD ERROR"];
  59. ITEM LE$ZERO U(01,48,12) = [0];
  60. END
  61. $END
  62.  
  63.  
  64. ARRAY MREQ[00:00] S(1);
  65. BEGIN
  66. ITEM MREQ$WD U(00,00,59);
  67. ITEM MREQ$C B(00,59,01); # COMPLETION BIT #
  68. END
  69.  
  70. ITEM ODTEC I; # OVERLAY DEFINITION TABLE ENTRY COUNT #
  71. ITEM NB I; # END OF OVERLAY #
  72. ITEM DONE B; # FLAG FOR SATISFIED MEMORY REQUEST #
  73. ITEM ODTINDX I; # LOOP INDUCTION VARIABLE #
  74.  
  75.  
  76. #
  77. ** OVLST - STATES ALLOWED FOR THE OVERLAY LOADER.
  78. *
  79. * THIS STATUS LIST DEFINES THE ALLOWED STATES FOR THE OVERLAY
  80. * PROCESSING.
  81. *
  82. #
  83. STATUS OVLST
  84. IDLE, # IDLE, NO OVERLAY REQUESTS AVAILABLE #
  85. WMEM, # WAIT MEMORY, NO SPACE AVAILABLE #
  86. WLOAD, # WAIT LOAD CONPLETION, CIO BUSY #
  87. WCOMP; # WAIT COMPLETION, STILL EXECUTING #
  88.  
  89. ITEM OVLSTATE S:OVLST = S"IDLE";
  90.  
  91. SWITCH OVLJMP:OVLST
  92. LIDLE:IDLE,
  93. LWMEM:WMEM,
  94. LWLOAD:WLOAD,
  95. LCOMP:WCOMP;
  96.  
  97.  
  98. CONTROL EJECT;
  99.  
  100.  
  101.  
  102.  
  103. GOTO OVLJMP[OVLSTATE];
  104.  
  105.  
  106.  
  107.  
  108. LIDLE:
  109. LCOMP:
  110.  
  111. # SCAN OVERLAY REQUEST TABLE FOR LOWEST NUMBERED OVERLAY TO LOAD. #
  112.  
  113. FOR ODTINDX = 1 STEP 1 WHILE (ODTINDX LQ NODT$)
  114. AND (ORT$MAP[ODTINDX] EQ 0 )
  115. DO
  116. BEGIN
  117. END
  118.  
  119. IF ODTINDX GR NODT$
  120. THEN
  121. BEGIN
  122.  
  123. # AT THIS POINT RELEASE THE OVERLAY AREA IF WE HAVE RESERVED CM. #
  124.  
  125. SSTSDA(LOADBASE,MREQ,DONE);
  126. FOR ODTINDX=ODTINDX WHILE NOT DONE
  127. DO
  128. BEGIN
  129. RECALL(MREQ);
  130. SSTSDA(LOADBASE,MREQ,DONE);
  131. END
  132.  
  133.  
  134. ORC = 0; # WAIT FOR NEXT OVERLAY REQUEST #
  135. OVLSTATE = OVLST"IDLE";
  136. STE$RTN = LOC(SSOCOL);
  137. STE$ADDR1 = LOC(ORC);
  138. STE$INIT1 = 0;
  139. STE$ADDR2 = 0;
  140. STE$INIT2 = 0;
  141. RETURN;
  142. END
  143.  
  144.  
  145. OVNUM = ODTINDX;
  146. MREQ$C = TRUE;
  147.  
  148. #
  149. * SEARCH EACPM (5400) TABLE FOR REQUIRED OVERLAY (MATCH ON PRIMARY
  150. * LEVEL NUMBER. GET RELATIVE PRU ADDRESS OF DESIRED OVERLAY.
  151. #
  152. ODTEC = EAC$DL[0] / 2; # NUM OF PRIMARY OVERLAY ENTRYS #
  153. FOR ODTINDX=0 STEP 1
  154. WHILE ODT$PLVL[ODTINDX] NQ OVNUM
  155. AND ODTINDX LS ODTEC
  156. DO # FIND REQUIRED OVERLAY DEF #
  157. BEGIN END
  158.  
  159. $BEGIN
  160. IF ODTINDX GQ ODTEC
  161. THEN
  162. BEGIN
  163. MESSAGE (LOADERR, 0);
  164. ABORT;
  165. END
  166. $END
  167.  
  168.  
  169.  
  170. LWMEM:
  171.  
  172. # KEEP MAKING MEMORY REQUESTS UNTIL MEMORY IS AVAILABLE #
  173.  
  174. OVLSTATE = OVLST"WMEM";
  175. NB = ODT$LWA[ODTINDX];
  176. SSTSDA( NB, MREQ, DONE );
  177.  
  178. IF NOT DONE
  179. THEN
  180. BEGIN
  181. STE$RTN = LOC(SSOCOL);
  182. STE$ADDR1 = LOC(MREQ);
  183. STE$INIT1 = MREQ$WD[0];
  184. STE$CBIT1 = FALSE;
  185. STE$ADDR1 = 0;
  186. STE$INIT2 = 0;
  187. RETURN;
  188. END
  189.  
  190.  
  191.  
  192.  
  193. # START OVERLAY LOAD. #
  194.  
  195. OF$LFN[0] = "OVLFILE";
  196. OF$CBIT[0] = TRUE;
  197. OF$R[0] = TRUE;
  198. OF$L[0] = OFSIZ$-5;
  199. OF$FIRST[0] = LOADBASE;
  200. OF$IN[0] = LOADBASE;
  201. OF$OUT[0] = LOADBASE;
  202. OF$LIMIT[0] = NB + O"101"; # INSURE ALL OF OVL IS READ #
  203.  
  204.  
  205. OF$RR[0] = ODT$PRU[ODTINDX];
  206.  
  207. READ (OVLFET);
  208.  
  209. OVLSTATE = OVLST"WLOAD";
  210.  
  211.  
  212.  
  213.  
  214. LWLOAD:
  215.  
  216. # WHEN LOAD IS COMPLETE, START EXECUTATION. #
  217.  
  218. IF NOT OF$CBIT[0]
  219. THEN
  220. BEGIN
  221. STE$RTN = LOC(SSOCOL);
  222. STE$ADDR1 = LOC(OVLFET);
  223. STE$INIT1 = OF$WORD[0];
  224. STE$CBIT1 = FALSE;
  225. STE$ADDR2 = 0;
  226. STE$INIT2 = 0;
  227. RETURN;
  228. END
  229.  
  230. $BEGIN
  231. IF OF$LNAT[0] NQ 0
  232. THEN
  233. BEGIN
  234. MESSAGE (LOADERR, 0);
  235. ABORT;
  236. END
  237. $END
  238.  
  239. SSSAWR(SSOEOPW); # EXECUTE OVERLAY #
  240.  
  241. SSOVLD = FALSE;
  242.  
  243. OVLSTATE = OVLST"WCOMP";
  244.  
  245. STE$RTN = LOC(SSOCOL);
  246. STE$ADDR1 = LOC(SSOVLD);
  247. STE$INIT1 = 0; # FALSE #
  248. STE$ADDR2 = 0;
  249. STE$INIT2 = 0;
  250. RETURN;
  251.  
  252.  
  253.  
  254.  
  255. END # SSOCOL #
  256.  
  257. TERM
cdc/nos2.source/nam5871/ssocol.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator