User Tools

Site Tools


plato:source:plaopl:copypf

COPYPF

Table Of Contents

  • [00010] COPY PLATO FILES FROM DUMPS
  • [00196] ATTAUD - ATTACH AUDIT TRAIL FILE
  • [00211] SUBROUTINES
  • [00213] CKSTATS - CHECK FILE STATUS FOR BUSY
  • [00235] CLREPR - CLEAR ERROR PROCESSING BIT IN THE FET
  • [00248] GETPN - ATTACH FILE ON PACK *PN*
  • [00268] GTW - GET WORD
  • [00319] INIT - INITIALIZE
  • [00370] INITFIL - INITIALIZE FOR FILE RECOVERY
  • [00403] INITPCK - INITIALIZE PACKNAME/VSN FOR MASTER FILE
  • [00437] INITPT - INITIALIZE POINTERS
  • [00458] PRA - EXTRACT PARAMETERS BEYOND PERIOD
  • [00510] RTF - REQUEST TAPE FILE
  • [00634] SETEB - SETUP EXTENDED LABEL BUFFER
  • [00659] SETEPR - SET ERROR PROCESSING BIT IN THE FET
  • [00671] ZERO - ZERO BUFFER
  • [00693] PROCESS MF DATA
  • [01050] PLATO FILE ATTACH, READ WRITE ROUTINES
  • [01051] SETF - ATTACH FILE
  • [01095] DRD - DATAIN ROUTINES
  • [01115] DWR - DWRITE ROUTINES
  • [01132] DDET - DETACH FILE
  • [01143] DPAR - STORE PARAMETERS
  • [01158] BDIS - SENT MESSAGE TO THE B DISPLAY ONLY
  • [01171] DMAM - OUTPUT FILE NAME INTO DAYFILE
  • [01181] DMEM - OUTPUT ERROR STATUS INTO DAYFILE
  • [01191] DBGM - OUTPUT BEGIN RECORD INTO DAYFILE
  • [01201] DNRM - OUTPUT NUMBER OF RECORDS INTO DAYFILE
  • [01263] K-DISPLAY ROUTINES
  • [01265] BUILDO - BUILD OUTPUT LINE
  • [01479] MOVEL - MOVE CODED LINE TO LEFT SCREEN BUFFER
  • [01554] SETBUF - SET UP BUFFER
  • [01577] SETK - SET UP K-DISPLAY PARAMETERS
  • [01649] SETPAR - SETUP PARAMETERS
  • [01683] SETSTK - SET PARAMETERS IN STACK
  • [01705] WAINP - WAIT FOR KEYBOARD INPUT
  • [01892] MESSAGES, BUFFERS, DATA AREAS AND COM DECKS

Source Code

COPYPF.txt
  1. COPYPF
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK COPYPFX 00 000 81/04/29 11.32
  4. COPYPF
  5. IDENT COPYPF,BEGIN,COPYPF
  6. ENTRY COPYPF
  7. SYSCOM B1 DEFINE (B1) = 1
  8. *COMMENT COPY PLATO FILES FROM DUMPS
  9. COMMENT COPYRIGHT CONTROL DATA CORP. 1980.
  10. TITLE COPY PLATO FILES FROM DUMPS
  11. SPACE 4
  12. *** COPY PLATO FILES FROM DUMPS
  13. * J. J. BUCHMANN. 80/06/17.
  14. *
  15. *FUNCTION;
  16. * THIS PROGRAM HAS TWO MODES OF OPERATION, SINGLE PLATO
  17. * FILE RECOVERY, AND MASTERFILE RECOVERY MODE. THE MODE
  18. * OF OPERATION DEPENDS ON THE *FF* PARAMETER ON THE
  19. * CONTROL CARD. IF *FF* IS PRESENT, THEN SINGLE FILE
  20. * MODE IS SELECTED, IF NOT PRESENT, THEN MASTERFILE MODE
  21. * IS SELECTED.
  22. *
  23. * IN SINGLE FILE MODE, ALL THE PARAMETERS MUST BE
  24. * SPECIFIED ON THE CONTROL CARD; PLATO MUST BE UP; AND A
  25. * PLATO FILE CREATED (*TF* PARAMETER) OF TYPE BACKUP,
  26. * RESIDING IN THE SAME ACCOUNT AS THE ORIGINAL FILE, AND
  27. * OF THE SAME SIZE. THE COPYPF PROGRAM WILL REQUEST THE
  28. * TAPE/DISK (E,P DISPLAY IF THE V=VSN PARAMETER IS
  29. * SPECIFIED). THE TAPE/DISK WILL BE SCANNED FOR THE
  30. * REQUESTED FILE, AND THE FILE WILL BE RESTORED IF ALL
  31. * CONDITIONS FOR FILE TYEP, ACCOUNT, AND SIZE ARE MET.
  32. *
  33. * IN MASTERFILE MODE, THE PARAMETERS MAY BE PASSED ON
  34. * THE CONTROL CARD OR VIA THE K-DISPLAY. WHEN THE
  35. * PROPER MASTERFILES HAVE BEEN SELECTED FOR RECOVERY,
  36. * THEN A K.GO WILL START THE PROCESS. ALL MASTERFILES
  37. * THAT ARE TO BE RECOVERED MUST HAVE BEEN ATTACHED TO
  38. * THE CONTROL POINT PRIOR TO THE RECOVERY ATTEMPT. THE
  39. * PROGRAM WILL REQUEST TAPES/PACKS VIA THE E,P DISPLAY.
  40. * THE OPERATOR CONTINUES TO MOUNT THE TAPE/PACKS AS
  41. * NEEDED UNTIL ALL REQUESTED MASTERFILES HAVE BEEN
  42. * RECOVERED.
  43. *
  44. * AN ON-LINE LISTING OF ALL PARAMETERS MAYBE DISPLAYED
  45. * BY TYPING KK.
  46. *
  47. *PARAMETERS;
  48. * SINGLE PLATO FILE RECOVERY MODE;
  49. * V=VSN REQUEST LABELED TAPE (VSN=LABEL)
  50. * FF=XXXXXX FROM FILE NAME (PLATO FILE NAME ON TAPE)
  51. * TF=XXXXXX TO FILE NAME (CURRENT PLATO FILE NAME)
  52. * IF NOT SPECIFIED, DEFAULT = FF
  53. *
  54. * MASTERFILE RECOVERY MODE;
  55. * PN=PACK PACKNAME TO BE RECOVERED
  56. * MF=MASTER MASTERFILE NAME TO BE RECOVERED
  57. * DA=MMDD MONTH AND DAY TO BE RECOVERED
  58. * SL=NN SLOT VALUE TO BE USED
  59. *
  60. * K-DISPLAY PARAMETERS (MASTERFILE MODE ONLY);
  61. * PN,MF,DA,SL SAME AS ABOVE
  62. * GO BEGIN PROCESSING THE RECOVERY TAPES
  63. *
  64. * /--- BLOCK COPYPFX 00 000 81/04/29 11.33
  65. *INFORMATIVE MESSAGES;
  66. * DO NOT USE BLANK LABEL TAPE (WRONG TAPE)
  67. * DUMP FILE ASSIGNED TO DISK (RESTART THE PROGRAM AND
  68. * GIVE TAPE ASSIGNMENT)
  69. * NO FILES SELECTED (WHEN K.GO IS ENTERED)
  70. * FFFFF - FILE NOT FOUND IN MASTERFILE MMMMM (FILE NOT
  71. * IN THIS MASTERFILE, SKIP TO NEXT MASTERFILE)
  72. * MMMMM - MASTERFILE NOT REQUESTED (THIS MASTERFILE WILL
  73. * BE SKIPPED)
  74. * ALL DONE
  75. *
  76. *ERROR MESSAGES;
  77. * ERROR IN PARAMETERS (CORRECT THE PROCEDURES)
  78. * TOO MANY FILES SELECTED (TO BE RESTORED - MAX. 50)
  79. * FIW OF TO FILE NOT BACKUP TYPE
  80. * TO FILE TYPE NOT BACKUP (WORD 2 OF BLOCK 0)
  81. * FILE SIZES DO NOT MATCH
  82. * FILE ACCOUNTS DO NOT MATCH
  83. *
  84. *PLATO ATTACH READ/WRITE ERROR MESSAGES;
  85. * WAITING FOR FILE - XXXXXX (INFORMATIVE ONLY)
  86. * ERROR IN ATTACHING FILE
  87. * ERROR IN READING FILE
  88. * ERROR IN WRITING FILE
  89. * FILE NAME = XXXXX
  90. * ERROR STATUS = NNNN
  91. * BEGINNING RECORD = NNNN
  92. * ENDING RECORD = NNNN
  93. *
  94. *INTERNAL ERROR MESSAGES;
  95. * ERROR IN PROCESSOR TABLE
  96. * TOO MANY FILES IN MASTER FILE
  97. * NAMES OF TO FILES DO NOT MATCH (FIW .VS. FILE DIRECT.)
  98. * NAMES OF FROM FILES DO NOT MATCH (FIW .VS. FILE DIR.)
  99. * FROM FILE SIZE WRONG
  100. * FILE NOT COMPLETELY CONTAINED IN MASTERFILE
  101. SPACE 4
  102. *CALL COMCMAC
  103. *CALL COMCDCM
  104. *CALL COMCCMD
  105. SPACE 4,10
  106. *CALL SYSCON
  107. SPACE 4,10
  108. **** ASSEMBLY CONSTANTS.
  109.  
  110. BUFL EQU 10001B CIO BUFFER LENGTH (SMALL)
  111. LBUFL EQU 10001B CIO BUFFER LENGTH (LARGE)
  112. WORKL EQU 320*7 WORKING STORAGE BUFFER LENGTH
  113. CWRKH EQU 6 COMMUNICATIONS BUFFER HEADER
  114. CWRKF EQU 3 COMM. BUFFER FILE ENTRY
  115. MAXFIL EQU MFFILES MAX NUM OF FILES / MASTERFILE
  116.  
  117. MAXK545 EQU 35 MAX LINES ON CC545 K-DISPLAY
  118. MAXK721 EQU 20 MAX LINES ON 721 K-DISPLAY
  119. MAXST EQU 50 MAX NO. OF STACK ENTRIES
  120. MAXST2 EQU MAXST*2 SIZE OF STACK BUFFER
  121.  
  122. BLOCK EQU 320 BLOCK SIZE
  123. NUMBLK EQU 7 NUMBER OF BLOCKS/PART
  124. PART EQU BLOCK*NUMBLK PART SIZE
  125. BASE EQU 320 BASE WORD FOR BEGINNING OF INFO
  126. MFNM EQU BASE MASTER FILE NAME
  127. MFTY EQU BASE+1 MASTER FILE TYPE
  128. FILW EQU BASE+3 FILE WORD WITHIN FIRST BLOCK
  129. OFFS EQU BASE+4 FILE LIST OFFSET
  130. BACKTY EQU 52B BACKUP TYPE
  131.  
  132. NAME EQU 0 FILE NAME OFFSET IN DIRECTORY
  133. TYPE EQU 1 FILE TYPE OFFSET
  134. SIZE EQU 2 FILE SIZE OFFSET
  135. ACCT EQU 40 ACCOUNT NAME OFFSET
  136.  
  137. * /--- BLOCK COPYPFX 00 000 81/05/07 06.53
  138. USERI EQU 377773B USER INDEX FOR FILES
  139. TIMEL EQU 7777B TIME LIMIT
  140. PRIOR EQU 41B PRIORITY
  141.  
  142.  
  143. BEGIN BSS 0
  144. * SET UP FETS
  145.  
  146. IF BSS 0
  147. MFDUMP FILEC IBUF,LBUFL,(FET=14),XL
  148.  
  149. TB BSS 0
  150. ZZZZZZ FILEC TBUF,BUFL,(FET=14)
  151.  
  152. * MAIN LOOP
  153.  
  154. COPYPF BSS 0 ENTRY POINT
  155. SB1 1 FOREVER CONSTANT
  156. RJ INIT INITIALIZE AND GET ARGS
  157. CPF1 SA1 MFCT UPDATE MASTER FILE COUNT
  158. SX6 X1+B1
  159. SA6 A1
  160. SA1 VSNX USER REQUESTED VSN
  161. BX6 X1
  162. RJ RTF OPEN TAPE
  163. READ IF,R INITIALIZE READING OF FILE
  164.  
  165. CPF2 READW IF,WORK,WORKL
  166. SA2 ECOUNT TRANSFER WORD COUNTS
  167. SX7 B6-WORK NUMBER OF WORDS READ
  168. BX6 X2
  169. SA6 WCOUNT
  170. IX7 X6+X7 NEW WORD COUNT
  171. SA7 A2
  172. BX7 X1 SAVE READ STATUS
  173. SA7 STATUS
  174. NG X1,CPF4 IF EOF/EOI
  175. NZ X1,CPF3 IF EOR
  176. RJ PROCESS PROCESS INFO FOR THIS BLOCK
  177. EQ CPF2
  178.  
  179. CPF3 RJ PROCESS PROCESS INFO FOR THIS BLOCK
  180. READ IF
  181. EQ CPF2
  182.  
  183. CPF4 SX5 X1+B1
  184. NZ X5,CPF5 IF EOI OR ERROR
  185. RJ PROCESS PROCESS INFO FOR THIS BLOCK
  186. READ IF
  187. EQ CPF2
  188.  
  189. CPF5 RJ PROCESS PROCESS INFO FOR THIS BLOCK
  190. SA1 FF
  191. ZR X1,PROK6 IF DUMP MASTERFILE MODE
  192. MESSAGE TOOBIG
  193. EQ ABORT
  194. * /--- BLOCK COPYPFX 00 000 80/11/17 11.04
  195. ATTAUD SPACE 4
  196. ** ATTAUD - ATTACH AUDIT TRAIL FILE
  197.  
  198.  
  199. ATTAUD DATA 0 ENTRY/EXIT
  200. SETUI USERI USER INDEX
  201. PACKNAM PACK SET PACKNAME
  202. SA1 TB+1 SET ERROR PROCESSING BIT
  203. RJ SETEPR
  204. ATTA1 ATTACH TB,APER,,,R ATTACH AUDIT FILE
  205. SA1 TB CHECK STATUS FOR BUSY
  206. RJ CKSTATS
  207. NZ X2,ATTA1 IF BUSY
  208. SA1 TB+1 CLEAR ERROR PROCESSING BIT
  209. RJ CLREPR
  210. EQ ATTAUD
  211. TITLE SUBROUTINES
  212. CKSTATS SPACE 4
  213. ** CKSTATS - CHECK FILE STATUS FOR BUSY
  214. * ROLLOUT FOR 64 SECONDS IF BUSY
  215. * ABORT IF ERROR
  216. *
  217. * ENTRY X1-FET STATUS WORD
  218. *
  219. * EXIT X2=0, NOT BUSY
  220.  
  221.  
  222. CKSTATS DATA 0 ENTRY/EXIT
  223. AX1 10
  224. MX7 -8
  225. BX2 -X7*X1 ISOLATE STATUS
  226. ZR X2,CKSTATS IF NOT BUSY AND NO ERROR
  227. SX2 X2-1
  228. NZ X2,ABORT ATTACH ERROR
  229. ROLLOUT CKSW
  230. SX2 1 BUSY STATUS
  231. EQ CKSTATS
  232.  
  233. CKSW DATA 7700000100B
  234. CLREPR SPACE 4
  235. ** CLREPR - CLEAR ERROR PROCESSING BIT IN THE FET
  236. *
  237. * ENTRY A1/X1=FET+1 AND CONTENTS
  238.  
  239.  
  240. CLREPR DATA 0 ENTRY/EXIT
  241. SX6 B1 MASK FOR EPR
  242. LX6 44
  243. BX6 -X6*X1
  244. SA6 A1
  245. EQ CLREPR
  246. * /--- BLOCK COPYPFX 00 000 81/01/15 07.00
  247. GETPN SPACE 4
  248. ** GETPN - ATTACH FILE ON PACK *PN*
  249.  
  250.  
  251. GETPN DATA 0 ENTRY/EXIT
  252. SA1 MFCT GET MF COUNT
  253. SA2 =5LMFDMP
  254. LX1 24
  255. BX6 X1+X2
  256. SA6 IF+8
  257. SA1 IF+1 SET EPR
  258. RJ SETEPR
  259. GETPN1 ATTACH IF,IF+8,,,R,PN
  260. SA1 IF
  261. RJ CKSTATS
  262. NZ X2,GETPN1
  263. SA1 IF+1 CLEAR EPR
  264. RJ CLREPR
  265. REWIND IF,R
  266. EQ GETPN
  267. GTW SPACE 4
  268. ** GTW - GET WORD
  269. *
  270. * THIS ROUTINE EXTRACTS UP TO TEN CHARACTERS FROM
  271. * A CONTROL CARD AREA. 'ALL WORDS ARE SEPARATED
  272. * BY DELIMITERS (ANY CHARACTER .GT. 9 EXCEPT BLANK).
  273. *
  274. * ENTRY B1 = 1
  275. * A4/X4 = CHARACTERS TO BE EXTRACTED FROM
  276. * B6 = SHIFT COUNT (INITIALLY 0)
  277. *
  278. * EXIT X1 = WORD THAT WAS EXTRACTED
  279. * X2 = DELIMITER
  280. * IF X2 .LT. 0 - MORE THAN 10 CHARS IN WORD
  281. * IF X2 .EQ. 0 - END OF CARD
  282. * B5 = 60-(N*6) WHERE N IS THE NUMBER OF
  283. * CHARACTERS FOUND IN THE WORD
  284. * A4/X4/B6 SET FOR NEXT WORD
  285. *
  286. * USES A-4
  287. * X-1,2,3,4
  288. * B-5,6,7
  289.  
  290.  
  291. * /--- BLOCK COPYPFX 00 000 81/01/15 06.59
  292. GTW DATA 0 ENTRY/EXIT
  293. MX1 0 INITIAL SETTINGS
  294. SB5 60
  295. SB7 B5
  296. GTW1 SB6 B6+6 NEXT CHARACTER
  297. GT B6,B7,GTW2 IF NEW WORD NEEDED
  298. MX2 -6 CHARACTER MASK
  299. LX4 6 SHIFT TO NEXT CHARACTER
  300. BX2 -X2*X4
  301. ZR X2,GTW END OF CARD
  302. SX3 X2-1R TEST FOR BLANKS
  303. ZR X3,GTW1A
  304. SX3 X2-1R9-1
  305. PL X3,GTW IF DELIMITER
  306. GTW1A SB5 B5-6 DECREASE CHARACTER SHIFT COUNT
  307. NG B5,GTW3 IF MORE THAN 10 CHARS.
  308. LX2 X2,B5 SHIFT TO PROPER LOCATION
  309. BX1 X1+X2 MERGE
  310. EQ GTW1 GET NEXT CHARACTER
  311.  
  312. GTW2 SA4 A4+B1 GET NEXT WORD
  313. SB6 B0
  314. EQ GTW1
  315.  
  316. GTW3 BX2 -X2 ERROR FLAG
  317. EQ GTW EXIT
  318. INIT SPACE 4
  319. ** INIT - INITIALIZE
  320.  
  321.  
  322. INIT4 RJ INITFIL INITIALIZE FOR SINGLE FILE MODE
  323. INIT DATA 0 ENTRY/EXIT
  324. SB6 LSCR CLEAR BUFFERS
  325. SB7 BEND-LSCR
  326. RJ ZERO
  327. RJ INITPT INITIALIZE POINTERS
  328. SETUI USERI SET USER INDEX
  329. SETTL TIMEL SET TIME LIMIT
  330. SETPR PRIOR SET PRIORITY
  331. *
  332. * GET ARGUMENTS
  333. *
  334. SA1 ACTR ARG COUNT
  335. SB4 X1
  336. SA4 ARGR FIRST ARG
  337. SB5 ARGTBL ARG TABLE
  338. RJ ARG
  339. NZ X1,INITERR ERROR IN ARGUMENTS
  340. SA1 INITM MODIFY COMCARG FOR 10 CHARS
  341. BX6 X1
  342. SA6 /COMCARG/ARG5
  343. SA1 Z SEE IF EXTENDED PARAMETERS
  344. ZR X1,INIT1
  345. SX5 CCDR CONTROL CARD AREA
  346. RJ PRA EXTRACT EXTENDED PARAMETERS
  347. NZ X6,INITERR IF ERROR IN CARD
  348. SB5 ARGTBL ARG TABLE ADDRESS
  349. RJ ARG
  350. NZ X1,INITERR ERROR IN ARGUMENTS
  351. INIT1 SA1 FF FROM FILE
  352. NZ X1,INIT3 IF TO FILE SPECIFIED
  353. INIT2 RJ KDISP DO K-DISPLAY
  354. EQ INIT
  355.  
  356. INIT3 SA2 TF TO FILE
  357. NZ X2,INIT4 IF TO FILE SPECIFIED
  358. BX6 X1 SET TO = FROM
  359. SA6 A2
  360. EQ INIT4
  361.  
  362. INITM BX7 X3+X6 INSTRUCTIONS MODIFIED AT ARG5
  363. SA7 B2+
  364. SB3 B2-B3
  365.  
  366. INITERR MESSAGE INMSG
  367. EQ ABORT
  368. * /--- BLOCK COPYPFX 00 000 80/11/13 09.27
  369. INITFIL SPACE 4
  370. ** INITFIL - INITIALIZE FOR FILE RECOVERY
  371.  
  372.  
  373. INITFIL DATA 0 ENTRY/EXIT
  374. REWIND TB
  375. SA1 TF ATTACH TO FILE
  376. RJ SETF
  377. SX1 WORK READ DIRECTORY BLOCK
  378. SX6 B0
  379. SX7 B1
  380. RJ DRD
  381. SA1 =XPFINFO
  382. MX7 -6
  383. AX1 24
  384. BX6 -X7*X1 SIZE OF FILE (PARTS)
  385. SA6 TOSIZE
  386. AX1 6
  387. BX6 -X7*X1 TYPE OF FILE
  388. SX6 X6-BACKTY SEE IF BACKUP TYPE
  389. NZ X6,TOFIWE IF WRONG TYPE
  390. SA1 WORK+NAME
  391. SA2 TF
  392. IX6 X1-X2
  393. NZ X6,TONAME IF WRONG NAME
  394. SA1 WORK+TYPE
  395. SA2 BACKUP
  396. IX6 X1-X2
  397. NZ X6,TOTYPE IF WRONG TYPE
  398. SA1 WORK+ACCT
  399. BX6 X1
  400. SA6 TOACCT SAVE ACCOUNT
  401. EQ INITFIL
  402. INITPCK SPACE 4
  403. ** INITPCK - INITIALIZE PACKNAME/VSN FOR MASTER FILE
  404. * RECOVERY MODE.
  405. *
  406. * EXIT X1=0, NO MORE STACK ENTRIES
  407.  
  408.  
  409. INITPCK DATA 0 ENTRY/EXIT
  410. SA1 STACKPT
  411. ZR X1,INITPCK IF NO ENTRIES
  412. SX7 0 ZERO POINTERS
  413. SA7 MFCT
  414. SA7 VSNX
  415. SA7 VSN
  416. SA7 PN
  417. SA7 RTFA
  418. SB6 0
  419. SB7 X1+ COUNTERS
  420. IPCK1 SA1 B6+STACK+1 CURRENT STACK ENTRY
  421. NZ X1,IPCK2 ENTRY FILLED
  422. SB6 B6+2 NEXT ENTRY
  423. LT B6,B7,IPCK1 IF NOT DONE
  424. EQ INITPCK EXIT, X1=0
  425.  
  426. IPCK2 BX6 X1 STORE ENTRY IN VSN OR PACKNAME
  427. MX7 6
  428. BX7 X7*X6
  429. ZR X7,IPCK3 IF VSN
  430. SA6 PN
  431. EQ INITPCK
  432.  
  433. IPCK3 LX6 6
  434. SA6 VSNX
  435. EQ INITPCK
  436. INITPT SPACE 4
  437. ** INITPT - INITIALIZE POINTERS
  438.  
  439.  
  440. INITPT DATA 0 ENTRY/EXIT
  441. SX7 0 ZERO COUNTERS
  442. SA7 COUNT
  443. SA7 WCOUNT
  444. SA7 ECOUNT
  445. SA7 MFNAME
  446. SA7 MFTYPE
  447. SA7 NFILES
  448. SA7 MFILES
  449. SA7 OFFSET
  450. SA1 PROX INITIALIZE PROCESS POINTERS
  451. BX6 X1
  452. SA6 PRO1
  453. SX7 PTABLE
  454. SA7 PPOINT
  455. EQ INITPT
  456. * /--- BLOCK COPYPFX 00 000 80/11/03 07.22
  457. PRA SPACE 4
  458. ** PRA - EXTRACT PARAMETERS BEYOND PERIOD
  459. *
  460. * EXTRACT PARAMETERS FROM CONTROL CARD AREA
  461. *
  462. * ENTRY B1 = 1
  463. * X5 = ADDRESS OF CONTROL CARD
  464. *
  465. * EXIT X6 = 0 ALL OK, -1 IF ERROR
  466. * ARGUMENTS AT ARGR
  467. * A4/X4 = FIRST ARGUMENT
  468. * B4 = NUMBER OF ARGUMENTS
  469. *
  470. * USES A-4
  471. * X-1,2,3,4,6,7
  472. * B-3,4,5,6,7
  473. *
  474. * CALLS GTW
  475.  
  476.  
  477. PRA DATA 0 ENTRY/EXIT
  478. SA4 X5 CONTROL CARD AREA
  479. SB6 0 INITIAL SHIFT COUNT
  480. PRA1 RJ GTW GET NEXT WORD
  481. NG X2,PRAX ERROR - MORE THAN 10 CHARS.
  482. ZR X2,PRAX ERROR - NULL WORD
  483. SX7 X2-1R.
  484. ZR X7,PRA2 IF PERIOD
  485. SX7 X2-1R)
  486. NZ X7,PRA1 IF NOT )
  487. PRA2 SB3 ARGR LOCATION TO STORE ARGS
  488. PRA3 RJ GTW GET NEXT WORD
  489. NG X2,PRAX ERROR - MORE THAN 10 CHARS
  490. ZR X1,PRA5 IF END OF CARD
  491. SX7 X2-1R= SEE IF = IS DELIMITER
  492. SX6 0
  493. NZ X7,PRA4 IF NOT =
  494. SB4 48
  495. LT B5,B4,PRA4 IF NOT 1 OR 2 CHARACTERS
  496. SX6 1R= ADD = CHARACTER TO WORD
  497. PRA4 BX6 X6+X1 MERGE
  498. SA6 B3 STORE ARGUMENT
  499. SB3 B3+B1 ADVANCE ARG POINTER
  500. NZ X2,PRA3 IF NOT END OF CARD
  501. PRA5 SB4 B3-ARGR NUMBER OF ARGUMENTS
  502. SA4 ARGR FIRST ARGUMENT
  503. MX6 0 OK EXIT
  504. EQ PRA
  505.  
  506. PRAX MX6 59 ERROR EXIT
  507. EQ PRA
  508. * /--- BLOCK COPYPFX 00 000 80/11/14 09.08
  509. RTF SPACE 4
  510. ** RTF - REQUEST TAPE FILE
  511. *
  512. * REQUEST A LABELED TAPE
  513. *
  514. * ENTRY - IF = FET ADDRESS
  515. * PN .NE. 0 - PN=PACKNAME (DO NOT LABEL)
  516. * (X6) = VSN REQUESTED
  517. * IF BINARY 0, GET SCRATCH TAPE
  518. * IF BINARY 1, REQUEST TAPE
  519. *
  520. * EXIT - (X6) = VSN OF TAPE LOADED
  521. * LABELS WRITTEN
  522.  
  523.  
  524. RTF DATA 0 ENTRY/EXIT
  525. SA1 RTFA INCREMENT TAPE FILE COUNT
  526. SX7 X1+B1
  527. SA7 A1
  528. RTF1 SA1 PN SEE IF PACK NAME SPECIFIED
  529. NZ X1,RTF8
  530. SX1 B1 TEST FOR REQUEST TAPE OPTION
  531. SX2 B1
  532. LX2 39 X2=RING OUT
  533. IX6 X6-X1
  534. ZR X6,RTF2 REQUEST TAPE
  535. IX6 X6+X1
  536. NZ X6,RTF2 IF VSN SPECIFIED
  537. SA1 =6L LABEL FOR SCRATCH TAPE
  538. BX6 X1 (X6) = SCRATCH VSN
  539. RTF2 SX7 5 (X7) = LABELED / 9-TRACK
  540. LX7 56
  541. BX7 X7+X2
  542. SA7 IF+8
  543. MX0 36
  544. BX6 X0*X6
  545. SA6 A7+B1 SET VSN
  546. BX6 X6-X6
  547. SX6 B0 SET FILE NAME = 0
  548. SA6 A6+B1
  549. SA2 RTFA GET TAPE POSITION
  550. BX7 X2
  551. * SX2 X2-1
  552. * SX7 1 FIRST FILE SEQUENCE = 1
  553. * ZR X2,RTF4
  554. * SX7 9999 ALL OTHERS = 9999
  555. RTF4 IX6 X6+X7 MERGE WITH FILE NAME
  556. SA6 A6+B1 FET+11
  557. SA1 =6LMFDUMP
  558. BX6 X1
  559. SA6 A6+B1 SET NAME = *MFDUMP*
  560. BX7 X7-X7
  561. SA7 A6+B1
  562. LABEL IF FIND LABELED TAPE
  563.  
  564. * OPEN VOL1 LABEL IF FIRST TIME THRU
  565.  
  566. SA3 RTFA TAPE FILE NUMBER
  567. SX3 X3-1
  568. NZ X3,RTF5 IF NOT FIRST FILE
  569. * RJ SETEB
  570. * SA1 =0LVOL1
  571. * BX6 X1
  572. * SA6 PB+1
  573. * OPEN IF,READ,R
  574. * SA1 IF+B1 CHECK DEVICE TYPE
  575. * PL X1,RTF7 IF ASSIGNED TO DISK
  576. * SA1 PB+1 GET VSN
  577. * SA4 =6L TEST FOR BLANK LABEL
  578. * MX6 36
  579. * LX1 24
  580. * BX6 X6*X1
  581. * IX7 X6-X4
  582. * ZR X7,RTF9 IF BLANK LABEL
  583. SA1 VSNX
  584. BX6 X1
  585. * /--- BLOCK COPYPFX 00 000 80/10/27 10.12
  586. LX6 54 CLEAR TOP BITS FOR TAPE FLAG
  587. SA6 VSN
  588. RTF5 SA1 RTFA FORM FILE SEQUENCE NUMBER
  589. SX1 X1+10000
  590. RJ CDD
  591. MX7 -18
  592. BX4 -X7*X6
  593. SA1 IF+10 SHIFT TO STANDARD FET INFO
  594. SA2 A1+B1
  595. BX6 X1
  596. SA6 A1-B1 FILE IDENTIFIER-FIRST 10 CHARS
  597. MX7 42
  598. BX6 X7*X2 NEXT 7 CHARS
  599. BX6 X6+X4 ADD SEQUENCE NUMBER
  600. SA6 A6+B1 FET+10
  601. MX6 0
  602. SA6 A6+B1
  603. SA1 A6+B1 SET IDENTIFICATION
  604. MX7 36
  605. BX6 X7*X1
  606. SA6 A1 FET+12
  607. SA1 IF+1 CLEAR EXTENDED LABEL BIT
  608. SX6 B1
  609. LX6 41
  610. BX6 -X6*X1
  611. SA6 A1
  612. POSMF IF,R
  613. SA1 IF+2 IN=OUT
  614. BX6 X1
  615. SA6 A1+B1
  616. SA1 IF+B1 CHECK DEVICE TYPE
  617. NG X1,RTF IF ASSIGNED TO TAPE
  618. RTF7 MESSAGE WRONG WRONG DEVICE
  619. EQ ABORT
  620.  
  621. RTF8 RJ GETPN GET FILE ATTACHED ON PACK
  622. EQ RTF EXIT
  623.  
  624. RTF9 UNLOAD IF,R GET RID IF BLANK LABEL
  625. MESSAGE BLANK ERROR MESSAGE
  626. SA1 VSNX TRY TO REQUEST TAPE AGAIN
  627. BX6 X1
  628. EQ RTF1
  629.  
  630. PB BSSZ 10 BUFFER FOR VOL1 HEADER
  631. RTFA DATA 0 COUNT OF FILES ON TAPE
  632. * /--- BLOCK COPYPFX 00 000 80/10/30 12.14
  633. SETEB SPACE 4
  634. ** SETEB - SETUP EXTENDED LABEL BUFFER
  635. *
  636. * SETS UP COUNT FIELDS IN FET AND EXT. BUFFER
  637. * CLEAR ALL OTHER FIELDS IN BUFFER
  638. *
  639. * USES A - 6,7
  640. * X - 6,7
  641. * B - 6
  642.  
  643.  
  644. SETEB DATA 0 ENTRY/EXIT
  645. SX6 10 LENGTH
  646. SX7 PB BEGINNING ADDRESS
  647. LX6 18
  648. BX6 X6+X7
  649. SA6 IF+9 PUT IN FET
  650. SX7 80 CHARACTER COUNT
  651. SA7 PB
  652. SX6 0
  653. SB6 9
  654. SEB1 SA6 A7+B6 CLEAR PB+1 TO PB+9
  655. SB6 B6-B1
  656. GE B6,B1,SEB1
  657. EQ SETEB
  658. SETEPR SPACE 4
  659. ** SETEPR - SET ERROR PROCESSING BIT IN THE FET
  660. *
  661. * ENTRY A1/X1=FET+1 AND CONTENTS
  662.  
  663.  
  664. SETEPR DATA 0 ENTRY/EXIT
  665. SX6 B1 MASK FOR EPR
  666. LX6 44
  667. BX6 X6+X1
  668. SA6 A1
  669. EQ SETEPR
  670. ZERO SPACE 4
  671. ** ZERO - ZERO BUFFER
  672. *
  673. * ENTRY B1=1
  674. * B6=FWA
  675. * B7=NUMBER OF WORDS TO ZERO
  676. *
  677. * EXIT X7=0
  678. * BUFFER ZEROED
  679. *
  680. * USES A-7
  681. * X-7
  682. * B-6,7
  683.  
  684. ZERO DATA 0 EMTRY/EXIT
  685. MX7 0
  686. SB7 B7-B1
  687. NG B7,ZERO
  688. ZRO1 SA7 B6+B7
  689. SB7 B7-B1
  690. PL B7,ZRO1
  691. EQ ZERO
  692. * /--- BLOCK COPYPFX 00 000 80/10/24 07.15
  693. TITLE PROCESS MF DATA
  694. ** PROCESS BLOCK INFORMATION
  695.  
  696.  
  697. PROZ SA1 PROY INSTALL FAST EXIT
  698. BX6 X1
  699. SA6 PRO1
  700. PROCESS DATA 0 PROCESS BLOCK INFO
  701. *
  702. * THE FOLLOWING COMMANDS DUPLICATED AT PROX
  703. *
  704. PRO1 SA3 PPOINT PROCESS POINTER
  705. SA4 X3+
  706. ZR X4,PROZ IF ALL DONE
  707. SA1 WCOUNT BEGINNING COUNT FOR THIS READ
  708. SA2 ECOUNT ENDING COUNT FOR THIS READ
  709. MX7 30
  710. BX6 -X7*X4 WORD THAT IS WANTED
  711. ZR X6,PRO5 JUMP ROUTINE DEMANDED
  712. IX5 X6-X1 COMPARE WITH BEGINNING
  713. IX3 X6-X2 COMPARE WITH ENDING
  714. NG X5,PROERR IF WE HAVE ALREADY PASSED IT
  715. PL X3,PROCESS IF NOT HERE YET
  716. MX7 12
  717. BX7 X7*X4 WORD COUNT
  718. ZR X7,PRO5 PROCESS JUMP WANTED
  719. LX7 12
  720. SB7 X7 WORD COUNT
  721. NE B7,B1,PRO2 IF MORE THAN 1 WORD
  722. SA1 X5+WORK GET WORD THAT IS WANTED
  723. AX4 30 STORE LOCATION
  724. BX7 X1
  725. SA7 X4 STORE DESIRED WORD
  726. SX7 A4+B1 BUMP POINTER COUNTER
  727. SA7 PPOINT
  728. EQ PRO1 PROCESS NEXT REQUEST
  729.  
  730. PRO2 IX6 X3+X7 COMPARE WORD COUNT WITH ROOM
  731. NG X6,PRO3 IF ENOUGH ROOM
  732. ZR X6,PRO3 IF JUST ENOUGH ROOM
  733. IX7 X4-X3 INCREMENT FROM
  734. LX3 30
  735. IX7 X7-X3 INCREMENT TO
  736. LX3 18
  737. IX7 X7+X3 DECREMENT TO
  738. LX3 12 RESTORE COUNT
  739. SA7 A4 STORE NEW COMMAND FOR NEXT PASS
  740. BX1 -X3 WORD COUNT THIS PASS
  741. EQ PRO4 MOVE WORDS
  742.  
  743. PRO3 SX7 A4+B1 BUMP POINTER
  744. SA7 PPOINT
  745. SX1 B7 WORD COUNT
  746. PRO4 SX2 X5+WORK FROM
  747. AX4 30
  748. SX3 X4 TO
  749. RJ MVE= MOVE WORDS
  750. EQ PRO1 NEXT REQUEST
  751.  
  752. * /--- BLOCK COPYPFX 00 000 80/10/31 12.06
  753. PRO5 SX7 A4+B1 BUMP POINTER
  754. SA7 PPOINT
  755. AX4 30 GET JUMP ADDRESS
  756. SB7 X4
  757. JP B7+ JUMP TO PROPER ROUTINE
  758.  
  759. PROF SA1 NFILES GET FILE COUNTS
  760. SX7 X1 NUMBER OF FILES
  761. AX1 18
  762. NZ X7,PROF1 IF NO FILES, FAKE ONE
  763. SX7 1
  764. PROF1 SX6 X1 MAX NUMBER OF FILES
  765. SA7 A1
  766. SA6 MFILES
  767. SX5 X7-MAXFIL-1 COMPARE WITH MAX.
  768. PL X5,PROFERR TOO MANY
  769. SA1 OFFSET
  770. SX2 FILN FILE NAME BUFFER
  771. SX3 FILI FILE INFO BUFFER
  772. LX2 30
  773. LX3 30
  774. SX1 X1+BASE
  775. IX6 X6+X1
  776. LX7 48 FILE COUNT
  777. IX6 X6+X7
  778. IX6 X6+X3
  779. IX7 X7+X1
  780. IX7 X7+X2
  781. SA7 PTABA
  782. SA6 A7+B1
  783. EQ PRO1 NEXT REQUEST
  784.  
  785. PROG SA2 NFILES NUMBER OF FILES
  786. SA1 FF FROM FILE
  787. SB7 X2+
  788. SB6 0
  789. PROG1 SA2 FILN+B6 CURRENT FILE NAME
  790. IX6 X1-X2
  791. ZR X6,PROG4 IF DESIRED FILE
  792. SB6 B6+B1 NEXT FILE
  793. LT B6,B7,PROG1 IF NOT DONE
  794. RJ SFN FORM MESSAGE
  795. SA6 PROGM
  796. SA1 MFNAME MASTER FILE NAME
  797. SX2 3RLE
  798. BX6 X1+X2
  799. LX6 42
  800. SA6 PROGM1
  801. MESSAGE PROGM
  802. PROG1A SA1 PN UNLOAD IF DISK PACK
  803. ZR X1,PROG2
  804. UNLOAD IF,R
  805. EQ PROG3
  806.  
  807. PROG2 SA1 IF+2 IN=OUT
  808. BX6 X1
  809. SA6 A1+B1
  810. PROG3 RJ INITPT INITIALIZE POINTERS
  811. EQ CPF1 READ NEXT MASTER FILE
  812.  
  813. PROG4 SA1 FILI+B6 FILE INFO WORD
  814. SX5 PART NUMBER OF WORDS IN PART
  815. MX7 -24
  816. BX6 -X7*X1 BEGINNING PART NUMBER
  817. IX6 X6*X5 BEGINNING WORD
  818. SX7 PROH FORM PROCESSOR TABLE ENTRY
  819. LX7 30
  820. IX6 X6+X7
  821. SA6 PTABB
  822. MX7 -6
  823. AX1 24
  824. BX6 -X7*X1 NUMBER OF PARTS IN FILE
  825. IX6 X6*X5 WORD COUNT
  826. SA6 WCWANT
  827. EQ PRO1 NEXT ENTRY
  828.  
  829. * /--- BLOCK COPYPFX 00 000 81/01/15 07.56
  830. PROH BSS 0
  831. SA1 WCWANT WORD COUNT REMAINING IN FILE
  832. IX6 X3+X1 DECREMENT
  833. SA6 A1
  834. NG X6,PROH1 IF ENOUGH WORDS THIS PASS
  835. ZR X6,PROH1 IF JUST ENOUGH WORDS
  836. SA4 A4 REREAD PROCESSOR WORD
  837. IX7 X4-X3 INCREMENT FROM COUNT
  838. SA7 A4
  839. SX7 A4 RESET PROCESSOR POINTER
  840. SA7 PPOINT
  841.  
  842. PROH1 BX3 -X3 CORRECT WORD COUNT
  843. WRITEW TB,WORK+X5,X3 WRITE OUT TEMP. FILE
  844. SA1 WCWANT
  845. NG X1,PROH2 IF DONE
  846. NZ X1,PRO1 IF NOT DONE
  847. PROH2 WRITER TB,R WRITE EOR
  848. EQ PRO1
  849.  
  850. PROI BSS 0
  851. REWIND TB,R
  852. READ TB,R
  853. READW TB,WORK,BLOCK
  854. NZ X1,PROIER IF EARLY EOR, EOF, EOI
  855. SA1 WORK+NAME SEE IF NAMES MATCH
  856. SA2 FF
  857. IX6 X1-X2
  858. NZ X6,FFNAME
  859. SA2 TOACCT
  860. BX6 X2 UPDATE ACCT NAME IN FILE DIR.
  861. SA6 WORK+ACCT
  862. SA1 WORK+SIZE SEE IF SIZE MATCH
  863. SA2 TOSIZE
  864. SX6 NUMBLK
  865. IX2 X6*X2
  866. IX6 X1-X2
  867. NZ X6,TOSIZX
  868. BX6 X1 SAVE NUMBER OF BLOCKS
  869. SA6 A2
  870. SX6 B0 CURRENT BLOCK
  871. SA6 WCWANT
  872. PROI1 READW TB,WORK,BLOCK
  873. NZ X1,PROI2 IF EOR, EOF, EOI
  874. SA1 WCWANT
  875. SX6 X1+B1 CURRENT BLOCK
  876. SA6 A1
  877. SX7 1 NUMBER OF BLOCKS TO WRITE
  878. SX1 WORK FWA
  879. RJ DWR WRITE BLOCK
  880. EQ PROI1
  881.  
  882. PROI2 SA1 WCWANT
  883. SA2 TOSIZE
  884. SX1 X1+B1
  885. IX6 X1-X2
  886. NZ X6,PROIER IF FILES NOT THE SAME SIZE
  887. REWIND TB,R REREAD FIRST BLOCK
  888. READ TB,R
  889. READW TB,WORK,BLOCK
  890. NZ X1,PROIER IF EARLY EOR, EOF, EOI
  891. SA1 TF PUT IN PROPER NAME
  892. BX6 X1
  893. SA6 WORK+NAME
  894. SX6 B0 REWRITE DIRECTORY
  895. SX7 B1
  896. SX1 WORK
  897. RJ DWR
  898. PROI3 MESSAGE (=C*ALL DONE*)
  899. ENDRUN
  900.  
  901. * /--- BLOCK COPYPFX 00 000 80/11/14 08.33
  902. PROJ SA1 FF
  903. NZ X1,PRO1 SKIP IF IN SINGLE FILE MODE
  904. SA2 MFNAME GET MASTER FILE NAME
  905. SA3 STACKPT NUMBER OF ENTRIES IN STACK * 2
  906. SB6 B0 COUNTER
  907. SB5 2 INCREMENT
  908. SB7 X3 FINAL COUNT
  909. PROJ1 SA1 B6+STACK CURRENT ENTRY
  910. BX6 X1-X2 COMPARE
  911. SB6 B6+B5 INCREMENT FOR NEXT ENTRY
  912. PROJ2 ZR X6,PROJ3 IF MASTER FILES AGREE
  913. LT B6,B7,PROJ1 IF NOT DONE
  914. SA1 MFNAME OUTPUT MASTERFILE NAME
  915. RJ SFN
  916. SA6 NOTREQ
  917. MESSAGE NOTREQ
  918. EQ PROG1A
  919.  
  920. PROJ3 SA1 B6+STACK-1 GET VSN/PACKNAME
  921. MX7 6 MASK FOR TOP CHARACTER
  922. BX7 X7*X6
  923. ZR X7,PROJ5 IF VSN
  924. SA1 PN GET PACK NAME
  925. PROJ4 BX6 X1-X2 COMPARE VSN/PN WITH REQUEST
  926. * NZ X6,PROJ2 IF NOT THE SAME
  927. SX6 B6-B5 SAVE STACK ADDRESS
  928. SA6 THISONE
  929. SA1 MFNAME
  930. SX6 B1
  931. IX6 X6+X1
  932. SA6 TB SET UP F.E.T.
  933. REWIND TB,R
  934. SX7 PTABD RESET PROCESS POINTER
  935. SA7 PPOINT
  936. SX6 PROK SET UP PROCESS WORD
  937. LX6 30
  938. SA6 X7
  939. SA1 MFNAME OUTPUT RESTORING MESSAGES
  940. RJ SFN
  941. SA6 REING+1
  942. MESSAGE REING
  943. EQ PRO1 FOR NOW
  944.  
  945. PROJ5 SA1 VSN GET VSN
  946. EQ PROJ4
  947.  
  948. PROK SA1 ECOUNT ENDING COUNT
  949. SX6 PROK PROCESS TABLE POINTER
  950. SA2 WCOUNT BEGINNING COUNT
  951. LX6 30 SHIFT TO PROPER SUBR. POSITION
  952. IX5 X1-X2 WORD COUNT
  953. IX6 X1+X6 NEXT RECORD PROCESS WORD
  954. SA6 PTABD
  955. SX6 A6 PROCESS POINTER
  956. SA6 PPOINT
  957. ZR X5,PROK1 NO WORDS TO WRITE
  958. WRITEW TB,WORK,X5 WRITE OUT WORDS
  959. PROK1 SA1 STATUS CHECK READ STATUS
  960. SB7 X1+
  961. LE B7,B0,PROK2 IF NOT EOR
  962. SB7 1 EOR JUMP NUMBER
  963. PROK2 JP B7+PROK3+3 JUMP TO PROPER ROUTINE
  964.  
  965. PROK3 EQ PROK5 ERROR
  966. EQ PROK6 EOI
  967. EQ PROK4 EOF
  968. EQ PRO1 NORMAL READ
  969. * WRITER TB,R EOR
  970. EQ PRO1 NEXT RECORD
  971.  
  972. * PROK4 WRITEF TB,R EOF
  973. PROK4 BSS 0
  974. EQ PRO1 NEXT RECORD
  975.  
  976. PROK5 MESSAGE (=C* ERROR WHILE READING INPUT*)
  977. EQ ABORT
  978.  
  979. * /--- BLOCK COPYPFX 00 000 80/11/07 13.23
  980. PROK6 SA1 TB+2 SEE IF BUFFER EMPTY
  981. SA2 A1+B1
  982. IX3 X1-X2
  983. ZR X3,PROK7
  984. WRITE TB,R
  985. SA1 TB+2 SEE IF BUFFER NOW EMPTY
  986. SA2 A1+B1
  987. IX3 X1-X2
  988. ZR X3,PROK7
  989. WRITER TB,R FORCE WRITE
  990. PROK7 SA1 MFNAME OUTPUT RECOVERED MESSAGE
  991. RJ SFN
  992. SA6 RECOV
  993. MESSAGE RECOV
  994. SA1 THISONE
  995. SA1 X1+STACK+1 GET THIS PACKNAME/VSN
  996. MX7 0 CLEAR THIS ENTRY
  997. SA7 A1
  998. SA7 A7-B1
  999. *
  1000. * LOOK FOR MORE ENTRIES TO DO
  1001. *
  1002. SB6 B0
  1003. SA3 STACKPT
  1004. SB7 X3
  1005. SB5 B1+B1
  1006. PROK8 SA2 B6+STACK+1 CURRENT ENTRY
  1007. BX6 X1-X2 SEE IF SAME AS CURRENT ONE
  1008. SB6 B6+B5
  1009. ZR X6,PROG1A IF MORE FOR THIS VSN/PACK
  1010. LT B6,B7,PROK8 IF MORE TO LOOK AT
  1011. UNLOAD IF,R ALL DONE WITH THIS PACK VSN
  1012. RJ INITPT SET UP POINTERS
  1013. RJ INITPCK INIT. PACK POINTERS
  1014. NZ X1,CPF1 IF MORE ENTRIES
  1015. EQ PROI3 ALL DONE
  1016.  
  1017. PROX SA3 PPOINT COPY OF PRO1
  1018. SA4 X3+
  1019. PROY EQ PROCESS DUMMY FAST EXIT COMMAND
  1020.  
  1021. PROERR MESSAGE PROM
  1022. ABORT ABORT
  1023.  
  1024. PROFERR MESSAGE PROFM
  1025. EQ ABORT
  1026.  
  1027. PROIER MESSAGE PROIE
  1028. EQ ABORT
  1029.  
  1030. * PROCESSOR TABLE
  1031.  
  1032. PPOINT VFD 60/PTABLE PROCESS TABLE POINTER
  1033. PTABLE BSS 0
  1034. VFD 12/1,18/MFNAME,30/MFNM
  1035. VFD 12/0,18/PROJ,30/0
  1036. VFD 12/1,18/MFTYPE,30/MFTY
  1037. VFD 12/1,18/NFILES,30/FILW
  1038. VFD 12/1,18/OFFSET,30/OFFS
  1039. VFD 12/0,18/PROF,30/0
  1040. PTABA VFD 12/0,18/FILN,30/0 FILLED IN WITH NUM FILES
  1041. VFD 12/0,18/FILI,30/0 FILLED IN WITH NUM FILES
  1042. VFD 12/0,18/PROG,30/0
  1043. PTABB VFD 12/0,18/PROH,30/0 FILE LOCATION FILLED IN
  1044. VFD 12/0,18/PROI,30/0
  1045. PTABC DATA 0 END OF TABLE
  1046.  
  1047. PTABD VFD 12/0,18/PROK,30/0
  1048. DATA 0 END OF TABLE
  1049. * /--- BLOCK COPYPFX 00 000 80/10/15 08.53
  1050. TITLE PLATO FILE ATTACH, READ WRITE ROUTINES
  1051. ** SETF - ATTACH FILE
  1052. *
  1053. * X1=FILE NAME
  1054. *
  1055. * EXIT IF ALREADY ATTACHED
  1056. * ABORT IF ERROR
  1057.  
  1058.  
  1059. SETFX SA1 DST4 SEE IF CLEAR MESSAGE NEEDED
  1060. ZR X1,SETF
  1061. MX6 0 CLEAR FLAG
  1062. SA6 A1
  1063. SX6 CMSG
  1064. RJ BDIS CLEAR B DISPLAY
  1065. SETF DATA 0 ENTRY/EXIT
  1066. BX7 X1 FILE NAME
  1067. SA1 DSNAME OLD FILE NAME
  1068. IX6 X7-X1
  1069. ZR X6,SETF EXIT IF ALREADY ATTACHED
  1070. SA7 A1 SAVE FOR LATER
  1071. DST1 SA1 DARG1 ARGUMENT LIST
  1072. RJ =XSETFILE ATTACH FILE
  1073. SB1 1 RESTORE
  1074. SA1 DERROR SEE IF ERROR STATUS
  1075. NG X1,SETFX IF NO ERROR
  1076. SX6 X1-13 SEE IF ATTACHED EARLIER
  1077. ZR X6,DST2
  1078. SX1 X1-2 SEE IF ATTACHED ELSEWARE
  1079. NZ X1,DST3
  1080. SA6 DST4 FLAG TO CLEAR WAITING MESSAGE
  1081. SX6 DWAIT WAITING MESSAGE
  1082. RJ BDIS
  1083. EQ DST1
  1084.  
  1085. DST2 RJ DDET DETACH IT
  1086. EQ DST1 REATTACH IT
  1087.  
  1088. DST3 MESSAGE DMATT ATTACH ERROR MESSAAGE
  1089. RJ DMAM FILE NAME
  1090. RJ DMEM ERROR STATUS
  1091. EQ ABORT
  1092.  
  1093. DST4 DATA 0 FLAG FOR WAITING MESSAGE
  1094. DRD SPACE 4
  1095. ** DRD - DATAIN ROUTINES
  1096. *
  1097. * X1 - CENTRAL MEMORY LOCATION
  1098. * X6 - STARTING RECORD
  1099. * X7 - NUMBER OF RECORDS
  1100.  
  1101.  
  1102. DRD DATA 0 ENTRY/EXIT
  1103. RJ DPAR STORE PARAMETERS
  1104. RJ =XDREAD READ IN DATA
  1105. SB1 1 RESTORE
  1106. SA1 DERROR LOOK AT STATUS
  1107. NG X1,DRD IF NO ERROR
  1108. MESSAGE DMRDM DREAD ERROR MESSAGE
  1109. DRDX RJ DMAM FILE NAME
  1110. RJ DMEM ERROR STATUS
  1111. RJ DBGM BEGINNING RECORD NUMBER
  1112. RJ DNRM NUMBER OF RECORDS
  1113. EQ ABORT ABORT
  1114. DWR SPACE 4
  1115. ** DWR - DWRITE ROUTINES
  1116. *
  1117. * X1 - CENTRAL MEMORY LOCATION
  1118. * X6 - STARTING RECORD
  1119. * X7 - NUMBER OF RECORDS
  1120.  
  1121.  
  1122. DWR DATA 0 ENTRY/EXIT
  1123. RJ DPAR STORE PARAMETERS
  1124. RJ =XDWRITE WRITE OUT DATA
  1125. SB1 1 RESTORE
  1126. SA1 DERROR LOOK AT STATUS
  1127. NG X1,DWR IF NO ERROR
  1128. MESSAGE DMWRM DWRITE ERROR MESSAGE
  1129. EQ DRDX ERROR MESSAGES AND ABORT
  1130. * /--- BLOCK COPYPFX 00 000 80/10/15 08.42
  1131. DDET SPACE 4
  1132. ** DDET - DETACH FILE
  1133. *
  1134. * DETACHES LAST FILE
  1135.  
  1136.  
  1137. DDET DATA 0 ENTRY/EXIT
  1138. SA1 DARG3 ARGUMENT LIST
  1139. RJ =XDETACH DETACH FILE
  1140. SB1 1 RESTORE
  1141. EQ DDET
  1142. DPAR SPACE 4
  1143. ** DPAR - STORE PARAMETERS
  1144. *
  1145. * X1 - CENTRAL MEMORY LOCATION
  1146. * X6 - STARTING RECORD
  1147. * X7 - NUMBER OF RECORDS
  1148.  
  1149.  
  1150. DPAR DATA 0 ENTRY/EXIT
  1151. SA6 DBR BEGINNING RECORD
  1152. SA7 DNR NUMBER OF RECORDS
  1153. BX6 X1 MEMORY ADDRESS
  1154. SA6 DA2M
  1155. SA1 DARG2 PARAMETER LIST
  1156. EQ DPAR
  1157. BDIS SPACE 4
  1158. ** BDIS - SENT MESSAGE TO THE B DISPLAY ONLY
  1159. *
  1160. * X6=ADDRESS OF MESSAGE
  1161.  
  1162.  
  1163. BDIS DATA 0 ENTRY/EXIT
  1164. SA6 DARG4 STORE ARGUMENT
  1165. SA1 DARG4
  1166. RJ =XBDISP
  1167. SB1 1 RESTORE
  1168. EQ BDIS
  1169. * /--- BLOCK COPYPFX 00 000 80/10/15 08.53
  1170. DMAM SPACE 4
  1171. ** DMAM - OUTPUT FILE NAME INTO DAYFILE
  1172.  
  1173.  
  1174. DMAM DATA 0 ENTRY/EXIT
  1175. SA1 DSNAME GET CURRENT FILE NAME
  1176. BX6 X1
  1177. SA6 DMNAX STORE IN ERROR MESSAGE
  1178. MESSAGE DMNAM
  1179. EQ DMAM
  1180. DMEM SPACE 4
  1181. ** DMEM - OUTPUT ERROR STATUS INTO DAYFILE
  1182.  
  1183.  
  1184. DMEM DATA 0 ENTRY/EXIT
  1185. SA1 DERROR GET ERROR STATUS
  1186. RJ CDD CONVERT
  1187. SA6 DMERX STORE IN ERROR MESSAGE
  1188. MESSAGE DMERR
  1189. EQ DMEM
  1190. DBGM SPACE 4
  1191. ** DBGM - OUTPUT BEGIN RECORD INTO DAYFILE
  1192.  
  1193.  
  1194. DBGM DATA 0 ENTRY/EXIT
  1195. SA1 DBR GET BEGINNING RECORD NUMBER
  1196. RJ CDD CONVERT
  1197. SA6 DMBGX STORE IN ERROR MESSAGE
  1198. MESSAGE DMBGR
  1199. EQ DBGM
  1200. DNRM SPACE 4
  1201. ** DNRM - OUTPUT NUMBER OF RECORDS INTO DAYFILE
  1202.  
  1203.  
  1204. DNRM DATA 0 ENTRY/EXIT
  1205. SA1 DNR GET NUMBER OF RECORDS
  1206. RJ CDD CONVERT
  1207. SA6 DMNRX STORE IN ERROR MESSAGE
  1208. MESSAGE DMNRC
  1209. EQ DNRM
  1210.  
  1211.  
  1212. * ERROR MESSAGES
  1213.  
  1214. DMATT DIS ,* ERROR IN ATTACHING FILE*
  1215. DMRDM DIS ,* ERROR IN READING FILE*
  1216. DMWRM DIS ,* ERROR IN WRITING FILE*
  1217. DMNAM DATA 10H FILE NAM
  1218. DATA 10HE =
  1219. DMNAX DATA 0
  1220. DATA 0
  1221. DMERR DATA 10H ERROR ST
  1222. DATA 10HATUS =
  1223. DMERX DATA 0
  1224. DATA 0
  1225. DMBGR DATA 10H BEGINNIN
  1226. DATA 10HG RECORD =
  1227. DMBGX DATA 0
  1228. DATA 0
  1229. DMNRC DATA 10H ENDING R
  1230. DATA 10HECORD =
  1231. DMNRX DATA 0
  1232. DATA 0
  1233.  
  1234. * ARGUMENT LISTS AND VARIABLES
  1235.  
  1236. DWAIT DATA 10HWAITING FO
  1237. DATA 10HR FILE -
  1238. DSNAME DATA 0 FILE NAME
  1239. DATA 0 END OF MESSAGE
  1240. DERROR DATA 0 RETURN STATUS
  1241. DM1 DATA -1 WRITE PERMISSION
  1242. DBR DATA 0 BEGINNING RECORD NUMBER
  1243. DNR DATA 0 NUMBER OF RECORDS
  1244. CMSG DATA 1L CLEAR MESSAGE
  1245.  
  1246. DARG1 VFD 60/DSNAME ARGUMENT LIST FOR ATTACH
  1247. VFD 60/DERROR
  1248. VFD 60/DM1
  1249. DATA 0
  1250.  
  1251. DARG2 VFD 60/DBR ARG. LIST FOR DREAD /DWRITE
  1252. DA2M VFD 60/0 MEMORY LOCATION STORED HERE
  1253. VFD 60/DNR
  1254. VFD 60/DERROR
  1255. DATA 0
  1256.  
  1257. DARG3 VFD 60/DSNAME ARGUMENT LIST FOR DETACH
  1258. DATA 0
  1259.  
  1260. DARG4 VFD 60/0 B DISPLAY ARGUMENT
  1261. DATA 0
  1262. * /--- BLOCK COPYPFX 00 000 80/10/27 14.51
  1263. TITLE K-DISPLAY ROUTINES
  1264. BUILDO SPACE 4
  1265. ** BUILDO - BUILD OUTPUT LINE
  1266. *
  1267. * AUDIT INFO IN BUFA
  1268. * BUILDS OUTPUT LINE FOR PRINTER IN BUILD
  1269.  
  1270. BUILDO DATA 0 ENTRY/EXIT
  1271. SA1 BUFA MASTER FILE NAME
  1272. MX7 42
  1273. BX1 X7*X1
  1274. RJ SFN
  1275. LX6 54
  1276. SA6 BUILD
  1277. SA1 BUFA+1 PACKNAME
  1278. MX7 42
  1279. BX1 X7*X1
  1280. RJ SFN
  1281. SA6 BUILD+1
  1282. SA1 BUFA NUMBER OF FILES
  1283. SX1 X1
  1284. RJ CDD
  1285. MX7 -24
  1286. BX6 -X7*X6
  1287. LX6 36
  1288. SA6 BUILD+2
  1289. SA1 BUFA+1 SLOT NUMBER
  1290. MX7 -7
  1291. BX1 -X7*X1
  1292. RJ CDD
  1293. SA1 BUILD+2
  1294. LX6 6
  1295. MX7 -36
  1296. BX6 -X7*X6
  1297. IX6 X6+X1
  1298. SA6 A1
  1299. SA1 BUFA+2 VSN/PACK
  1300. MX7 6 IF TAPE, ADD *
  1301. BX7 X7*X1
  1302. NZ X7,BUI1
  1303. SX7 1R*
  1304. LX7 54
  1305. BX1 X1+X7
  1306. BUI1 MX7 42
  1307. BX1 X7*X1
  1308. RJ SFN
  1309. SA6 BUILD+3
  1310. SA1 BUFA+1 EST
  1311. MX7 -6
  1312. AX1 7
  1313. BX1 -X7*X1
  1314. RJ WOD
  1315. MX6 -12
  1316. SA1 BUILD+3
  1317. BX7 -X6*X7
  1318. BX1 X6*X1
  1319. IX6 X7+X1
  1320. SA6 A1
  1321. SA1 BUFA+2 YEAR
  1322. AX1 14
  1323. MX7 -4
  1324. BX1 -X7*X1
  1325. SX1 X1+80
  1326. RJ CDD
  1327. MX7 -18
  1328. BX6 -X7*X6
  1329. LX6 42
  1330. SA6 BUILD+4
  1331. SA1 BUFA+2 MONTH
  1332. AX1 10
  1333. MX7 -4
  1334. BX1 -X7*X1
  1335. RJ CDD
  1336. SA1 BUILD+4
  1337. MX7 -18
  1338. BX6 -X7*X6
  1339. LX6 24
  1340. IX6 X6+X1
  1341. SA6 A1
  1342. SA1 BUFA+2 DAY
  1343. AX1 5
  1344. MX7 -5
  1345. BX1 -X7*X1
  1346. RJ CDD
  1347. SA1 BUILD+4
  1348. LX6 6
  1349. MX7 -24
  1350. BX6 -X7*X6
  1351. IX6 X6+X1
  1352. SA6 A1
  1353. SA1 BUFA+2 HOUR
  1354. MX7 -5
  1355. BX1 -X7*X1
  1356. RJ CDD
  1357. LX6 6
  1358. MX7 -18
  1359. BX6 -X7*X6
  1360. LX6 42
  1361. SA6 BUILD+5
  1362. EQ BUILDO
  1363. * /--- BLOCK COPYPFX 00 000 80/11/03 10.40
  1364. KDISP SPACE 4
  1365. ** DO K-DISPLAY
  1366.  
  1367.  
  1368. KDISP DATA 0 ENTRY/EXIT
  1369. RJ SETPAR SET UP PARAMETERS
  1370. NZ X4,INITERR IF ERROR IN PARAMS
  1371. SX6 0 CLEAR GO FLAG
  1372. SA6 GO
  1373. RJ ATTAUD ATTACH AUDIT FILE
  1374. KDSP1 RJ SETK SET UP K-DISPLAY PARAMETERS
  1375. KDSP2 REWIND TB,R
  1376. READ TB,R
  1377. KDSP3 READW TB,BUFA,BUFAL READ AUDIT ENTRY
  1378. NZ X1,KDSP11 IF EOR, EOF, EOI
  1379. SA1 PN SEE IF PACKNAME SPECIFIED
  1380. ZR X1,KDSP4
  1381. SA2 BUFA+1
  1382. MX7 42
  1383. BX2 X7*X2
  1384. BX6 X1-X2
  1385. NZ X6,KDSP3 IF PACKNAMES DO NOT MATCH
  1386. KDSP4 SA1 MF SEE IF MASTERFILE SPECIFIED
  1387. ZR X1,KDSP5
  1388. SA2 BUFA
  1389. MX7 42
  1390. BX2 X7*X2
  1391. BX6 X1-X2
  1392. NZ X6,KDSP3 IF MASTERFILES DO NOT MATCH
  1393. KDSP5 SA1 SL SEE IF SLOT SPECIFIED
  1394. ZR X1,KDSP6
  1395. SA2 BUFA+1
  1396. MX7 -7
  1397. BX2 -X7*X2
  1398. BX6 X1-X2
  1399. NZ X6,KDSP3 IF SLOT DOES NOT MATCH
  1400. KDSP6 SA1 MO SEE IF MONTH SPECIFIED
  1401. ZR X1,KDSP7
  1402. SA2 BUFA+2
  1403. AX2 10
  1404. MX7 -4
  1405. BX2 -X7*X2
  1406. BX6 X1-X2
  1407. NZ X6,KDSP3 IF MONTH DOES NOT MATCH
  1408. KDSP7 SA1 DAY SEE IF DAY SPECIFIED
  1409. ZR X1,KDSP8
  1410. SA2 BUFA+2
  1411. AX2 5
  1412. MX7 -5
  1413. BX2 -X7*X2
  1414. BX6 X1-X2
  1415. NZ X6,KDSP3 IF DAY DOES NOT MATCH
  1416. KDSP8 SA1 GO SEE IF IN GO MODE
  1417. ZR X1,KDSP10 NO GO MODE
  1418. RJ SETSTK ADD TO REQUEST STACK
  1419. NG X7,KDSP3 IF NO OVERFLOW
  1420. RJ SETBUF SETUP BUFFER
  1421. RJ SETK
  1422. SB6 TOOMF TOO MANY FILE SELECTED
  1423. KDSP9 RJ MOVEL MOVE ERROR LINE
  1424. SX6 0 CLEAR GO FLAG
  1425. SA6 GO
  1426. EQ KDSP11
  1427.  
  1428. KDSP10 RJ BUILDO BUILD OUTPUT LINE
  1429. SB6 BUILD
  1430. RJ MOVEL MOVE TO K-DISPLAY BUFFER
  1431. ZR X6,KDSP3 IF NO OUTPUT TO TRANSFER
  1432. EQ KDSP12
  1433.  
  1434. * /--- BLOCK COPYPFX 00 000 80/11/07 07.34
  1435. KDSP11 SA1 GO SEE IF GO MODE
  1436. NZ X1,KDSP14
  1437. SB6 0 END MESSAGE
  1438. RJ MOVEL
  1439. ZR X6,KDSP2 START OVER IF +
  1440. KDSP12 SA1 =10HXXXXXXXXX. SET UP FAKE CONTROL CARD
  1441. SX5 KFILL
  1442. BX6 X1
  1443. SA6 X5
  1444. RJ PRA STRIP OFF PARAMETERS
  1445. NZ X6,KDSP13 IF ERROR IN PARAMETERS
  1446. SB5 ARGT ARG TABLE ADDRESS
  1447. RJ ARG
  1448. NZ X1,KDSP13 ERROR IN PARAMETERS
  1449. RJ SETBUF SET UP BUFFER
  1450. RJ SETPAR SET UP PARAMETERS
  1451. NZ X4,KDSP13 IF ERROR IN PARAMS
  1452. SA1 GO SEE IF GO MODE
  1453. ZR X1,KDSP1
  1454. SB6 STACK ZERO STACK
  1455. SB7 MAXST*2
  1456. RJ ZERO
  1457. SA7 STACKPT CLEAR STACK POINTER
  1458. EQ KDSP1
  1459.  
  1460. KDSP13 RJ SETBUF SET UP BUFFER PARAMS
  1461. RJ SETK
  1462. SB6 INMSG ERROR IN PARAMS MESSAGE
  1463. RJ MOVEL
  1464. EQ KDSP11
  1465.  
  1466. KDSP14 RJ INITPCK SEE IF ANY ENTRIES/INITIALIZE
  1467. ZR X1,KDSP15
  1468. UNLOAD TB,R GET RID OF AUDIT TRAIL FILE
  1469. MX6 0 RELEASE CONSOLE BUFFERS
  1470. SA6 CMA
  1471. CONSOLE CMA
  1472. EQ KDISP
  1473.  
  1474. KDSP15 RJ SETBUF SEND ERROR MESSAGE
  1475. RJ SETK
  1476. SB6 NOFILE
  1477. EQ KDSP9
  1478. MOVEL SPACE 4
  1479. ** MOVEL - MOVE CODED LINE TO LEFT SCREEN BUFFER
  1480. *
  1481. * MOVES A CODED LINE TO LEFT DISPLAY BUFFER IF ROOM.
  1482. * IF NO ROOM, OUTPUT MESSAGE *+ FOR MORE*, AND
  1483. * WAIT FOR KEYBOARD INPUT. IF INPUT =*+*, THEN
  1484. * ZERO BUFFER AFTER HEADER AND MOVE LINE.
  1485. *
  1486. * ENTRY B1=1
  1487. * B6=ADDRESS OF CODED LINE
  1488. * IF B6=0, END MESSSAGE SENT
  1489. * WLINE, WHDR, LLINE, LHDR SET(INIT. 0,1,0,0)
  1490. *
  1491. * EXIT X6=0, LINE MOVED OK
  1492. * X6.NE.0, INFORMATION IN KEYBOARD BUFFER
  1493. * WLINE, LLINE RESET
  1494.  
  1495.  
  1496. * /--- BLOCK COPYPFX 00 000 80/10/30 11.11
  1497. MOVEL DATA 0 ENTRY/EXIT
  1498. MVL1 ZR B6,MVL7 IF END MESSAGE
  1499. MX7 -12 CHARACTER MASK
  1500. SB7 B0 WORD COUNTER
  1501. MVL2 SA1 B6+B7 GET NEXT WORD
  1502. BX6 -X7*X1 SEE IF BOTTOM 12 BITS ARE ZERO
  1503. ZR X6,MVL3 IF END OF LINE
  1504. SB7 B7+B1 BUMP WORD COUNT
  1505. EQ MVL2
  1506.  
  1507. MVL3 SA1 WLINE CURRENT WORD COUNT
  1508. SB7 B7+B1 CORRECT WORD COUNT FOR LINE
  1509. SX6 X1+B7 TOTAL INCLUDING THIS LINE
  1510. SX7 X6-1000B-3
  1511. PL X7,MVL5 IF NOT ENOUGH ROOM IN BUFFER
  1512. SA6 A1 UPDATE WORD COUNT
  1513. SA2 LLINE UPDATE NUMBER OF LINES
  1514. SX6 X2+B1
  1515. SA6 A2
  1516. SB4 B0 MOVE COUNTER
  1517. SA3 MAXK CHECK IF TOO MANY LINES
  1518. IX6 X2-X3
  1519. PL X6,MVL5
  1520. SB5 X1+LSCR FIRST STOREAGE ADDRESS
  1521. MVL4 SA1 B6+B4 NEXT WORD TO TRANSFER
  1522. BX6 X1
  1523. SA6 B5+B4 STORE IN LEFT SCREEN BUFFER
  1524. SB4 B4+B1 BUMP COUNTER
  1525. LT B4,B7,MVL4 IF NOT DONE
  1526. MX6 0 OK FLAG
  1527. EQ MOVEL EXIT
  1528.  
  1529. MVL5 SA2 =10L+ FOR MORE MORE INFO MESSAGE
  1530. MVL6 BX6 X2
  1531. SX7 B6 SAVE FWA OF MESSAGE
  1532. SA6 LSCR+X1 PUT IN SCREEN BUFFER
  1533. SA7 LSAVE
  1534. RJ WAINP WAIT FOR KEYBOARD INPUT
  1535. NZ X6,MOVEL EXIT WITH ERROR FLAG
  1536. RJ SETBUF SET UP BUFFER
  1537. SA1 LSAVE RESTORE FWA OF LINE
  1538. SB6 X1
  1539. MX6 0
  1540. ZR B6,MOVEL EXIT IF END MESSAGE
  1541. EQ MVL1 TRY IT AGAIN
  1542.  
  1543. MVL7 SA2 =3LEND END MESSAGE
  1544. SA1 WLINE WORD COUNT
  1545. EQ MVL6 MOVE END MESSAGE
  1546.  
  1547. WLINE DATA 0 NUMBER OF WORDS USED IN BUFFER
  1548. LLINE DATA 0 NUMBER OF LINES IN BUFFER
  1549. WHDR DATA 1 NUMBER OF WORDS IN HEADER
  1550. LHDR DATA 0 NUMBER OF LINES IN HEADER
  1551. LSAVE DATA 0 SAVE FWA OF LINE
  1552. * /--- BLOCK COPYPFX 00 000 80/10/29 14.34
  1553. SETBUF SPACE 4
  1554. ** SETBUF - SET UP BUFFER
  1555. *
  1556. * ZEROS NON-HEADER PORTION OF BUFFER
  1557. * ZERO KEYBOARD BUFFER
  1558. * SETS POINTER TO REFLECT HEADER
  1559.  
  1560.  
  1561. SETBUF DATA 0 ENTRY/EXIT
  1562. SA1 WHDR ZERO BUFFER AND SET LINE COUNT
  1563. SA2 LHDR
  1564. BX6 X1
  1565. BX7 X2
  1566. SA6 WLINE
  1567. SA7 LLINE
  1568. SB6 X1+LSCR
  1569. SB7 X1-1000B - WORD COUNT
  1570. SB7 -B7
  1571. RJ ZERO
  1572. SB6 KBUF ZERO KEYBOARD BUFFER
  1573. SB7 KEND-KBUF
  1574. RJ ZERO
  1575. EQ SETBUF
  1576. SETK SPACE 4
  1577. ** SETK - SET UP K-DISPLAY PARAMETERS
  1578.  
  1579.  
  1580. SETK DATA 0 ENTRY/EXIT
  1581. .NOS23 IFGE "MODLEVEL",617D
  1582. CSTATUS CTYPE GET CONSOLE TYPE
  1583. SA1 CTYPE
  1584. MX6 12
  1585. BX1 X6*X1
  1586. ZR X1,SETK1 IF CC545 CONSOLE
  1587. SX6 MAXK721 RESET MAX LINES
  1588. SA6 MAXK
  1589. .NOS23 ENDIF
  1590. SETK1 SX6 B1 SET UP SCREEN BUFFERS
  1591. SA6 WLINE NUMBER OF WORDS
  1592. LX6 48
  1593. SX7 0
  1594. SA7 LLINE LINE COUNT
  1595. SA6 LSCR SET DISPLAY MODES
  1596. SA6 RSCR
  1597. SA1 PN FORMAT PACKNAME
  1598. RJ SFN
  1599. MX7 42
  1600. BX6 X7*X6
  1601. SX7 3RPN=
  1602. IX6 X6+X7
  1603. LX6 42
  1604. SA6 PLINE+1
  1605. SA1 MF FORMAT FILENAME
  1606. RJ SFN
  1607. MX7 42
  1608. BX6 X7*X6
  1609. SX7 3RMF=
  1610. IX6 X6+X7
  1611. LX6 42
  1612. SA6 PLINE+3
  1613. SA1 SL FORMAT SLOT
  1614. RJ CDD
  1615. MX7 42
  1616. BX4 X7*X4
  1617. SX6 3RSL=
  1618. BX6 X6+X4
  1619. LX6 36
  1620. BX6 X7*X6
  1621. SA6 PLINE+4
  1622. SA1 DA FORMAT DATE
  1623. RJ CDD
  1624. MX7 42
  1625. BX4 X7*X4
  1626. SX6 3RDA=
  1627. BX6 X6+X4
  1628. LX6 36
  1629. SA6 PLINE+2
  1630. SB6 PLINE MOVE HEADER LINES
  1631. RJ MOVEL
  1632. SB6 =1L
  1633. RJ MOVEL
  1634. SB6 LINE1
  1635. RJ MOVEL
  1636. SB6 LINE2
  1637. RJ MOVEL
  1638. SA1 WLINE NUMBER OF WORDS IN HEADER
  1639. BX6 X1
  1640. SA6 WHDR
  1641. SX6 4 NUMBER OF LINES IN HEADER
  1642. SA6 LHDR
  1643. CONSOLE CMA CALL CONSOLE
  1644. EQ SETK
  1645.  
  1646. CTYPE BSS 1
  1647. * /--- BLOCK COPYPFX 00 000 80/10/29 14.43
  1648. SETPAR SPACE 4
  1649. ** SETPAR - SETUP PARAMETERS
  1650. *
  1651. * CONVERT DATE/SLOT PARAMETERS
  1652. *
  1653. * EXIT X4=0 IF OK, X4.NE.0 IF ERROR
  1654.  
  1655.  
  1656. SETPAR DATA 0 ENTRY/EXIT
  1657. SA5 SLOT CONVERT SLOT
  1658. SX6 B1
  1659. IX6 X5-X6
  1660. MX4 0 EXIT FLAG
  1661. SB7 B1 BASE FLAG = DECIMAL
  1662. ZR X6,SETP1
  1663. RJ DXB CONVERT
  1664. SETP1 NZ X4,SETPAR IF ERROR
  1665. SA6 SL STORE CONVERTED NUMBER
  1666. SA5 DATE CONVERT DATE
  1667. SX6 B1
  1668. IX6 X5-X6
  1669. ZR X6,SETP2
  1670. RJ DXB CONVERT
  1671. SETP2 NZ X4,SETPAR IF ERROR
  1672. SA6 DA STORE CONVERTED NUMBER
  1673. SX5 100 FIND MONTH
  1674. BX1 X6
  1675. IX7 X6/X5
  1676. SA7 MO
  1677. SX5 100
  1678. IX7 X7*X5 FIND DAY OF MONTH
  1679. IX7 X1-X7
  1680. SA7 DAY
  1681. EQ SETPAR
  1682. SETSTK SPACE 4
  1683. ** SETSTK - SET PARAMETERS IN STACK
  1684. *
  1685. * GOOD AUDIT ENTRY AT BUFA
  1686. * STACKPT - SET TO CURRENT STACK ENTRY
  1687. *
  1688. * EXIT X7.LT.0 - ENTRY INSERTED, X7=+ - OVERFLOW
  1689.  
  1690.  
  1691. SETSTK DATA 0 ENTRY/EXIT
  1692. SA2 STACKPT CURRENT STACK POINTER
  1693. SA1 BUFA GET MASTER FILE NAME
  1694. MX7 42
  1695. BX6 X7*X1
  1696. SA6 STACK+X2
  1697. SA1 BUFA+2 GET VSN/PACK NAME
  1698. BX6 X7*X1
  1699. SA6 A6+B1
  1700. SX7 X2+2 INCREMENT STACK POINTER
  1701. SA7 A2
  1702. SX7 X7-MAXST2-1 TEST FOR OVERFLOW
  1703. EQ SETSTK
  1704. WAINP SPACE 4
  1705. ** WAINP - WAIT FOR KEYBOARD INPUT
  1706. *
  1707. * EXIT X6=0, FIRST CHARACTER OF INPUT IS A *+*
  1708.  
  1709.  
  1710. WAINP DATA 0
  1711. WAI1 RECALL WAIT FOR USER INPUT
  1712. SA1 KBUF SEE IF USER INPUT
  1713. ZR X1,WAI1 IF NO INPUT
  1714. MX6 6 SEE IF *+*
  1715. BX6 X6*X1
  1716. LX6 6
  1717. SX6 X6-1R+
  1718. EQ WAINP
  1719. * /--- BLOCK COPYPFX 00 000 87/03/18 14.33
  1720. DEBUG SPACE 4
  1721. DEBUG DATA 0 ENTRY/EXIT
  1722. RJ CDD
  1723. SA6 DMSG
  1724. MESSAGE DMSG
  1725. EQ DEBUG
  1726. DEBUGX DATA 0 ENTRY/EXIT
  1727. BX7 X2
  1728. SA7 DMS
  1729. RJ CDD
  1730. SA6 DMSG
  1731. MESSAGE DMS
  1732. EQ DEBUGX
  1733. SHOW DATA 0
  1734. BX6 X1
  1735. SA6 DMSG
  1736. RJ WOD
  1737. SA6 DMSA
  1738. SA7 A6+B1
  1739. MESSAGE DMSA
  1740. EQ SHOW
  1741. MESSX DATA 0 ENTRY/EXIT
  1742. BX7 X2
  1743. SA7 DMS
  1744. BX6 X1
  1745. SA6 DMSG
  1746. MESSAGE DMS
  1747. EQ MESSX
  1748. * /--- BLOCK ARG 00 000 87/03/18 14.08
  1749. ARG TITLE ARG - PROCESS ARGUMENTS.
  1750. *** ARG - PROCESS ARGUMENTS.
  1751. * G. R. MANSFIELD. 70/10/09.
  1752. *
  1753. * THIS IS A COPY OF NOS COMMON DECK COMCARG.
  1754. *
  1755. * AFTER PARSING THE CONFORMING ARGUMENTS, THE *INIT*
  1756. * ROUTINE MODIFIES THE CODE TO ACCEPT 10 CHARACTER
  1757. * ARGUMENTS (THOSE FOLLOWING THE CLOSE PARENTHESIS
  1758. * OR PERIOD) FOR THE *Z* PARAMETER.
  1759. *
  1760. IF -DEF,QUAL$,1
  1761. QUAL COMCARG
  1762. BASE D
  1763. ARG SPACE 4
  1764. *** ARG PROCESSES AN ARGUMENT LIST BY THE USE OF AN
  1765. * EQUIVALENCE TABLE.
  1766. *
  1767. * ENTRY (B1) = 1.
  1768. * (B4) = ARGUMENT COUNT.
  1769. * (A4) = ADDRESS OF FIRST ARGUMENT.
  1770. * (X4) = FIRST ARGUMENT.
  1771. * (B5) = ADDRESS OF ARGUMENT TABLE IN ONE OF THE
  1772. * FOLLOWING FORMS -
  1773. * 1. 12/ OP, 18/ ASV, 12/ ST, 18/ ADDR
  1774. * 2. 12/ 77B, 18/ ASV, 12/ ST, 18/ ADDR
  1775. * 42/ OP, 18/0
  1776. * 77B = INDICATION THAT TWO-WORD ENTRY TABLE
  1777. * FORMAT WAS USED.
  1778. * OP = ONE TO SEVEN CHARACTER OPTION.
  1779. * ASV = ADDRESS OF ASSUMED VALUE.
  1780. * ST = STATUS.
  1781. * ADDR = ADDRESS TO STORE ARGUMENT.
  1782. * THE LOWER 18 BITS OF THE ASSUMED VALUE ARE
  1783. * ENTERED INTO THE EQUIVALENCED ARGUMENT.
  1784. * IF *ASV* .LT. 0, THE ARGUMENT MUST NOT BE
  1785. * EQUIVALENCED.
  1786. * IF *ASV* = *ADDR*, ONLY ONE ENTRY OF THAT
  1787. * ARGUMENT WILL BE ALLOWED (*OP* IS SET TO - 0).
  1788. * IF STATUS = 4000B, A ZERO *0* PARAMETER IS
  1789. * RETAINED AS A DISPLAY ZERO, OTHERWISE A
  1790. * VALUE OF ZERO IS STORED.
  1791. *
  1792. * EXIT (X1) .NE. 0, IF ARGUMENT ERROR DETECTED.
  1793. * AN ERROR STATUS IS RETURNED FOR THE FOLLOWING
  1794. * CONDITIONS -
  1795. * 1. OPTION NOT FOUND IN TABLE
  1796. * 2. SINGLE ARGUMENT EQUIVALENCED
  1797. * 3. ILLEGAL RE-ENTRY OF ARGUMENT
  1798. *
  1799. * USES X - 0, 1, 2, 3, 4, 6, 7.
  1800. * B - 2, 3, 4.
  1801. * A - 2, 3, 4, 7.
  1802.  
  1803. * /--- BLOCK ARG 00 000 87/03/18 14.02
  1804.  
  1805. ARG SUBR ENTRY/EXIT
  1806. MX0 42
  1807. SX1 B0
  1808. ZR B4,ARGX IF NO ARGUMENTS
  1809. SX1 B1 PRESET ERROR
  1810.  
  1811. * SEARCH FOR MATCH IN ARGUMENT TABLE.
  1812.  
  1813. ARG1 ZR X4,ARGX IF NULL ARGUMENT
  1814. SA2 B5-B1
  1815. MX3 12
  1816. SB3 12
  1817. ARG1.1 SA2 A2+B1 GET NEXT OPTION
  1818. ZR X2,ARGX IF END OF OPTION TABLE
  1819. SB2 B0
  1820. BX6 X3*X2 CHECK FOR KEYWORD MATCH
  1821. LX7 X6,B3
  1822. SX7 X7-77B
  1823. NZ X7,ARG1.2 IF ARGUMENT LESS THAN THREE CHARACTERS
  1824. SB2 B1
  1825. SA2 A2+B1 GET SECOND WORD OF THE ENTRY
  1826. BX6 X0*X2 GET OPTION
  1827. ARG1.2 BX7 X4-X6
  1828. BX7 X0*X7
  1829. NZ X7,ARG1.1 IF NO MATCH
  1830.  
  1831. * CHECK FOR EQUIVALENCE ALLOWED.
  1832.  
  1833. ZR B2,ARG2 IF ONE WORD ENTRY
  1834. SA2 A2-B1
  1835. ARG2 SX7 X4-1R= CHECK FOR EQUIVALENCE SEPARATOR
  1836. SB2 X2 SET VALUE ADDRESS
  1837. LX2 30 GET ASSUMED VALUE
  1838. ZR X7,ARG2.1 IF NOS *=*
  1839. SX7 X4-2 CHECK FOR PRODUCT SET FORMAT *=*
  1840. ARG2.1 SB3 X2
  1841. PL B3,ARG3 IF EQUIVALENCE ALLOWED
  1842. SA3 -B3 ASSUMED VALUE
  1843. BX6 -X0*X3 ASSUMED STATUS
  1844. SB3 -B3
  1845. NZ X7,ARG5 IF ARGUMENT NOT EQUIVALENCED
  1846. SA4 A4+B1
  1847. SB4 B4-B1
  1848. ZR X4,ARG6 IF NULL PARAMETER
  1849. EQ ARGX RETURN
  1850.  
  1851. * /--- BLOCK ARG 00 000 87/03/18 14.04
  1852. * PROCESS EQUIVALENCE.
  1853.  
  1854. ARG3 SA3 B3 ASSUMED VALUE
  1855. BX6 -X0*X3 ASSUMED STATUS
  1856. NZ X7,ARG5 IF ARGUMENT NOT EQUIVALENCED
  1857. SA4 A4+B1 CHECK EQUIVALENCE
  1858. SB4 B4-B1
  1859. BX3 X4 CHANGED TO BX3 X0*X4 IN NOS 670
  1860. AX4 42
  1861. NG X2,ARG4 IF DISPLAY ZERO REQUESTED
  1862. SX2 X4-1L0
  1863. ARG4 ZR X3,ARG6 IF NULL PARAMETER
  1864. NZ X2,ARG5 IF NOT *0*
  1865. SX3 B0 CLEAR EQUIVALENCE
  1866. SX6 B0 CLEAR STATUS
  1867.  
  1868. * ENTER ARGUMENT.
  1869.  
  1870. ARG5 BX3 X0*X3 MERGE ARGUMENT AND STATUS
  1871. IX7 X3+X6
  1872. SA7 B2 STORE ARGUMENT
  1873. SB3 B2-B3
  1874. NZ B3,ARG6 IF ASSUMED VALUE NOT IN ARGUMENT ADDRESS
  1875. SA2 A2
  1876. MX3 12
  1877. BX4 -X3*X2
  1878. BX7 X3+X4 SET OP = -0 IF ONLY ONE ARGUMENT ALLOWED
  1879. SA7 A2
  1880. ARG6 SB4 B4-B1 CHECK FOR MORE ARGUMENTS
  1881. SA4 A4+B1
  1882. NZ B4,ARG1 IF MORE ARGUMENTS TO PROCESS
  1883. SX1 B0 CLEAR ERROR
  1884. EQ ARGX RETURN
  1885. SPACE 4
  1886. BASE *
  1887. QUAL$ IF -DEF,QUAL$
  1888. QUAL *
  1889. ARG EQU /COMCARG/ARG
  1890. QUAL$ ENDIF
  1891. * /--- BLOCK MESSAGES 00 000 87/03/18 14.33
  1892. TITLE MESSAGES, BUFFERS, DATA AREAS AND COM DECKS
  1893.  
  1894.  
  1895. * DISPLAY MESSAGES
  1896.  
  1897.  
  1898. TOFIWE MESSAGE TOFIW
  1899. EQ ABORT
  1900. TONAME MESSAGE TONAM
  1901. EQ ABORT
  1902. TOTYPE MESSAGE TOTYP
  1903. EQ ABORT
  1904. TOACCE MESSAGE TOACT
  1905. EQ ABORT
  1906. TOSIZX MESSAGE TOSIZ
  1907. EQ ABORT
  1908. FFNAME MESSAGE FFNAM
  1909. EQ ABORT
  1910.  
  1911.  
  1912. INMSG DIS ,* ERROR IN PARAMETERS.*
  1913. PROM DIS ,* ERROR IN PROCESSOR TABLE.*
  1914. WRONG DIS ,* DUMP FILE ASSIGNED TO DISK*
  1915. BLANK DIS ,* DO NOT USE BLANK LABEL TAPE*
  1916. PROFM DIS ,* TOO MANY FILES IN MASTER FILE.*
  1917. TOFIW DIS ,* FIW OF TO FILE NOT BACKUP TYPE*
  1918. TONAM DIS ,* NAMES OF TO FILES DOES NOT MATCH*
  1919. FFNAM DIS ,* NAMES OF FROM FILES DOES NOT MATCH*
  1920. TOTYP DIS ,* TO FILE TYPE NOT BACKUP*
  1921. TOSIZ DIS ,* FILE SIZES DO NOT MATCH*
  1922. TOACT DIS ,* FILE ACCOUNTS DO NOT MATCH*
  1923. TOOMF DIS ,* TOO MANY FILES SELECTED*
  1924. NOFILE DIS ,* NO FILES SELECTED*
  1925. NOTREQ DATA 0 MASTER FILE NAME
  1926. DIS ,* - MASTER FILE NOT REQUESTED*
  1927. PROIE DIS ,* FROM FILE SIZE WRONG*
  1928. PROGM DATA 0 FILE NAME
  1929. DATA 30H - FILE NOT FOUND IN MASTER FI
  1930. PROGM1 DATA 3LLE MASTER FILE NAME ADDED HERE
  1931. DATA 0
  1932. TOOBIG DIS ,* FILE NOT COMPLETELY CONTAINED IN M.F.*
  1933. RECOV DATA 0 MASTER FILE NAME
  1934. DIS ,* - MASTER FILE RECOVERED*
  1935. REING DATA 10HRESTORING
  1936. DATA 0,0
  1937. PLINE DATA 10HPARAMS -
  1938. DATA 3HPN=
  1939. DATA 4H DA=
  1940. DATA 3HMF=
  1941. DATA 4L SL=
  1942. LINE1 DIS ,= MASTER- PACKNAME FILE SLOT VSN(*) EST YY MM DD HH=
  1943. LINE2 DIS ,= FILE PACK=
  1944. DMSA DATA 0
  1945. DMS DATA 0
  1946. DMSG DATA 0,0 DEBUG MESSAGE AREA
  1947.  
  1948.  
  1949. * ARGUMENT TABLE
  1950.  
  1951.  
  1952. ARGTBL BSS 0
  1953. VFD 12/1LV,18/ONE,30/VSNX
  1954. VFD 12/1LZ,18/ONE,30/Z
  1955. VFD 12/2LFF,18/FF,30/FF
  1956. VFD 12/2LTF,18/TF,30/TF
  1957. * VFD 12/2LSP,18/PACK,30/PACK
  1958. * VFD 12/2LAP,18/APER,30/APER
  1959. ARGT BSS 0
  1960. VFD 12/2LPN,18/ZRO,30/PN
  1961. VFD 12/2LMF,18/ZRO,30/MF
  1962. VFD 12/2LGO,18/ONE,30/GO
  1963. VFD 12/2LSL,18/ONE,12/4000B,18/SLOT
  1964. VFD 12/2LDA,18/ONE,12/4000B,18/DATE
  1965. ARGTBLE DATA 0 END OF TABLE
  1966.  
  1967.  
  1968. * /--- BLOCK DATA 00 000 80/11/17 11.01
  1969.  
  1970. * COUNTERS AND PARAMETERS
  1971.  
  1972. COUNT DATA 0 BLOCK COUNT
  1973. WCOUNT DATA 0 BEGINNING WORD COUNT
  1974. ECOUNT DATA 0 ENDING WORD COUNT
  1975. MFNAME DATA 0 MASTER FILE NAME
  1976. MFTYPE DATA 0 MASTER FILE TYPE
  1977. NFILES DATA 0 NUMBER OF FILES
  1978. MFILES DATA 0 MAX. NUMBER OF FILES
  1979. OFFSET DATA 0 FILE OFFSET
  1980. PACKNAM DATA 0 PACKNAME
  1981. VSN DATA 0 VSN NUMBER (ACTUAL)
  1982. VSNX DATA 0 VSN NUMBER (USER REQUEST)
  1983. Z DATA 0 EXTENDED PARAMETER FLAG
  1984. ONE DATA 1 CONSTANT ONE
  1985. ZRO DATA 0 CONSTANT ZERO
  1986. PN DATA 0 USER PACK NAME FOR DUMPED FILE
  1987. FF DATA 0 FROM FILE
  1988. TF DATA 0 TO FILE
  1989. MFCT DATA 0 MASTER FILE COUNT
  1990. WCWANT DATA 0 WORD COUNT WANTED
  1991. BACKUP DATA 10HBACKUP ) BACKUP FILE TYPE
  1992. TOSIZE DATA 0 TO FILE SIZE (PARTS)
  1993. TOACCT DATA 0 TO FILE ACCOUNT
  1994. PACK DATA 0 PACK NAME FOR ATTACHES
  1995. APER DATA 5LAUDIT PERMANENT FILE FOR AUDIT
  1996. MF DATA 0 MASTER FILE NAME
  1997. SL DATA 0 SLOT NUMBER
  1998. SLOT DATA 0 SLOT NUMBER/FLAG
  1999. DA DATA 0 DATE
  2000. MO DATA 0 MONTH
  2001. DAY DATA 0 DAY OF MONTH
  2002. DATE DATA 0 DATE/FLAG
  2003. GO DATA 0 GO FLAG
  2004. STACKPT DATA 0 STACK POINTER
  2005. STATUS DATA 0 STATUS OF READ REQUEST
  2006. THISONE DATA 0 POINTER TO CURRENT STACK ENTRY
  2007. MAXK CON MAXK545 MAX LINES ON K-DISPLAY
  2008. CMA VFD 24/KBUF,18/RSCR,18/LSCR K-SCREEN PARAMS
  2009.  
  2010. * RESERVE BUFFER SPACE
  2011.  
  2012. WORK BSSZ WORKL WORKING BUFFER
  2013. IBUF BSSZ LBUFL INPUT CIRCULAR BUFFER
  2014. TBUF BSSZ BUFL TEMP CIRCULAR BUFFER
  2015. FILN BSSZ MAXFIL FILE NAMES
  2016. FILI BSSZ MAXFIL FILE INFO AND LOCATION
  2017.  
  2018. * SCREEN LOCATIONS
  2019.  
  2020. RSCR EQU IBUF RIGHT SCREEN
  2021. LSCR EQU RSCR+1000B LEFT SCREEN
  2022. KFILL EQU LSCR+1000B KEYBOARD FILL IN COMMAND
  2023. KBUF EQU KFILL+1 KEYBOARD BUFFER
  2024. KEND EQU KBUF+9 END OF KEYBOARD BUFFER
  2025. BUILD EQU KEND BUILD AUDIT OUTPUT LINE
  2026. BUFA EQU BUILD+6 READ AUDIT INFO
  2027. BUFAL EQU 3 LENGTH OF AUDIT INFO
  2028. BEND EQU BUFA+BUFAL END OF BUFFERS
  2029.  
  2030. * STACK
  2031.  
  2032. STACK EQU FILN REQUEST STACK
  2033. * /--- BLOCK COMMONS 00 000 87/03/18 14.37
  2034.  
  2035. * COMMON DECKS.
  2036.  
  2037.  
  2038. *CALL COMCCIO
  2039. *CALL COMCRDS
  2040. *CALL COMCRDW
  2041. *CALL COMCSYS
  2042. *CALL COMCWTS
  2043. *CALL COMCWTW
  2044. *CALL COMCCDD
  2045. *CALL COMCWOD
  2046. *CALL COMCMVE
  2047. *CALL COMCSFN
  2048. *CALL COMCCPM
  2049. *CALL COMCPFM
  2050. *CALL COMCLFM
  2051. *CALL COMCDXB
  2052.  
  2053. ORG RSCR+1
  2054. DIS ,* COPYPF PARAMETER HELP SEQUENCE*
  2055. DIS ,* *
  2056. DIS ,* K.MF=MASTER FILE NAME*
  2057. DIS ,* K.PN=PACK NAME*
  2058. DIS ,* K.SL=SLOT NUMBER*
  2059. DIS ,* K.DA=DATE (MMDD FORMAT, MM=MONTH, DD=DATE)*
  2060. DIS ,* *
  2061. DIS ,* K.+ WILL ADVANCE THE ENTRIES OR START OVER*
  2062. DIS ,* IF AT THE END OF THE ENTRIES*
  2063. DIS ,* *
  2064. DIS ,* K.GO WILL START THE PROCESSING*
  2065. DATA 0
  2066.  
  2067. ORG *
  2068.  
  2069.  
  2070. END COPYPF
plato/source/plaopl/copypf.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator