User Tools

Site Tools


cdc:nos2.source:nam5871:nvfibof

NVFIBOF

Table Of Contents

  • [00005] PROC NVFIBOF
  • [00006] BUILD OVERLAY FILE.
  • [00010] BUILD OVERLAY FILE.
  • [00030] PROC ABORT
  • [00031] PROC SSTRTS
  • [00032] PROC LOADREQ
  • [00033] PROC MOVEI
  • [00034] PROC MESSAGE
  • [00035] PROC RECALL
  • [00036] PROC SSTSDA
  • [00037] PROC WRITER
  • [00105] PROC GET$OVL
  • [00106] GET OVERLAY.
  • [00109] GET$OVL - GET OVERLAY.
  • [00246] PROC WRITOVL
  • [00247] WRITE OVERLAY.
  • [00250] WRITOVL - WRITE OVERLAY.

Source Code

NVFIBOF.txt
  1. *DECK NVFIBOF
  2. USETEXT TEXTNVF
  3. USETEXT TXINNVF
  4. USETEXT TEXTSS
  5. PROC NVFIBOF;
  6. # TITLE - BUILD OVERLAY FILE. #
  7.  
  8. BEGIN
  9. #
  10. ** NVFIBOF - BUILD OVERLAY FILE.
  11. *
  12. * D. K. ENDO. 82/06/15.
  13. * D. G. DEPEW. 82/06/25.
  14. *
  15. * THIS PROCEDURE INITIALIZES THE OVERLAY FILE BY LOADING THEM AND
  16. * THEN WRITING THEM TO FILE *OVLFILE*.
  17. *
  18. * PROC NVFIBOF
  19. *
  20. * ENTRY 1. NONE.
  21. *
  22. * EXIT 1. *OVLFILE* BUILT
  23. #
  24.  
  25. #
  26. **** PROC NVFIBOF - XREF LIST.
  27. #
  28. XREF
  29. BEGIN
  30. PROC ABORT; # CAUSES ABORT WHEN CALLED #
  31. PROC SSTRTS; # SS-RELEASE TABLE SPACE #
  32. PROC LOADREQ; # ISSUES LOAD REQUEST #
  33. PROC MOVEI; # MACREL - MOVE WORDS #
  34. PROC MESSAGE; # SENDS MESSAGE TO THE DAYFILE #
  35. PROC RECALL; # RETURNS CONTROL WHEN COMPLETE BIT SET #
  36. PROC SSTSDA; # SET DYNAMIC ADDRESS #
  37. PROC WRITER; # FLUSHES CIO BUFFER AND WRITES EOR #
  38. END
  39. #
  40. ****
  41. #
  42.  
  43.  
  44. DEF AAC$NAM # O"16260614010103" #; # A-A CONN OVLY (NVFLAAC) #
  45. DEF AAI$NAM # O"16260614110120" #; # A-A OUTCALL OVLY (NVFLIAP) #
  46. DEF AAR$NAM # O"16260614220120" #; # A-A INCALL OVLY (NVFLRAP) #
  47. DEF AEP$NAM # O"16260614010520" #; # APPL/EVT OVLY (NVFLAEP) #
  48. DEF OPC$NAM # O"16260614172003" #; # OPER CMD OVLY (NVFLOPC) #
  49. DEF OPE$NAM # O"16260614172005" #; # OPER EVT OVLY (NVFLOPE) #
  50.  
  51.  
  52. ITEM ADDLEN; # ADDITONAL LENGTH TO ADD TO OVERLAY #
  53. ITEM FWA; # FIRST WORD ADDRESS TO LOAD THE OVERLAY #
  54. ITEM LENGTH; # ADDITIONAL LEN OF OVLY #
  55. ITEM TO; # ADDRESS TO WHERE #
  56. ITEM I; # LOOP INDUCTION VARIABLE #
  57. ITEM ODTORD ; # OVLY DEFINITION TABLE ORDINAL FOR EVLY #
  58.  
  59.  
  60. #
  61. * THIS ARRAY CONTAINS THE NAME OF THE OVERLAY TO BE LOADED.
  62. #
  63. ARRAY OVN [00:00] S(1);
  64. BEGIN
  65. ITEM OVN$NAM C(00,00,07);
  66. ITEM OVN$NUM U(00,00,42);
  67. END
  68.  
  69. #
  70. * THIS BASED ARRAY IS USED TO DEFINE THE OUTCALL RECORD BASED ARRAY.
  71. * IT ACTUALLY DEFINES THE POINTER WORD AND LENGTH WORD OF THE OUTCALL
  72. * RECORD WHICH CONTAINS SEVERAL BLOCKS. THIS BASED ARRAY COINCIDES
  73. * WITH THE OUTREC BASED ARRAY IN THE COMMON BLOCK "NVFOUT" IN THE
  74. * TEXT TXOUTAA.
  75. #
  76.  
  77. BASED ARRAY OCALL [00:00] S(1);
  78. BEGIN
  79. ITEM OCA$OUT U(00,00,60);# PTR TO OUTCALL RECORD #
  80. ITEM OCA$OUTL U(01,00,60);# LEN OF OUTCALL RECORD #
  81. END
  82.  
  83. #
  84. * THIS BASED ARRAY DEFINES THE POINTER WORD AND LENGTH WORD OF THE
  85. * INCALL RECORD. IT COINCIDES WITH THE INREC BASED ARRAY DEF IN THE
  86. * TEXT TXINAA COMMON BLOCK NVFIN.
  87. #
  88.  
  89. BASED ARRAY ICALL [00:00] S(2);
  90. BEGIN
  91. ITEM ICA$IN U(00,00,60);# LOC PTR OF INCALL RECORD #
  92. ITEM ICA$INL U(01,00,60);# LEN OF THE INCALL RECORD #
  93. END
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103. CONTROL EJECT;
  104.  
  105. PROC GET$OVL;
  106. # TITLE - GET OVERLAY. #
  107. BEGIN
  108. #
  109. ** GET$OVL - GET OVERLAY.
  110. *
  111. * D.K. ENDO 82/06/15
  112. *
  113. * THIS PROCEDURE DOES AN INITIAL LOAD OF AN OVERLAY TO BE PREPARED
  114. * FOR WRITING TO THE OVERLAY FILE.
  115. *
  116. * PROC GET$OVL
  117. *
  118. * ENTRY 1. OVN$NAM[0] = OVERLAY NAME.
  119. * 2. ADDLEN = ADDITIONAL LENGTH TO BE ADDED TO THE OVL
  120. *
  121. * EXIT 1. ODTORD = OVERLAY DEFINITION TABLE ORDINAL FOR THE
  122. * OVERLAY LOADED.
  123. *
  124. #
  125.  
  126.  
  127.  
  128. ITEM DONE B; # MOVE MANAGED TABLES STATUS #
  129. ITEM MEMSTAT I; # MEMORY REQUEST STATUS WORD #
  130. ITEM NEED I; # TOTAL FIELD LENGTH NEEDED FOR LOAD #
  131.  
  132.  
  133. #
  134. * THIS ARRAY DEFINES THE MESSAGE SENT WHEN AN OVERLAY IS NOT FOUND.
  135. #
  136. ARRAY ONF$TXT [00:00] S(3);
  137. BEGIN
  138. ITEM ONF$NAME C(00,00,07);
  139. ITEM ONF$MSG C(00,42,18) =[" OVERLAY NOT FOUND"];
  140. ITEM ONF$ZBYT U(02,30,30) = [0];
  141. END
  142.  
  143.  
  144.  
  145.  
  146. #
  147. * THIS ARRAY DEFINES THE OVERLAY PARAMETER BLOCK USED BY
  148. * LOADREQ TO MAKE THE LOAD REQUEST.
  149. #
  150. ARRAY OPB [00:00] S(2);
  151. BEGIN
  152. ITEM OPB$NAME C(00,00,07);
  153. ITEM OPB$WRD1 I(00,00,60);
  154. ITEM OPB$LLL U(01,00,12);
  155. ITEM OPB$LO B(01,17,01);
  156. ITEM OPB$OLF B(01,18,01);
  157. ITEM OPB$LWA U(01,24,18);
  158. ITEM OPB$FWA U(01,42,18);
  159. ITEM OPB$WRD2 I(01,00,60);
  160. END
  161.  
  162.  
  163.  
  164. #
  165. * SEARCH THE 5400 TABLE FOR THE OVERLAY NAME.
  166. #
  167. FOR ODTORD =0 STEP 1 WHILE OVN$NAM[0] NQ ODT$NAME[ODTORD ] AND
  168. ODTORD LS EAC$DL[0]/2
  169. DO
  170. BEGIN
  171. END
  172.  
  173.  
  174. #
  175. * IF FOUND, THEN GET THE OVERLAY.
  176. #
  177. IF ODTORD LS EAC$DL[0]/2
  178. THEN
  179. BEGIN
  180.  
  181.  
  182. #
  183. * COMPUTE THE SPACE NEEDED TO LOAD THE OVERLAY. IF NOT ENOUGH ROOM,
  184. * THEN MOVE THE MANAGED TABLES UP TO MAKE ROOM. SET THE OVERLAY
  185. * PARAMETER BLOCK. LOAD THE OVERLAY.
  186. #
  187. LENGTH = ODT$LWA[ODTORD ] - ODT$FWA[ODTORD ];
  188. NEED = FWA + LENGTH + ADDLEN;
  189.  
  190. IF NEED GQ MEMLOC
  191. THEN
  192. BEGIN
  193. SSTSDA(NEED,MEMSTAT,DONE);
  194. FOR LENGTH=LENGTH WHILE NOT DONE
  195. DO
  196. BEGIN
  197. RECALL(MEMSTAT);
  198. SSTSDA(NEED,MEMSTAT,DONE);
  199. END
  200. END
  201.  
  202. OPB$WRD1[0] = 0;
  203. OPB$WRD2[0] = 0;
  204. OPB$LLL[0] = ODT$LVL[ODTORD ];
  205. OPB$LO[0] = LDI$LB[0];
  206. OPB$OLF[0] = TRUE;
  207. OPB$LWA[0] = NEED;
  208. OPB$FWA[0] = FWA;
  209. IF OPB$LO[0]
  210. THEN
  211. BEGIN
  212. OPB$NAME[0] = OVN$NAM[0];
  213. END
  214. ELSE
  215. BEGIN
  216. OPB$NAME[0] = LDI$NAME[0];
  217. END
  218.  
  219.  
  220. LOADREQ(OPB);
  221.  
  222.  
  223. ODT$LWA[ODTORD ] = ODT$LWA[ODTORD ] + ADDLEN;
  224. END
  225.  
  226. #
  227. * IF OVERLAY IS NOT FOUND, SEND MESSAGE TO DAYFILE AND ABORT.
  228. #
  229.  
  230. ELSE
  231. BEGIN
  232. ONF$NAME[0] = OVN$NAM[0];
  233. MESSAGE(ONF$TXT,0);
  234. ABORT;
  235. END
  236.  
  237.  
  238. END # GET$OVL #
  239.  
  240.  
  241.  
  242.  
  243.  
  244. CONTROL EJECT;
  245.  
  246. PROC WRITOVL;
  247. # TITLE - WRITE OVERLAY. #
  248. BEGIN
  249. #
  250. ** WRITOVL - WRITE OVERLAY.
  251. *
  252. * D.K. ENDO 82/06/16
  253. *
  254. * THIS PROCEDURE WRITES A GIVEN OVERLAY OUT TO *OVLFILE* AND SAVES
  255. * THE RANDOM SECTOR ADDRESS FOR THAT OVERLAY.
  256. *
  257. * PROC WRITOVL
  258. *
  259. * ENTRY 1. ODTORD = OVLY DEFINITION TBL ORDINAL FOR OVERLAY.
  260. *
  261. * EXIT 1. OVERLAY WRITTEN TO FILE *OVLFILE*.
  262. * 2. RANDOM SECTOR ADDRESS IN ODT ENTRY.
  263. *
  264. #
  265.  
  266.  
  267.  
  268. #
  269. * POINT THE FET TO THE OVERLAY TO BE WRITTEN.
  270. #
  271. OF$FIRST[0] = FWA;
  272. OF$IN[0] = FWA + (ODT$LWA[ODTORD ] - ODT$FWA[ODTORD ]);
  273. OF$OUT[0] = FWA;
  274. OF$LIMIT[0] = OF$IN[0] + 1;
  275.  
  276.  
  277. #
  278. * SAVE THE CURRENT RANDOM SECTOR ADDRESS.
  279. #
  280. ODT$PRU[ODTORD ] = OF$CRI[0];
  281.  
  282.  
  283. #
  284. * WRITE THE OVERLAY OUT TO THE FILE.
  285. #
  286. WRITER(OVLFET,0);
  287. RECALL(OVLFET);
  288.  
  289.  
  290. END # WRITOVL #
  291.  
  292.  
  293.  
  294.  
  295.  
  296. CONTROL EJECT;
  297.  
  298. #
  299. * MAIN ROUTINE BEGINS HERE.
  300. *
  301. * POINT THE ODT BASED ARRAY TO THE OVERLAY ENTRIES IN THE 5400 TABLE
  302. * OF THE (0,0) OVERLAY. CALCULATE THE LWA+1 OF THE (77,00)OVERLAY.
  303. * INITALIZE THE OVLFILE FET. INITIALIZE THE OVERLAY REQUEST COUNT
  304. * AND THE OVERLAY REQUEST TABLE.
  305. #
  306. P<LDRINFO> = O"64";
  307. P<EACPM> = O"100";
  308. P<ODT> = P<EACPM> + 8 + EAC$NEP[0];
  309.  
  310.  
  311. FOR I=0 STEP 1 WHILE ODT$LVL[I] NQ O"7700" AND
  312. I LS EAC$DL[0]/2
  313. DO
  314. BEGIN
  315. END
  316.  
  317. IF I LS EAC$DL[0]/2
  318. THEN
  319. BEGIN
  320. FWA = ODT$LWA[I];
  321. END
  322.  
  323. OF$LFN[0] = "OVLFILE";
  324. OF$CODE[0] = 3;
  325. OF$R[0] = TRUE;
  326. OF$L[0] = 2;
  327. OF$CRI[0] = 1;
  328.  
  329.  
  330. #
  331. * CLEAR THE COUNT OF OVERLAY REQUESTS AND THE OVERLAY REQUEST
  332. * TABLE. SET THE WORKLIST NUMBER TO BE USED BY THE SERVICES AND
  333. * SCHEDULING OVERLAY ROUTINES FOR EXECUTING OVERLAYS.
  334. #
  335. ORC = 0;
  336.  
  337. FOR I=0 STEP 1 UNTIL NODT$
  338. DO
  339. BEGIN
  340. ORT$WORD[I] = 0;
  341. END
  342.  
  343.  
  344. SSOEOPW = WWDF"SOEOP";
  345.  
  346.  
  347. #
  348. * GET THE A-A CONNECTION OVERLAY. WRITE IT OUT TO THE OVERLAY FILE.
  349. #
  350. OVN$NUM[0] = AAC$NAM;
  351. ADDLEN = 0;
  352. GET$OVL;
  353.  
  354.  
  355. WRITOVL;
  356.  
  357.  
  358. #
  359. * GET THE APPLICATION/EVENT OVERLAY. WRITE IT OUT THE OVERLAY FILE.
  360. #
  361. OVN$NUM[0] = AEP$NAM;
  362. ADDLEN = 0;
  363. GET$OVL;
  364.  
  365.  
  366. WRITOVL;
  367.  
  368.  
  369. #
  370. * GET THE COMMAND PROCESSOR OVERLAY. WRITE IS OUT TO THE OVERLAY
  371. * FILE.
  372. #
  373. OVN$NUM[0] = OPC$NAM;
  374. ADDLEN = 0;
  375. GET$OVL;
  376.  
  377.  
  378. WRITOVL;
  379.  
  380.  
  381. #
  382. * GET THE OPERATOR EVENT OVERLAY. WRITE IT OUT TO THE OVERLAY FILE.
  383. #
  384. OVN$NUM[0] = OPE$NAM;
  385. ADDLEN = 0;
  386. GET$OVL;
  387.  
  388.  
  389. WRITOVL;
  390.  
  391.  
  392. #
  393. * GET THE A-A OUTCALL REQUEST PROCESSING OVERLAY. WRITE IT OUT TO
  394. * THE OVERLAY FILE.
  395. #
  396.  
  397. OVN$NUM[0] = AAI$NAM;
  398. ADDLEN = OUTSMQL;
  399. GET$OVL;
  400.  
  401. #
  402. * POINT THE 5400 TABLE TO END OF 77,0 OVERLAY.
  403. * POINT THE OUTCALL RECORD TO LABELLED COMMON AND THEN MOVE THE
  404. * OUTCALL RECORD FROM THE OUTSMQ TO THE LABELLED COMMON.
  405. #
  406.  
  407. P<EAHPM> = FWA;
  408. P<OCALL> = FWA + 4 + EAH$NEP[0];
  409. OCA$OUT[0] = LOADBASE + LENGTH;
  410. OCA$OUTL[0] = OUTSMQL;
  411. IF OUTSMQL NQ 0
  412. THEN
  413. BEGIN
  414. TO = FWA + LENGTH;
  415. MOVEI(OUTSMQL,P<OUTSMQ>,TO);
  416. SSTRTS(P<OUTSMQ>,0,OUTSMQL);
  417. END
  418. WRITOVL;
  419.  
  420. #
  421. * GET THE INCALL REQUEST PROCESSING OVERLAY.
  422. * CALCULATE THE ADDED LENGTH NEEDED TO APPEND THE INCALL
  423. * RECORD TO THE OVERLAY. INITIALIZE THE POINTER ADDRESS
  424. * AND LENGTH VARIABLES IN THE LABELLED COMMON BLOCK NVFIN.
  425. * WRITE THE OVERLAY TO THE OVERLAY FILE.
  426. #
  427.  
  428. OVN$NUM[0] = AAR$NAM;
  429. ADDLEN = INSMQL;
  430. GET$OVL;
  431. P<EAHPM> = FWA;
  432. P<ICALL> = FWA + 4 + EAH$NEP[0];
  433. ICA$IN[0] = LOADBASE + LENGTH;
  434. ICA$INL[0] = INSMQL;
  435. IF INSMQL NQ 0
  436. THEN
  437. BEGIN
  438. TO = FWA + LENGTH;
  439. MOVEI(INSMQL,P<INSMQ>,TO);
  440. SSTRTS(P<INSMQ>,0,INSMQL);
  441. END
  442. WRITOVL;
  443.  
  444. END # NVFIBOF #
  445. TERM
cdc/nos2.source/nam5871/nvfibof.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator