User Tools

Site Tools


cdc:nos2.source:nam5871:csibof

CSIBOF

Table Of Contents

  • [00004] PROC CSIBOF
  • [00005] BUILD OVERLAY FILE.
  • [00008] BUILD OVERLAY FILE.
  • [00034] PROC MOVEI
  • [00035] PROC RECALL
  • [00036] PROC REWIND
  • [00102] PROC GET$OVL
  • [00103] GET OVERLAY.
  • [00127] PROC ABORT
  • [00128] PROC LOADREQ
  • [00129] PROC MESSAGE
  • [00130] PROC RECALL
  • [00131] PROC SSTSDA
  • [00251] PROC WRITOVL
  • [00252] WRITE OVERLAY.
  • [00275] PROC RECALL
  • [00276] PROC WRITER

Source Code

CSIBOF.txt
  1. *DECK CSIBOF
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. PROC CSIBOF;
  5. # TITLE - BUILD OVERLAY FILE. #
  6. BEGIN
  7. #
  8. ** CSIBOF - BUILD OVERLAY FILE.
  9. *
  10. * D.K. ENDO 82/06/15
  11. * A. LIM 82/06/24
  12. *
  13. * THIS PROCEDURE INITIALIZES THE OVERLAY FILE BY LOADING THEM AND
  14. * THEN WRITING THEM TO FILE *OVLFILE*.
  15. * IT MOVES ALL THE CROSS REFERENCE TABLES NEEDED FOR THE OVERLAY
  16. * FROM THE MANAGED AREA TO BLANK COMMON BEFORE IT WRITES THE
  17. * OVERLAY OUT TO FILE *OVLFILE*.
  18. *
  19. * PROC CSIBOF
  20. *
  21. * ENTRY 1. NONE.
  22. *
  23. * EXIT 1. *OVLFILE* BUILT
  24. *
  25. #
  26.  
  27.  
  28. #
  29. **** PROC CSIBOF - XREF LIST BEGINS.
  30. #
  31.  
  32. XREF
  33. BEGIN
  34. PROC MOVEI; # MACREL - MOVE INDIRECT BLOCK OF CM WORDS#
  35. PROC RECALL; # RETURNS CONTROL WHEN COMPLETE #
  36. PROC REWIND; # REWINDS A FILE #
  37. END
  38.  
  39. #
  40. ****
  41. #
  42.  
  43.  
  44. DEF CMP$NAM # O"03231403152000" #; # CMD PROCESSOR (CSLCMP)#
  45. DEF CMR$NAM # O"03231403152200" #; # CMD RECOGNIZER(CSLCMR)#
  46. DEF EVT$NAM # O"03231405262400" #; # EVENT OVLY (CSLEVT) #
  47. DEF OIO$NAM # O"03231417111700" #; # OPERATOR I/O (CSLOIO #
  48. DEF OSS$NAM # O"03231417232300" #; # OPERATOR SUP (CSLOSS) #
  49.  
  50. DEF XRFSIZ$ # 8 #; # XRF SIZE = 4 TABLES X 2 #
  51.  
  52.  
  53. ITEM ADDLEN; # ADDITONAL LENGTH TO ADD TO OVERLAY #
  54. ITEM FWA; # FIRST WORD ADDRESS TO LOAD THE OVERLAY #
  55. ITEM I; # LOOP INDUCTION VARIABLE #
  56. ITEM LENGTH I; # LENGTH OF OVERLAY TO BE LOADED #
  57. ITEM TO U; # FWA OF MOVE TO BLOCK #
  58.  
  59. ITEM ODTORD ; # OVLY DEFINITION TABLE ORDINAL FOR EVLY #
  60.  
  61.  
  62. #
  63.   THIS ARRAY CONTAINS THE NAME OF THE OVERLAY TO BE LOADED.
  64. #
  65. ARRAY OVN [00:00] S(1);
  66. BEGIN
  67. ITEM OVN$NAM C(00,00,07);
  68. ITEM OVN$NUM U(00,00,42);
  69. END
  70.  
  71.  
  72. #
  73. * XRF - CROSS REFERENCE INFORMATION TABLE.
  74. *
  75. * THIS BASED ARRAY DEFINES THE POINTER WORD AND LENGTH PAIR
  76. * OF EACH CROSS REFERENCE TABLE NEEDED BY ALL THE CS OVERLAYS.
  77. * IT ALWAYS POINTS TO THE LABELLED COMMON BLOCK OF BASED ARRAY
  78. * POINTER WORD AND LENGTH OF ALL CS CROSS REFERENCE TABLES, AND
  79. * THIS BLOCK IS ALWAYS THE FIRST BLOCK IN ANY OVERLAY.
  80. * THIS TABLE MUST MATCH THE *CSXRF* DEFINITIONS IN *TEXTOV*.
  81. * ANY CHANGE TO THIS ARRAY OR TO *CSXRF* MUST CAUSE A COMPARABLE
  82. * CHANGE TO THE OTHER. SERIOUS CIRCUMSTANCES MAY OCCUR OTHERWISE.
  83. #
  84.  
  85. BASED ARRAY XRF[00:00] S(XRFSIZ$);
  86. BEGIN
  87. ITEM XRF$DEX U(00,00,60); # DEVICE XREF TABLE #
  88. ITEM XRF$DEXL U(01,00,60); # LENGTH OF DEX TABLE #
  89. ITEM XRF$LIX U(02,00,60); # LINE XREF TABLE #
  90. ITEM XRF$LIXL U(03,00,60); # LENGTH OF LIX TABLE #
  91. ITEM XRF$LLXR U(04,00,60); # LOGICAL LINK XREF TABLE #
  92. ITEM XRF$LLXRL U(05,00,60); # LENGTH OF LLXR TABLE #
  93. ITEM XRF$PLXRF U(06,00,60); # PHYICAL LINK XREF TABLE #
  94. ITEM XRF$PLXRFL U(07,00,60); # LENGTH OF PLXREF TABLE #
  95. END
  96.  
  97.  
  98.  
  99.  
  100.  
  101. CONTROL EJECT;
  102. PROC GET$OVL;
  103. # TITLE - GET OVERLAY. #
  104. BEGIN
  105. #
  106. * GET$OVL - GET OVERLAY.
  107. *
  108. * D.K. ENDO 82/06/15
  109. *
  110. * THIS PROCEDURE DOES AN INITIAL LOAD OF AN OVERLAY TO BE PREPARED
  111. * FOR WRITING TO THE OVERLAY FILE.
  112. *
  113. * PROC GET$OVL
  114. *
  115. * ENTRY 1. OVN$NAM[0] = OVERLAY NAME.
  116. * 2. ADDLEN = ADDITIONAL LENGTH TO BE ADDED TO THE OVL
  117. *
  118. * EXIT 1. ODTORD = OVERLAY DEFINITION TABLE ORDINAL FOR THE
  119. * OVERLAY LOADED.
  120. *
  121. #
  122. #
  123. * PROC GET$OVL - XREF LIST BEGINS.
  124. #
  125. XREF
  126. BEGIN
  127. PROC ABORT; # CAUSES ABORT WHEN CALLED #
  128. PROC LOADREQ; # ISSUES LOAD REQUEST #
  129. PROC MESSAGE; # SENDS MESSAGE TO THE DAYFILE #
  130. PROC RECALL; # RETURNS CONTROL WHEN COMPLETE BIT SET #
  131. PROC SSTSDA; # SET DYNAMIC ADDRESS #
  132. END
  133. #
  134. *
  135. #
  136.  
  137.  
  138.  
  139. ITEM DONE B; # MOVE MANAGED TABLES STATUS #
  140. ITEM MEMSTAT I; # MEMORY REQUEST STATUS WORD #
  141. ITEM NEED I; # TOTAL FIELD LENGTH NEEDED FOR LOAD #
  142.  
  143.  
  144. #
  145.   THIS ARRAY DEFINES THE MESSAGE SENT WHEN AN OVERLAY IS NOT FOUND.
  146. #
  147. ARRAY ONF$TXT [00:00] S(3);
  148. BEGIN
  149. ITEM ONF$NAME C(00,00,07);
  150. ITEM ONF$MSG C(00,42,18) =[" OVERLAY NOT FOUND"];
  151. ITEM ONF$ZBYT U(02,30,30) = [0];
  152. END
  153.  
  154.  
  155. #
  156.   THIS ARRAY DEFINES THE OVERLAY PARAMETER BLOCK USED BY
  157.   LOADREQ TO MAKE THE LOAD REQUEST
  158. #
  159. ARRAY OPB [00:00] S(2);
  160. BEGIN
  161. ITEM OPB$NAME C(00,00,07);
  162. ITEM OPB$WRD1 I(00,00,60);
  163. ITEM OPB$LLL U(01,00,12);
  164. ITEM OPB$LO B(01,17,01);
  165. ITEM OPB$OLF B(01,18,01);
  166. ITEM OPB$LWA U(01,24,18);
  167. ITEM OPB$FWA U(01,42,18);
  168. ITEM OPB$WRD2 I(01,00,60);
  169. END
  170. CONTROL EJECT;
  171. # #
  172. # GET$OVL CODE BEGINS HERE #
  173. # #
  174. #
  175. * SEARCH THE 5400 TABLE FOR THE OVERLAY NAME.
  176. #
  177. FOR ODTORD =0 STEP 1 WHILE OVN$NAM[0] NQ ODT$NAME[ODTORD ] AND
  178. ODTORD LS EAC$DL[0]/2
  179. DO
  180. BEGIN
  181. END
  182.  
  183.  
  184. #
  185. * IF FOUND, THEN GET THE OVERLAY.
  186. #
  187. IF ODTORD LS EAC$DL[0]/2
  188. THEN
  189. BEGIN
  190.  
  191.  
  192. #
  193. * COMPUTE THE SPACE NEEDED TO LOAD THE OVERLAY. IF NOT ENOUGH ROOM,
  194. * THEN MOVE THE MANAGED TABLES UP TO MAKE ROOM. SET THE OVERLAY
  195. * PARAMETER BLOCK. LOAD THE OVERLAY.
  196. #
  197. LENGTH = ODT$LWA[ODTORD ] - ODT$FWA[ODTORD ];
  198. NEED = FWA + LENGTH + ADDLEN;
  199.  
  200. IF NEED GQ MEMLOC
  201. THEN
  202. BEGIN
  203. SSTSDA(NEED,MEMSTAT,DONE);
  204. FOR LENGTH=LENGTH WHILE NOT DONE
  205. DO
  206. BEGIN
  207. RECALL(MEMSTAT);
  208. SSTSDA(NEED,MEMSTAT,DONE);
  209. END
  210. END
  211.  
  212. OPB$WRD1[0] = 0;
  213. OPB$WRD2[0] = 0;
  214. OPB$LLL[0] = ODT$LVL[ODTORD ];
  215. OPB$LO[0] = LDI$LB[0];
  216. OPB$OLF[0] = TRUE;
  217. OPB$LWA[0] = NEED;
  218. OPB$FWA[0] = FWA;
  219. IF OPB$LO[0]
  220. THEN
  221. BEGIN
  222. OPB$NAME[0] = OVN$NAM[0];
  223. END
  224. ELSE
  225. BEGIN
  226. OPB$NAME[0] = LDI$NAME[0];
  227. END
  228.  
  229.  
  230. LOADREQ(OPB);
  231.  
  232.  
  233. ODT$LWA[ODTORD ] = ODT$LWA[ODTORD ] + ADDLEN;
  234. END
  235.  
  236. #
  237. * IF OVERLAY IS NOT FOUND, SEND MESSAGE TO DAYFILE AND ABORT.
  238. #
  239.  
  240. ELSE
  241. BEGIN
  242. ONF$NAME[0] = OVN$NAM[0];
  243. MESSAGE(ONF$TXT,0);
  244. ABORT;
  245. END
  246.  
  247.  
  248. RETURN; # **** RETURN **** #
  249. END
  250. CONTROL EJECT;
  251. PROC WRITOVL;
  252. # TITLE - WRITE OVERLAY. #
  253. BEGIN
  254. #
  255. * WRITOVL - WRITE OVERLAY.
  256. *
  257. * D.K. ENDO 82/06/16
  258. *
  259. * THIS PROCEDURE WRITES A GIVEN OVERLAY OUT TO *OVLFILE* AND SAVES
  260. * THE RANDOM SECTOR ADDRESS FOR THAT OVERLAY.
  261. *
  262. * PROC WRITOVL
  263. *
  264. * ENTRY 1. ODTORD = OVLY DEFINITION TBL ORDINAL FOR OVERLAY.
  265. *
  266. * EXIT 1. OVERLAY WRITTEN TO FILE *OVLFILE*.
  267. * 2. RANDOM SECTOR ADDRESS IN ODT ENTRY.
  268. *
  269. #
  270. #
  271. * PROC WRITOVL - XREF LIST BEGINS.
  272. #
  273. XREF
  274. BEGIN
  275. PROC RECALL; # RETURNS CONTROL WHEN COMPLETE BIT IS SET#
  276. PROC WRITER; # FLUSHES CIO BUFFER AND WRITES EOR #
  277. END
  278. #
  279. *
  280. #
  281.  
  282.  
  283.  
  284. # #
  285. # WRITOVL CODE BEGINS HERE #
  286. # #
  287. #
  288. * POINT THE FET TO THE OVERLAY TO BE WRITTEN.
  289. #
  290. OF$FIRST[0] = FWA;
  291. OF$IN[0] = FWA + (ODT$LWA[ODTORD ] - ODT$FWA[ODTORD ]);
  292. OF$OUT[0] = FWA;
  293. OF$LIMIT[0] = OF$IN[0] + 1;
  294.  
  295.  
  296. #
  297. * SAVE THE CURRENT RANDOM SECTOR ADDRESS.
  298. #
  299. ODT$PRU[ODTORD ] = OF$CRI[0];
  300.  
  301.  
  302. #
  303. * WRITE THE OVERLAY OUT TO THE FILE.
  304. #
  305. WRITER(OVLFET,0);
  306. RECALL(OVLFET);
  307.  
  308.  
  309. RETURN; # **** RETURN **** #
  310. END # WRITOVL #
  311. CONTROL EJECT;
  312. # #
  313. # CSIBOF CODE BEGINS HERE #
  314. # #
  315. #
  316. * POINT THE ODT BASED ARRAY TO THE OVERLAY ENTRIES IN THE 5400 TABLE
  317. * OF THE (0,0) OVERLAY. CALCULATE THE LWA+1 OF THE (77,00)OVERLAY.
  318. * INITALIZE THE OVLFILE FET. INITIALIZE THE OVERLAY REQUEST COUNT
  319. * AND THE OVERLAY REQUEST TABLE.
  320. #
  321. P<LDRINFO> = O"64";
  322. P<EACPM> = O"100";
  323. P<ODT> = P<EACPM> + 8 + EAC$NEP[0];
  324.  
  325.  
  326. FOR I=0 STEP 1 WHILE ODT$LVL[I] NQ O"7700" AND
  327. I LS EAC$DL[0]/2
  328. DO
  329. BEGIN
  330. END
  331.  
  332. IF I LS EAC$DL[0]/2
  333. THEN
  334. BEGIN
  335. FWA = ODT$LWA[I];
  336. END
  337.  
  338. OF$LFN[0] = "OVLFILE";
  339. OF$CODE[0] = 3;
  340. OF$R[0] = TRUE;
  341. OF$L[0] = OFSIZ$ - 5;
  342. OF$CRI[0] = 1;
  343. OF$FIRST[0] = FWA;
  344. OF$IN[0] = FWA;
  345. OF$OUT[0] = FWA;
  346. OF$LIMIT[0] = FWA + O"100";
  347.  
  348. ORC = 0;
  349.  
  350. FOR I=0 STEP 1 UNTIL NODT$
  351. DO
  352. BEGIN
  353. ORT$WORD[I] = 0;
  354. END
  355.  
  356.  
  357. SSOEOPW = CSWDF"SOEOP";
  358.  
  359.  
  360. REWIND(OVLFET);
  361. RECALL(OVLFET);
  362.  
  363.  
  364. #
  365. * GET THE EVENT OVERLAY. CALCULATE THE TOTAL LENGTH NEEDED TO LOAD
  366. * ITS CROSS REFERENCE TABLES, WHICH ARE: LIX, LLXR, AND
  367. * PLXREF. LOAD THE OVERLAY, THEN MOVE ONE TABLE AT A TIME TO THE
  368. * END OF THE OVERLAY. INITIALIZE THE POINTER ADDRESS AND LENGTH OF
  369. * THE TABLE DEFINED IN LABELLED COMMON BLOCK *CSXRF*.
  370. * THEN WRITE IT OUT THE OVERLAY FILE.
  371. #
  372.  
  373. OVN$NUM[0] = EVT$NAM;
  374. ADDLEN = LIXLS + LLXREFLS + PLXREFLS;
  375. GET$OVL;
  376. P<EAHPM> = FWA; # POINT 5400 TABLE AT END OF 77,0 OVL #
  377. P<XRF> = FWA + 4 + EAH$NEP[0]; # POINT XRF TO LABELLED COMMON #
  378.  
  379. XRF$LIX[0] = LOADBASE + LENGTH; # LIX TABLE #
  380. XRF$LIXL[0] = LIXLS;
  381. TO = FWA + LENGTH;
  382. MOVEI(LIXLS, P<LIXS>, TO);
  383.  
  384. XRF$LLXR[0] = XRF$LIX[0] + XRF$LIXL[0]; # LLXR TABLE #
  385. XRF$LLXRL[0] = LLXREFLS;
  386. TO = TO + XRF$LIXL[0];
  387. MOVEI(LLXREFLS, P<LLXRS>, TO);
  388.  
  389. XRF$PLXRF[0] = XRF$LLXR[0] + XRF$LLXRL[0]; # PLXRF TABLE #
  390. XRF$PLXRFL[0] = PLXREFLS;
  391. TO = TO + XRF$LLXRL[0];
  392. MOVEI(PLXREFLS, P<PLXREFS>, TO);
  393.  
  394. WRITOVL;
  395.  
  396. #
  397. * GET THE OPERATOR I/O OVERLAY. WRITE IT OUT TO THE OVERLAY FILE.
  398. #
  399.  
  400. OVN$NUM[0] = OIO$NAM;
  401. ADDLEN = 0;
  402. GET$OVL;
  403.  
  404.  
  405. WRITOVL;
  406.  
  407.  
  408. #
  409. * GET THE COMMAND RECOGNIZER OVERLAY. WRITE IT OUT TO THE OVERLAY
  410. * FILE.
  411. #
  412. OVN$NUM[0] = CMR$NAM;
  413. ADDLEN = 0;
  414. GET$OVL;
  415.  
  416.  
  417. WRITOVL;
  418.  
  419.  
  420. #
  421. * GET THE COMMAND PREPROCESSOR OVERLAY. CALCULATE THE TOTAL LENGTH
  422. * NEEDED TO LOAD ITS CROSS REFERENCE TABLES, WHICH ARE: DEX, LIX,
  423. * LLXR, AND PLXREF. LOAD THE OVERLAY. THEN MOVE ONE TABLE
  424. * AT A TIME TO THE END OF THE OVERLAY. INITIALIZE THE POINTER
  425. * ADDRESS AND LENGTH OF THE TABLES DEFINED IN LABELLED COMMON
  426. * BLOCK *CSXRF*.
  427. * WRITE THE OVERLAY OUT TO THE OVERLAY FILE.
  428. #
  429.  
  430. OVN$NUM[0] =CMP$NAM;
  431. ADDLEN = DEXLS + LIXLS + LLXREFLS + PLXREFLS;
  432. GET$OVL;
  433. P<XRF> = FWA + 4 + EAH$NEP[0];
  434.  
  435. XRF$DEX[0] = LOADBASE + LENGTH; # DEX TABLE #
  436. XRF$DEXL[0] = DEXLS;
  437. TO = FWA + LENGTH;
  438. MOVEI(DEXLS, P<DEXS>, TO);
  439.  
  440. XRF$LIX[0] = XRF$DEX[0] + XRF$DEXL[0]; # LIX TABLE #
  441. XRF$LIXL[0] = LIXLS;
  442. TO = TO + XRF$DEXL[0];
  443. MOVEI(LIXLS, P<LIXS>, TO);
  444.  
  445. XRF$LLXR[0] = XRF$LIX[0] + XRF$LIXL[0]; # LLXR TABLE #
  446. XRF$LLXRL[0] = LLXREFLS;
  447. TO = TO + XRF$LIXL[0];
  448. MOVEI(LLXREFLS, P<LLXRS>, TO);
  449.  
  450. XRF$PLXRF[0] = XRF$LLXR[0] + XRF$LLXRL[0]; # PLXRF TABLE #
  451. XRF$PLXRFL[0] = PLXREFLS;
  452. TO = TO + XRF$LLXRL[0];
  453. MOVEI(PLXREFLS, P<PLXREFS>, TO);
  454.  
  455. WRITOVL;
  456.  
  457.  
  458. #
  459. * GET THE OPERATOR SUPERVISION OVERLAY. WRITE IT OUT TO THE
  460. * OVERLAY FILE.
  461. #
  462.  
  463. OVN$NUM[0] = OSS$NAM;
  464. ADDLEN = 0;
  465. GET$OVL;
  466.  
  467.  
  468.  
  469.  
  470. WRITOVL;
  471.  
  472. #
  473. * ZERO OUT THE LENGTH OF ALL CROSS REFERENCE TABLES IN
  474. * MANAGED AREA.
  475. #
  476.  
  477. DEXLS = 0;
  478. LIXLS = 0;
  479. LLXREFLS = 0;
  480. PLXREFLS = 0;
  481.  
  482. RETURN; # **** RETURN **** #
  483.  
  484. END # CSIBOF #
  485.  
  486. TERM
cdc/nos2.source/nam5871/csibof.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator