User Tools

Site Tools


cdc:nos2.source:opl871:files

Table of Contents

FILES

Table Of Contents

  • [00023] FILES - LOCAL FILE MANIPULATOR.
  • [00025] LOCAL FILE MANIPULATOR.
  • [00047] MULTI FILE PROCESSOR.
  • [00049] MULTI FILE PROCESSOR.
  • [00085] FUNCTION PROCESSORS.
  • [00283] SUBROUTINES.
  • [00286] ARG - PROCESS ARGUMENTS.
  • [00413] ERR - PROCESS ARGUMENT ERROR.

Source Code

FILES.txt
  1. IDENT FILES,FILES
  2. ABS
  3. SST
  4. SYSCOM B1
  5. ENTRY BKSP
  6. ENTRY BKSPRU
  7. ENTRY COMMON
  8. ENTRY EVICT
  9. ENTRY LOCK
  10. ENTRY PRIMARY
  11. ENTRY RENAME
  12. ENTRY SKIPEI
  13. ENTRY SKIPF
  14. ENTRY SKIPFB
  15. ENTRY SKIPR
  16. ENTRY UNLOCK
  17. ENTRY WRITEF
  18. ENTRY WRITER
  19. ENTRY NPC=
  20. ENTRY RFL=
  21. *COMMENT FILES - LOCAL FILE MANIPULATOR.
  22. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  23. TITLE FILES - LOCAL FILE MANIPULATOR.
  24. SPACE 4
  25. *** FILES - LOCAL FILE MANIPULATOR.
  26. * G. R. MANSFIELD. 70/11/25.
  27. SPACE 4
  28. *** FILES PROCESSES LOCAL FILE FUNCTIONS FOR A JOB AS
  29. * LISTED BELOW. NUMERIC ARGUMENTS, EXCEPT SKIPR EOR LEVEL AND
  30. * SETID ID CODE, ARE ASSUMED DECIMAL, BUT A TRAILING RADIX OF
  31. * *D* OR *B* MAY BE USED.
  32. SPACE 4
  33. *** DAYFILE MESSAGES.
  34. *
  35. *
  36. * * ERROR IN FILE ARGUMENTS.* = AN ARGUMENT TO A FILE
  37. * FUNCTON WAS ILLEGAL.
  38. SPACE 4
  39. *CALL COMCCMD
  40. *CALL COMCMAC
  41. *CALL COMSDSP
  42. *CALL COMSJIO
  43. SPACE 4,10
  44. * SPECIAL ENTRY POINT.
  45.  
  46. NPC= EQU 0 FORCE OPERATING SYSTEM PARAMETER FORMAT
  47. TITLE MULTI FILE PROCESSOR.
  48. FILES SPACE 4
  49. ** FILES - MULTI FILE PROCESSOR.
  50. * ENTRY (B5) = PROCESSOR ADDRESS.
  51.  
  52.  
  53. ORG 150B
  54. FILES SA5 2+B6 SET FILE NAME
  55. BX6 X5
  56. SB6 B6+B1
  57. SA6 F
  58. JP B5 PROCESS OPERATION
  59.  
  60. FIL1 NE B6,B7,FILES LOOP FOR ALL FILES
  61. FIL2 SA1 JOPR CHECK FOR *DIS* CALL
  62. LX1 59-19
  63. NG X1,FIL4 IF *DIS* CALL
  64. CONTROL CCDR,RSS
  65. SA1 PGNR
  66. ZR X1,FIL4 IF NO CONTROL CARD
  67. SA2 FILES-1 FIRST ENTRY NAME
  68. MX0 42
  69. BX1 X0*X1
  70. FIL3 NG X2,FIL4 IF END OF ENTRY NAMES
  71. BX3 X0*X2
  72. BX6 X3-X1
  73. SB2 X2
  74. SA2 A2-B1
  75. NZ X6,FIL3 IF NO MATCH
  76. CONTROL CCDR ADVANCE CONTROL CARD
  77. SA3 PGNR
  78. SA1 F+1 CLEAR FET STATUS
  79. ZR X3,ERR1 IF CONTROL STATEMENT LIMIT
  80. MX2 -24
  81. BX6 -X2*X1
  82. SA6 A1
  83. JP B2 PROCESS CALL
  84. FIL4 ENDRUN
  85. TITLE FUNCTION PROCESSORS.
  86. ASSIGN SPACE 4
  87. BKSP SPACE 4
  88. *** BKSP (F,N,M)
  89. * BACKSPACE N RECORDS ON FILE F
  90. * WITH FILE MODE *M*.
  91.  
  92.  
  93. BKSP SB2 -1 PROCESS F,X,M ARGUMENTS
  94. RJ ARG
  95. OPEN F,READNR,R
  96. SKIPB F,X0,R
  97. EQ SKF2 RESET FILE MODE
  98. BKSPRU SPACE 4,5
  99. *** BKSPRU (F,N,M)
  100. *
  101. * BACKSPACE N PHYSICAL RECORD UNITS ON FILE *F*
  102. * WITH FILE MODE *M*.
  103.  
  104.  
  105. BKSPRU SB2 -1 PROCESS F,N,M ARGUMENTS
  106. RJ ARG
  107. OPEN F,READNR,R
  108. BKSPRU F,X0,R
  109. EQ SKF2 RESET FILE MODE
  110. COMMON SPACE 4
  111. *** COMMON (F1,F2,...,FN)
  112. * FOR FILES FN, THE FOLLOWING OPERATION IS PERFORMED.
  113. * IF FILE FN IS NOT ASSIGNED TO THE JOB, *COMMON* FILE FN
  114. * IS ASSIGNED TO THE JOB.
  115. * IF FILE FN IS ALREADY ASSIGNED TO THE JOB, NO ACTION IS
  116. * TAKEN.
  117.  
  118.  
  119. COMMON SB2 1 CHECK SINGLE ARGUMENTS
  120. RJ ARG
  121. SB5 COM SET COMMON ENTRY
  122. EQ FILES
  123.  
  124. COM ASSIGN F
  125. EQ FIL1
  126. EVICT SPACE 4
  127. *** EVICT(F1,F2,...,FN)
  128. * EVICT FILES FN.
  129.  
  130.  
  131. EVICT SB2 1 CHECK SINGLE ARGUMENTS
  132. RJ ARG
  133. SB5 EVI SET EVICT ENTRY
  134. JP FILES
  135.  
  136. EVI EVICT A6,R
  137. JP FIL1 PROCESS NEXT FILE
  138. LOCK SPACE 4
  139. *** LOCK (F1,F2,...,FN)
  140. * LOCK FILES FN.
  141.  
  142.  
  143. LOCK SB2 1 CHECK SINGLE ARGUMENTS
  144. RJ ARG
  145. SB5 LCK SET LOCK ENTRY
  146. EQ FILES
  147.  
  148. LCK LOCK A6,R
  149. EQ FIL1 PROCESS NEXT FILE
  150. PRIMARY SPACE 4,2
  151. *** PRIMARY (F)
  152. * MAKE FILE F USER S NEW PRIMARY FILE.
  153.  
  154.  
  155. PRIMARY SB2 1 CHECK SINGLE ARGUMENT
  156. RJ ARG
  157. NE B1,B7,ERR IF MORE THAN 1 ARGUMENT SPECIFIED
  158. SB5 PRI
  159. EQ FILES
  160.  
  161. PRI PRIMARY F
  162. EQ FIL1
  163. RENAME SPACE 4
  164. *** RENAME (N1=F1,N2=F2,...,NI=FI)
  165. * RENAME FILES FN TO NN.
  166. * IF FILE NN WAS PREVIOUSLY DEFINED, THAT FILE WILL BE DROPPED
  167. * FROM THE JOB.
  168.  
  169.  
  170. RENAME SB2 2 CHECK EQUIVALENCED ARGUMENTS
  171. RJ ARG
  172. SB6 B1 BEGIN WITH SECOND NAME
  173. SB7 B7+B1
  174. SB5 REN SET RENAME ENTRY
  175. EQ FILES
  176.  
  177. REN SA4 A6 SAVE OLD NAME
  178. SA1 A5-B1 SET NEW NAME
  179. BX7 X1
  180. SA7 A6
  181. SA1 F SET NEW NAME
  182. BX6 X4 SET OLD NAME
  183. LX7 X1
  184. SA6 A1
  185. SA7 F+6
  186. RENAME A6,,R
  187. SB6 B6+B1
  188. EQ FIL1 PROCESS NEXT FILE
  189. SKIPEI SPACE 4
  190. *** SKIPEI (F)
  191. * SKIP TO END OF INFORMATION ON FILE F (MASS STORAGE ONLY).
  192.  
  193.  
  194. SKIPEI SB2 B0 PROCESS F,X ARGUMENTS
  195. RJ ARG
  196. NZ B7,ERR ERROR IF MORE THAN 1 ARGUMENT
  197. OPEN F,READNR,R
  198. SKIPEI F,R
  199. EQ FIL2
  200. SKIPF SPACE 4
  201. *** SKIPF (F,N,M)
  202. * SKIP N FILES FORWARD ON FILE F.
  203. * WITH FILE MODE *M*.
  204.  
  205.  
  206. SKIPF SB2 -1 PROCESS F,X,M ARGUMENTS
  207. RJ ARG
  208. OPEN F,READNR,R
  209. SKF1 SKIPFF F,X0,R
  210. SKF2 SA1 F RESET FILE MODE
  211. SX4 3
  212. MX0 42
  213. BX6 X0*X1
  214. BX6 X6+X4
  215. SA6 A1
  216. EQ FIL2
  217. SKIPFB SPACE 4
  218. *** SKIPFB (F,N,M)
  219. * SKIP N FILES BACKWARD ON FILE F.
  220. * WITH FILE MODE *M*.
  221.  
  222.  
  223. SKIPFB SB2 -1 PROCESS F,X,M ARGUMENTS
  224. RJ ARG
  225. OPEN F,READNR,R
  226. SKB1 SKIPFB F,X0,R
  227. EQ SKF2
  228. SKIPR SPACE 4
  229. *** SKIPR (F,N,L,M)
  230. * SKIP N RECORDS FORWARD ON FILE F.
  231. * WITH EOR LEVEL *L*, ASSUMED OCTAL, AND/OR FILE MODE *M*.
  232.  
  233.  
  234. SKIPR SB2 -2 PROCESS F,X,L,M ARGUMENTS
  235. RJ ARG
  236. BX4 X7 SAVE LEVEL NUMBER
  237. OPEN F,READNR,R
  238. BX7 X4 RESTORE LEVEL NUMBER
  239. SKR1 SX2 F
  240. LX0 18
  241. BX2 X2+X0
  242. LX7 14
  243. SX6 240B
  244. BX7 X7+X6
  245. MX6 60
  246. BX7 X7-X6
  247. RJ =XCIO=
  248. EQ SKF2
  249. UNLOCK SPACE 4
  250. *** UNLOCK (F1,F2,...,FN)
  251. * UNLOCK FILES FN.
  252.  
  253.  
  254. UNLOCK SB2 1 CHECK SINGLE ARGUMENTS
  255. RJ ARG
  256. SB5 ULK SET LOCK ENTRY
  257. EQ FILES
  258.  
  259. ULK UNLOCK A6,R
  260. EQ FIL1 PROCESS NEXT FILE
  261. WRITEF SPACE 4
  262. *** WRITEF(F,N)
  263. * WRITE N FILE MARKS ON FILE F.
  264.  
  265.  
  266. WRITEF SB2 B0 PROCESS F,X ARGUMENTS
  267. RJ ARG
  268. WRF1 WRITEF F,R
  269. SX0 X0-1
  270. NZ X0,WRF1 LOOP FOR ALL FILES
  271. EQ FIL2
  272. WRITER SPACE 4
  273. *** WRITER (F,N)
  274. * WRITE N EMPTY RECORDS ON FILE F.
  275.  
  276.  
  277. WRITER SB2 B0 PROCESS F,X ARGUMENTS
  278. RJ ARG
  279. WRR1 WRITER F,R
  280. SX0 X0-1
  281. NZ X0,WRR1 LOOP FOR ALL RECORDS
  282. EQ FIL2
  283. TITLE SUBROUTINES.
  284. AMO SPACE 4
  285. ARG SPACE 4
  286. ** ARG - PROCESS ARGUMENTS.
  287. *
  288. * ENTRY (B2) = -2 IF F,X,L,M FORM.
  289. * (B2) = -1 IF F,X,M FORM.
  290. * (B2) = 0 IF F,X FORM.
  291. * (B2) = 1 IF SINGLE VALUE ARGUMENT.
  292. * (B2) = 2 IF EQUIVALENCED ARGUMENT.
  293. *
  294. * EXIT (B1) = 1.
  295. * (B6) = 0.
  296. * (B7) = ARGUMENT COUNT.
  297. * (X0) = COUNT OF FILES OR RECORDS.
  298. * (X7) = LEVEL NUMBER.
  299. *
  300. * CALLS DXB.
  301.  
  302.  
  303. ARG PS 0 ENTRY/EXIT
  304. SB1 1 (B1) = CONSTANT 1
  305. SA1 ACTR CHECK ARGUMENT COUNT
  306. SB3 X1
  307. ZR B3,ERR IF NO ARGUMENTS
  308. SB7 X1
  309. MX0 42
  310. SA5 ARGR GET FIRST ARGUMENT
  311. SB6 B0
  312. SX2 1
  313. SX6 B2+
  314. ZR B2,ARG1 IF F,X FORM
  315. PL B2,ARG8 IF SINGLE VALUE OR EQUIVALENCED ARGUMENT
  316.  
  317. * PROCESS F,X OR F,X,M OR F,X,L,M ARGUMENT FORM.
  318.  
  319. ARG1 SA6 ARGA SAVE ARGUMENT FORM
  320. SX7 X5-1R=
  321. ZR X7,ERR IF EQUIVALENCED ARGUMENT
  322. SX2 3 STORE FILE NAME
  323. BX7 X5+X2
  324. SX0 B1 PRESET COUNT = 1
  325. SA7 F SET FILE NAME IN FET
  326. SB7 B7-B1
  327. BX7 X7-X7 SET LEVEL TO ZERO
  328. ZR B7,ARG RETURN IF 1 ARGUMENT
  329. NZ B2,ARG2 IF NOT F,X FORM
  330. NE B7,B1,ERR IF MORE THAN 2 ARGUMENTS
  331. ARG2 SA5 A5+B1 GET SECOND ARGUMENT
  332. MX0 42 CHECK FOR DEFAULT COUNT
  333. SX6 B1 SET DEFAULT COUNT OF 1
  334. BX2 X0*X5
  335. ZR X2,ARG3 IF COUNT NOT SPECIFIED
  336. SB7 1 ASSUME DECIMAL BASE
  337. RJ DXB
  338. NZ X4,ERR IF CONVERSION ERROR
  339. ZR X6,ERR IF ZERO COUNT
  340. ARG3 BX0 X6 SET COUNT
  341. SA6 ARGB
  342. BX7 X7-X7 SET LEVEL TO ZERO
  343. MX2 42
  344. BX3 X2*X6
  345. NZ X3,ERR IF TOO LARGE
  346. SA3 ARGA
  347. ZR X3,ARG IF F,X FORM
  348. SA1 ACTR
  349. SX3 X3+1
  350. NG X3,ARG4 IF F,X,L,M FORM
  351. SX2 X1-4
  352. PL X2,ERR IF MORE THAN 3 ARGUMENTS
  353. EQ ARG5 CONTINUE TO PROCESS
  354.  
  355. ARG4 SX2 X1-5
  356. PL X2,ERR IF MORE THAN 4 ARGUMENTS
  357. ARG5 SX2 X1-2
  358. ZR X2,ARG IF ONLY 2 ARGUMENTS
  359. SA5 A5+B1 GET THIRD ARGUMENT
  360. SB7 B0 SET OCTAL MODE
  361. RJ DXB
  362. SA2 ARGB RESET COUNT
  363. SX0 X2+
  364. NZ X4,ARG6 IF CONVERSION ERROR
  365. MX4 -4
  366. BX7 -X4*X6
  367. SA1 ACTR
  368. SX1 X1-4
  369. NG X1,ARG IF ONLY THREE ARGUMENTS
  370. SA5 A5+1 GET FOURTH ARGUMENT
  371. ARG6 SA5 A5+
  372. SX4 1LC
  373. LX4 42
  374. IX4 X5-X4
  375. ZR X4,ARG7 IF CODED
  376. SX4 1LB
  377. LX4 42
  378. IX4 X5-X4
  379. NZ X4,ERR IF NOT BINARY
  380. SX4 B1+ BINARY
  381. ARG7 LX4 1 SET MODE BIT IN FET
  382. SA1 F
  383. SX2 B1+B1
  384. BX6 -X2*X1
  385. BX6 X6+X4
  386. SA6 A1+
  387. EQ ARG
  388.  
  389. * PROCESS MULTI FILE FORM.
  390.  
  391. ARG8 EQ B2,B1,ARG9 IF SINGLE ARGUMENT REQUESTED
  392. SX7 X5-1R=
  393. NZ X7,ERR ERROR IF NO EQUIVALENCE
  394. BX6 X0*X5
  395. IX7 X6+X2 ADD COMPLETE BIT
  396. ZR X6,ERR ERROR IF BLANK NAME
  397. SA7 A5+
  398. SB3 B3-1 NEXT ARGUMENT
  399. SA5 A5+B1
  400. BX5 X0*X5
  401. ARG9 ZR X5,ERR IF BLANK NAME
  402. BX7 X5+X2 ADD COMPLETE BIT
  403. SA7 A5
  404. SB3 B3-B1 DECREMENT ARGUMENT COUNT
  405. SA5 A5+B1 NEXT ARGUMENT
  406. NZ B3,ARG8 IF MORE ARGUMENTS TO PROCESS
  407. EQ ARG RETURN
  408.  
  409.  
  410. ARGA CON 0 FORM OF ARGUMENTS FLAG
  411. ARGB CON 0 COUNT HOLD
  412. ERR SPACE 4
  413. ** ERR - PROCESS ARGUMENT ERROR.
  414.  
  415.  
  416. ERR BSS 0
  417. MESSAGE (=C* ERROR IN FILE ARGUMENTS.*)
  418. ERR1 ABORT
  419. FET SPACE 4
  420. ODEBL EQU 20B OPTICAL DISK EXTENSION BUFFER LENGTH
  421. F BSS 0
  422. FILE FILEB BUF,BUFL,(FET=10)
  423. ORG F+11B
  424. VFD 36/,6/ODEBL,18/FODEB POINTER TO *OD* EXT. BUFFER
  425. ORG F+10
  426.  
  427. * OPTICAL DISK EXTENSION BUFFER.
  428.  
  429. FODEB BSSZ ODEBL
  430.  
  431. BUF BSS 0
  432. BUFL EQU 1
  433. SPACE 4
  434. *CALL COMCCIO
  435. *CALL COMCDXB
  436. *CALL COMCLFM
  437. *CALL COMCSYS
  438. USE //
  439. RFL= BSS 0
  440. SPACE 4
  441. END
cdc/nos2.source/opl871/files.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator