User Tools

Site Tools


cdc:nos2.source:opl871:mst

Table of Contents

MST

Table Of Contents

  • [00010] MST - MASS STORAGE TEST.
  • [00012] MASS STORAGE TEST.
  • [00212] DATA.
  • [00246] MAIN PROGRAM.
  • [00248] MAIN PROGRAM.
  • [00295] TEST SECTIONS.
  • [00297] WSQ - WRITE SEQUENTIAL.
  • [00349] RSQ - READ SEQUENTIAL.
  • [00415] POS - SEQUENTIAL POSITIONING.
  • [00489] RRD - RANDOM READ.
  • [00547] WRD - RANDOM WRITE.
  • [00626] SUBROUTINES.
  • [00628] ABT - ABORT JOB.
  • [00663] AIP - ADVANCE *IN* POINTER.
  • [00802] CKS - CHECK SECTOR.
  • [00918] CIO - COMPUTE I/O RATE.
  • [00950] CTR - COMPUTE TRANSFER RATE.
  • [00990] CVA - CONVERT ADDRESS.
  • [01033] DCH - DATA CHECK.
  • [01105] ERR - SEND ERROR MESSAGE.
  • [01203] GDB - GENERATE DATA BUFFER.
  • [01251] MEM - REQUEST MEMORY.
  • [01275] MES - SEND MESSAGE.
  • [01294] RNO - GENERATE RANDOM SECTOR NUMBER.
  • [01333] WIC - WAIT I/O COMPLETE.
  • [01378] BUFFERS.
  • [01390] PRESET.
  • [01404] PRS - PRESET PROGRAM.
  • [01655] PRESET SUBROUTINES.
  • [01657] CNS - CALCULATE NUMBER OF SECTORS.
  • [01738] PRESET DATA.
  • [01790] TBLM - GENERATE TABLE VIA *TBL* MACRO.
  • [01824] ADDRESS CONVERSION ROUTINES.
  • [01826] CDE - CONVERT *DE* ADDRESS.
  • [01831] CDP - CONVERT *DP* ADDRESS.

Source Code

MST.txt
  1. IDENT MST,FET
  2. ABS
  3. SST FL
  4. ENTRY MST
  5. ENTRY MFL=
  6. ENTRY SSJ=
  7. SYSCOM B1
  8. *COMMENT MST - MASS STORAGE TEST.
  9. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  10. TITLE MST - MASS STORAGE TEST.
  11. SPACE 4
  12. *** MST - MASS STORAGE TEST.
  13. * G. R. MANSFIELD. 70/12/06.
  14. * MODIFIED BY W. E. GOEBEL. 74/01/21.
  15. SPACE 4
  16. *** MST IS A CENTRAL PROCESSOR DRIVEN MASS STORAGE TEST. IT
  17. * PERFORMS SEQUENTIAL WRITES, READS AND POSITIONS ALONG WITH
  18. * RANDOM READS AND WRITES ON A SELECTED MASS STORAGE DEVICE.
  19. *
  20. * OPERATING INSTRUCTIONS.
  21. * WHEN CALLED, MST WILL REQUEST ASSIGNMENT OF THE FILE *DISK1*.
  22. *
  23. * SEQUENTIAL WRITE.
  24. * RANDOM DATA IS WRITTEN SEQUENTIALLY ON THE FILE IN THIS
  25. * FORMAT - 1 WORD CONTAINING JSN, MFID AND PRU NUMBER
  26. * 1 WORD CONTAINING RANDOM DATA SEED
  27. * 61 WORDS OF RANDOM DATA
  28. * 1 WORD CHECKSUM OF ABOVE DATA
  29. *
  30. * SEQUENTIAL READ.
  31. * FILE IS REWOUND AND DATA IS READ BACK CHECKING SECTOR NUMBER
  32. * AND CHECKSUM OF RANDOM DATA.
  33. *
  34. * SEQUENTIAL POSITIONING.
  35. * FILE IS POSITIONED ALTERNATELY TO SUCCESSIVE SECTORS
  36. * FROM BEGINING TO END.
  37. *
  38. * RANDOM READ.
  39. * RANDOM SECTOR NUMBERS ARE PICKED AND THE SECTORS READ.
  40. * THE SECTOR NUMBER IS CHECKED AND THE DATA CHECKSUM VERIFIED.
  41. *
  42. * RANDOM WRITE.
  43. * RANDOM SECTOR NUMBERS ARE PICKED AND THE SECTORS ARE WRITTEN.
  44. * A SEQUENTIAL READ IS PERFORMED TO VERIFY THE WRITTEN DATA.
  45. *
  46. * FOR BUFFERED DISKS THERE IS A THREE SECOND PAUSE FOLLOWING
  47. * EACH SECTION TO ALLOW I/O ACTIVITY TO COMPLETE ON THE
  48. * DISK BEFORE CONTINUING TO THE NEXT SECTION.
  49. SPACE 4
  50. *** ARGUMENT PARAMETERS.
  51. *
  52. * T TEST SECTION (CAN BE EQUATED).
  53. * T=0 OR T OR OMISSION OF THIS PARAMETER WILL RUN ALL
  54. * SECTIONS.
  55. * T=1 WRITE SEQUENTIAL.
  56. * T=2 READ SEQUENTIAL.
  57. * T=3 POSITION SEQUENTIAL.
  58. * T=4 RANDOM READ.
  59. * T=5 RANDOM WRITE.
  60. *
  61. * P TEST PATTERN (CAN BE EQUATED).
  62. * P=0 ALL ZEROS PATTERN.
  63. * P=1 ALL ONES PATTERN.
  64. * P=2 25252525252525252525B PATTERN.
  65. * P=3 52525252525252525252B PATTERN.
  66. * P=4 DO NOT GENERATE OR CHECK DATA. THE SECTOR
  67. * NUMBER, JSN AND MFID IS GENERATED AND CHECKED
  68. * FOR EACH SECTOR.
  69. * P=5 OR P OR OMISSION OF THIS PARAMETER WILL ENABLE
  70. * RANDOM PATTERN.
  71. * P=6 DO NOT GENERATE OR CHECK DATA. DO NOT COPY DATA
  72. * BETWEEN THE CIO BUFFER AND THE WORKING BUFFER.
  73. * THE SECTOR NUMBER, JSN AND MFID IS GENERATED AND
  74. * CHECKED FOR EACH SECTOR.
  75. *
  76. * N NUMBER OF SECTORS (CAN BE EQUATED).
  77. * N=0 GIVES ARGUMENT ERROR MESSAGE AND PROGRAM ABORT.
  78. * N=XXXXXXX WILL RUN THE TEST ON XXXXXXX SECTORS.
  79. * IF TOO LARGE A VALUE OF XXXXXXX IS SPECIFIED,
  80. * A TRACK LIMIT WILL RESULT.
  81. * N=* WILL TEST ALL AVAILABLE SECTORS.
  82. * IF SPECIFIED ON A DEVICE WITH OTHER ACTIVITY,
  83. * A TRACK LIMIT MAY RESULT.
  84. *
  85. * NW NO WRITE PERFORMED AT BEGINING OF TEST.
  86. *
  87. * TL TRANSFER LENGTH IN SECTORS FOR RANDOM I/O.
  88. * DEFAULT IS 10B SECTORS.
  89. *
  90. * NV IF SPECIFIED, DO NOT PERFORM SEQUENTIAL READ AFTER
  91. * RANDOM WRITE.
  92. *
  93. * RO IF SPECIFIED, SIMULATE ROLLIN/ROLLOUT I/O ON BUFFERED
  94. * DEVICES.
  95. *
  96. * IO IF SPECIFIED, GIVES THE NUMBER OF I/O-S TO BE
  97. * PERFORMED ON THE DEVICE. IF *IO* IS NOT SPECIFIED,
  98. * THE VALUE FOR NUMBER OF I/O-S IS COMPUTED FROM THE
  99. * TRANSFER LENGTH.
  100. *
  101. * NOTE:
  102. * SENSE SWITCH 2 - IF SET WILL ABORT ON ERRORS.
  103. * SENSE SWITCH 3 - IF SET WILL CONTINUE AT END OF TEST.
  104. * SENSE SWITCH 4 - IF SET WILL REPEAT CURRENT SECTION.
  105. *
  106. * ISSUING A CALL OF MST FROM THE CONSOLE WILL
  107. * SELECT ALL SECTIONS, RANDOM PATTERN, DEFAULT SECTOR
  108. * VALUE, PAUSE ON ERROR AND STOP AT END OF TEST.
  109. * TO CONTINUE ON ERRORS TYPE *GO.*.
  110. *
  111. MST SPACE 4
  112. *** DAYFILE MESSAGES.
  113. *
  114. * * ARGUMENT ERROR.* = ONE OF PARAMETERS IS IN ERROR.
  115. *
  116. * * ILLEGAL EQUIPMENT.* = THE EQUIPMENT WHICH WAS ASSIGNED IN
  117. * RESPONSE TO THE DISPLAY REQUEST IS NOT
  118. * RECOGNIZED AS BEING A DEVICE UPON WHICH
  119. * THE TEST MAY BE RUN.
  120. *
  121. * * SEQUENTIAL WRITE.* = THIS TEST SECTION IS BEING EXECUTED.
  122. *
  123. * * SEQUENTIAL READ.* = THIS TEST SECTION IS BEING EXECUTED.
  124. *
  125. * * SEQUENTIAL POSITIONING.* = THIS SECTION IS BEING EXECUTED.
  126. *
  127. * * RANDOM READ.* = THIS TEST SECTION IS BEING EXECUTED.
  128. *
  129. * * RANDOM WRITE.* = THIS TEST SECTION IS BEING EXECUTED.
  130. *
  131. * *MST TRANSFER RATE = XXXXXX.XXX KC.* = THE DISK TRANSFER
  132. * RATE FOR THE PREVIOUS SECTION WAS
  133. * XXXXXX.XXX KILO-CHARACTERS PER SECOND.
  134. *
  135. * * NUMBER OF I/O-S = XXXXXXXXXX.* = THE NUMBER OF IO PAIRS
  136. * SPECIFIED WITH THE *IO* PARAMETER OR
  137. * COMPUTED FROM THE *NL* PARAMETER.
  138. *
  139. * * IO PER SECONDS = XXXXXX.XXX.* = NUMBER OF IO-S PERFORMED
  140. * PER SECOND.
  141. *
  142. * * FILE SIZE = XXXXXXXXXX SECTORS.* = SIZE OF THE DATA
  143. * FILE IN SECTORS.*
  144. *
  145. * * ILLEGAL EOF DETECTED.* = AN EOF WAS DETECTED BEFORE THE
  146. * LAST SECTOR ON THE FILE.
  147. *
  148. * * NO EOF DETECTED ON LAST READ.* = NO EOF ON THE LAST SECTOR.
  149. *
  150. * * JOB ABORTED.* = ABNORMAL TERMINATION OF MST.
  151. *
  152. * *EQXXX,DATA ERROR AT -PHYSICAL POSITION-.*
  153. * *EQXXX,RXXXXXXX,TYYYY,SZZZZ.*
  154. * DATA ERRORS HAVE BEEN DETECTED ON A
  155. * SECTOR WHICH WAS READ.
  156. *
  157. * *EQXXX,POS. ERROR AT -PHYSICAL POSITION-.*
  158. * *EQXXX,RXXXXXXX,TYYYY,SZZZZ.*
  159. * THE SECTOR WHICH WAS READ WAS NOT
  160. * THE CORRECT SECTOR. THE POSITION GIVEN
  161. * IS THE POSITION OF THE SECTOR READ.
  162. *
  163. * *EQXXX,DEV.-TYPE ERR--PHYSICAL POSITION-.*
  164. * *EQXXX,RXXXXXXX,TYYYY,SZZZZ.*
  165. * CIO HAS DETECTED ONE OF THE FOLLOWING
  166. * ERRORS WHICH APPEAR IN THE -TYPE ERR-
  167. * POSITION.
  168. * -TYPE ERR- = PARITY ER. -- PARITY ERROR
  169. * ADDR. ERR. -- ADDRESS ERROR
  170. * STATUS ER. -- DEVICE STATUS ERROR
  171. * 81 FNC REJ -- 6681 FUNCTION REJECT
  172. * RESERVED -- DEVICE RESERVED
  173. * NOT READY -- DEVICE NOT READY
  174. *
  175. * *EQXXX,EXP. POSITION -PHYSICAL POSITION-.*
  176. * *EQXXX,RXXXXXXX,TYYYY,SZZZZ.*
  177. * WHEN A POSITION OR DEVICE ADDRESS ERROR
  178. * OCCURES THE EXPECTED POSITION IS GIVEN
  179. * BY THIS MESSAGE.
  180. *
  181. * *EQXXX,DATA EXP WWW,EEEEEEEEEEEEEEEEEEEE*
  182. * *EQXXX,DATA READ WWW,RRRRRRRRRRRRRRRRRRRR*
  183. * *EQXXX,DATA DIFF WWW,DDDDDDDDDDDDDDDDDDDD*
  184. * *DATA OK.* (OPTIONAL - SEE BELOW)
  185. * WHEN A DATA ERROR OR DEVICE PARITY ERROR IS
  186. * DETECTED THE DATA ON THE SECTOR IS CHECKED
  187. * AND THE ERRORS REPORTED. IF NO ERRORS ARE
  188. * FOUND THE MESSAGE *DATA OK.* IS ISSUED.
  189. * WWW IS THE WORD NUMBER IN THE SECTOR.
  190. * EE-----E IS THE EXPECTED DATA.
  191. * RR-----R IS THE DATA READ.
  192. * DD-----D IS THE DIFFERNCE.
  193. *
  194. * * MST ERROR - GO / DROP.* = *MST* HAS DETECTED AN
  195. * IRRECOVERABLE READ ERROR.
  196. *
  197. * * END MASS STORAGE TEST.* = END OF TEST.
  198. SPACE 4
  199. ** COMMON DECKS.
  200.  
  201.  
  202. *CALL COMCMAC
  203. *CALL COMCCMD
  204. *CALL COMSCIO
  205. *CALL COMSMSP
  206. SPACE 4
  207. **** ASSEMBLY CONSTANTS.
  208.  
  209.  
  210. DBUFL EQU 4001B
  211. ****
  212. TITLE DATA.
  213. FET SPACE 4
  214. * FILE FET.
  215.  
  216.  
  217. ORG 110B
  218. FET BSS 0
  219. D BSS 0
  220. DISK1 RFILEB DBUF,DBUFL,(FET=8),(DTY=2RMS)
  221.  
  222. * DATA STORAGE.
  223.  
  224.  
  225. FL CON 0 ORIGINAL FIELD LENGTH
  226. NS CON 10000B NUMBER OF SECTORS
  227. SM CON 7777B SECTOR MASK
  228. NW CON 0 NO SEQUENTIAL WRITE AT BEGINNING OF TEST
  229. TS CON 0L0 TEST SECTION TO BE EXECUTED
  230. TP CON 0L5 DEFAULT TEST PATTERN
  231. ST CON 0 START TIME
  232. ET CON 0 ENDING TIME
  233. BD CON 0 BUFFERED DEVICE FLAG
  234. ND CON 0 NULL DATA FLAG
  235. NT CON 1 NO DATA TRANSFER FLAG
  236. TL CON 0L10B TRANSFER LENGTH
  237. NV CON 0 NO VERIFICATION AFTER RANDOM WRITE FLAG
  238. RO CON 0 ROLLOUT SIMULATION FLAG
  239. IO CON 0 NUMBER OF I/O-S
  240. JN CON 0 24/JSN, 12/MAINFRAME ID, 24/0
  241. EMTS VFD 1/1,59/0 EXTENDED MEMORY TRACK SHIFT
  242.  
  243. * SPECIAL ENTRY POINTS.
  244.  
  245. SSJ= EQU 0
  246. TITLE MAIN PROGRAM.
  247. MST SPACE 4
  248. ** MST - MAIN PROGRAM.
  249.  
  250.  
  251. MST SB1 1 (B1) = 1
  252. SB7 B0
  253. SX6 A0
  254. SA6 FL
  255. RJ PRS PRESET
  256. MST1 SA1 NW
  257. NZ X1,MST2 IF NO WRITE
  258. RJ WSQ WRITE SEQUENTIAL
  259. RJ WIC WAIT I/O COMPLETE
  260. MST2 SA1 TS
  261. ZR X1,MST3 IF ALL SECTIONS SELECTED
  262. SB5 X1-1
  263. ZR B5,MST7
  264. SB2 3
  265. GT B5,B2,MST6
  266. EQ B5,B2,MST5
  267. GT B5,B1,MST4
  268. MST3 RJ RSQ READ SEQUENTIAL
  269. RJ WIC WAIT I/O COMPLETE
  270. SA1 TS
  271. NZ X1,MST7
  272. MST4 RJ POS POSITION SEQUENTIAL
  273. RJ WIC WAIT I/O COMPLETE
  274. SA1 TS
  275. NZ X1,MST7
  276. MST5 RJ RRD READ RANDOM
  277. RJ WIC WAIT I/O COMPLETE
  278. SA1 TS
  279. NZ X1,MST7
  280. MST6 RJ WRD WRITE RANDOM
  281. RJ WIC WAIT I/O COMPLETE
  282. SA1 NV
  283. NZ X1,MST7 IF NO VERIFICATION REQUIRED
  284. RJ RSQ READ SEQUENTIAL
  285. MST7 SA1 B0
  286. LX1 59-8
  287. PL X1,MST8 IF REPEAT TEST NOT SET
  288. RJ WIC WAIT I/O COMPLETE
  289. EQ MST1 CONTINUE
  290.  
  291. MST8 MESSAGE (=C* END MASS STORAGE TEST.*)
  292. ENDRUN
  293.  
  294. MSTA CON 0 TEMPORARY USED BY RSQ AND RRD
  295. TITLE TEST SECTIONS.
  296. WSQ SPACE 4,15
  297. ** WSQ - WRITE SEQUENTIAL.
  298. *
  299. * USES X - 0, 1, 2, 4, 5, 6, 7.
  300. * A - 1, 5, 6, 7.
  301. *
  302. * CALLS AIP, CKS, CTR, GDB, MEM, MES.
  303. *
  304. * MACROS REWIND, RTIME, WRITEF, WRITEW.
  305.  
  306.  
  307. WSQ SUBR ENTRY/EXIT
  308. SX6 1 SET SECTORS TO CHECK
  309. SA6 CKSI
  310. SA1 FL
  311. RJ MEM REQUEST MEMORY
  312. WSQ1 REWIND D,R
  313. SX1 =C* SEQUENTIAL WRITE.*
  314. RJ MES SEND MESSAGE
  315. SA5 NS NUMBER OF SECTORS TO WRITE
  316. BX0 X5
  317. BX6 X5 SAVE SECTOR COUNT
  318. SA6 CTRB
  319. SX5 B1
  320. RTIME ST
  321. WSQ2 SA2 JN JSN AND MFID
  322. SA1 TP GENERATE SECTOR TO WRITE
  323. BX7 X2+X5
  324. BX6 X1
  325. SA7 SBUF
  326. SA6 SBUF+1
  327. RJ GDB GENERATE DATA BUFFER
  328. SA7 TP
  329. SX2 D SET FET ADDRESS
  330. SA1 NT
  331. ZR X1,WQS3 IF NO DATA TRANSFER
  332. WRITEW X2,SBUF,100B
  333. EQ WQS4 CHECK FOR CIO ERROR
  334.  
  335. WQS3 RJ AIP ADVANCE *IN* POINTER
  336. WQS4 SX4 B0
  337. RJ CKS CHECK FOR CIO ERROR
  338. SX6 B1+
  339. IX5 X5+X6 ADVANCE SECTOR COUNTER
  340. IX0 X0-X6
  341. NZ X0,WSQ2 IF MORE SECTORS TO WRITE
  342. WRITEF D,R
  343. RJ CTR COMPUTE TRANSFER RATE
  344. SA1 B0
  345. LX1 59-9
  346. NG X1,WSQ1 IF REPEAT SECTION SET
  347. EQ WSQX RETURN
  348. RSQ SPACE 4,15
  349. ** RSQ - READ SEQUENTIAL.
  350. *
  351. * USES X - 0, 1, 2, 4, 5, 6, 7.
  352. * A - 1, 5, 6, 7.
  353. *
  354. * CALLS ABT, AOP, CKS, CTR, MEM, MES.
  355. *
  356. * MACROS MESSAGE, READ, READW, REWIND, RTIME.
  357.  
  358.  
  359. RSQ SUBR ENTRY/EXIT
  360. SX6 1 SET SECTORS TO CHECK
  361. SA6 CKSI
  362. SA1 FL
  363. RJ MEM REQUEST MEMORY
  364. RSQ1 REWIND D,R
  365. SX1 =C* SEQUENTIAL READ.*
  366. RJ MES SEND MESSAGE
  367. SA5 NS NUMBER OF SECTORS
  368. BX0 X5
  369. BX6 X5 SAVE SECTOR COUNT
  370. SA6 CTRB
  371. SX5 B0
  372. RTIME ST
  373. RSQ2 READ D
  374. RSQ3 SX2 D SET FET ADDRESS
  375. SA1 NT
  376. ZR X1,RSQ3.1 IF NO DATA TRANSFER
  377. READW X2,SBUF,100B
  378. EQ RSQ3.2 CHECK FOR EOR/EOF
  379.  
  380. RSQ3.1 RJ AOP ADVANCE *OUT* POINTER
  381. RSQ3.2 ZR X1,RSQ3.3 IF NO EOR/EOF DETECTED
  382. SX1 X1+3 CHECK FOR *CIO* ERROR
  383. NZ X1,RSQ5 IF NO *CIO* ERROR
  384. RSQ3.3 ZR X0,RSQ4 IF EOF EXPECTED
  385. SX2 B1
  386. IX4 X5+X2 ADVANCE EXPECTED SECTOR
  387. SA5 SBUF
  388. BX6 X4
  389. SA6 MSTA SAVE RANDOM ADDRESS
  390. IX0 X0-X2 DECREMENT SECTOR COUNTER
  391. RJ CKS CHECK SECTOR
  392. SA5 MSTA
  393. ZR X4,RSQ3 IF NO ERROR DETECTED
  394. SA1 D+1 RESTART READ ON ERROR
  395. SX2 B1
  396. IX7 X5+X2 SET RANDOM ADDRESS TO NEXT SECTOR
  397. SX6 X1
  398. SA6 A1+B1
  399. SA7 D+6
  400. SA6 A6+B1
  401. EQ RSQ2
  402.  
  403. RSQ4 MESSAGE (=C* NO EOF ON LAST READ.*)
  404. EQ RSQ6
  405.  
  406. RSQ5 ZR X0,RSQ7 IF EOF EXPECTED
  407. MESSAGE (=C* ILLEGAL EOF DETECTED.*)
  408. RSQ6 RJ ABT CHECK FOR ABORT ON ERRORS
  409. RSQ7 RJ CTR COMPUTE TRANSFER RATE
  410. SA1 B0
  411. LX1 59-9
  412. NG X1,RSQ1 IF REPEAT SECTION
  413. EQ RSQX RETURN
  414. POS SPACE 4,15
  415. ** POS - SEQUENTIAL POSITIONING.
  416. *
  417. * ENTRY NONE.
  418. *
  419. * EXIT NONE.
  420. *
  421. * USES X - ALL.
  422. * A - 1, 2, 3, 4, 5, 6, 7.
  423. * B - 2.
  424. *
  425. * CALLS CKS, CTR, MES, MTR.
  426. *
  427. * MACROS READW, REWIND, RPHRLS, RTIME.
  428.  
  429.  
  430. POS7 RJ CTR COMPUTE TRANSFER RATE
  431. SA1 B0
  432. LX1 59-9
  433. NG X1,POS1 IF REPEAT SECTION SET
  434.  
  435. POS SUBR ENTRY/EXIT
  436. REWIND D,R
  437. SX1 MFL=-200000B
  438. RJ MEM REQUEST MEMORY
  439. POS1 SX1 =C* SEQUENTIAL POSITIONING.*
  440. RJ MES SEND MESSAGE
  441. BX6 X6-X6 CLEAR SECTOR COUNT
  442. SA6 CTRB
  443. RTIME ST
  444. SA1 NS
  445. SX7 B1
  446. BX0 X0-X0
  447. LX6 X1
  448. EQ POS3
  449.  
  450. POS2 SX0 X0-40B
  451. NZ X0,POS7 IF LAST READ ENCOUNTERED - RETURN
  452. SA2 A4-B1
  453. SA1 A2-B1
  454. BX7 X2
  455. LX6 X1
  456. POS3 SA3 POSA
  457. SA7 TRRD-1
  458. POS4 IX6 X6-X3 GENERATE LIST OF SECTORS
  459. IX7 X7+X3
  460. NG X6,POS5 IF END OF SECTORS TO READ
  461. SA6 A7+1
  462. SA7 A7+2
  463. SB2 A6-TRRD-36B
  464. NZ B2,POS4 IF LIST NOT FULL
  465. POS5 MX7 0 SET END OF LIST FLAG
  466. SB2 B1+B1
  467. SX2 D
  468. SX6 DBUF IN = OUT = FIRST
  469. SA7 A7+B1
  470. SA6 X2+B2
  471. SX7 TRRD
  472. SA6 A6+B1
  473. SA7 A6+B2 SET LIST ADDRESS
  474. RPHRLS X2
  475. POS6 READW D,SBUF,100B GET SECTOR TO CHECK
  476. SA4 TRRD+X0
  477. SA5 SBUF
  478. ZR X4,POS2 IF END OF LIST
  479. RJ CKS CHECK SECTOR
  480. SX0 X0+B1
  481. SA1 CTRB COUNT SECTORS
  482. SX2 B1
  483. IX6 X1+X2
  484. SA6 A1
  485. EQ POS6 NEXT SECTOR
  486.  
  487. POSA CON 0 INCREMENT (SET BY PRESET)
  488. RRD SPACE 4,15
  489. ** RRD - RANDOM READ.
  490. *
  491. * ENTRY NONE.
  492. *
  493. * EXIT NONE.
  494. *
  495. * USES X - 0, 1, 4, 5, 6, 7.
  496. * A - 1, 4, 5, 6, 7.
  497. * B - NONE.
  498. *
  499. * CALLS CIO, CKS, CTR, MES, RNO.
  500. *
  501. * MACROS READ, RTIME.
  502.  
  503.  
  504. RRD SUBR ENTRY/EXIT
  505. SA1 TL REQUEST MEMORY
  506. BX6 X1
  507. LX1 6
  508. SA6 CKSI SET SECTORS TO READ
  509. SX1 X1+DBUF+11B
  510. BX6 X1
  511. SA6 D+4
  512. RJ MEM
  513. RRD1 SX1 =C* RANDOM READ.*
  514. RJ MES ISSUE MESSAGE
  515. SA1 TL
  516. SA5 IO GET NUMBER OF I/O-S
  517. BX0 -X5
  518. SA5 NS SET NUMBER OF SECTORS TRANSFERED
  519. AX5 7
  520. IX6 X1*X5
  521. SA6 CTRB
  522. RTIME ST
  523. RRD2 SX7 B1 SET RANDOM ADDRESS IN FET
  524. LX7 29-0
  525. RJ RNO GET RANDOM NUMBER
  526. SA6 RRDA
  527. BX7 X6+X7
  528. SA7 D+6
  529. SX6 DBUF SET IN = OUT = FIRST
  530. SA6 D+2
  531. SA6 A6+B1
  532. READ D,R
  533. SA5 DBUF SET ACTUAL RANDOM ADDRESS
  534. SA4 RRDA SET EXPECTED RANDOM ADDRESS
  535. RJ CKS CHECK DATA
  536. SX0 X0+B1 INCREMENT I/O COUNT
  537. NG X0,RRD2 IF MORE I/O-S REQUIRED
  538. RJ CTR COMPUTE TRANSFER RATE
  539. RJ CIO COMPUTE I/O RATE
  540. SA1 B0
  541. LX1 59-9
  542. NG X1,RRD1 IF NOT DONE
  543. EQ RRDX RETURN
  544.  
  545. RRDA CON 0 EXPECTED RANDOM ADDRESS
  546. WRD SPACE 4,15
  547. ** WRD - RANDOM WRITE.
  548. *
  549. * ENTRY NONE.
  550. *
  551. * EXIT NONE.
  552. *
  553. * USES X - 0, 1, 5, 6, 7.
  554. * A - 1, 5, 6, 7.
  555. * B - 4, 5.
  556. *
  557. * CALLS CIO, CTR, GDB, MEM, MES, RNO.
  558. *
  559. * MACROS RTIME, WRITE.
  560.  
  561.  
  562. WRD SUBR ENTRY/EXIT
  563. SA1 D+1 CLEAR EPR BIT
  564. SX6 B1
  565. LX6 44
  566. BX6 -X6*X1
  567. SA6 A1
  568. SA1 TL
  569. BX6 X1
  570. SA6 CKSI SET SECTORS TO CHECK
  571. LX1 6
  572. SX1 X1+DBUF+11B
  573. RJ MEM
  574. WRD1 SX1 =C* RANDOM WRITE.*
  575. RJ MES SEND MESSAGE
  576. SA5 NS
  577. SA1 TL REQUEST MEMORY
  578. AX5 7
  579. BX0 -X5
  580. IX6 X1*X5
  581. SA6 CTRB
  582. RTIME ST
  583. WRD1.1 SA1 TL
  584. SB4 B0
  585. SB5 X1
  586. SX7 B1
  587. LX7 29
  588. RJ RNO GET RANDOM NUMBER
  589. SA2 JN JSN AND MFID
  590. BX7 X6+X7 SET RANDOM BIT
  591. SA7 D+6
  592. BX6 X2+X6 ADD JSN AND MFID TO SECTOR NUMBER
  593. WRD2 SA6 B4+DBUF
  594. SA1 TP
  595. BX6 X1
  596. SA6 B4+DBUF+1 STORE RANDOM ADDRESS IN FET
  597. RJ GDB GENERATE DATA BUFFER
  598. SA7 TP
  599. SA1 B4+DBUF
  600. SX6 1
  601. IX6 X1+X6
  602. SB5 B5-B1
  603. SB4 B4+100B
  604. NE B5,WRD2 IF MORE SECTORS TO GENERATE
  605. SA1 TL
  606. LX1 6
  607. SX6 DBUF
  608. IX7 X6+X1
  609. SA6 D+3 OUT = FIRST
  610. SA7 D+2 IN = FIRST + 64
  611. WRITE D,R
  612. SX6 B1
  613. IX0 X0+X6 COUNT SECTOR
  614. NG X0,WRD1.1 IF MORE SECTORS TO TRANSFER
  615. RJ CTR COMPUTE TRANSFER RATE
  616. RJ CIO COMPUTE I/O RATE
  617. SA1 B0
  618. LX1 59-9
  619. NG X1,WRD1 IF REPEAT SECTION SET
  620. SA1 D+1 SET EPR BIT
  621. SX6 B1
  622. LX6 44
  623. BX6 X6+X1
  624. SA6 A1
  625. EQ WRDX RETURN
  626. TITLE SUBROUTINES.
  627. ABT SPACE 4,15
  628. ** ABT - ABORT JOB.
  629. *
  630. * ABORTS JOB IF PAUSE ON ERROR NOT SELECTED.
  631. *
  632. * EXIT (X4) = 1.
  633. *
  634. * USES X - 1, 4, 7.
  635. * A - 1, 7.
  636. * B - NONE.
  637. *
  638. * MACROS ABORT, MESSAGE, RECALL.
  639.  
  640.  
  641. ABT SUBR ENTRY/EXIT
  642. SA1 B0
  643. LX1 59-7
  644. NG X1,ABT2 IF ABORT ON ERROR
  645. SX7 B1+ SET PAUSE BIT
  646. LX1 7-59
  647. LX7 12
  648. BX7 X7+X1
  649. SA7 A1
  650. MESSAGE ABTA,2,R ISSUE MESSAGE TO SECOND LINE
  651. ABT1 RECALL
  652. SA1 B0
  653. LX1 59-12
  654. NG X1,ABT1 IF PAUSE BIT SET
  655. SX4 B1
  656. EQ ABTX RETURN
  657.  
  658. ABT2 MESSAGE (=C* JOB ABORTED.*)
  659. ABT3 ABORT ABORT JOB
  660.  
  661. ABTA DATA C*$MST ERROR - GO / DROP.*
  662. AIP SPACE 4,20
  663. ** AIP - ADVANCE *IN* POINTER.
  664. *
  665. * ADVANCE THE *IN* POINTER BY 100B (AS IF A *WRITEW* OF 100B
  666. * WORDS HAD BEEN PERFORMED), BUT DO NOT TRANSFER THE DATA.
  667. * COPY ONLY THE FIRST WORD OF THE BLOCK FROM BUFFER *SBUF*
  668. * TO THE CIO BUFFER.
  669. *
  670. * ENTRY (X2) = ADDRESS OF FET FOR FILE.
  671. *
  672. * EXIT VIA *WTX=*.
  673. * (X2) = ADDRESS OF FET FOR FILE.
  674. *
  675. * USES X - 1, 2, 3, 4, 6, 7.
  676. * A - 1, 2, 3, 4, 6.
  677. * B - 2, 3, 4, 5, 6, 7.
  678. *
  679. * CALLS DCB=, WTX=.
  680.  
  681.  
  682. + EQ AIP1 (REENTRY ADDRESS FROM *DCB=*)
  683.  
  684. AIP SUBR ENTRY/EXIT
  685. SA4 *-1 SET REENTRY/RETURN ADDRESS
  686. SA1 X2+4 (B5) = LIMIT
  687. SA3 X2+B1 (X3) = FIRST
  688. SB5 X1
  689.  
  690. * REENTER HERE FROM *DCB=*.
  691.  
  692. AIP1 SA2 X2 (B2) = FET STATUS
  693. SA1 A3+2 (B4) = OUT
  694. SB2 X2
  695. SA2 A3+B1 (X2) = IN
  696. SB4 X1
  697. SB3 X2+B1 (B3) = IN+1
  698. LE B3,B4,AIP3 IF IN .LT. OUT
  699.  
  700. * CALCULATE SPACE LEFT IN BUFFER (IN .GE. OUT).
  701.  
  702. SB7 X3
  703. SX6 B5-B7 (LIMIT-FIRST)
  704. SX7 B3-B4 (IN+1-OUT)
  705. IX6 X6-X7 AVAILABLE SPACE IN BUFFER
  706. SX7 X6-100B
  707. NG X7,DCB= IF NOT ENOUGH SPACE
  708.  
  709. * UPDATE BUFFER POINTER (IN .GE. OUT).
  710.  
  711. SB6 X2+100B NEW VALUE OF IN
  712. LT B6,B5,AIP2 IF NO BUFFER WRAPAROUND
  713. SB7 B5-B7 (LIMIT-FIRST)
  714. SB6 B6-B7 NEW VALUE OF IN
  715. AIP2 SA1 SBUF COPY FIRST WORD OF BLOCK TO (IN)
  716. BX6 X1
  717. SA6 X2
  718. SX2 B6 SET NEW VALUE OF IN
  719. EQ WTX= EXIT
  720.  
  721. * CALCULATE SPACE LEFT IN BUFFER (IN .LT. OUT).
  722.  
  723. AIP3 SX6 B4-B3 AVAILABLE SPACE IN BUFFER
  724. SX7 X6-100B
  725. NG X7,DCB= IF NOT ENOUGH SPACE IN BUFFER
  726.  
  727. * UPDATE BUFFER POINTER (IN .LT. OUT).
  728.  
  729. SB6 X2+100B NEW VALUE OF IN
  730. EQ AIP2 EXIT
  731. AOP SPACE 4,20
  732. *** AOP - ADVANCE *OUT* POINTER.
  733. *
  734. * ADVANCE THE *OUT* POINTER BY 100B (AS IF A *READW* OF 100B
  735. * WORDS HAD BEEN PERFORMED), BUT DO NOT TRANSFER THE DATA.
  736. * COPY ONLY THE FIRST WORD OF THE BLOCK FROM THE CIO BUFFER
  737. * TO BUFFER *SBUF*.
  738. *
  739. * ENTRY (X2) = ADDRESS OF FET FOR FILE.
  740. *
  741. * EXIT VIA *RDX=*.
  742. * (X1) = 0 FOR TRANSFER COMPLETE.
  743. * (X1) = -1 IF EOF DETECTED ON FILE.
  744. * (X1) = -2 IF EOI DETECTED ON FILE.
  745. * (X2) = ADDRESS OF FET FOR FILE.
  746. *
  747. * USES X - 1, 2, 3, 4, 6, 7.
  748. * A - 1, 2, 3, 4, 7.
  749. * B - 3, 4, 5, 6, 7.
  750. *
  751. * CALLS LCB=, RDX=.
  752.  
  753.  
  754. + EQ AOP1 (REENTRY ADDRESS FOR *LCB=*)
  755.  
  756. AOP SUBR ENTRY/EXIT
  757. SA4 *-1 SET REENTRY/RETURN ADDRESS
  758. SA1 X2+4 (B5) = LIMIT
  759. SA3 X2+B1 (X3) = FIRST
  760. SB5 X1
  761.  
  762. * REENTER HERE FROM *LCB=*.
  763.  
  764. AOP1 SA1 A3+B1 (B3) = IN
  765. SA2 A1+B1 (B4) = OUT
  766. SB3 X1
  767. SB4 X2
  768. LT B3,B4,AOP3 IF IN .LT. OUT
  769.  
  770. * CALCULATE DATA AVAILABLE IN BUFFER (IN .GE. OUT).
  771.  
  772. SX6 B3-B4 AVAILABLE DATA IN BUFFER
  773. SX7 X6-100B
  774. NG X7,LCB= IF NOT ENOUGH DATA IN BUFFER
  775.  
  776. * UPDATE BUFFER POINTER (IN .GE. OUT).
  777.  
  778. SB6 B4+100B NEW VALUE OF OUT
  779. AOP2 SA1 B4 COPY FIRST WORD OF BLOCK FROM (OUT)
  780. BX7 X1
  781. SA7 SBUF
  782. SB4 B6 SET NEW VALUE OF OUT
  783. EQ RDX= EXIT
  784.  
  785. * CALCULATE DATA AVAILABLE IN BUFFER (IN .LT. OUT)
  786.  
  787. AOP3 SB7 X3
  788. SX6 B5-B7 (LIMIT-FIRST)
  789. SX7 B4-B3 (OUT-IN)
  790. IX6 X6-X7 AVAILABLE DATA IN BUFFER
  791. SX7 X6-100B
  792. NG X7,LCB= IF NOT ENOUGH DATA IN BUFFER
  793.  
  794. * UPDATE BUFFER POINTER (IN .LT. OUT).
  795.  
  796. SB6 B4+100B NEW VALUE OF OUT
  797. LT B6,B5,AOP2 IF NO BUFFER WRAPAROUND
  798. SB7 B5-B7 (LIMIT-FIRST)
  799. SB6 B6-B7 NEW VALUE OF OUT
  800. EQ AOP2 EXIT
  801. CKS SPACE 4,20
  802. ** CKS - CHECK SECTOR.
  803. *
  804. * ENTRY (X5) = SECTOR NUMBER, JSN AND MFID READ.
  805. * (X4) = SECTOR NUMBER EXPECTED.
  806. * (A5) = ADDRESS OF SECTOR TO BE CHECKED.
  807. * ND .NE. 0 IF DATA IS TO BE CHECKED.
  808. *
  809. * EXIT (X4) = 0 IF NO ERROR DETECTED.
  810. *
  811. * USES X - ALL.
  812. * A - 1, 2, 3, 4, 5, 6, 7.
  813. * B - 2.
  814. *
  815. * RESTORES X5, D+2, D+3, X0, D+6 WHEN RETURNING FROM ERROR.
  816. *
  817. * CALLS ABT, DCH, ERR.
  818.  
  819.  
  820. CKS SUBR ENTRY/EXIT
  821. SA3 D+6 CHECK FOR CIO ERROR
  822. MX2 -3
  823. BX2 -X2*X3
  824. NZ X2,CKS2 IF CIO ERROR
  825. ZR X4,CKSX IF CHECKING ON WRITE - RETURN
  826. CKS0 SA2 JN GET JSN AND MFID
  827. BX2 X2+X4 MERGE WITH SECTOR NUMBER
  828. BX6 X2-X5
  829. NZ X6,CKS3 IF POSITION ERROR
  830. SX6 B1
  831. IX6 X4+X6 INCREMENT RANDOM ADDRESS FOR NEXT SECTOR
  832. SA6 CKSJ
  833. SA4 ND
  834. ZR X4,CKSX IF DATA NOT TO BE CHECKED
  835. SX4 B0
  836. SB2 76B
  837. SA2 A5+77B LOAD CHECKSUM
  838. CKS1 SA1 A5+B2 VALIDATE CHECKSUM
  839. IX2 X2-X1
  840. SB2 B2-1
  841. GT B2,B1,CKS1 IF MORE DATA
  842. NZ X2,CKS1.1 IF CHECKSUM ERROR
  843. SA3 CKSI CHECK SECTOR COUNT
  844. SX6 X3-1
  845. ZR X6,CKSX IF END OF TRANSFER
  846. SA6 A3+
  847. SA5 A5+100B SET ACTUAL RANDOM ADDRESS
  848. SA4 CKSJ SET EXPECTED RANDOM ADDRESS
  849. EQ CKS0 NEXT SECTOR
  850.  
  851. CKS1.1 SA1 CKSA DATA ERROR PROCESSING
  852. SA2 CKSE
  853. RJ ERR DATA ERROR MESSAGE
  854. RJ DCH DATA CHECK
  855. EQ CKS6
  856.  
  857. CKS2 SA1 CKSB CIO ERROR PROCESSING
  858. SX6 X2-2
  859. SA2 X2+TCIO-1
  860. SA6 CKSG
  861. LX7 X4
  862. SX4 B0
  863. SA7 CKSH
  864. RJ ERR CIO ERROR MESSAGE
  865. SA1 CKSG
  866. NG X1,CKS5 IF PARITY ERROR
  867. ZR X1,CKS4 IF ADDRESS ERROR
  868. EQ CKS6
  869.  
  870. CKS3 SA1 CKSC POSITION ERROR PROCESSING
  871. SA2 CKSE
  872. BX6 X4
  873. SX4 B0
  874. SA6 CKSH
  875. RJ ERR POSITION ERROR MESSAGE
  876. CKS4 SA4 CKSH SECTOR EXPECTED
  877. SA1 CKSD
  878. SA2 CKSF
  879. BX5 X4
  880. SX4 B1
  881. ZR X5,CKS6 IF ADDRESS ERROR ON SEQUENTIAL WRITE
  882. RJ ERR EXPECTED ERROR MESSAGE
  883. CKS5 RJ DCH DATA CHECK
  884. CKS6 RJ ABT CHECK FOR ABORT ON ERRORS
  885. CKS7 SA5 ERRA RESTORE REGISTERS
  886. SA2 A5+B1
  887. SA3 A2+B1
  888. SA1 A3+B1
  889. BX6 X2
  890. LX7 X3
  891. SA2 A1+B1
  892. SA6 D+2
  893. SA7 D+3
  894. LX6 X2
  895. BX0 X1
  896. SA6 D+6
  897. EQ CKSX RETURN
  898.  
  899.  
  900. CKSA DATA 10HEQXXX,DATA
  901. CKSB DATA 10HEQXXX,DEV.
  902. CKSC DATA 10HEQXXX,POS.
  903. CKSD DATA 10HEQXXX,EXP.
  904. CKSE CON 10H ERROR AT
  905. CKSF CON 10H POSITION
  906. CKSG CON 0 TEMPORARY
  907. CKSH CON 0 TEMPORARY
  908. CKSI CON 0 NUMBER OF SECTORS REMAINING TO CHECK
  909. CKSJ CON 0 EXPECTED RANDOM ADDRESS OF NEXT SECTOR
  910.  
  911. TCIO CON 10LPARITY ER. PARITY ERROR
  912. CON 10LADDR. ERR. ADDRESS ERROR
  913. CON 10LSTATUS ER. DEVICE STATUS ERROR
  914. CON 10L81 FNC REJ 6681 FUNCTION REJECT
  915. CON 10LRESERVED DEVICE RESERVED
  916. CON 10LNOT READY DEVICE NOT READY
  917. CIO SPACE 4,10
  918. ** CIO - COMPUTE I/O RATE.
  919. *
  920. * USES X - 1, 2, 5, 6.
  921. * A - 1, 2, 5, 6.
  922. * B - NONE.
  923. *
  924. * CALLS CDD, CFD, MES.
  925.  
  926.  
  927. CIO SUBR ENTRY/EXIT
  928. SA1 CIOA GET ELAPSED TIME
  929. SA5 NS SET NUMBER OF I/O-S
  930. AX5 7
  931. SA2 CIOD
  932. IX5 X2*X5
  933. IX1 X5/X1
  934. RJ CFD CONVERT TO FLOATING POINT
  935. SA6 CIOB+2
  936. SA1 IO
  937. RJ CDD CONVERT TO DISPLAY
  938. SA6 CIOC+2
  939. SX1 CIOB
  940. RJ MES SEND I/O-S PER SECOND MESSAGE
  941. SX1 CIOC
  942. RJ MES
  943. EQ CIOX RETURN
  944.  
  945. CIOA CON 0 ELAPSED TIME
  946. CIOB DATA C* IO PER SECOND = XXXXXX.XXX.*
  947. CIOC DATA C* NUMBER OF I/O-S = XXXXXXXXXX.*
  948. CIOD CON 1000D*1000D
  949. CTR SPACE 4,15
  950. ** CTR - COMPUTE TRANSFER RATE.
  951. *
  952. * ENTRY (CTRB) = NUMBER OF SECTORS TRANSFERRED.
  953. * (ST) = START TIME.
  954. *
  955. * EXIT TRANSFER RATE MESSAGE ISSUED TO DAYFILE.
  956. *
  957. * USES X - 0, 1, 2, 3, 6.
  958. * A - 1, 2, 6.
  959. * B - NONE.
  960. *
  961. * CALLS CFD, MES.
  962. *
  963. * MACROS RTIME.
  964.  
  965.  
  966. CTR SUBR ENTRY/EXIT
  967. RTIME ET GET ENDING TIME
  968. SA1 ST COMPUTE ELAPSED TIME
  969. SA2 ET
  970. MX0 -36
  971. BX1 -X0*X1
  972. BX2 -X0*X2
  973. IX2 X2-X1
  974. BX6 X2
  975. SA6 CIOA
  976. SA1 CTRB
  977. SX3 640*1000/64
  978. LX3 6
  979. IX3 X1*X3 CHAR
  980. IX1 X3/X2
  981. RJ CFD CONVERT TO DISPLAY CODE
  982. SA6 CTRA+2
  983. SX1 CTRA SEND TRANSFER RATE MESSAGE
  984. RJ MES
  985. EQ CTRX RETURN
  986.  
  987. CTRA DATA C*MST TRANSFER RATE = XXXXXX.XXX KC.*
  988. CTRB CON 0 SECTORS TRANSFERRED
  989. CVA SPACE 4,15
  990. ** CVA - CONVERT ADDRESS.
  991. *
  992. * THIS SUBROUTINE PERFORMS THE CONVERSION OF LOGICAL
  993. * TO PHYSICAL DISK ADDRESS. IT IS OVERLAYED BY THE
  994. * THE CONVERSION ROUTINE FOR THE SPECIFIED EQUIPMENT.
  995. *
  996. * ENTRY (B6) = MESSAGE ADDRESS.
  997. *
  998. * EXIT NONE.
  999. *
  1000. * USES X - 0, 1, 2, 6, 7.
  1001. * A - 1, 2, 6, 7.
  1002. * B - NONE.
  1003. *
  1004. * CALLS WOD.
  1005.  
  1006. * WILL NEED WORK HERE FOR MULTI-PARTITION DEVICES.
  1007.  
  1008.  
  1009. CVA PS ENTRY/EXIT
  1010. SA2 D+6 PLACE TRACK AND SECTOR
  1011. MX0 -12
  1012. AX2 12
  1013. BX6 -X0*X2
  1014. AX2 12
  1015. BX7 -X0*X2
  1016. LX7 15*3
  1017. LX6 9*3
  1018. BX1 X7+X6
  1019. RJ WOD
  1020. SA1 CVAA
  1021. SA2 A1+B1
  1022. IX6 X1+X6
  1023. IX7 X2+X7
  1024. SA6 B6
  1025. SA7 B6+B1
  1026. EQ CVA RETURN
  1027.  
  1028. CVAA CON 10HT0000 S000-10H0000000000
  1029. CON 10H0. -10H0000000000
  1030. BSS 10
  1031. CVAE BSS 0
  1032. DCH SPACE 4,15
  1033. ** DCH - DATA CHECK.
  1034. *
  1035. * ENTRY (SBUF - SBUF+77B) = SECTOR TO BE CHECKED.
  1036. *
  1037. * USES X - 0, 1, 2, 6, 7.
  1038. * A - 1, 2, 6, 7.
  1039. * B - 2, 5, 6, 7.
  1040. *
  1041. * CALLS COD, GDB, WOD.
  1042. *
  1043. * MACROS MESSAGE.
  1044.  
  1045.  
  1046. DCH4 NZ B7,DCHX IF ERRORS FOUND RETURN
  1047. MESSAGE (=C*DATA OK.*)
  1048.  
  1049. DCH SUBR ENTRY/EXIT
  1050. SA1 ND
  1051. ZR X1,DCHX IF NO DATA GENERATED
  1052. SA1 SBUF+1
  1053. SB5 B1
  1054. BX6 X1
  1055. SA6 TBUF+1
  1056. SB7 B0+
  1057. RJ GDB REGENERATE DATA
  1058. DCH1 SB6 77B
  1059. DCH2 SA1 TBUF+B5
  1060. SA2 SBUF+B5
  1061. SB5 B5+B1
  1062. BX7 X2-X1
  1063. GT B5,B6,DCH4 IF END OF CHECK
  1064. ZR X7,DCH2 IF DATA MATCHES
  1065. LX6 X2
  1066. SB7 B1 ERROR FLAG
  1067. SA6 DCHA
  1068. SA7 A6+B1
  1069. BX0 X1
  1070. SX1 B5
  1071. SB6 B0
  1072. RJ COD CONVERT WORD NUMBER
  1073. LX6 6
  1074. SX1 B1
  1075. IX6 X6+X1
  1076. BX1 X0
  1077. SA6 DCHD
  1078. DCH3 RJ WOD CONVERT DATA
  1079. SA1 TMES+B6 MESSAGE TYPE
  1080. SA2 DCHD
  1081. SA6 DCHE
  1082. MX0 -24
  1083. SA7 A6+B1
  1084. BX2 -X0*X2 MERGE MESSAGE TYPE
  1085. BX1 X0*X1
  1086. BX6 X2+X1
  1087. SA6 A2
  1088. MESSAGE DCHC,,R
  1089. SA1 DCHA+B6
  1090. SB2 B6-B1
  1091. SB6 B6+B1
  1092. NE B2,B1,DCH3 IF MORE MESSAGES FOR THIS ERROR
  1093. EQ DCH1
  1094.  
  1095. DCHA CON 0 TEMPORARY
  1096. DCHB CON 0 TEMPORARY
  1097. DCHC DATA 10HEQXXX,DATA
  1098. DCHD CON 10H .... 000,
  1099. DCHE CON 0,0,0
  1100.  
  1101. TMES CON 6L EXP TABLE OF MESSAGES
  1102. CON 6L READ
  1103. CON 6L DIFF
  1104. ERR SPACE 4,15
  1105. ** ERR - SEND ERROR MESSAGE.
  1106. *
  1107. * ENTRY (X5) = SECTOR NUMBER, JSN AND MFID READ.
  1108. * (X4) = 0 IF REGISTERS MUST BE SAVED.
  1109. * (X2) = SECOND WORD OF MESSAGE.
  1110. * (X1) = FIRST WORD OF MESSAGE.
  1111. *
  1112. * USES X - 0, 1, 2, 3, 4, 6, 7.
  1113. * A - 1, 2, 3, 6, 7.
  1114. * B - 6
  1115. *
  1116. * CALLS CVA, WOD.
  1117. *
  1118. * MACROS MESSAGE, RECALL, RPHR, STATUS.
  1119.  
  1120.  
  1121. ERR SUBR ENTRY/EXIT
  1122. BX6 X1
  1123. LX7 X2
  1124. SA6 ERRB
  1125. MX6 -24
  1126. BX6 -X6*X5
  1127. SA7 A6+B1
  1128. SA6 ERRH
  1129. RECALL D
  1130. NZ X4,ERR1 IF REGISTERS ALREADY SAVED
  1131. SA2 D+2
  1132. SA3 D+3
  1133. LX6 X5
  1134. BX7 X2
  1135. SA2 D+6
  1136. SA6 ERRA
  1137. LX6 X3
  1138. SA7 A6+B1
  1139. BX7 X0
  1140. SA6 A7+B1
  1141. LX6 X2
  1142. SA7 A6+B1
  1143. SA6 A6+2
  1144. ERR1 SA2 ERRH POSITION TO ERROR
  1145. SA1 D+1
  1146. BX6 X2
  1147. SX7 X1
  1148. SA6 D+6
  1149. SX6 X1+B1
  1150. SA7 A1+B1
  1151. SA6 A7+B1
  1152. RPHR D,R
  1153. STATUS X2,P
  1154. SA1 ERRH MERGE RANDOM ADDRESS TRACK AND SECTOR
  1155. SA2 D+6
  1156. MX0 30
  1157. LX2 18
  1158. BX1 -X0*X1
  1159. BX2 X0*X2
  1160. BX1 X1+X2
  1161. RJ WOD CONVERT RANDOM ADDRESS TRACK AND SECTOR
  1162. SA1 ERRE
  1163. MX0 -18
  1164. SA2 A1+B1
  1165. BX1 X0*X1
  1166. LX7 -24
  1167. MX4 24
  1168. BX3 -X0*X7
  1169. BX2 -X4*X2
  1170. BX4 X4*X7
  1171. BX7 X1+X3 MERGE RANDOM ADDRESS IN MESSAGE
  1172. SA3 A2+B1
  1173. BX2 X4+X2
  1174. SA7 A1
  1175. MX4 -24
  1176. BX7 -X4*X6
  1177. AX6 24
  1178. BX2 X4*X2 CLEAR TRACK
  1179. BX6 -X4*X6
  1180. LX4 24
  1181. BX3 X4*X3 CLEAR SECTOR
  1182. BX6 X6+X2 MERGE TRACK IN MESSAGE
  1183. LX7 24
  1184. SA6 A2
  1185. BX7 X7+X3 MERGE SECTOR IN MESSAGE
  1186. SA7 A3
  1187. SB6 ERRD
  1188. RJ CVA CONVERT ADDRESS
  1189. MESSAGE ERRB,,R
  1190. MESSAGE ERRE,,R
  1191. EQ ERRX RETURN
  1192.  
  1193. ERRA BSS 5
  1194. ERRB DATA 10HEQXXX,ZZZZ
  1195. ERRC CON 10H ERROR AT
  1196. ERRD CON 0,0
  1197. CON 0 END OF LINE FOR FIRST MESSAGE
  1198. ERRE DATA 10HEQXXX,R000
  1199. ERRF CON 10H0000,T0000
  1200. ERRG CON 7L,S0000.
  1201. ERRH CON 0 RANDOM ADDRESS TEMPORARY
  1202. GDB SPACE 4,15
  1203. ** GDB - GENERATE DATA BUFFER.
  1204. *
  1205. * ENTRY (X6) = RANDOM NUMBER WHICH WILL GENERATE BUFFER.
  1206. * (A6) = ADDRESS OF RANDOM NUMBER IN BUFFER.
  1207. *
  1208. * EXIT (X6) = CHECKSUM OF BUFFER.
  1209. * (X7) = LAST DATA WORD STORED IN BUFFER.
  1210. * (B2) = (B3) = NUMBER OF DATA WORDS GENERATED.
  1211. * (A6) = ADDRESS OF LAST WORD IN BUFFER.
  1212. *
  1213. * USES X - 2, 6, 7.
  1214. * A - 2, 6, 7.
  1215. * B - 2, 3.
  1216.  
  1217.  
  1218. GDB SUBR ENTRY/EXIT
  1219. SA2 ND
  1220. ZR X2,GDBX IF NO DATA GENERATION
  1221. SB3 75B
  1222. SB2 B0+
  1223. GDBA BX7 X6
  1224. SA7 A6
  1225.  
  1226. * THIS INSTRUCTION IS MODIFIED BY PRESET
  1227. * EQ GDB2 IF NON-RANDOM PATTERN
  1228.  
  1229. SX6 B0+ IF RANDOM PATTERN - CLEAR CHECKSUM
  1230.  
  1231. GDB1 PX2 X7
  1232. DX7 X2*X2
  1233. IX7 X7+X2
  1234. SB2 B2+B1
  1235. LX2 15
  1236. IX7 X7+X2
  1237. LX2 19
  1238. IX7 X2+X7
  1239. SA7 A7+B1
  1240. IX6 X6+X7 ADVANCE CHECKSUM
  1241. NE B2,B3,GDB1 IF MORE DATA TO GENERATE
  1242. SA6 A7+B1 CHECKSUM IN LAST LOCATION OF BUFFER
  1243. EQ GDBX
  1244.  
  1245. GDB2 SB2 B2+B1
  1246. SA7 A7+B1
  1247. NE B2,B3,GDB2 IF BUFFER NOT FULL
  1248. SA6 A7+B1
  1249. EQ GDBX
  1250. MEM SPACE 4,15
  1251. ** MEM - REQUEST MEMORY.
  1252. *
  1253. * ENTRY (X1) = REQUESTED MEMORY.
  1254. *
  1255. * EXIT (IN) = (OUT) = (FIRST).
  1256. * (LIMIT) = REQUESTED FIELD LENGTH.
  1257. *
  1258. * USES X - 2, 6, 7.
  1259. * A - 2, 6, 7.
  1260. * B - NONE.
  1261. *
  1262. * MACROS MEMORY.
  1263.  
  1264.  
  1265. MEM SUBR ENTRY/EXIT
  1266. SA2 D+1
  1267. SX7 X1-10B
  1268. SX6 X2
  1269. SA7 D+4 LIMIT
  1270. SA6 A7-B1 OUT
  1271. SA6 A6-B1 IN
  1272. MEMORY ,,R,X1 REQUEST MEMORY
  1273. EQ MEMX RETURN
  1274. MES SPACE 4,15
  1275. ** MES - SEND MESSAGE.
  1276. *
  1277. * ENTRY (X1) = MESSAGE ADDRESS.
  1278. *
  1279. * EXIT MESSAGE SENT TO CONTROL POINT AND JOB DAYFILE.
  1280. *
  1281. * USES X - 0.
  1282. * A - NONE.
  1283. * B - NONE.
  1284. *
  1285. * MACROS MESSAGE.
  1286.  
  1287.  
  1288. MES SUBR ENTRY/EXIT
  1289. SX0 X1+
  1290. MESSAGE X1,1,R
  1291. MESSAGE X0,3,R
  1292. EQ MESX RETURN
  1293. RNO SPACE 4
  1294. ** RNO - GENERATE RANDOM SECTOR NUMBER.
  1295. *
  1296. * ENTRY NONE.
  1297. *
  1298. * EXIT (X6) = RANDOM SECTOR NUMBER IN FILE.
  1299. *
  1300. * USES X - 1, 3, 5, 6.
  1301. * A - 1, 3, 5, 6.
  1302. * B - NONE.
  1303.  
  1304.  
  1305. RNO SUBR ENTRY/EXIT
  1306. RNO1 SA1 RNOA LAST NUMBER
  1307. SA3 SM SECTOR MASK
  1308. SA5 NS NUMBER OF SECTORS
  1309. PX1 X1
  1310. DX6 X1*X1
  1311. IX6 X1+X6
  1312. LX1 15
  1313. IX6 X1+X6
  1314. LX1 19
  1315. IX6 X1+X6
  1316. SA6 A1 SAVE NEW NUMBER
  1317. SA1 TL
  1318. IX5 X5-X1
  1319. BX6 -X3*X6
  1320. SA1 RO CHECK ROLLOUT SIMULATION REQUEST
  1321. ZR X1,RNO2 IF NO ROLLOUT SIMULATION
  1322. IX6 X1+X6 ROUND SECTOR ADDRESS UP TO MULTIPLE OF 32
  1323. AX6 5
  1324. LX6 5
  1325. RNO2 BSS 0
  1326. IX3 X5-X6
  1327. ZR X6,RNO1 IF SECTOR NUMBER = 0
  1328. NG X3,RNO1 IF SECTOR NOT IN FILE
  1329. EQ RNOX RETURN
  1330.  
  1331. RNOA DATA 13576420735162531625B
  1332. WIC SPACE 4,10
  1333. ** WIC - WAIT I/O COMPLETE.
  1334. *
  1335. * ENTRY (BD) = 2 IF DEVICE IS BUFFERED.
  1336. *
  1337. * USES X - 1, 2, 3.
  1338. * A - 1.
  1339. * B - NONE.
  1340. *
  1341. * MACROS MESSAGE, RECALL, RTIME.
  1342.  
  1343.  
  1344. WIC SUBR
  1345. SA1 BD
  1346. LX1 59-1
  1347. PL X1,WICX IF DEVICE NOT BUFFERED
  1348. MESSAGE (=C* WAIT I/O COMPLETE.*),1,R
  1349. RTIME WICA FETCH TIME
  1350. SA1 WICA
  1351. MX3 -36
  1352. BX2 -X3*X1 SAVE START TIME
  1353. WIC1 RECALL DELAY
  1354. RTIME WICA CHECK TIME
  1355. SA1 WICA
  1356. BX1 -X3*X1
  1357. IX1 X1-X2 TIME SINCE FIRST CALL
  1358. SX1 X1-3000
  1359. NG X1,WIC1 IF 3 SECONDS NOT ELAPSED
  1360. EQ WICX RETURN
  1361.  
  1362. WICA BSS 1
  1363. SPACE 4
  1364. ** COMMON DECKS.
  1365.  
  1366.  
  1367. ERP1$ EQU 1 ENABLE I/O ERROR PROCESSING
  1368. *CALL COMCCDD
  1369. *CALL COMCCOD
  1370. *CALL COMCCIO
  1371. *CALL COMCCFD
  1372. *CALL COMCLFM
  1373. *CALL COMCRDW
  1374. *CALL COMCSYS
  1375. *CALL COMCWOD
  1376. *CALL COMCWTW
  1377. BUFFERS SPACE 4
  1378. TITLE BUFFERS.
  1379. USE //
  1380. SEG
  1381. BUFS BSS 0
  1382.  
  1383. TRRD EQU BUFS+1 TABLE OF SECTORS FOR RANDOM READ WITH LIST
  1384. TBUF EQU TRRD+41 TEST BUFFER FOR PATTERN REGENERATION
  1385. SBUF EQU TBUF+100B
  1386. DBUF EQU SBUF+100B
  1387. MFL= EQU DBUF+DBUFL+10B+200000B
  1388.  
  1389.  
  1390. TITLE PRESET.
  1391. ORG BUFS
  1392.  
  1393.  
  1394. ** THE FOLLOWING CODE IS OVERLAYED BY BUFFERS.
  1395.  
  1396.  
  1397. * COMMON DECKS
  1398.  
  1399. *CALL COMCARG
  1400. *CALL COMCCPM
  1401. *CALL COMCDXB
  1402. *CALL COMCMVE
  1403. PRS SPACE 4
  1404. ** PRS - PRESET PROGRAM.
  1405. *
  1406. * ENTRY (B7) = 1 IF ADDRESS CONVERSION PRESET.
  1407.  
  1408.  
  1409. PRS SUBR ENTRY/EXIT
  1410. SYSTEM RSB,R,PRSF SET EXTENDED MEMORY TRACK SHIFT
  1411. SA1 EMTS
  1412. MX0 -2
  1413. LX1 0-29
  1414. BX6 -X0*X1
  1415. SA6 A1
  1416. EQ B7,B1,PRS5 IF ADDRESS CONVERSION PRESET
  1417. MODE 1
  1418. GETJN JN GET JSN
  1419. MACHID PRSH GET MAINFRAME ID
  1420. SA1 PRSH MERGE JSN AND MFID
  1421. SA2 JN
  1422. LX1 24
  1423. BX6 X1+X2
  1424. SA6 A2+
  1425. REQUEST D
  1426. STATUS X2,P
  1427. SA1 D+6
  1428. BX6 X1
  1429. AX6 48
  1430. SA6 PRSG SAVE EST ORDINAL
  1431. RJ WOD CONVERT EST ORDINAL
  1432. SA1 D+1
  1433. AX6 6 POSITION EST ORDINAL
  1434. MX0 12
  1435. BX1 X0*X1
  1436. MX0 18
  1437. LX0 -12
  1438. BX6 X0*X6
  1439. BX6 X6+X1 MERGE EST ORDINAL AND TYPE
  1440. MX0 -30
  1441. SA1 DCHC SET EQUIPMENT IN MESSAGES
  1442. BX1 -X0*X1
  1443. BX7 X6+X1
  1444. SA7 DCHC
  1445. SA1 ERRE
  1446. BX1 -X0*X1
  1447. BX7 X6+X1
  1448. SA7 ERRE
  1449. SA1 CKSA-1
  1450. SB2 B0+
  1451. SB3 4
  1452. PRS1 SA1 A1+B1
  1453. BX1 -X0*X1
  1454. SB2 B2+1
  1455. BX7 X6+X1
  1456. SA7 A1
  1457. LT B2,B3,PRS1 IF MORE MESSAGES
  1458. MX6 0
  1459. SA6 D+5
  1460. SA6 A6+B1
  1461.  
  1462. * IDENTIFY ASSIGNED EQUIPMENT.
  1463.  
  1464. SA2 TEQP
  1465. SA1 D+B1
  1466. MX0 -24
  1467. MX5 1 SET EP BIT IN FET
  1468. MX4 12
  1469. LX5 44-59
  1470. SX7 B1
  1471. PRS2 ZR X2,PRS8 IF END OF TABLE
  1472. BX3 X2-X1
  1473. BX6 X4*X3
  1474. LX3 X2
  1475. SA2 A2+B1
  1476. NZ X6,PRS2 IF NO EQUIPMENT MATCH
  1477. BX6 X1+X5
  1478. SA6 A1 SET EPR BIT IN FET
  1479. BX6 -X0*X3
  1480. IX6 X6-X7
  1481. SA6 NS
  1482. MX7 12 SET SECTOR MASK
  1483. NX6 X6,B2
  1484. AX7 X7,B2
  1485. AX3 24
  1486. SA7 A6+B1
  1487. MX0 -6
  1488. BX6 -X0*X3
  1489. SA6 BD SET BUFFERED DEVICE FLAG
  1490. AX3 6
  1491. SX2 X3
  1492. ZR X2,PRS8 IF ILLEGAL EQUIPMENT
  1493. MOVE CVAE-CVA,X2,CVA
  1494.  
  1495. * RETRIEVE ARGUMENTS.
  1496.  
  1497. SA1 ACTR ARGUMENT COUNT
  1498. SB7 B0
  1499. SB4 X1
  1500. SA4 ARGR FIRST ARGUMENT
  1501. SB5 TARG ARGUMENT TABLE
  1502. RJ ARG PROCESS ARGUMENTS
  1503. NZ X1,PRS7 IF ARGUMENT ERROR
  1504.  
  1505. * PROCESS *N* PARAMETER (NUMBER OF SECTORS).
  1506.  
  1507. SA5 NS NUMBER OF SECTORS
  1508. MX2 14B
  1509. BX3 X2*X5
  1510. ZR X3,PRS3 IF ARGUMENT OMITTED
  1511. SA3 =0L*
  1512. BX3 X3-X5
  1513. AX3 18
  1514. NZ X3,PRS2.1 IF NOT /*/
  1515. RJ CNS CALCULATE NUMBER OF SECTORS
  1516. EQ PRS2.2 SET NUMBER OF SECTORS
  1517.  
  1518. PRS2.1 RJ DXB CONVERT ARGUMENT
  1519. SX1 B1
  1520. IX6 X6-X1
  1521. ZR X6,PRS7 IF ARGUMENT ERROR
  1522. PRS2.2 SA6 NS
  1523. MX7 12 SET SECTOR MASK
  1524. NX6 X6,B2
  1525. AX7 X7,B2
  1526. SA7 SM
  1527. PRS3 SA1 NS SET SECTOR SIZE
  1528. RJ CDD CONVERT TO DISPLAY
  1529. SA6 PRSE+2
  1530. SX1 PRSE
  1531. RJ MES SEND FILE SIZE MESSAGE
  1532.  
  1533. * PROCESS *IO* PARAMETER (NUMBER OF I/O-S).
  1534.  
  1535. SA5 IO SET NUMBER OF I/O-S
  1536. ZR X5,PRS3.1 IF NUMBER OF I/O-S NOT SPECIFIED
  1537. RJ DXB
  1538. NZ X4,PRS7 IF ERROR IN CONVERSION
  1539. EQ PRS3.2 SAVE NUMBER OF I/O-S
  1540.  
  1541. PRS3.1 SA5 NS BASE NUMBER OF I/O-S ON NUMBER OF SECTORS
  1542. AX5 7
  1543. BX6 X5
  1544. PRS3.2 SA6 IO
  1545.  
  1546. * PROCESS *TL* PARAMETER (TRANSFER LENGTH).
  1547.  
  1548. SA5 TL SET TRANSFER LENGTH
  1549. RJ DXB
  1550. NZ X4,PRS7 IF ERROR IN CONVERSION
  1551. ZR X6,PRS7 IF INVALID TRANSFER LENGTH
  1552. SA6 A5
  1553. SA5 NS
  1554. IX6 X5-X6
  1555. NG X6,PRS7 IF TRANSFER SIZE GREATER THAN FILE SIZE
  1556.  
  1557. * PROCESS *P* PARAMETER (SELECT TEST PATTERN).
  1558.  
  1559. PRS3.3 SA5 TP
  1560. RJ DXB
  1561. NZ X4,PRS7 IF ARGUMENT ERROR
  1562. SB5 X6-TPATL+1
  1563. BX5 X6
  1564. GT B5,B0,PRS7 IF ARGUMENT ERROR
  1565. SA1 X6+TPAT
  1566. SA2 PRSA
  1567. BX6 X1
  1568. LX7 X2
  1569. SB5 X5-5
  1570. ZR B5,PRS4 IF P=5 (RANDOM PATTERN)
  1571. SA7 GDBA SETS AN INSTRUCTION IN GDB
  1572. PRS4 SA6 TP
  1573. SX7 X5-4
  1574. SA7 ND SET NO DATA FLAG
  1575. ZR X7,PRS4.1 IF P=4
  1576. SX7 X5-6
  1577. NZ X7,PRS4.1 IF NOT P=6
  1578. SA7 ND SET NO DATA FLAG
  1579. SA7 NT SET NO DATA TRANSFER FLAG
  1580. PRS4.1 SA1 NS SET INCREMENT FOR POSITION TEST
  1581. SX2 B1+
  1582. AX1 6
  1583. IX7 X1+X2
  1584. SA7 POSA
  1585.  
  1586. * PROCESS *T* PARAMETER (SELECT TEST SECTION).
  1587.  
  1588. SA5 TS
  1589. RJ DXB
  1590. NZ X4,PRS7 IF ARGUMENT ERROR
  1591. SX3 X6-6
  1592. PL X3,PRS7 IF ARGUMENT ERROR
  1593. SA6 TS
  1594. EQ PRSX RETURN
  1595.  
  1596. * PRESET FOR ADDRESS CONVERSION.
  1597.  
  1598. PRS5 SA1 ACTR
  1599. SA4 ARGR
  1600. SB5 TART
  1601. SB4 X1+
  1602. RJ ARG PROCESS ARGUMENTS
  1603. NZ X1,PRS7 IF ARGUMENT ERROR
  1604. SA1 PRSB
  1605. SA5 PRSC ADDRESS
  1606. SA2 TEQP-1
  1607. PRS6 SA2 A2+B1
  1608. ZR X2,PRS8 IF EQUIPMENT NOT FOUND
  1609. BX3 X2-X1
  1610. AX3 48
  1611. NZ X3,PRS6 IF NO MATCH
  1612. BX6 X2
  1613. LX2 30
  1614. SA6 A1
  1615. SB6 X2
  1616. SB7 B0
  1617. RJ DXB
  1618. NZ X4,PRS7 IF ARGUMENT ERROR
  1619. SA6 PRSC
  1620. SA5 PRSD
  1621. RJ DXB CONVERT SECTOR
  1622. NZ X4,PRS7 IF ARGUMENT ERROR
  1623. MX0 -12
  1624. BX5 X0*X6
  1625. SA1 PRSC
  1626. NZ X5,PRS7 IF TRACK ERROR
  1627. BX5 X0*X1
  1628. LX1 12
  1629. NZ X5,PRS7 IF SECTOR ERROR
  1630. BX6 X6+X1
  1631. LX6 12
  1632. SA6 D+6
  1633. SB4 CVA
  1634. EQ B4,B5,PRSX IF TRACK AND SECTOR ADDRESS
  1635. MOVE CVAE-CVA,B6,B4
  1636. EQ PRSX RETURN
  1637.  
  1638. PRS7 MESSAGE (=C* ARGUMENT ERROR.*)
  1639. EQ ABT3 ABORT
  1640.  
  1641. PRS8 MESSAGE (=C* ILLEGAL EQUIPMENT.*)
  1642. EQ ABT3 ABORT
  1643.  
  1644. PRSA BX7 X6
  1645. SA7 A6
  1646. EQ GDB2
  1647.  
  1648. PRSB CON 0 DEVICE TYPE - NO DEFAULT
  1649. PRSC DATA 0L0 TRACK
  1650. PRSD CON 0 SECTOR
  1651. PRSE DATA C* FILE SIZE = XXXXXXXXXX SECTORS.*
  1652. PRSF VFD 24/1,18/MEFL,18/EMTS
  1653. PRSG DATA 0 EST ORDINAL
  1654. PRSH CON 0 MAINFRAME ID
  1655. TITLE PRESET SUBROUTINES.
  1656. CNS SPACE 4,20
  1657. ** CNS - CALCULATE NUMBER OF SECTORS.
  1658. *
  1659. * READS THE MST FOR THE SPECIFIED DEVICE AND COMPUTES
  1660. * NS = (AVAILABLE TRACKS)*(SECTOR LIMIT) - 5. THIS SIZE
  1661. * ALLOWS FOR BOI, EOR, EOF, EOI, AND AN EXTRA SECTOR.
  1662. * FOR *LDAM* DEVICES, DO NOT TEST THE LAST *RWPC* SECTORS,
  1663. * TO AVOID A TRACK LIMIT CAUSED BY LOGIC IN *1MS*.
  1664. *
  1665. * ENTRY (PRSG) = EST ORDINAL.
  1666. *
  1667. * EXIT (X6) = NUMBER OF SECTORS.
  1668. *
  1669. * USES X - 1, 2, 3, 4, 6.
  1670. * A - 1, 2.
  1671. *
  1672. * CALLS RSB=.
  1673.  
  1674.  
  1675. CNS SUBR
  1676. SX1 CNSA READ EST POINTER
  1677. SX2 ESTP
  1678. SX3 B1
  1679. SX4 B0
  1680. RJ RSB= READ POINTER
  1681.  
  1682. * READ EST ENTRY FOR DEVICE.
  1683.  
  1684. SA1 PRSG
  1685. SA2 CNSA
  1686. SX3 ESTE
  1687. AX2 36
  1688. MX4 -24
  1689. IX1 X1*X3
  1690. BX2 -X4*X2 FWA EST
  1691. SX3 EQDE
  1692. IX2 X1+X2 EST ADDRESS FOR SPECIFIED DEVICE
  1693. IX2 X2+X3
  1694. SX1 CNSB READ *EQDE* WORD OF EST ENTRY
  1695. SX3 B1
  1696. SX4 B0
  1697. RJ RSB= READ EST
  1698.  
  1699. * READ MST FOR SPECIFIED DEVICE.
  1700.  
  1701. SA1 CNSB
  1702. MX2 -12 GET MST ADDRESS
  1703. BX2 -X2*X1
  1704. LX2 3
  1705. SX1 CNSC
  1706. SX4 B0
  1707. SX3 MSTL
  1708. RJ RSB= READ MST
  1709.  
  1710. * CALCULATE NUMBER OF AVAILABLE SECTORS.
  1711.  
  1712. SA1 CNSC+TDGL
  1713. SA2 CNSC+MDGL
  1714. MX3 -12
  1715. BX1 -X3*X1 NUMBER OF AVAILABLE TRACKS
  1716. BX2 -X3*X2 SECTOR LIMIT
  1717. SX1 X1+B1 ADD TRACK ALREADY ALLOCATED TO FILE
  1718. IX1 X1*X2
  1719. SX4 5
  1720. IX6 X1-X4 SET TOTAL SECTOR COUNT
  1721. SA1 CNSB
  1722. LX1 59-55
  1723. PL X1,CNSX IF NOT *LDAM* DEVICE
  1724. SX1 RWPC DO NOT TEST THE LAST *RWPC* SECTORS
  1725. IX6 X6-X1
  1726. EQ CNSX RETURN
  1727.  
  1728.  
  1729. CNSA VFD 1/1,23/0,18/0,18/0
  1730. CNSB VFD 1/1,23/0,18/0,18/0
  1731. CNSC VFD 1/1,23/0,18/0,18/0
  1732. BSS MSTL-1
  1733. SPACE 4,10
  1734. * COMMON DECKS.
  1735.  
  1736.  
  1737. *CALL COMCRSB
  1738. TITLE PRESET DATA.
  1739.  
  1740. TARG BSS 0 MST ARGUMENT TABLE
  1741. T ARG DZRO,TS,400B
  1742. P ARG TP,TP,400B
  1743. N ARG DZRO,NS,400B
  1744. NW ARG -ONE,NW
  1745. TL ARG TL,TL,400B
  1746. NV ARG -ONE,NV
  1747. RO ARG -T32,RO
  1748. IO ARG IO,IO,400B
  1749. ARG
  1750.  
  1751. TART BSS 0 ARGUMENT TABLE FOR ADDRESS CONVERSION
  1752. EQ ARG TEQP+1,PRSB,400B
  1753. T ARG DZRO,PRSC,400B
  1754. S ARG DZRO,PRSD,400B
  1755. ARG
  1756.  
  1757.  
  1758. DZRO DATA 1L0 DISPLAY CODE ZERO
  1759. ONE DATA 1 CONSTANT 1
  1760. T32 DATA 32 CONSTANT 32
  1761. SPACE 4
  1762. CDV EQU CVA 819 SINGLE DENSITY
  1763. CDW EQU CVA 819 DOUBLE DENSITY
  1764. CDB EQU CVA PFMD - DEMA ACCESS
  1765. CDC EQU CVA 895
  1766. CDF EQU CVA 887 (4KB SECTOR)
  1767. CDH EQU CVA 887 (16KB SECTOR)
  1768. CDN EQU CVA 9853
  1769. CEA EQU CVA 5832 (1X SSD)
  1770. CEB EQU CVA 5832 (2X SSD)
  1771. CEC EQU CVA 5833 (1X SABRE)
  1772. CED EQU CVA 5833 (1XP SABRE)
  1773. CEE EQU CVA 5833 (2X SABRE)
  1774. CEF EQU CVA 5833 (2XP SABRE)
  1775. CEG EQU CVA 5838 (1X ELITE)
  1776. CEH EQU CVA 5838 (1XP ELITE)
  1777. CEI EQU CVA 5838 (2X ELITE)
  1778. CEJ EQU CVA 5838 (2XP ELITE)
  1779. CEK EQU CVA 5838 (3XP ELITE)
  1780. CEL EQU CVA 5838 (4X ELITE)
  1781. CEM EQU CVA 5833 (3XP SABRE)
  1782. CEN EQU CVA 5833 (4X SABRE)
  1783. CEO EQU CVA 47444 (1X 3.5IN)
  1784. CEP EQU CVA 47444 (1XP 3.5IN)
  1785. CES EQU CVA 47444 (2X 3.5IN)
  1786. CEU EQU CVA 47444 (2XP 3.5IN)
  1787. CEV EQU CVA 47444 (3XP 3.5IN)
  1788. CEW EQU CVA 47444 (4X 3.5IN)
  1789. SPACE 4
  1790. ** TBLM - GENERATE TABLE VIA *TBL* MACRO.
  1791.  
  1792.  
  1793. PURGMAC TBLM
  1794. TBLM MACRO EQ
  1795. IFC NE,*"DRN_EQ"*DI*
  1796. IFC NE,*"DRN_EQ"*DJ*
  1797. VFD 12/2R_EQ,18/C_EQ,6/BF_EQ
  1798. ELSE 1
  1799. VFD 12/2R_EQ,18/CVA,6/BF_EQ
  1800. IFNE NT_EQ,0
  1801. VFD 24/NT_EQ*SL_EQ/2
  1802. ELSE 1
  1803. VFD 24/3400B
  1804. ENDM
  1805.  
  1806.  
  1807. TEQP BSS 0 TABLE OF EQUIPMENTS
  1808. LIST G
  1809. TBL "MSEQ"
  1810. LIST -G
  1811. CON 0 END OF TABLE
  1812.  
  1813. TPAT BSS 0 TABLE OF PATTERNS.
  1814. DATA 0
  1815. DATA -0
  1816. DATA 25252525252525252525B
  1817. DATA 52525252525252525252B
  1818. DATA 0
  1819. DATA 13576420735162531625B
  1820. DATA 0
  1821. TPATL EQU *-TPAT
  1822.  
  1823. PRS SPACE 4
  1824. TITLE ADDRESS CONVERSION ROUTINES.
  1825. CDE SPACE 4
  1826. ** CDE - CONVERT *DE* ADDRESS.
  1827.  
  1828.  
  1829. CDE BSS 0
  1830. CDP SPACE 4,10
  1831. ** CDP - CONVERT *DP* ADDRESS.
  1832. *
  1833. * USES X - 1, 2, 3, 4, 6, 7.
  1834. * A - 1, 2, 6, 7.
  1835. * B - NONE.
  1836. *
  1837. * CALLS WOD.
  1838.  
  1839.  
  1840. CDP BSS 0
  1841. LOC CVA
  1842. CVA PS ENTRY/EXIT
  1843. SA1 EMTS GET EM TRACK SHIFT
  1844. SB2 X1+10
  1845. SB3 X1+4
  1846. MX6 -12
  1847. SA1 D+6 READ POSITION
  1848. AX1 12 EXTRACT SECTOR
  1849. BX7 -X6*X1
  1850. SX4 3777B
  1851. LX7 6 SECTOR * 101B
  1852. BX6 -X6*X1
  1853. IX3 X7+X6
  1854. AX1 12 EXTRACT TRACK
  1855. BX2 X4*X1 TRACK * 101 * SECTOR LIMIT
  1856. LX2 B2
  1857. BX7 X4*X1
  1858. LX7 B3
  1859. IX2 X7+X2
  1860. IX1 X2+X3
  1861. LX1 12*3 POSITION DATA
  1862. RJ WOD CONVERT DATA
  1863. SA1 CDEA
  1864. SA2 A1+B1
  1865. IX6 X1+X6
  1866. IX7 X2+X7
  1867. SA6 B6
  1868. SA7 B6+B1
  1869. EQ CVA RETURN
  1870.  
  1871. CDEA CON 10HA0000000. -10H0000000000
  1872. CON 10H -10H0000000000
  1873.  
  1874. ERRNG CVAE-*
  1875. LOC *O
  1876. SPACE 4
  1877. END
cdc/nos2.source/opl871/mst.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator