User Tools

Site Tools


cdc:nos2.source:opl871:tdump

Table of Contents

TDUMP

Table Of Contents

  • [00006] TDUMP - FILE DUMP.
  • [00012] FILE DUMP.
  • [00044] READO - REDEFINE READ WORD MACRO TO USE CONTROL WORD READS.
  • [00052] EQUIVALENCES AND CONSTANTS.
  • [00096] MAIN PROGRAM.
  • [00230] SUBROUTINES.
  • [00232] BSB - BLANK FILL STRING BUFFER.
  • [00252] CKL - CHECK LIMITS ON ALL COUNTERS.
  • [00286] CPL - CHECK PAGE LIMIT.
  • [00334] ELH - ENTER DUMP LINE HEADER.
  • [00388] ESB - ENTER STRING BUFFER.
  • [00411] FAW - FORMAT ALPHA WORD.
  • [00515] FHW - FORMAT HEXADECIMAL WORD.
  • [00566] FML - FORMAT PRINT LINE(S).
  • [00651] FOW - FORMAT OCTAL WORD.
  • [00704] RDA - READ DATA (READO MACRO).
  • [00761] TDS - TERMINATE DUMP SEGMENT.
  • [00798] WBL - WRITE BLANK LINE.
  • [00816] WSB - WRITE STRING BUFFER.
  • [00876] PRESET PROGRAM
  • [00878] PRE - PRESET PROGRAM.
  • [01019] CDT - CHECK DEVICE TYPE.

Source Code

TDUMP.txt
  1. IDENT TDUMP,ASEM
  2. ABS
  3. ENTRY TDUMP
  4. ENTRY RFL=
  5. SST LREC
  6. TITLE TDUMP - FILE DUMP.
  7. SYSCOM B1
  8. SPACE 4
  9. *COMMENT TDUMP - FILE DUMP.
  10. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  11. SPACE 4
  12. *** TDUMP - FILE DUMP.
  13. * R. N. LAGERSTROM. 70/03/05.
  14. * D. A. HIVELEY. 72/05/16.
  15. SPACE 4
  16. *** TDUMP WILL LIST A FILE IN OCTAL, ALPHANUMERIC OR HEXADECIMAL
  17. * FORM. ANY OR ALL OF THE THREE FORMS MAY BE SELECTED IN ANY
  18. * COMBINATION. EACH LINE OF THE DUMP IS LISTED IN EACH OF THE
  19. * SELECTED FORMS - OCTAL, ALPHANUMERIC, AND/OR HEXADECIMAL, IN
  20. * THAT ORDER. BY DEFAULT, AN OCTAL/ALPHANUMERIC DUMP IS DONE
  21. * ON THE ENTIRE DATA FILE.
  22. SPACE 4
  23. *** CONTROL CARD CALL.
  24. *
  25. * TDUMP(P1,P2,...,PN)
  26. *
  27. * WHERE PN CAN BE -
  28. * I=FN INPUT FILE NAME (DEFAULT = TAPE1).
  29. * L=FN OUTPUT FILE NAME (DEFAULT = OUTPUT).
  30. * O OCTAL DUMP (DEFAULT = O AND A).
  31. * A ALPHANUMERIC DUMP (DEFAULT = O AND A).
  32. * H HEXADECIMAL DUMP (DEFAULT = O AND A).
  33. * R=NN RECORD COUNT(DECIMAL) (DEFAULT = TO EOI).
  34. * F=NN FILE COUNT(DECIMAL) (DEFAULT = TO EOI).
  35. * F=0 DUMP TO DOUBLE EOF (EMPTY FILE)
  36. * N=NN LINE LIMIT OF DUMP(DECIMAL) (DEFAULT = INFINITE).
  37. * C READ FILE I IN CODED MODE (DEFAULT = BINARY MODE).
  38. * NR DO NOT REWIND FILE I BEFORE DUMP (DEFAULT = REWIND).
  39. * CW PRINT CONTROL WORDS IF DEFINED ON DEVICE TYPE.
  40. SPACE 4
  41. *CALL COMCMAC
  42. *CALL COMCCMD
  43. READO SPACE 4
  44. ** READO - REDEFINE READ WORD MACRO TO USE CONTROL WORD READS.
  45.  
  46. PURGMAC READO
  47.  
  48. READO MACRO F
  49. SA1 F+2
  50. RJ RDA
  51. ENDM
  52. TITLE EQUIVALENCES AND CONSTANTS.
  53. OLWSL EQU 136 LINE LENGTH (CHARACTERS)
  54. BUFOL EQU 512*2+1 LENGTH OF OUTPUT BUFFER
  55. BUFFL EQU 20011B LENGTH OF *TAPE1* BUFFER
  56. ODFEL EQU 16 OPTICAL DISK FET EXTENSION LENGTH
  57. OPBO EQU 0 BIT FOR OPTION O (OCTAL DUMP)
  58. OPVO EQU 1S0 VALUE FOR OPTION O
  59. OPBA EQU 1 BIT FOR OPTION A (ALPHANUMERIC DUMP)
  60. OPVA EQU 1S1 VALUE FOR OPTION A
  61. OPBH EQU 2 BIT FOR OPTION H (HEXADECIMAL DUMP)
  62. OPVH EQU 1S2 VALUE FOR OPTION H
  63. SPACE 4
  64. ORG 110B
  65. ASEM EQU *
  66. RECT CON 1 RECORD COUNT
  67. FLCT CON 1 FILE COUNT
  68. PGCT CON 1 PAGE COUNT
  69. WDCT CON 0 WORD COUNT
  70. RPCT CON 0 REPEAT COUNT - SKIPPED LINES
  71. TLCT CON 0 TOTAL LINE COUNT
  72. LILM DATA 1C0 LINE LIMIT
  73. LREC DATA 1C0 RECORD LIMIT
  74. LFLC DATA 0L999999 FILE LIMIT (EOI)
  75. REWD CON 0 REWIND FILE
  76. LSCT CON 99999,0 LINE COUNT ON PAGE
  77. LL EQU LSCT+1 LINE LIMIT
  78. SCPC CON 0 BYTE POSITION
  79. OPWD CON OPVO+OPVA OPTION CONTROL WORD (PRESET OCTAL/ALPHA)
  80. EQTW CON 0 EQUIVALENCE TEST WORD
  81. EOFL CON 0 END OF FILE FLAG
  82. DTOL BSSZ 4 DATA FOR ONE LINE
  83. WCBL CON 0 BEGINNING OF LINE WORD COUNT
  84. TCCS CON 0 TERMINAL-S CURRENT CHARACTER SET
  85. TSRW BSSZ 2 TERMINAL STATUS REPLY WORDS
  86. TF CON 1 ZERO IF TERMINAL FILE
  87. CODD CON 0 INPUT FILE MODE (0=BINARY, 2=CODED)
  88. CW CON 0 CONTROL WORD FLAG (1=LEGAL)
  89. CWDS CON 0 CONTROL WORD DUMP SELECTED (1=SELECTED)
  90.  
  91. * WORDS/LINE TABLE INDEXED BY *TF*.
  92.  
  93. WPLT BSS 0
  94. CON 2 TERMINAL
  95. CON 4 NON-TERMINAL
  96. TITLE MAIN PROGRAM.
  97. * MAIN ROUTINE.
  98.  
  99. TDM SA1 CW CHECK CONTROL WORDS LEGAL
  100. ZR X1,TDM0 IF CONTROL WORDS NOT LEGAL
  101. MX6 1 SET FIRST READ FLAG
  102. SA6 F-2
  103. READCW F,17B INITIAL FILE READ
  104. JP TDM1
  105.  
  106. TDM0 READ F NORMAL FILE READ
  107.  
  108. TDM1 SA0 B0 CLEAR ENTRY POSITION
  109. BX6 X6-X6
  110. SA6 WDCT CLEAR WORD COUNT
  111. SA6 WCBL CLEAR BEGINNING OF LINE COUNT
  112. TDM1.1 READO F READ WORD FROM FILE
  113. NZ X1,TDM5 IF EOR OR EOF
  114. BX7 X7-X7
  115. SX2 B1
  116. SA7 EOFL CLEAR EOF FLAG
  117. SA6 DTOL+A0 STORE IN LINE WORD BUFFER
  118. SA1 WDCT
  119. IX6 X1+X2 ADVANCE WORD COUNT
  120. SA6 A1
  121. SA0 A0+B1 ADVANCE POSITION COUNT
  122. SA1 TF
  123. SA2 X1+WPLT
  124. SB2 X2
  125. SX1 A0-B2
  126. NZ X1,TDM1.1 IF NOT FULL LINE
  127. SA4 WPLT TERMINAL WORD COUNT
  128. SB3 X4
  129. SA1 DTOL WORD 1
  130. SA2 A1+B1
  131. SA3 A2+B1
  132. SA4 A3+B1 WORD 4
  133. BX6 X1-X2 X6 = DIFF(1-2)
  134. EQ B2,B3,TDM1.2 IF TERMINAL
  135. BX7 X1-X3
  136. BX6 X6+X7 X6 = DIFF(1-2-3)
  137. BX7 X1-X4
  138. BX6 X6+X7 X6 = DIFF(1-2-3-4)
  139. TDM1.2 NZ X6,TDM1.3 IF NOT ALL SAME ON LINE
  140. PL X6,TDM4 IF ALL SAME ON LINE
  141. TDM1.3 BSS 0
  142. SA1 RPCT
  143. NZ X1,TDM3 IF LINES BEING SKIPPED
  144. TDM2 RJ FML FORMAT LIST LINE(S)
  145. SA0 B0 CLEAR POSITION COUNT
  146. ZR X1,TDM1.1 IF NO LIMIT REACHED
  147. EQ TDM10 PROCESS LIMIT
  148.  
  149. TDM2.5 BX7 X3 USE OLD REPEAT COUNT
  150. SA7 A3
  151. TDM3 BX7 X7-X7
  152. SA2 RPCT
  153. SA7 A2 ZERO SUPPRESSING COUNT
  154. AX2 1
  155. ZR X2,TDM2 IF ONE LINE ONLY
  156. WRITEC O,MALR WRITE LINES REPEATED
  157. RJ CPL
  158. EQ TDM2
  159.  
  160. TDM4 SA4 EQTW PREVIOUS IDENTITY LINE
  161. SA3 RPCT SKIP COUNT
  162. BX6 X1
  163. BX1 X1-X4
  164. SA6 A4 STORE NEW IDENTITY
  165. SX7 X3+B1 ADVANCE SKIP COUNT
  166. SA7 A3
  167. ZR X3,TDM2 IF NO SUPPRESSION RUNNING
  168. NZ X1,TDM2.5 IF PREVIOUS SUPPRESSION NOT CONTINUED
  169. NG X1,TDM2.5 IF PREVIOUS SUPPRESSION NOT CONTINUED
  170. SA2 WDCT
  171. BX7 X2
  172. SA0 B0 RESET WORD COUNT
  173. SA7 WCBL
  174. JP TDM1.1 GET NEXT WORD
  175.  
  176. TDM5 NG X1,TDM6 IF EOF
  177. RJ TDS
  178. WRITEC O,MEOR WRITE EOR MESSAGE
  179. RJ WBL
  180. RJ CPL
  181. SA1 RECT
  182. SX7 X1+B1
  183. SA7 A1 ADVANCE RECORD COUNT
  184. RJ CKL
  185. NZ X1,TDM10 IF LIMIT REACHED
  186. SA1 CW CHECK TYPE OF READ FOR NEXT RECORD
  187. ZR X1,TDM0 IF NO CONTROL WORDS, ISSUE STANDARD READ
  188. JP TDM1 ELSE, FETCH FROM BUFFER
  189.  
  190. TDM6 SA1 EOFL
  191. SA2 LFLC
  192. SX6 X1+B1 ADVANCE EOF FLAG
  193. NZ X2,TDM7 IF FILE LIMIT REQUESTED
  194. SA6 A1
  195. AX6 1
  196. NZ X6,TDM9 IF DOUBLE EOF TERMINATION
  197. TDM7 SA1 F
  198. LX1 59-0
  199. NG X1,TDM8 IF FILE NOT BUSY
  200. RECALL F
  201. EQ TDM7
  202.  
  203. TDM8 LX1 60-9
  204. NG X1,TDM9 IF END OF INFORMATION
  205. RJ TDS
  206. WRITEC O,MEOF WRITE EOF MESSAGE
  207. RJ WBL
  208. RJ CPL
  209. SX6 B1
  210. SA6 RECT RESET RECORD COUNT
  211. SA2 FLCT
  212. SX7 X2+B1
  213. SA7 A2 ADVANCE FILE COUNT
  214. RJ CKL
  215. ZR X1,TDM IF NO LIMIT, GET NEXT FILE
  216. EQ TDM10 LIMIT TERMINATION
  217.  
  218. TDM9 RJ TDS
  219. SX1 MEOI
  220. TDM10 WRITEC O,X1 WRITE TERMINATION MESSAGE
  221. RJ WBL
  222. RJ CPL
  223. WRITEC O,MEOD WRITE END OF DUMP
  224. WRITEF O
  225. MESSAGE TDMA
  226. ENDRUN
  227.  
  228.  
  229. TDMA DATA C* TDUMP COMPLETE.*
  230. TITLE SUBROUTINES.
  231. BSB SPACE 4
  232. ** BSB - BLANK FILL STRING BUFFER.
  233. *
  234. * ENTRY NONE.
  235. *
  236. * EXIT (OWLS) BLANK FILLED.
  237. *
  238. * USES A - 7.
  239. * X - 7.
  240. * B - 6, 7.
  241.  
  242.  
  243. BSB SUBR ENTRY/EXIT
  244. SX7 1R
  245. SB7 OLWS+OLWSL
  246. SB6 OLWS
  247. BSB1 SA7 B6
  248. SB6 B6+B1
  249. NE B6,B7,BSB1 IF NOT BLANK FILLED
  250. EQ BSBX RETURN
  251. CKL SPACE 4
  252. ** CKL - CHECK LIMITS ON ALL COUNTERS.
  253. *
  254. * ENTRY (TLCT), (RECT), (FLCT) CHECKED FOR LIMITS AGAINST
  255. * (LILM), (LREC), (LFLC).
  256. *
  257. * EXIT (X1) = 0 IF NO LIMIT REACHED.
  258. * ELSE, ADDRESS OF LIMIT MESSAGE.
  259. *
  260. * USES A - 1, 2.
  261. * X - 1, 2.
  262.  
  263.  
  264. CKL SUBR ENTRY/EXIT
  265. SA1 LILM
  266. ZR X1,CKL1 IF NO LINE LIMIT
  267. SA2 TLCT
  268. IX2 X1-X2 (LIMIT)-(TOTAL LINE COUNT)
  269. SX1 MLLN SET LINE LIMIT
  270. NG X2,CKLX IF LINE LIMIT
  271. CKL1 SA1 LREC
  272. ZR X1,CKL2 IF NO RECORD LIMIT
  273. SA2 RECT
  274. IX2 X1-X2 (LIMIT)-(RECORD COUNT)
  275. SX1 MLRN SET RECORD LIMIT
  276. NG X2,CKLX IF RECORD LIMIT
  277. CKL2 SA1 LFLC
  278. ZR X1,CKL3 IF DUMPING TO DOUBLE EOF
  279. SA2 FLCT
  280. IX2 X1-X2 (LIMIT)-(FILE COUNT)
  281. SX1 MLFN SET FILE LIMIT
  282. NG X2,CKLX IF FILE LIMIT
  283. CKL3 BX1 X1-X1
  284. EQ CKLX RETURN IF NO LIMITS REACHED
  285. CPL SPACE 4
  286. ** CPL - CHECK PAGE LIMIT.
  287. *
  288. * ENTRY (LSCT) LINE COUNT ON PAGE.
  289. * (TLCT) TOTAL LINE COUNT.
  290. *
  291. * EXIT (LSCT) ADVANCED BY 1 AND PAGE HEADER WRITTEN
  292. * AND RESET IF NECESSARY.
  293. * (TLCT) ALWAYS ADVANCED.
  294. *
  295. * USES X - 1, 2, 3, 6, 7.
  296. * A - 1, 2, 3, 6, 7.
  297. *
  298. * CALLS CDD.
  299. *
  300. * MACROS CLOCK, WRITEC.
  301.  
  302.  
  303. CPL SUBR ENTRY/EXIT
  304. SA1 LSCT
  305. SA2 TLCT
  306. SX6 X2+B1 ADVANCE TOTAL LINE COUNT
  307. SA6 A2
  308. SA3 TF
  309. ZR X3,CPLX IF TERMINAL FILE
  310. SX7 X1+B1 ADVANCE LINES ON PAGE
  311. SA7 A1
  312. SA3 A1+B1
  313. IX7 X7-X3
  314. NG X7,CPLX IF NOT END OF PAGE
  315. SX7 B1+B1
  316. IX6 X6+X7 ADVANCE TOTAL LINE COUNT
  317. SA6 A2
  318. SA7 A1 CLEAR LINES ON PAGE
  319. SA1 PGCT
  320. SX7 X1+B1 ADVANCE PAGE COUNT
  321. SA7 A1
  322. RJ CDD CONVERT PAGE NUMBER
  323. SA1 HDRMD
  324. MX2 30
  325. BX7 X2*X1
  326. BX6 -X2*X6
  327. BX7 X6+X7
  328. SA7 A1 STORE PAGE NUMBER IN HEADER
  329. CLOCK HDRMC
  330. WRITEC O,HDRM WRITE HEADER
  331. WRITEC O,WBLA WRITE BLANK LINE
  332. EQ CPLX RETURN
  333. ELH SPACE 4
  334. ** ELH - ENTER DUMP LINE HEADER.
  335. *
  336. * ENTRY (FLCT) FILE COUNT.
  337. * (RECT) RECORD COUNT.
  338. * (WDCT) WORD COUNT.
  339. *
  340. * EXIT LINE BUFFER CLEARED AND HEADER DATA INSERTED.
  341. *
  342. * CALLS BSB, COD, ESB.
  343. *
  344. * USES A - 1, 2, 7.
  345. * X - 1, 2, 3, 4, 6, 7.
  346. * B - 2, 3, 4, 6, 7.
  347.  
  348.  
  349. ELH SUBR ENTRY/EXIT
  350. RJ BSB BLANK STRING BUFFER
  351.  
  352. * SET FILE COUNT.
  353.  
  354. SA1 FLCT
  355. RJ COD CONVERT FILE COUNT
  356. SX7 1RF
  357. SA7 OLWS+1 STORE FILE IDENTIFIER
  358. SB7 A7+B1
  359. MX1 3
  360. LX6 48 POSITION CONVERTED DIGITS
  361. RJ ESB ENTER FILE COUNT
  362.  
  363. * SET RECORD COUNT.
  364.  
  365. SA1 RECT
  366. RJ COD CONVERT RECORD COUNT
  367. SX7 1RR
  368. SA7 B7+B1 STORE RECORD IDENTIFIER
  369. SB7 A7+B1
  370. MX1 4
  371. LX6 42
  372. RJ ESB ENTER RECORD COUNT
  373.  
  374. * SET WORD COUNT.
  375.  
  376. SA1 WCBL
  377. RJ COD CONVERT WORD COUNT
  378. SX7 1RW
  379. SA7 B7+B1 STORE WORD IDENTIFIER
  380. SB7 A7+B1
  381. MX1 6
  382. LX6 30
  383. RJ ESB ENTER WORD COUNT
  384. SX7 1R-
  385. SA7 B7 ENTER SEPARATOR
  386. EQ ELHX RETURN
  387. ESB SPACE 4
  388. ** ESB - ENTER STRING BUFFER.
  389. *
  390. * ENTRY (X6) POSITIONED CHARACTER DATA
  391. * (X1) NUMBER OF CHARS TO STORE (ONE BIT PER CHAR)
  392. * (B7) ENTRY ADDRESS IN STRING BUFFER
  393. *
  394. * EXIT (B7) NEXT ENTRY ADDRESS
  395. *
  396. * USES A - 7.
  397. * X - 1, 2, 6, 7.
  398. * B - 7.
  399.  
  400.  
  401. ESB SUBR ENTRY/EXIT
  402. ESB1 PL X1,ESBX RETURN
  403. MX2 -6
  404. LX1 1
  405. BX7 -X2*X6
  406. SA7 B7 STORE CHARACTER
  407. SB7 B7+B1 ADVANCE STORE
  408. LX6 6
  409. EQ ESB1 LOOP FOR NEXT CHARACTER
  410. FAW SPACE 4
  411. ** FAW - FORMAT ALPHA WORD.
  412. *
  413. * ENTRY (B2) = ADDRESS OF WORD TO FORMAT TO STRING BUFFER.
  414. * (SCPC) = BYTE POSITION.
  415. *
  416. * EXIT (B2) = UNCHANGED.
  417. * CHARACTERS PLACED IN STRING BUFFER AND (SCPC)
  418. * ADVANCED.
  419. *
  420. * CALLS BSB.
  421. *
  422. * USES X - 1, 2, 3, 4, 5, 6, 7.
  423. * A - 1, 3, 4, 5, 6, 7.
  424. * B - 4, 5, 6, 7.
  425.  
  426.  
  427. FAW SUBR ENTRY/EXIT
  428. SA4 SCPC
  429. NZ X4,FAW2 IF NOT FIRST WORD
  430. SA3 OPWD
  431. LX3 59-OPBO
  432. BX6 X6-X6 CLEAR POSITION INCREMENT
  433. SA6 FAWB
  434. PL X3,FAW2 IF NOT OCTAL/ALPHA MODE
  435. RJ BSB BLANK BUFFER
  436. FAW2 SA5 FAWA GET ASCII ESCAPE CHARACTER
  437. SA1 B2 GET DATA WORD
  438. MX2 10
  439. SA3 OPWD
  440. MX6 54
  441. LX3 59-OPBO
  442. SB7 1R SET BLANK REPLACE
  443. NG X3,FAW7 IF OCTAL/ALPHA MODE
  444. SA3 TAAP+X4 GET STARTING POSITION
  445. SB5 X3
  446. SB4 B1
  447. FAW2.1 SA3 FAWB INCREMENT STARTING POSITION
  448. SB5 X3+B5
  449. FAW3 SB6 B1+B1 SET BYTE WIDTH
  450. FAW4 LX1 6
  451. BX7 -X6*X1
  452. LX2 1
  453. SB6 B6-B1
  454. SA3 TCCS
  455. ZR X3,FAW4.1 IF TERMINAL CHARACTER SET NOT ASCII
  456. NZ X5,FAW9 IF PREVIOUS CHARACTER IS ESCAPE
  457. SX3 X7-76B
  458. ZR X3,FAW8 IF ESCAPE 76
  459. SX3 X7-74B
  460. ZR X3,FAW8 IF ESCAPE 74
  461. FAW4.1 NZ X7,FAW5 IF NOT 00 CHARACTER
  462. SX7 B7 FORCE BLANK
  463. FAW5 SA7 B5
  464. SB5 B5+B4 ADVANCE STORE
  465. NZ B6,FAW4 IF NOT END OF BYTE
  466. SB5 B5+B1 SKIP ONE POSITION
  467. NG X2,FAW3 IF NOT END OF WORD
  468. BX7 X5 SAVE ESCAPE CHARACTER
  469. SA7 FAWA
  470. SA4 SCPC ADVANCE POSITION
  471. SA3 OPWD
  472. SX7 X4+B1
  473. LX3 59-OPBO
  474. SX6 X7-TBOPL
  475. NG X3,FAW6 IF OCTAL ALPHA MODE
  476. SX6 X7-TAAPL
  477. FAW6 SA7 A4
  478. NZ X6,FAW IF NOT END OF LINE
  479. SA6 A4 SET BEGINNING OF NEXT LINE
  480. EQ FAWX RETURN
  481.  
  482. FAW7 SA3 TBOP+X4 SET STARTING POSITION
  483. SB5 X3+B1
  484. SB4 B1+B1 SET INCREMENT
  485. EQ FAW2.1 LOOP FOR NEXT BYTE
  486.  
  487. FAW8 BX5 X7
  488. SX7 B7 FORCE BLANK
  489. EQ FAW5 STORE CHARACTER
  490.  
  491. FAW9 BX6 X5 STORE ESCAPE CHARACTER
  492. SA6 B5
  493. SB5 B5+1
  494. SA3 FAWB ADVANCE POSITION INCREMENT
  495. SX6 X3+B1
  496. SA6 A3
  497. BX5 X5-X5 CLEAR ESCAPE CHARACTER
  498. MX6 54 RESET MASK
  499. EQ FAW5 STORE CHARACTER
  500.  
  501. FAWA CON 0 ASCII ESCAPE CHARACTER
  502. FAWB CON 0 WORD POSITION INCREMENT
  503.  
  504. * TABLE OF BYTE FORMAT POSITIONS
  505.  
  506. TAAP BSS 0
  507. LOC 0
  508. CON OLWS+21
  509. CON OLWS+38
  510. CON OLWS+55
  511. CON OLWS+72
  512. TAAPL EQU *
  513. LOC *O
  514. FHW SPACE 4,15
  515. ** FHW - FORMAT HEXADECIMAL WORD.
  516. *
  517. * ENTRY (B2) = ADDRESS OF WORD TO FORMAT TO STRING BUFFER.
  518. * (SCPC) = BYTE POSITION.
  519. *
  520. * EXIT (B2) = UNCHANGED.
  521. * (X6) = 0 IF LINE IS FILLED.
  522. * CHARACTERS PLACED IN STRING BUFFER AND (SCPC)
  523. * ADVANCED.
  524. *
  525. * USES X - 2, 3, 4, 6, 7.
  526. * A - 3, 4, 6, 7.
  527. * B - 5, 6, 7.
  528. *
  529. * CALLS BSB.
  530.  
  531.  
  532. FHW SUBR ENTRY/EXIT
  533. SA4 SCPC
  534. NZ X4,FHW0 IF NOT FIRST WORD
  535. SA3 OPWD
  536. SX3 X3-OPVH
  537. ZR X3,FHW0 IF ONLY H OPTION SELECTED
  538. RJ BSB BLANK BUFFER
  539. FHW0 SA4 TBOP+X4
  540. MX3 15 DIGIT COUNT
  541. SB7 X4 STORE ADDRESS
  542. MX2 -4
  543. SA4 B2
  544. FHW1 SB5 3
  545. FHW2 LX4 4
  546. BX7 -X2*X4 EXTRACT DIGIT
  547. SB6 X7-10
  548. LX3 1
  549. NG B6,FHW3 IF PURE DECIMAL DIGIT PRESENT
  550. SX7 X7-9-1R0 BIAS TO ALPHA
  551. FHW3 SX7 X7+1R0 CONVERT DIGIT
  552. SA7 B7 STORE RESULT
  553. SB5 B5-B1
  554. SB7 B7+1
  555. NZ B5,FHW2 IF NOT END OF BYTE
  556. SB7 B7+2 SKIP COLUMNS
  557. NG X3,FHW1 IF NOT END OF WORD
  558. SA4 SCPC
  559. SX7 X4+B1
  560. SA7 A4
  561. SX6 X7-TBOPL
  562. NZ X6,FHWX IF LINE NOT FILLED
  563. SA6 A4+ RESET BYTE POSITION
  564. EQ FHWX RETURN
  565. FML SPACE 4
  566. ** FML - FORMAT PRINT LINE(S).
  567. *
  568. * ENTRY (A0) INDEX TO LAST ENTRY+1 IN WORD BUFFER.
  569. *
  570. * EXIT (X1) = 0 IF NO LIMIT REACHED.
  571. *
  572. * USES X - 1, 2, 6, 7.
  573. * A - 2, 6, 7.
  574. * B - 2.
  575. *
  576. * CALLS ELH, FAW, FHW, FOW, WSB.
  577.  
  578.  
  579. FML SUBR ENTRY/EXIT
  580. BX1 X1-X1
  581. SX1 A0-B1
  582. NG X1,FMLX IF EMPTY LINE
  583. SA2 OPWD
  584. LX2 59-OPBO
  585. PL X2,FML2 IF NOT OCTAL MODE
  586. BX6 X6-X6 CLEAR BYTE POSITION
  587. SA6 SCPC
  588. RJ ELH ENTER LINE HEADER
  589. SB2 DTOL
  590. RJ FOW WORD 1
  591. SB2 B2+B1
  592. SX1 A0-2
  593. NG X1,FML1 IF END OF LINE
  594. RJ FOW WORD 2
  595. SB2 B2+B1
  596. SX1 A0-3
  597. NG X1,FML1 IF END OF LINE
  598. RJ FOW WORD 3
  599. SB2 B2+B1
  600. SX1 A0-4
  601. NG X1,FML1 IF END OF LINE
  602. RJ FOW WORD 4
  603. FML1 RJ WSB WRITE BUFFER
  604. FML2 SA2 OPWD
  605. LX2 59-OPBA
  606. BX6 X6-X6
  607. PL X2,FML4 IF NOT ALPHA MODE
  608. SA6 SCPC
  609. RJ ELH
  610. SB2 DTOL
  611. RJ FAW WORD 1
  612. SB2 B2+B1
  613. SX1 A0-2
  614. NG X1,FML3 IF END OF LINE
  615. RJ FAW WORD 2
  616. SB2 B2+B1
  617. SX1 A0-3
  618. NG X1,FML3 IF END OF LINE
  619. RJ FAW WORD 3
  620. SB2 B2+B1
  621. SX1 A0-4
  622. NG X1,FML3 IF END OF LINE
  623. RJ FAW WORD 4
  624. FML3 RJ WSB WRITE BUFFER
  625. FML4 SA2 OPWD
  626. LX2 59-OPBH
  627. BX6 X6-X6
  628. PL X2,FML6 IF NOT A HEXADECIMAL DUMP
  629. SA6 SCPC CLEAR BYTE COUNT
  630. RJ ELH SET UP LINE HEADERS
  631. SB2 DTOL
  632. RJ FHW FORMAT HEXADECIMAL WORD
  633. SB2 B2+1
  634. SX1 A0-2
  635. NG X1,FML5 IF END OF LINE
  636. RJ FHW FORMAT HEXADECIMAL WORD
  637. SB2 B2+1
  638. SX1 A0-3
  639. NG X1,FML5 IF END OF LINE
  640. RJ FHW FORMAT HEXADECIMAL WORD
  641. SB2 B2+1
  642. SX1 A0-4
  643. NG X1,FML5 IF END OF LINE
  644. RJ FHW FORMAT HEXADECIMAL WORD
  645. FML5 RJ WSB WRITE BUFFER
  646. FML6 SA2 WDCT
  647. BX7 X2
  648. SA7 WCBL SET BEGINNING OF NEXT LINE
  649. EQ FMLX RETURN
  650. FOW SPACE 4
  651. ** FOW - FORMAT OCTAL WORD.
  652. *
  653. * ENTRY (B2) ADDRESS OF WORD TO FORMAT.
  654. * (SCPC) BYTE POSITION.
  655. *
  656. * EXIT WORD PLACED IN BUFFER.
  657. * (SCPC) UPDATED.
  658. * (X6) = 0 IF LINE IS FILLED.
  659. * (B2) UNCHANGED.
  660. *
  661. * USES A - 4, 6, 7.
  662. * X - 2, 3, 4, 6, 7.
  663. * B - 1, 2, 5, 6, 7.
  664.  
  665.  
  666. FOW SUBR ENTRY/EXIT
  667. SA4 SCPC
  668. SA4 TBOP+X4 GET BEGINNING CHARACTER POSITION
  669. MX3 20 DIGIT COUNT
  670. SB7 X4 STORE ADDRESS
  671. SB6 1R0
  672. MX2 -3
  673. SA4 B2 GET INPUT WORD
  674. FOW2 SB5 4
  675. FOW3 LX4 3
  676. BX7 -X2*X4 GET DIGIT
  677. SX7 X7+B6
  678. LX3 1
  679. SA7 B7 STORE CONVERTED DIGIT
  680. SB7 B7+B1
  681. SB5 B5-B1
  682. NZ B5,FOW3 IF NOT END OF BYTE
  683. SB7 B7+B1 SKIP COLUMN
  684. NG X3,FOW2 IF NOT END OF WORD
  685. SA4 SCPC
  686. SX7 X4+B1
  687. SX6 X7-TBOPL
  688. SA7 A4 ADVANCE POSITION
  689. NZ X6,FOWX IF NOT END OF LINE
  690. SA6 A4 RESET BYTE POSITION
  691. EQ FOWX RETURN
  692.  
  693. * TABLE OF FORMATTING VALUES
  694.  
  695. TBOP BSS 0
  696. LOC 0
  697. CON OLWS+21
  698. CON OLWS+48
  699. CON OLWS+75
  700. CON OLWS+102
  701. TBOPL EQU *
  702. LOC *O
  703. RDA SPACE 4
  704. ** RDA - READ DATA (READO MACRO).
  705. * PROCESS READ ONE WORD REQUESTS (RDO=).
  706. * DEBLOCK DATA IF CONTROL WORD READS USED.
  707. *
  708. * ENTRY (X1) = (FET+2).
  709. * (A1) = FET+2.
  710. *
  711. * EXIT (X1) = 1 IF EOR DETECTED.
  712. * (X1) = -1 IF EOF DETECTED.
  713. * (X1) = -2 IF EOI DETECTED.
  714. * (X1) = 0 IF TRANSFER COMPLETE.
  715. *
  716. * USES X - 1, 2, 3, 4, 6, 7.
  717. * A - 1, 2, 3, 6, 7.
  718. * B - 4, 5, 6.
  719. *
  720. * CALLS RDO=.
  721.  
  722.  
  723. RDA5 SX7 B6 STORE WORDS REMAINING IN THIS BLOCK
  724. SA7 A2
  725. RDA6 RJ RDO= PROCESS WORD REQUEST
  726.  
  727. RDA SUBR ENTRY/EXIT
  728. SA2 CWDS CHECK CONTROL WORD DUMP FLAG
  729. PL X2,RDA6 IF CONTROL WORDS NOT LEGAL NOW
  730. RDA1 SB4 A1 SAVE FET POINTER
  731. SA2 A1-4 GET NUMBER OF WORDS BEFORE CONTROL WORD
  732. SB5 X2
  733. NG X2,RDA4 IF FIRST READ OF FILE
  734. RDA2 SB6 B5-B1 DECREMENT WORDS REMAINING IN BLOCK
  735. PL B6,RDA5 IF ENOUGH WORDS LEFT FOR REQUEST
  736. SA3 A2+B1 CHECK EOR FLAG
  737. PL X3,RDA3 IF NOT EOR
  738. MX6 1 SET NEW READ FLAG ON
  739. SA6 A2
  740. SA6 A3 RESET EOR FLAG
  741. RJ RDO= CLEAR LEVEL WORD
  742. SX1 B1 SET EOR INDICATOR FOR RETURN
  743. JP RDAX RETURN
  744.  
  745. RDA3 RJ RDO= CLEAR LEVEL WORD
  746. RDA4 SA1 B4 RESET A1, X1 VALUES
  747. RJ RDO= READ CONTROL WORD
  748. NG X1,RDAX IF EOF/EOI, RETURN
  749. SA1 B4 RESET A1, X1 VALUES
  750. BX3 X6 CONTROL WORD
  751. SX7 5 BYTES/WORD
  752. SX4 X3+4 ROUND UP
  753. AX3 36
  754. SX3 X3
  755. IX7 X4/X7 WORDS IN BLOCK
  756. IX6 X7-X3 SAVE EOR FLAG
  757. SA7 A1-4 STORE WORD COUNT
  758. SA6 A1-3 STORE EOF FLAG
  759. JP RDA1 CONTINUE IN LOOP
  760. TDS SPACE 4
  761. ** TDS - TERMINATE DUMP SEGMENT.
  762. *
  763. * ENTRY (A0) NUMBER OF WORDS IN BUFFER.
  764. *
  765. * EXIT (X1) = 0 IF NO LIMITS EXCEEDED.
  766. *
  767. * CALLS FML, CPL, WBL.
  768. *
  769. * USES ALL REGISTERS EXCEPT A0, X0, A5 AND X5.
  770.  
  771.  
  772. TDS SUBR ENTRY/EXIT
  773. SA1 RPCT
  774. SX2 X1-3
  775. AX1 1
  776. BX6 X6-X6
  777. SA6 A1 CLEAR REPEAT
  778. ZR X1,TDS3 IF NOT REPEAT (SUPPRESSING)
  779. PL X2,TDS1 IF MORE THAN TWO LINES
  780. SX6 A0
  781. ZR X6,TDS2 IF NO WORDS
  782. TDS1 WRITEC O,MALR WRITE REPEAT MESSAGE
  783. RJ WBL
  784. RJ CPL
  785. SX6 A0
  786. NZ X6,TDS3 IF WORDS IN BUFFER
  787. TDS2 SA4 TF SET WORDS/LINE FOR FILE TYPE
  788. SA2 X4+WPLT
  789. SA1 WCBL
  790. IX6 X1-X2
  791. SA6 A1
  792. SA0 X2
  793. TDS3 RJ FML
  794. BX6 X6-X6
  795. SA6 WCBL ZERO BEGIN LINE WORD COUNT
  796. EQ TDSX RETURN
  797. WBL SPACE 4
  798. ** WBL - WRITE BLANK LINE.
  799. *
  800. * ENTRY NONE.
  801. *
  802. * EXIT BLANK LINE WRITTEN.
  803. *
  804. * CALLS CPL, WTC.
  805. *
  806. * USES ALL REGISTERS EXCEPT A0, X0, A5 AND X5.
  807.  
  808.  
  809. WBL SUBR ENTRY/EXIT
  810. RJ CPL CHECK PAGE LIMIT
  811. WRITEC O,WBLA WRITE BLANK LINE
  812. EQ WBLX RETURN
  813.  
  814. WBLA DATA 2C
  815. WSB SPACE 4
  816. ** WSB - WRITE STRING BUFFER.
  817. *
  818. * ENTRY NONE.
  819. *
  820. * EXIT (X1) = 0 IF NO LIMITS REACHED.
  821. * STRING BUFFER WRITTEN TO OUTPUT FILE.
  822. *
  823. * CALLS CPL, CKL, WTS.
  824. *
  825. * USES ALL REGISTERS EXCEPT A0, X0, A5 AND X5.
  826.  
  827.  
  828. WSB SUBR ENTRY/EXIT
  829. WRITES O,OLWS,OLWSL
  830. RJ CPL
  831. BX6 X6-X6
  832. SA6 SCPC SET LINE EMPTY
  833. RJ CKL
  834. EQ WSBX RETURN
  835.  
  836. * MESSAGES.
  837.  
  838. HDRM DATA 30H1 - FILE DUMP -
  839. HDRMA DATA 30H
  840. DATA 30H
  841. HDRMB DATA 10H
  842. HDRMC DATA 10H
  843. HDRMD DATA 10H PAGE 0000
  844. DATA 1C.
  845. MLLN DATA C* -- LINE LIMIT --*
  846. MLRN DATA C* -- RECORD LIMIT --*
  847. MLFN DATA C* -- FILE LIMIT --*
  848. MEOR DATA C* -- END OF RECORD --*
  849. MEOF DATA C* -- END OF FILE --*
  850. MEOI DATA C* -- END OF INFORMATION --*
  851. MEOD DATA C* -- END OF DUMP --*
  852. MALR DATA C* -- ABOVE LINE REPEATED --*
  853.  
  854. * COMMON DECKS.
  855.  
  856. *CALL,COMCCDD
  857. *CALL,COMCCOD
  858. *CALL,COMCCIO
  859. *CALL,COMCRDO
  860. *CALL,COMCSYS
  861. *CALL,COMCWTC
  862. *CALL,COMCWTS
  863. *CALL,COMCWTW
  864.  
  865. * FETS.
  866.  
  867. O BSS 0
  868. OUTPUT FILEB BUFO,BUFOL,EPR,(FET=8)
  869.  
  870. CON 0 REMAINING WORD COUNT
  871. CON 0 EOR FLAG
  872.  
  873. F BSS 0
  874. TAPE1 FILEB BUFF,BUFFL,(FET=10)
  875. ODFE BSSZ ODFEL OPTICAL DISK FET EXTENSION
  876. TITLE PRESET PROGRAM
  877. PRE SPACE 4
  878. ** PRE - PRESET PROGRAM.
  879. *
  880. * ENTRY CONTROL CARD ARGUMENTS STORED BY SYSTEM.
  881. *
  882. * EXIT (B1) = 1.
  883. *
  884. * CALLS ARG, CDT, CPL, DXB, SFN, STF.
  885. *
  886. * MACROS ABORT, DATE, GETPP, MESSAGE, OPEN, REWIND,
  887. * TSTATUS, WRITEW.
  888.  
  889.  
  890. TDUMP BSS 0
  891. PRE EQU TDUMP
  892.  
  893. SB1 1
  894. SA1 ACTR
  895. R= A4,ARGR SET FIRST ARGUMENT
  896. SB4 X1 SET ARGUMENT COUNT
  897. SB5 TARG SET EQUIVALENCE TABLE
  898. RJ ARG PROCESS ARGUMENTS
  899. ZR X1,PRE1.1 IF NO ARGUMENT ERROR
  900. PRE1 SX2 =C* ARGUMENT ERROR.*
  901. MESSAGE X2
  902. ABORT
  903.  
  904. PRE1.1 SA1 OPWA GET ALPHA DUMP OPTION
  905. SA2 OPWH GET HEX DUMP OPTION
  906. BX6 X1+X2
  907. SA1 OPWO GET OCTAL DUMP OPTION
  908. BX6 X1+X6
  909. ZR X6,PRE2 IF NO DUMP OPTION USE DEFAULT
  910. SA6 OPWD SET COMPOSITE DUMP OPTION
  911. PRE2 SA1 O
  912. MX6 42
  913. BX7 X7-X7
  914. BX1 X6*X1
  915. SX6 A1
  916. BX6 X1+X6 FORM POINTER TO *OUTPUT* FILE
  917. SA6 B1+B1
  918. SA7 A6+B1
  919. SX2 A1 OUTPUT FET ADDRESS
  920. RJ STF CHECK IF TERMINAL FILE
  921. SA6 TF
  922. NZ X6,PRE3 IF NON-TERMINAL
  923. TSTATUS TSRW GET CURRENT CHARACTER SET
  924. SA2 TSRW+1
  925. MX0 59
  926. LX2 0-2
  927. BX6 -X0*X2
  928. SA6 TCCS
  929. PRE3 SB7 B1 DECIMAL BASE
  930. SA5 LREC
  931. RJ DXB
  932. NZ X4,PRE1 IF RECORD COUNT NON NUMERIC
  933. SA6 A5 STORE CONVERTED VALUE
  934. SA5 LFLC
  935. ZR X5,PRE3.1 IF NO CONVERSION
  936. RJ DXB
  937. NZ X4,PRE1 IF FILE COUNT NON NUMERIC
  938. SA6 A5 STORE CONVERTED VALUE
  939. PRE3.1 SA5 LILM
  940. RJ DXB
  941. NZ X4,PRE1 IF LINE LIMIT NON NUMERIC
  942. SA6 A5 STORE CONVERTED VALUE
  943. SB6 8
  944. SA1 CCDR-1
  945. SB7 HDRMA
  946. MX3 54
  947. PRE4 SA1 A1+B1 GET WORD OF CONTROL CARD
  948. BX7 X1
  949. BX6 -X3*X1
  950. ZR X6,PRE6 IF LAST WORD
  951. SA7 B7 STORE IN HEADER LINE
  952. SB6 B6-B1
  953. SB7 B7+B1
  954. NZ B6,PRE4 IF MORE WORDS TO CONTROL CARD
  955. PRE5 DATE HDRMB
  956. SA1 CODD SET FET FOR CODED READ IF REQUESTED
  957. SA2 F
  958. BX6 -X1*X2
  959. SA6 A2
  960. GETPP BUFF,LL,BUFF GET PAGE SIZE PARAMETERS
  961. SA1 TF
  962. WRITEW O,A6,X1 CONDITIONALLY WRITE FORMAT EFFECTOR
  963. RJ CPL ISSUE FIRST LINE
  964. SX2 F
  965. SA3 PREA
  966. RJ SOE SET OPTICAL FET EXTENSION
  967. OPEN F,READNR,R CHECK IF CONTROL WORDS LEGAL
  968. SA1 F+1
  969. RJ CDT CHECK DEVICE TYPE
  970. ZR X7,PRE5.1 IF CONTROL WORDS NOT LEGAL
  971. SX7 B0+
  972. SA1 LREC CHECK RECORD COUNT
  973. NZ X1,PRE5.1 IF *R=* USED, FORCE NO CONTROL WORD READS
  974. SX7 1 SET CONTROL LEGAL FLAG
  975. SA7 CW
  976. PRE5.1 SA1 CWDS SET CONTROL WORD DUMP FLAG
  977. IX7 X1-X7
  978. SA7 A1
  979. SA1 REWD CHECK REWIND INDICATOR
  980. NZ X1,TDM IF NO REWIND
  981. REWIND F,R
  982. EQ TDM BEGIN PROGRAM
  983.  
  984. PRE6 RJ SFN SPACE FILL WORD
  985. SA6 B7
  986. EQ PRE5
  987.  
  988. PREA VFD 36/0,6/ODFEL,18/ODFE OPTICAL FET EXTENSION POINTER
  989.  
  990. * TABLE OF ARGUMENT CONTROL WORDS
  991.  
  992. TARG BSS 0
  993. CW ARG -DFCW,CWDS
  994. I ARG F,F,400B
  995. L ARG O,O,400B
  996. A ARG -DFVA,OPWA
  997. H ARG -DFVH,OPWH
  998. O ARG -DFVO,OPWO
  999. NR ARG -DFVO,REWD
  1000. C ARG -DFVA,CODD
  1001. R ARG LREC,LREC
  1002. F ARG LFLC,LFLC
  1003. N ARG LILM,LILM
  1004. ARG
  1005.  
  1006. * TABLE OF DEFAULT VALUES.
  1007.  
  1008. DFCW CON 1
  1009. DFVO CON OPVO
  1010. DFVA CON OPVA
  1011. DFVH CON OPVH
  1012.  
  1013. * TEMPORARY OPTION CONTROL WORDS.
  1014.  
  1015. OPWO CON 0 OPTION O CONTROL WORD (PRESET OMITTED)
  1016. OPWA CON 0 OPTION A CONTROL WORD (PRESET OMITTED)
  1017. OPWH CON 0 OPTION H CONTROL WORD (PRESET OMITTED)
  1018. CDT SPACE 4
  1019. ** CDT - CHECK DEVICE TYPE.
  1020. *
  1021. * ENTRY (X1) = (FET+1).
  1022. *
  1023. * EXIT (X7) = 0 IF CONTROL WORD READ/WRITE NOT SUPPORTED ON
  1024. * THIS DEVICE.
  1025. *
  1026. * USES A - 2.
  1027. * X - 0, 1, 2, 6, 7.
  1028.  
  1029.  
  1030. CDT2 LX1 12 CHECK *TT*
  1031. BX6 -X0*X1
  1032. SX7 X6-2RTT
  1033.  
  1034. CDT SUBR ENTRY/EXIT
  1035. MX0 -12
  1036. PL X1,CDT2 IF ALLOCATABLE
  1037. LX1 12
  1038. SA2 CDTA SEARCH DEVICE TABLE
  1039. SX7 0 ASSUME NO FIND
  1040. CDT1 ZR X2,CDTX IF NOT FOUND, RETURN
  1041. BX6 X1-X2
  1042. AX2 12
  1043. BX6 X2*X6
  1044. SA2 A2+B1
  1045. NZ X6,CDT1 IF NOT MATCH
  1046. SX7 1 INDICATE CONTROL WORD POSSIBLE
  1047. JP CDTX RETURN
  1048.  
  1049. CDTA VFD 36/,12/7703B,12/4002B
  1050. VFD 36/,12/7703B,12/4102B
  1051. VFD 36/,12/7777B,12/2RMT+4000B
  1052. VFD 36/,12/7777B,12/2RNT+4000B
  1053. VFD 36/,12/7777B,12/2RCT+4000B
  1054. VFD 36/,12/7777B,12/2RAT+4000B
  1055. VFD 36/,12/7777B,12/2ROD+4000B
  1056. CON 0
  1057. SPACE 4
  1058. *CALL,COMCARG
  1059. *CALL COMCCPM
  1060. *CALL,COMCDXB
  1061. *CALL,COMCLFM
  1062. *CALL,COMCSFN
  1063. *CALL,COMCSOE
  1064. *CALL,COMCSTF
  1065.  
  1066. * BUFFERS.
  1067.  
  1068. OLWS EQU PRE
  1069. BUFO EQU OLWS+OLWSL
  1070. BUFF EQU BUFO+BUFOL
  1071. RFL= EQU BUFF+BUFFL+4
  1072.  
  1073. END
cdc/nos2.source/opl871/tdump.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator