User Tools

Site Tools


cdc:nos2.source:opl871:cpupfm

CPUPFM

Table Of Contents

  • [00011] CPUPFM - COPY INDIRECT ACCESS FILES.
  • [00015] COPY INDIRECT ACCESS FILES.
  • [00109] FETS AND STORAGE LOCATIONS.
  • [00150] MAIN PROGRAM.
  • [00243] SUBROUTINES.
  • [00245] COS - CHECK OUTPUT FET STATUS,
  • [00307] ERR - *REPRIEVE* ERROR PROCESSOR.
  • [00322] DOF - DELETE ORIGINAL FILE.
  • [00352] SBC - SINGLE BUFFER COPY.
  • [00574] BUFFERS.

Source Code

CPUPFM.txt
  1. IDENT CPUPFM,FWA
  2. ABS
  3. SST
  4. ENTRY CPF
  5. ENTRY DMP=
  6. ENTRY LIB=
  7. ENTRY MFL=
  8. ENTRY SSJ=
  9. ENTRY UTL=
  10. SYSCOM B1
  11. TITLE CPUPFM - COPY INDIRECT ACCESS FILES.
  12. *COMMENT CPUPFM - COPY INDIRECT ACCESS FILES.
  13. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  14. CPF SPACE 4,10
  15. *** CPUPFM - COPY INDIRECT ACCESS FILES.
  16. *
  17. * R. C. SCHMITTER. 84/03/28.
  18. SPACE 4,10
  19. *** *CPUPFM* IS CALLED BY *PFM* TO PERFORM THE COPY OF AN
  20. * INDIRECT ACCESS FILE FOR *GET*, *OLD*, *SAVE*, *REPLACE*
  21. * AND *APPEND* OPERATIONS IF THE FILE LENGTH IS GREATER
  22. * THAN THE THREHOLD DEFINED IN *COMSPFM*. THE ONLY ENTRY
  23. * IS BY *DMP=* CALL TO *CPF*. *CPUPFM* CANNOT BE CALLED
  24. * AT THE COMMAND LEVEL.
  25. SPACE 4,10
  26. *** COMMAND FORMAT.
  27. *
  28. * *SPCW* FORMAT FROM *PFM*.
  29. *
  30. *T 18/ *CPF*,6/ 30B,18/ 0,18/ COMMAND CODE
  31. *
  32. * *CPUPFM* REPLY TO *PFM*.
  33. *
  34. *T 24/ 0,3/ 1,1/E ,8/ EC,24/ 0
  35. *
  36. * E = ERROR IDLE FLAG. IF SET, ERROR IDLE STATUS IS
  37. * TO BE SET FOR THE MASTER DEVICE BY *PFM*.
  38. *
  39. * THIS FLAG IS SET WHEN THE FILE TRANSFER IS
  40. * INCOMPLETE FOR *APPEND*, *REPLACE*, AND *SAVE*
  41. * COMMANDS. THIS CONDITION CAN OCCUR WITH
  42. * *TRACK LIMIT*, *PFM ABORTED*, AND *MASS STORAGE
  43. * ERROR* ERROR CODES .
  44. *
  45. * THIS FLAG IS SET WITH *FILE LENGTH ERROR* ERROR
  46. * CODE WHEN THERE IS A LOGICAL ERROR IN THE LENGTH
  47. * OF THE FILE.
  48. *
  49. * EC = *PFM* ERROR CODE.
  50. * DTE(17) - DATA TRANSFER ERROR.
  51. * TKL(31) - TRACK LIMIT.
  52. * FLE(32) - FILE LENGTH ERROR.
  53. * ABT(36) - PFM ABORTED.
  54. * MSE(37) - MASS STORAGE ERROR.
  55. * RTR(127) - RETRY REQUEST.
  56. *
  57. *
  58. * THE *DMPN* BLOCK IN NFL IS SET BY *PFM* WITH THE FOLLOWING
  59. * FORMAT.
  60. *
  61. *T 42/ LFN,18/ FLAGS
  62. *T, 12/ ,24/ APFL, 24/ LF
  63. *T, 36/ ,24/ RANDOM ADDRESS
  64. *T, 60/ SRB (WORD 0)
  65. *T, 60/ SRB (WORD 1)
  66. *T, 60/ SRB (WORD 2)
  67. *T, 60/ SRB (WORD 3)
  68. *
  69. * LFN = LOCAL FILE NAME.
  70. * FLAGS = 17/ ,1/ FGIA
  71. * FGIA = INDIRECT ALLOCATION INTERLOCK HELD.
  72. * LF = TOTAL LENGTH OF FILE TO BE TRANSFERRED (BOTH PERMANENT
  73. * AND LOCAL FOR *APPEND*).
  74. * APFL = LENGTH OF THE LOCAL FILE FOR *APPEND*.
  75. * = 0, IF NOT *APPEND*.
  76. * SRB = SPECIAL REQUEST BLOCK FOR THE ORIGINAL FILE FOR
  77. * *APPEND*.
  78. *
  79. * IF *APFL* = *LF*, THEN THE *APPEND* IS AT THE END OF
  80. * THE INDIRECT CHAIN.
  81. SPACE 4,10
  82. * COMMON DECKS.
  83.  
  84.  
  85. *CALL COMCMAC
  86. *CALL COMCCMD
  87. *CALL COMSMLS
  88. *CALL COMSPFM
  89. *CALL COMSPFU
  90. *CALL COMSPRD
  91. *CALL COMSRPV
  92. *CALL COMSSSD
  93. *CALL COMSSSJ
  94. SPACE 4,10
  95. * MACROS.
  96.  
  97.  
  98. DELPFC MACRO LFN,SRB
  99. MACREF DELPFC
  100. =4 LFN,,,,SRB,,,,,,,,27B
  101. DELPFC ENDM
  102. SPACE 4,10
  103. **** ASSEMBLY CONSTANTS.
  104.  
  105.  
  106. BUFL EQU 10030B BUFFER LENGTH FOR SINGLE BUFFER COPY
  107. EIDF EQU 400B ERROR IDLE FLAG
  108. ****
  109. TITLE FETS AND STORAGE LOCATIONS.
  110. ORG 120B
  111. SPACE 4,10
  112. FWA BSS 0
  113.  
  114. * FETS.
  115.  
  116.  
  117. I BSS 0 INPUT FILE
  118. INPUT FILEB BUF,BUFL,FET=10D,EPR
  119.  
  120. O BSS 0 OUTPUT FILE
  121. OUTPUT FILEB BUF,BUFL,FET=16D,EPR,UPR
  122. SPACE 4,10
  123. * STORAGE LOCATIONS.
  124.  
  125.  
  126. APFL CON 0 APPEND ORIGINAL FILE LENGTH
  127. ERRF CON 0 ERROR FLAG
  128. FTCF CON 0 FILE TRANSFER COMPLETE FLAG
  129. LENG CON 0 FILE LENGTH
  130. LFAL CON 0 LOCAL FILE ACCESS LEVEL
  131. LFNM CON 0 LOCAL FILE NAME
  132. PFMC CON 0 *PFM* COMMAND CODE
  133. SPACE 4,10
  134. * SPECIAL *PFM* COMMUNICATION FILE NAMES.
  135.  
  136.  
  137. APFN VFD 42/7L"APF",18/3 APPEND FILE NAME
  138. ILKN VFD 42/7L"ILK",18/3 INTERLOCK FILE NAME
  139. PFNM VFD 42/7L"PFN",18/3 PERMANENT FILE NAME
  140. SPACE 4,10
  141. * *SSJ=* SPECIAL ENTRY POINT PARAMETER BLOCK.
  142.  
  143.  
  144. SSJ= VFD 12/0,24/-0,12/PFCS,12/IRSI
  145. BSSZ SSJL-1
  146.  
  147. LIB= EQU 0 ALLOW WRITE ON EXECUTE-ONLY FILE
  148.  
  149. UTL= EQU 0 ALLOW ACCESS TO SUSPECT DEVICE
  150. TITLE MAIN PROGRAM.
  151. * MAIN PROGRAM.
  152.  
  153.  
  154. CPF SB1 1 ENTRY
  155. RJ PRS PRESET
  156. SA1 APFL
  157. SA5 LENG GET FILE LENGTH
  158. ZR X1,CPF2 IF NOT *APPEND*
  159. IX5 X5-X1 SET ORIGINAL FILE LENGTH
  160. ZR X5,CPF1 IF *APPEND* AT END OF CHAIN
  161.  
  162. * PROCESS COPY OF ORIGINAL FILE (*APPEND* ONLY).
  163.  
  164. SA1 APFN SET INPUT FILE NAME
  165. BX6 X1
  166. SA6 I
  167. RJ SBC COPY PERMANENT FILE
  168. NZ X1,CPF4 IF ERROR DETECTED
  169. SA1 I+FTFT RESET BUFFER POINTERS
  170. SX6 X1
  171. SA6 A1+B1
  172. SA6 A6+B1
  173. SA1 O+FTFT
  174. SX6 X1
  175. SA6 A1+B1
  176. SA6 A6+B1
  177. SA1 LFNM SET LOCAL FILE NAME
  178. BX6 X1
  179. SA6 I
  180. CPF1 SA5 APFL GET FILE LENGTH
  181.  
  182. * PROCESS FILE COPY (ALL FUNCTIONS).
  183.  
  184. CPF2 RJ SBC COPY FILE
  185. NZ X1,CPF4 IF ERROR DETECTED
  186. SX6 B1 SET FILE TRANSFER COMPLETE
  187. SA6 FTCF
  188. SA1 O+FTFT CLEAR USER PROCESSING IN OUTPUT FET
  189. MX0 59
  190. LX0 45
  191. BX6 X0*X1
  192. SA6 A1
  193. SA1 LFNM REWIND LOCAL FILE
  194. BX6 X1
  195. SA6 O
  196. REWIND O,R
  197. RJ COS CHECK OUTPUT FET STATUS
  198. NZ X1,CPF4 IF ERROR DETECTED
  199. RJ DOF DELETE ORIGINAL FILE
  200. SA1 ERRF
  201. NZ X1,CPF4 IF ERROR DETECTED
  202.  
  203. * RETURN ALL *PFM* FILES.
  204.  
  205. CPF3 RECALL I
  206. RECALL O
  207. SA1 PFNM RETURN PERMANENT FILE
  208. BX6 X1
  209. SA6 O
  210. RETURN O,R
  211. SA1 ILKN RETURN INTERLOCK FILE
  212. BX6 X1
  213. SA6 O
  214. RETURN O,R
  215. SA1 APFL
  216. ZR X1,CPF4 IF NOT *APPEND*
  217. SA5 LENG
  218. IX5 X5-X1
  219. ZR X5,CPF4 IF *APPEND* TO END OF CHAIN
  220. SA1 APFN RETURN APPEND FILE
  221. BX6 X1
  222. SA6 O
  223. RETURN O,R
  224.  
  225. * SET REPLY TO *PFM*.
  226.  
  227. CPF4 SA1 ERRF GET ERROR FLAG
  228. SX6 B1
  229. LX6 33
  230. ZR X1,CPF6 IF NO ERROR DETECTED
  231. SA2 FTCF CHECK FILE TRANSFER COMPLETE FLAG
  232. SA3 PFMC CHECK COMMAND CODE
  233. NZ X2,CPF5 IF FILE TRANSFER COMPLETE
  234. SX2 X3-CCGT
  235. ZR X2,CPF5 IF *GET* COMMAND
  236. SX2 X3-CCOD
  237. ZR X2,CPF5 IF *OLD* COMMAND
  238. SX1 X1+EIDF SET ERROR IDLE FLAG
  239. CPF5 LX1 24 ADD ERROR FLAG TO REPLY
  240. BX6 X1+X6
  241. CPF6 SA6 SPPR SET *SPCW*
  242. ENDRUN
  243. TITLE SUBROUTINES.
  244. COS SPACE 4,20
  245. ** COS - CHECK OUTPUT FET STATUS,
  246. *
  247. * ENTRY (O) = OUTPUT FET.
  248. * (PFMC) = *PFM* FUNCTION.
  249. *
  250. * EXIT (X1) = 0 IF NO ERROR STATUS IN FET.
  251. * .NE. 0 IF ERROR SET IN FET.
  252. * (ERRF) = ERROR FLAG SET IF ERROR SET IN FET.
  253. * SET TO *RETRY REQUEST* FOR WRITE ERROR
  254. * ON *GET* AND *OLD* REQUESTS AND TO
  255. * *MASS STORAGE ERROR* FOR WRITE ERROR
  256. * ON OTHER REQUESTS.
  257. * SET TO *TRACK LIMIT* FOR FULL DISK ERROR.
  258. * SET TO *PFM ABORTED* FOR ANY OTHER ERROR.
  259. *
  260. * USES X - 0, 1, 2, 6, 7.
  261. * A - 1, 2, 6, 7.
  262.  
  263.  
  264. COS SUBR ENTRY/EXIT
  265. SA2 O OUTPUT FET
  266. BX1 X1-X1
  267. LX2 59-0
  268. PL X2,COSX IF FET BUSY
  269. LX2 59-13-59+0
  270. NG X2,COS1 IF FATAL ERROR
  271. LX2 59-11-59+13
  272. NG X2,COS2 IF PARITY ERROR
  273. LX2 59-10-59+11
  274. PL X2,COSX IF NO ERROR
  275.  
  276. * PROCESS TRACK LIMIT ERROR.
  277.  
  278. SX6 /ERRMSG/TKL *EQXXX,DNYY, TRACK LIMIT.*
  279. EQ COS3 SET ERROR FLAG
  280.  
  281. * PROCESS FATAL ERROR.
  282.  
  283. COS1 SX6 /ERRMSG/ABT *PFM ABORTED.*
  284. EQ COS3 SET ERROR FLAG
  285.  
  286. * PROCESS PARITY ERROR.
  287.  
  288. COS2 SA1 PFMC CHECK *PFM* FUNCTION
  289. SX6 /ERRMSG/RTR RETRY REQUEST
  290. SX2 X1-CCGT
  291. ZR X2,COS3 IF *GET*
  292. SX2 X1-CCOD
  293. ZR X2,COS3 IF *OLD*
  294. SX6 /ERRMSG/MSE *EQXXX,DNYY, MASS STORAGE ERROR.*
  295.  
  296. * SET ERROR FLAG AND CLEAR ERROR CODE FROM FET.
  297.  
  298. COS3 SA6 ERRF SET ERROR FLAG
  299. SA2 O CLEAR ERROR CODE FROM FET
  300. MX0 56
  301. LX0 10
  302. BX7 X0*X2
  303. SA7 A2
  304. BX1 X6
  305. EQ COSX RETURN WITH (X1) .NE. 0
  306. ERR SPACE 4,10
  307. ** ERR - *REPRIEVE* ERROR PROCESSOR.
  308. *
  309. *
  310. * EXIT (ERRF) = ERROR FLAG.
  311. * TO *CPF3* TO RETURN *PFM* COMMUNICATION FILES.
  312.  
  313.  
  314. ERR BSS 0 ENTRY
  315. SX6 /ERRMSG/ABT *PFM ABORTED.*
  316. SA6 ERRF SET ERROR FLAG
  317. EQ CPF3 RETURN COMMUNICATION FILES
  318.  
  319.  
  320. ERRA RPVBLK ERR REPRIEVE PARAMETER BLOCK
  321. DOF SPACE 4,10
  322. ** DOF - DELETE ORIGINAL FILE.
  323. *
  324. * EXIT *PFM* CALLED TO DELETE PFC ENTRY FOR ORIGINAL
  325. * FILE ON *APPEND* OPERATION.
  326. * (ERRF) = ERROR RETURNED FROM *PFM*.
  327. *
  328. * USES X - 0, 1, 2, 6, 7.
  329. * A - 1, 2, 6, 7.
  330. *
  331. * MACROS DELPFC.
  332.  
  333.  
  334. DOF SUBR ENTRY/EXIT
  335. SA1 APFL
  336. ZR X1,DOFX IF NOT *APPEND*
  337. SA2 LENG
  338. IX6 X1-X2
  339. ZR X6,DOFX IF *APPEND* AT END OF CHAIN
  340. DELPFC O,SPPR+4
  341. SA1 O CHECK FOR ERROR
  342. MX0 -8
  343. LX0 10
  344. BX6 -X0*X1
  345. ZR X6,DOFX IF NO ERROR
  346. BX7 X0*X1 CLEAR ERROR CODE FROM FET
  347. SA7 A1
  348. LX6 0-10
  349. SA6 ERRF SAVE ERROR CODE
  350. EQ DOFX RETURN
  351. SBC SPACE 4,30
  352. ** SBC - SINGLE BUFFER COPY.
  353. *
  354. * ENTRY (X5) = LENGTH OF FILE.
  355. *
  356. * EXIT (X1) = 0 IF FILE COPY COMPLETE.
  357. * .NE. 0 IF FILE COPY INCOMPLETE.
  358. * (ERRF) = ERROR FLAG.
  359. *
  360. * ERROR WHEN READ PARITY ERROR DETECTED -
  361. * IF CORRECT SECTOR WAS READ, SET *DATA TRANSFER ERROR*
  362. * AND CONTINUE TRANSFER.
  363. * IF INCORRECT SECTOR WAS READ, SET *FILE LENGTH
  364. * ERROR* AND PAD OUTPUT FILE WITH EOF-S.
  365. *
  366. * USES X - ALL.
  367. * A - 0, 1, 2, 3, 4, 6.
  368. *
  369. * CALLS COS.
  370. *
  371. * MACROS READCW, RECALL, WRITECW, WRITEW.
  372. *
  373. * PROGRAMMER-S NOTE - WHEN CHECKING FOR FET COMPLETE AND
  374. * DATA IN THE BUFFER, THE FET STATUS MUST BE PICKED UP
  375. * BEFORE THE BUFFER POINTER.
  376. *
  377. * THIS ROUTINE IS ADAPTED FROM *SBC* IN *COPYB*.
  378.  
  379.  
  380. SBC SUBR ENTRY/EXIT
  381. RECALL O
  382. WRITECW O,* PRESET CONTROL WORD WRITE
  383. SA2 I+FTOT
  384. SA0 X2+ INITIALIZE INPUT PSEUDO OUT POINTER
  385. BX0 X0-X0 INDICATE NO BLOCKS AVAILABLE OR COMPLETE
  386. EQ SBC9 INITIATE CONTROL WORD READ
  387.  
  388. * CHECK FOR INPUT BLOCK AVAILABLE.
  389.  
  390. SBC1 SA2 I CHECK INPUT FILE STATUS
  391. SA3 I+FTIN CHECK INPUT IN = PSEUDO OUT POINTER
  392. BX0 X0-X0 INDICATE NO BLOCKS AVAILABLE OR COMPLETE
  393. SX1 A0
  394. IX1 X3-X1
  395. LX2 59-0
  396. NZ X1,SBC2 IF INPUT BLOCK AVAILABLE
  397. PL X2,SBC4 IF BUFFER BUSY
  398. LX2 59-9-59+0
  399. NG X2,SBC11 IF EOI
  400. LX2 59-13-59+9
  401. PL X2,SBC1.1 IF NO FATAL ERROR
  402. SX1 /ERRMSG/ABT *PFM ABORTED.*
  403. BX6 X1
  404. SA6 ERRF SET ERROR FLAG
  405. EQ SBCX RETURN WITH (X1) .NE. 0
  406.  
  407. SBC1.1 LX2 59-11-59+13
  408. PL X2,SBC4 IF NO READ PARITY ERROR STATUS IN FET
  409. SX7 /ERRMSG/DTE *DATA TRANSFER ERROR*
  410. SA7 ERRF
  411. SA1 I+6 CHECK DETAILED ERROR CODE
  412. LX1 59-11
  413. PL X1,SBC1.2 IF CORRECT SECTOR READ
  414. SX6 B1 SET LENGTH ERROR DUE TO HARDWARE FAILURE
  415. SA6 SBCC
  416. EQ SBC11 PAD FILE WITH EOF-S
  417.  
  418. SBC1.2 MX6 1 CLEAR PARITY ERROR BIT IN FET
  419. BX6 X2-X6
  420. LX6 59-59-59+11
  421. SA6 A2
  422. EQ SBC4 CONTINUE TRANSFER
  423.  
  424. * PROCESS INPUT BLOCK.
  425.  
  426. SBC2 SX0 B1 INDICATE INPUT BLOCK TRANSFERRED
  427. SA3 SBCB INCREMENT BLOCK COUNT
  428. SX4 B1 INDICATE DATA TRANSFERRED
  429. IX6 X3+X4
  430. SA4 A0 CRACK CONTROL WORD HEADER
  431. MX7 -24
  432. SA6 A3
  433. BX7 -X7*X4 BYTE COUNT
  434. SX2 4 CALCULATE WORD COUNT
  435. IX7 X7+X2
  436. SX2 X2+B1
  437. IX7 X7/X2
  438. SA2 I+FTLM
  439. SX3 X7+2 ADVANCE OVER BLOCK AND CONTROL WORDS
  440. SX1 A0
  441. SX2 X2+
  442. IX2 X2-X1
  443. IX6 X3-X2
  444. NG X6,SBC3 IF NO WRAP AROUND
  445. SA2 I+FTFT FIRST
  446. BX3 X6
  447. SX1 X2
  448. SBC3 IX6 X1+X3
  449. SA1 A0 GET CONTROL WORD HEADER
  450. PL X1,SBC3.1 IF NO READ ERROR OCCURRED ON THIS BLOCK
  451. SX7 /ERRMSG/DTE *DATA TRANSFER ERROR*
  452. SA7 ERRF
  453.  
  454. * TRANSFER BLOCK TO OUTPUT.
  455.  
  456. SBC3.1 ZR X5,SBC13 IF SUPPLIED PRU COUNT NOT ALREADY WRITTEN
  457. SX1 B1 DECREMENT PRU COUNT
  458. IX5 X5-X1
  459. SA6 O+FTIN ADVANCE OUTPUT IN POINTER
  460. SA0 X6 ADVANCE INPUT PSEUDO OUT POINTER
  461.  
  462. * CHECK FOR REINITIATE CONTROL WORD WRITE.
  463.  
  464. SBC4 SA1 O
  465. LX1 59-0
  466. PL X1,SBC6 IF BUFFER BUSY
  467. RJ COS CHECK OUTPUT FILE STATUS
  468. NZ X1,SBCX IF ERROR OCCURRED
  469. SA1 O+FTIN
  470. SA2 A1+B1
  471. SX3 BUFL/3
  472. IX1 X1-X2 (IN-OUT)
  473. IX2 X1-X3 (IN-OUT) - 1/3(BUFFER SIZE)
  474. ZR X1,SBC6 IF BUFFER EMPTY
  475. PL X1,SBC5 IF IN .GT. OUT
  476. LX3 1
  477. IX2 X3+X1 2/3(BUFFER SIZE) - (OUT-IN)
  478. SBC5 NG X2,SBC6 IF BUFFER THRESHOLD NOT REACHED
  479. WRITECW O REINITIATE CONTROL WORD WRITE
  480.  
  481. * CHECK FOR OUTPUT BLOCK WRITTEN.
  482.  
  483. SBC6 SA1 O+FTOT CHECK OUTPUT OUT = INPUT OUT
  484. SA2 I+FTOT
  485. IX3 X1-X2
  486. ZR X3,SBC7 IF BLOCK NOT WRITTEN
  487. BX6 X1
  488. SX0 X0+1 INDICATE OUTPUT BLOCK COMPLETE
  489. SA6 A2+ UPDATE INPUT OUT = OUTPUT OUT
  490.  
  491. * CHECK FOR REINITIATE CONTROL WORD READ.
  492.  
  493. SBC7 SA4 I CHECK INPUT FILE STATUS
  494. LX4 59-0
  495. PL X4,SBC10 IF BUFFER BUSY
  496. SA1 I+FTIN
  497. LX4 59-11-59+0
  498. NG X4,SBC10 IF PARITY ERROR STATUS IN FET
  499. LX4 59-3-59+11
  500. NG X4,SBC10 IF EOF/EOI ENCOUNTERED
  501. LX4 59-13-59+3
  502. NG X4,SBC10 IF FATAL ERROR STATUS IN FET
  503. SX3 BUFL/3 CHECK BUFFER THRESHOLD
  504. SA2 A1+B1
  505. IX1 X1-X2 (IN-OUT)
  506. IX2 X3+X1 1/3(BUFFER SIZE) + (IN-OUT)
  507. ZR X1,SBC9 IF BUFFER EMPTY
  508. NG X1,SBC8 IF OUT .GT. IN
  509. LX3 1
  510. IX2 X1-X3 (IN-OUT) - 2/3(BUFFER SIZE)
  511. SBC8 PL X2,SBC10 IF BUFFER THRESHOLD NOT REACHED
  512. SBC9 READCW I,0 INITIATE CONTROL WORD READ TO EOI
  513.  
  514. * CHECK FOR RECALL.
  515.  
  516. SBC10 NZ X0,SBC1 IF INPUT AND/OR OUTPUT BLOCKS TRANSFERRED
  517. RECALL WAIT FOR DATA TRANSFER
  518. EQ SBC1 CHECK FOR INPUT BLOCKS
  519.  
  520. * PROCESS EOI.
  521.  
  522. SBC11 ZR X5,SBC14 IF NO FILE LENGTH ERROR
  523.  
  524. * PROCESS INPUT FILE TOO SHORT.
  525.  
  526. SBC12 WRITEW O,SBCA,B1+B1 PAD FILE WITH EOF
  527. SX1 B1
  528. IX5 X5-X1
  529. NZ X5,SBC12 IF FILE NOT YET CORRECT LENGTH
  530.  
  531. * PROCESS INPUT FILE TOO LONG.
  532.  
  533. SBC13 SX5 -1
  534.  
  535. * FLUSH OUTPUT BUFFER.
  536.  
  537. SBC14 RECALL O
  538. RJ COS CHECK OUTPUT FILE STATUS
  539. NZ X1,SBCX IF ERROR OCCURRED
  540. SA1 O+FTIN CHECK IN = OUT
  541. SA2 A1+B1
  542. IX1 X1-X2
  543. ZR X1,SBC15 IF OUTPUT BUFFER EMPTY
  544. WRITECW O,R FLUSH OUTPUT BUFFER
  545. RJ COS CHECK OUTPUT FILE STATUS
  546. NZ X1,SBCX IF ERROR OCCURRED
  547.  
  548. * PROCESS FILE LENGTH ERROR.
  549.  
  550. SBC15 ZR X5,SBCX IF NO FILE LENGTH ERROR
  551. SA2 SBCC
  552. SX6 /ERRMSG/FLE *FILE LENGTH ERROR*
  553. NZ X2,SBC16 IF ERROR DUE TO HARDWARE FAILURE
  554. SX6 X6+EIDF SET ERROR IDLE FLAG
  555. SBC16 SA6 ERRF SET ERROR FLAG
  556. BX1 X6
  557. EQ SBCX RETURN WITH (X1) = 0
  558.  
  559.  
  560. SBCA VFD 60/0 CONTROL WORD EOF
  561. VFD 12/17B,48/0
  562.  
  563. SBCB CON 0 BLOCK COUNT
  564. SBCC CON 0 LENGTH ERROR DUE TO HARDWARE FAILURE
  565. SPACE 4,10
  566. * COMMON DECKS.
  567.  
  568.  
  569. *CALL COMCCIO
  570. *CALL COMCCPM
  571. *CALL COMCPFM
  572. *CALL COMCSYS
  573. *CALL COMCWTW
  574. TITLE BUFFERS.
  575. * BUFFERS.
  576.  
  577. USE LITERALS
  578.  
  579. BUF EQU * BUFFER FOR SINGLE BUFFER COPY
  580. BUFLWA EQU BUF+BUFL+4 END OF BUFFERS
  581. PRS TITLE PRESET.
  582. ** PRESET.
  583. *
  584. * ENTRY PARAMETER BLOCK FROM *PFM* AT *SPPR*.
  585. *
  586. * EXIT INPUT AND OUTPUT FILE NAMES SET.
  587. * RANDOM BITS SET IN OUTPUT FET.
  588. * (APFL) = APPEND FILE LENGTH.
  589. * (LENG) = TOTAL FILE LENGTH TO COPY.
  590. * (SPPR) PRESET WITH ERROR REPLAY FOR *PFM*.
  591. * (LFNM) = LOCAL FILE NAME.
  592. *
  593. * USES X - ALL.
  594. * A - 1, 2, 6, 7.
  595. *
  596. * MACROS ABORT, MESSAGE, REPRIEVE.
  597.  
  598.  
  599. PRS SUBR ENTRY/EXIT
  600. SA1 ACTR
  601. ZR X1,PRS1 IF NOT COMMAND CALL
  602. MESSAGE (=C*INCORRECT COMMAND.*),,R
  603. ABORT
  604.  
  605. PRS1 REPRIEVE ERRA,SET,277B SET EXTENDED REPRIEVE
  606. SA1 SPPR GET COMMAND CODE
  607. MX0 -18
  608. BX6 -X0*X1
  609. SA6 PFMC SAVE COMMAND CODE
  610. SA1 A1+B1 GET LOCAL FILE NAME
  611. BX5 -X0*X1 SAVE INTERLOCK FLAG
  612. BX1 X0*X1
  613. SX6 3
  614. BX6 X1+X6
  615. BX1 X6
  616. SA6 LFNM
  617.  
  618. * SET FILE NAMES IN FETS.
  619.  
  620. SA2 PFNM GET PERMANENT FILE NAME
  621. SA4 PFMC CHECK COMMAND CODE
  622. SX3 X4-CCGT
  623. ZR X3,PRS2 IF *GET*
  624. SX3 X4-CCOD
  625. ZR X3,PRS2 IF *OLD*
  626. BX1 X2 SWITCH FILE NAMES
  627. BX2 X6
  628. PRS2 BX6 X2 SET FILE NAMES
  629. BX7 X1
  630. SA6 I
  631. SA7 O
  632. SA1 SPPR+2 GET FILE LENGTHS
  633. MX0 -24
  634. BX6 -X0*X1
  635. AX1 24
  636. BX7 -X0*X1
  637. SA6 LENG
  638. SA7 APFL
  639. SA1 PRSA PRESET ERROR REPLY
  640. BX6 X1
  641. SA6 SPPR
  642. SA4 PFMC CHECK COMMAND CODE
  643. SX2 X4-CCGT
  644. ZR X2,PRSX IF *GET*
  645. SX2 X4-CCOD
  646. ZR X2,PRSX IF *OLD*
  647. SX1 EIDF SET ERROR IDLE FLAG IN ERROR REPLY
  648. LX1 24
  649. BX6 X1+X6
  650. SA6 A6
  651.  
  652. * SET RANDOM REWRITE BITS.
  653.  
  654. R= X6,FGIA
  655. BX5 X6*X5
  656. NZ X5,PRSX IF SEQUENTIAL WRITE (AT END OF CHAIN)
  657. SX6 B1 SET RANDOM ACCESS BIT
  658. LX6 47-0
  659. SA1 O+1
  660. BX6 X6+X1
  661. SA6 A1
  662. SX6 B1 SET RANDOM REWRITE REQUEST
  663. LX6 29-0
  664. SA1 O+6
  665. BX6 X1+X6
  666. SA2 SPPR+3 GET RANDOM ADDRESS
  667. BX6 X2+X6
  668. SA6 A1
  669. EQ PRSX RETURN
  670.  
  671.  
  672. PRSA VFD 24/0,3/1,1/0,8//ERRMSG/ABT,24/0 ERROR REPLY
  673. SPACE 4,10
  674. ERRNG MFL=-* OVERFLOW PAST END OF BUFFERS
  675. SPACE 4,10
  676. IDENT
  677.  
  678.  
  679. .1 SET BUFLWA+77B CALCULATE FIELD LENGTH
  680.  
  681. * SET IGNORE RESOURCE LIMITS FOR PROGRAM EXECUTION.
  682. * FORCE *OVERRIDE REQUIRED* BIT TO BE SET.
  683. * PREVENT *DMP=* ON COMMAND CALL.
  684. * DO NOT RELEASE EXTRA FIELD LENGTH ON LOAD.
  685.  
  686. DMP= EQU .1/100B+320000B
  687. MFL= EQU .1/100B*100B
  688. SPACE 4
  689. END
cdc/nos2.source/opl871/cpupfm.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator