User Tools

Site Tools


cdc:nos2.source:opl871:dmpccc

DMPCCC

Table Of Contents

  • [00010] DMPCCC - DUMP *CCC* MEMORY.
  • [00012] DUMP CCC MEMORY.
  • [00015] DUMP CCC MEMORY.
  • [00083] DATA ASSIGNMENTS.
  • [00126] MAIN PROGRAM.
  • [00128] MAIN PROGRAM.
  • [00178] SUBROUTINES.
  • [00180] CHD - CONVERT HEXADECIMAL DIGITS.
  • [00215] LSL - LIST LINE.
  • [00267] RDL - READ DUMP LINE.
  • [00417] PRS - PRESET PROGRAM.
  • [00496] ABT - ABORT JOB.
  • [00509] ACH - ASSEMBLE CHANNEL.
  • [00565] AFN - ASSEMBLE FILE NAME.
  • [00610] ARG - PROCESS ARGUMENTS.
  • [00647] ASD - ASSEMBLE DIGITS.
  • [00715] ASN - ASSEMBLE NAME.
  • [00753] TCS - TRANSLATE CONTROL STATEMENT.
  • [00791] UCS - UNPACK C-FORMAT TO S-FORMAT.

Source Code

DMPCCC.txt
  1. IDENT DMPCCC,ORG
  2. ABS
  3. SST
  4. ENTRY DMPCCC
  5. ENTRY RFL=
  6. ENTRY SSJ=
  7. SYSCOM B1
  8. *COMMENT 84/04/01. DMPCCC - DUMP CCC MEMORY.
  9. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  10. TITLE DMPCCC - DUMP *CCC* MEMORY.
  11. SPACE 4
  12. *** DMPCCC - DUMP CCC MEMORY.
  13. * L. E. LOVETT 84/04/01.
  14. SPACE 4,10
  15. *** DMPCCC - DUMP CCC MEMORY.
  16. *
  17. * *DMPCCC* PROVIDES THE CAPABILITY TO DYNAMICALLY AUTODUMP
  18. * THE *CCC* MEMORY. THE CALLING JOB MUST BE SYSTEM ORIGIN
  19. * OR THE USER MUST BE VALIDATED FOR SYSTEM ORIGIN PRIVILEGES,
  20. * AND THE SYSTEM MUST BE IN ENGINEERING MODE.
  21. *
  22. * *DMPCCC* READS THE *CCC* MEMORY VIA THE *PP* PROGRAM *DCC*
  23. * AND FORMATS THE DATA INTO AN OUTPUT FILE. *DMPCCC* WILL ISSUE
  24. * APPROPRIATE MESSAGES TO INDICATE THE SUCCESS OR FAILURE OF
  25. * THE AUTODUMP ATTEMPT.
  26. SPACE 4,10
  27. *** COMMAND FORMAT.
  28. *
  29. * DMPCCC(C=CH,L=LFN)
  30. *
  31. * CH CHANNEL NUMBER TO DUMP *CCC* FROM. THE SPECIFIED
  32. * CHANNEL MUST BE IN THE RANGE 0 - 13B OR 20B - 33B OR
  33. * C0 - C11B FOR CONCURRENT CHANNELS.
  34. * CHANNEL 0 WILL BE ASSUMED IF NO CHANNEL IS SPECIFIED
  35. * ON THE CALL.
  36. *
  37. * LFN OUTPUT FILE NAME. DEFAULT IS *OUTPUT*.
  38. SPACE 4,10
  39. *** DAYFILE MESSAGES.
  40. *
  41. * * DUMP COMPLETE.*
  42. * INFORMATIVE MESSAGE INDICATING THE COMPLETION OF THE
  43. * DUMP UTILITY.
  44. *
  45. * * EQUIVALENCE MISSING.*
  46. * A SYNTAX ERROR WAS ENCOUNTERED WITH THE COMMAND. THE
  47. * COMMAND PARAMETER WAS NOT SEPARATED FROM ITS EQUIVALENC
  48. * VALUE BY AN *=*.
  49. *
  50. * * INCORRECT CHANNEL NUMBER.*
  51. * THE SPECIFIED CHANNEL NUBER WAS NOT IN THE RANGE
  52. * 0 - 13B OR 20B - 33B OR C0 - C11B.
  53. *
  54. * * 8/9 NOT ALLOWED IN OCTAL FIELD.*
  55. * THE CHANNEL NUMBER WAS SPECIFIED WITH A POST SUFFIX
  56. * OF *B* WHILE AN *8* OR *9* WAS SPECIFIED.
  57. *
  58. * * NUMERIC FIELD MUST NOT BE BLANK.*
  59. * NO CHANNEL VALUE WAS SPECIFIED WITH THE *C* PARAMETER.
  60. *
  61. * * INCORRECT DIRECTIVE NAME.*
  62. * AN UNRECOGNIZED PARAMETER HAS BEEN SPECIFIED ON THE
  63. * COMMAND.
  64.  
  65. SPACE 4,10
  66. ** COMMON DECKS.
  67.  
  68.  
  69. *CALL COMCMAC
  70. SPACE 4
  71. ** ASSEMBLY CONSTANTS.
  72.  
  73.  
  74. LNP EQU 84 LINES/PRINTER PAGE
  75. CCSZ EQU 40000B *CCC* MEMORY SIZE
  76. CCSZA SET CCSZ*2+4
  77. NMBL SET CCSZA/5+100B DUMP BUFFER SIZE
  78. LFBL EQU 2001B LIST FILE BUFFER LENGTH
  79. WBFL EQU 64 WORKING BUFFER LENGTH
  80.  
  81.  
  82. SSJ= EQU 400000B
  83. TITLE DATA ASSIGNMENTS.
  84. DATA SPACE 4
  85. ** DATA ASSIGNMENTS.
  86.  
  87.  
  88.  
  89. ORG 110B
  90. ORG BSS 0
  91.  
  92. L BSS 0 LIST FILE
  93. OUTPUT FILEC LFB,LFBL,FET=8
  94. ORG L
  95. CON 0LOUTPUT+15B
  96. ORG L+8
  97.  
  98. N FILEB NMB,NMBL,FET=9
  99. ORG N
  100. VFD 12/0,18/0,18/0,12/0
  101. ORG N+9
  102.  
  103. BA CON LB1 BUFFER ADDRESS
  104. NA CON 0 CCC ADDRESS
  105. NL CON 0#4000 LIMIT ADDRESS
  106. CCHF CON 0 CONCURRENT CHANNEL FLAG
  107. SPACE 4
  108. ** LIST FILE CONTROLS.
  109.  
  110.  
  111. LN CON 10000 LINE NUMBER
  112. LP CON LNP LINES/PAGE
  113. PN CON 0 PAGE NUMBER
  114.  
  115. TTL DATA H*1 DUMP OF * PAGE TITLE LINE
  116. DATA 10H CCC, CH
  117. DATA 40H00.
  118. DTE BSS 1 DATE FOR OUTPUT
  119. TME BSS 1 TIME FOR OUTPUT
  120. PGE BSS 1 PAGE FOR OUTPUT
  121. CON 0
  122.  
  123. STL DATA 10H0
  124. DATA C* 0 1 2 3 4 5 6 7 8
  125. , 9 A B C D E F*
  126. TITLE MAIN PROGRAM.
  127. DMP SPACE 4,20
  128. ** DMPCCC - MAIN PROGRAM.
  129.  
  130.  
  131. DMPCCC RJ PRS PRESET PROGRAM
  132. DMP1 SA1 NA ADVANCE *CCC* ADDRESS
  133. SX6 X1+16
  134. SA6 A1
  135. SA4 NL
  136. IX4 X1-X4
  137. PL X4,DMP5 IF END OF DUMP
  138. RJ CHD CONVERT ADDRESS TO DISPLAY
  139. SA1 BA SET BUFFER ADDRESS
  140. LX6 30
  141. MX0 48
  142. SB3 6
  143. BX0 X0*X6
  144. SB2 X1
  145. RJ RDL READ DUMP LINE
  146. NZ X1,DMP4 IF END OF DATA
  147. SA1 BA SET BUFFER ADDRESS
  148. SX2 LB1&LB2 TOGGLE BUFFER
  149. BX6 X1-X2 COMPARE BUFFERS
  150. SA3 X1+B1
  151. MX7 1
  152. SA4 X6+B1
  153. BX7 X7+X1
  154. SX6 X6
  155. DMP2 BX2 X3-X4
  156. SA3 A3+B1
  157. SA4 A4+B1
  158. NZ X2,DMP3 IF LINE NOT DUPLICATE
  159. NG X2,DMP3 IF LINE NOT DUPLICATE
  160. NZ X3,DMP2 IF NOT END OF NEW LINE
  161. NG X1,DMP1 IF DUPLICATE LINES WRITTEN
  162. SA7 A1 SET DUPLICATE LINES WRITTEN
  163. SB2 =C* DUPLICATED LINES.*
  164. RJ LSL LIST LINE
  165. EQ DMP1 GET NEXT LINE TO PRINT
  166.  
  167. DMP3 SA6 A1
  168. SB2 X1
  169. RJ LSL LIST LINE
  170. EQ DMP1 GET NEXT LINE TO PRINT
  171.  
  172. DMP4 SA1 BA BUFFER ADDRESS
  173. SB2 X1
  174. RJ LSL LIST LINE
  175. DMP5 WRITER L
  176. MESSAGE (=C* DUMP COMPLETE.*)
  177. ENDRUN
  178. TITLE SUBROUTINES.
  179. CHD SPACE 4
  180. ** CHD - CONVERT HEXADECIMAL DIGITS.
  181. *
  182. * *CHD* CONVERTS UP TO 10 DIGITS TO DISPLAY CODE WITH LEADING
  183. * ZERO SUPPRESSION. CONVERSION CONTAINS SPACE FILL AND IS
  184. * RIGHT AND LEFT JUSTIFIED.
  185. *
  186. * ENTRY (X1) = NUMBER TO BE CONVERTED.
  187. *
  188. * EXIT (X6) = DISPLAY CODE CONVERSION RIGHT JUSTIFIED.
  189. * (X4) = DISPLAY CODE CONVERSION LEFT JUSTIFIED.
  190. * (B2) = 6*COUNT OF DIGITS CONVERTED.
  191. *
  192. * USES A - 4.
  193. * B - 2, 3.
  194. * X - 1, 2, 3, 4, 6.
  195.  
  196.  
  197. CHD SUBR ENTRY/EXIT
  198. SA4 =1H
  199. MX2 -4
  200. SB2 B0 CLEAR JUSTIFY COUNT
  201. CHD1 BX3 -X2*X1 EXTRACT DIGIT
  202. LX4 -6 SHIFT ASSEMBLY
  203. SB2 B2+6
  204. SB3 X3-10
  205. SX3 1R0+X3-1R
  206. NG B3,CHD2 IF DIGIT LESS THAN 10
  207. SX3 1RA+B3-1R
  208. CHD2 AX1 4 SHIFT OFF DIGIT
  209. IX4 X4+X3 ADD DIGIT TO ASSEMBLY
  210. NZ X1,CHD1 LOOP TO ZERO DIGIT
  211. LX4 -6 LEFT JUSTIFY ASSEMBLY
  212. LX6 X4,B2 RIGHT JUSTIFY ASSEMBLY
  213. EQ CHD RETURN
  214. LSL SPACE 4
  215. ** LSL - LIST LINE.
  216. *
  217. * ENTRY (B2) = ADDRESS OF LINE IN C-FORMAT.
  218. *
  219. * EXIT LINE WRITTEN TO OUTPUT FILE.
  220. *
  221. * USES A - 1, 2, 6, 7.
  222. * B - 2.
  223. * X - 1, 2, 6, 7.
  224. *
  225. * CALLS CDD.
  226. *
  227. * MACROS WRITEC.
  228.  
  229.  
  230. LSL1 SX6 X1+B1 ADVANCE LINE POINTER
  231. SA6 A1
  232. BX1 X6 CONVERT PAGE NUMBER
  233. RJ CDD CONVERT DECIMAL TO DISPLAY
  234. SA1 LSLB SET PAGE NUMBER ON OUTPUT
  235. BX6 X1-X6
  236. SA6 PGE
  237. WRITEC L,TTL WRITE LIST TITLE
  238. WRITEC L,STL WRITE LIST SUBTITLE
  239. WRITEC L,(=C* *) SKIP A LINE
  240. WRITEC L,(=C* *) SKIP A LINE
  241. SA1 LSLA RESTORE ADDRESS OF LINE
  242. SB2 X1
  243. LSL2 WRITEC L,B2 WRITE DATA LINE
  244.  
  245. LSL SUBR ENTRY/EXIT
  246. SA1 LN SET LINE NUMBER
  247. SA2 LP SET LINES PER PAGE
  248. SX6 X1+B1 ADVANCE LINE NUMBER
  249. SA6 A1
  250. IX1 X6-X2
  251. NG X1,LSL2 IF NO PAGE OVERFLOW
  252. SA1 PN SET PAGE NUMBER
  253. SX6 6 RESET LINE COUNT
  254. SX7 B2 SAVE ADDRESS OF LINE
  255. SA6 A6
  256. SA7 LSLA
  257. NZ X1,LSL1 IF NOT FIRST PAGE
  258. SB2 X2-80
  259. NG B2,LSL1 IF NOT 8 LINES/INCH
  260. WRITEC L,(=1LT) SET 8 LINES PER INCH
  261. SA1 PN SET PAGE NUMBER
  262. EQ LSL1 WRITE PAGE HEADER
  263.  
  264. LSLA BSS 1 ADDRESS OF DATA LINE
  265. LSLB CON 5L PAGE&5L PAGE NUMBER IDENTIFIER
  266. RDL SPACE 4
  267. ** RDL - READ DUMP LINE.
  268. *
  269. * ENTRY (B2) = OUTPUT WORD ADDRESS.
  270. * (B3) = OUTPUT WORD CHARACTER POSITION.
  271. * (X0) = PARTIAL ASSEMBLY.
  272. *
  273. * EXIT (X1) = EOR STATUS.
  274. *
  275. * USES A - 1, 2, 3, 4, 6, 7.
  276. * B - 2, 3, 4, 5, 6, 7.
  277. * X - ALL.
  278. *
  279. * MACROS READO.
  280.  
  281.  
  282. * ADD CHARACTER TRANSLATION OF MEMORY DUMP TO THE END
  283. * OF THE DUMP LINE.
  284.  
  285. RDL9 SA2 RDLB
  286. SA6 RDLA+1 SAVE INPUT STATUS
  287. SX6 B4
  288. MX3 -36
  289. SA6 A6-B1
  290. LX2 48
  291. BX6 -X3*X2
  292. BX4 X3*X2
  293. SA2 A2+B1
  294. BX7 X0+X6
  295. BX6 X4+X2
  296. SA2 A2+B1
  297. MX4 -12
  298. SA3 A2+B1
  299. SA7 B2
  300. SA6 B2+B1
  301. LX2 12
  302. LX3 24
  303. BX7 -X4*X3
  304. BX6 X4*X3
  305. BX7 X2+X7
  306. SA7 A6+B1
  307. SA6 A7+B1
  308. MX7 0 SET LINE TERMINATOR
  309. SA7 A7+2
  310.  
  311. RDL SUBR ENTRY/EXIT
  312. SA1 RDLA SET INPUT WORD STATUS
  313. MX2 -4
  314. MX3 -7
  315. SB5 16
  316. SA4 A1+B1
  317. SB4 X1
  318. BX5 X5-X5
  319. BX6 X4
  320. SB6 B1+B1
  321. SB7 RDLB
  322. RDL1 ZR B4,RDL8 IF END OF INPUT WORD
  323. LX6 8 EXTRACT NEXT 4 BITS
  324. SB4 B4-B1
  325. RDL2 BX1 -X2*X6
  326. SB6 B6-B1
  327. LX6 4 NEXT 4 BITS
  328. SX7 X1-10 CONVERT HEX DIGIT
  329. SX4 1R0+X1
  330. NG X7,RDL3 IF DIGIT LESS THAN 10
  331. SX4 1RA+X7
  332. RDL3 BX1 -X2*X6
  333. LX4 X4,B3
  334. SB3 B3-6
  335. SX7 X1-10
  336. SX1 1R0+X1
  337. NG X7,RDL4 IF DIGIT LESS THAN 10
  338. SX1 1RA+X7
  339. RDL4 BX0 X0+X4
  340. BX4 -X3*X6 CONVERT CHARACTER
  341. SX4 1R
  342. LX1 X1,B3
  343. LX5 6
  344. BX0 X0+X1
  345. BX5 X5+X4
  346. NZ B3,RDL5 IF OUTPUT WORD NOT FULL
  347. SB3 60
  348. BX7 X0
  349. MX0 0
  350. SA7 B2
  351. SB2 B2+B1
  352. RDL5 SB3 B3-6
  353. NZ B6,RDL1 IF 4 DIGITS NOT DONE
  354. SB3 B3-6 ADD SPACES
  355. SX1 2R
  356. LX1 X1,B3
  357. BX0 X0+X1
  358. SB5 B5-B1
  359. SB6 B1+B1
  360. NZ B3,RDL6 IF OUTPUT WORD NOT FULL
  361. SB3 60
  362. BX7 X0
  363. MX0 0
  364. SA7 B2
  365. SB2 B2+B1
  366. RDL6 SX7 B5 CHECK WORD
  367. MX1 -2
  368. SB3 B3-6
  369. BX1 -X1*X7
  370. NZ X1,RDL7 IF NOT 4TH WORD
  371. BX7 X5 STORE CONVERSION
  372. SA7 B7
  373. MX5 0
  374. SB7 B7+B1
  375. RDL7 NZ B5,RDL1 IF NOT 8 WORDS
  376. EQ RDL9 ADD CHARACTER TRANSLATION
  377.  
  378. * READ NEXT WORD.
  379.  
  380. RDL8 READO N
  381. MX2 -4
  382. SB4 4
  383. MX3 -7
  384. LX6 8
  385. ZR X1,RDL2 IF NOT EOR
  386. BX7 X0
  387. SA7 B2
  388. EQ RDL9 ADD CHARACTER TRANSLATION
  389.  
  390. RDLA CON 0,0 INPUT WORD STATUS
  391. RDLB BSS 4 CHARACTER TRANSLATION STORAGE
  392. SPACE 4
  393. ** COMMON DECKS.
  394.  
  395.  
  396. *CALL COMCCDD
  397. *CALL COMCCIO
  398. *CALL COMCMVE
  399. *CALL COMCRDO
  400. *CALL COMCRDW
  401. *CALL COMCSYS
  402. *CALL COMCWTC
  403. *CALL COMCWTW
  404. SPACE 4
  405. ** BUFFERS.
  406.  
  407.  
  408. USE //
  409. SEG
  410.  
  411. LB1 BSS 15 LINE BUFFER 1
  412. LB2 BSS 15 LINE BUFFER 2
  413. LFB EQU * LIST FILE BUFFER
  414. NMB EQU LFB+LFBL MEMORY BUFFER
  415. RFL= EQU NMB+NMBL+100B
  416. PRS SPACE 4
  417. ** PRS - PRESET PROGRAM.
  418.  
  419.  
  420. PRS SUBR ENTRY/EXIT
  421. SB1 1
  422. SA1 N SET E=0 IN THE FET
  423. MX0 3
  424. BX6 -X0*X1
  425. SA6 A1+
  426. SX7 LINP SET LINES/PAGE
  427. SA7 LP
  428. SX6 A0+ SET FIELD LENGTH
  429. SA6 N+4
  430. MOVE PRSB,PRSA,2 COPY FILE ACCESS LIST
  431. SA1 CCDR UNPACK CONTROL STATEMENT
  432. SB2 ISB INPUT STRING BUFFER
  433. RJ UCS UNPACK C-FORMAT TO S-FORMAT
  434. RJ ARG PROCESS ARGUMENTS
  435. DATE DTE GET CURRENT DATE
  436. CLOCK TME GET CURRENT TIME
  437.  
  438. * FORM PAGE TITLE LINE USING CHANNEL.
  439.  
  440. SA1 TTL+2 SET CHANNEL IN TITLE
  441. SA2 N
  442. MX3 -5
  443. LX3 -12
  444. BX2 -X3*X2
  445. MX3 -3
  446. LX3 -12
  447. BX4 -X3*X2
  448. LX2 3
  449. LX3 6
  450. BX7 -X3*X2
  451. IX6 X1+X4
  452. IX6 X6+X7
  453. SA6 A1
  454. SA2 A2
  455. SA1 NA SET CCC ADDRESSES
  456. SA3 NL
  457. LX1 12
  458. LX3 30
  459. BX6 X2+X1
  460. BX6 X6+X3
  461. SA6 A2
  462. SA1 CCHF CHECK FOR CONCURRENT CHANNEL
  463. NZ X1,PRS1 IF A CONCURRENT CHANNEL
  464. SYSTEM DCC,R,N CALL *DCC*
  465. EQ PRSX RETURN
  466.  
  467. PRS1 SYSTEM CPM,R,PRSC,140B*100B
  468. RECALL N WAIT FOR DUMP COMPLETE
  469. EQ PRSX RETURN
  470.  
  471. PRSA BSS 0 FILE ACCESS LIST
  472. CON 0LOUTPUT+L
  473. CON 0
  474. PRSB EQU *-PRSA
  475. PRSC VFD 36/0,12/0,12/0
  476. VFD 18/3RDCC,6/40B,36/N
  477.  
  478. * USED BY TCS.
  479.  
  480. EC CON 0 ERROR COUNTER
  481. EM CON 0 ERROR MESSAGE
  482. EP CON 0 ERROR POINTER
  483. CST SPACE 4
  484. ** CONTROL STATMENT TABLE.
  485.  
  486.  
  487. CST BSS 0
  488. CON 0LL L = LIST FILE
  489. VFD 6/,18/L,18/PRSA,18/AFN
  490. CON 0LCH CH = CHANNEL NUMBER
  491. CON ACH
  492. CON 0LC C = CHANNEL NUMBER
  493. CON ACH
  494. CON 0
  495. ABT SPACE 4
  496. ** ABT - ABORT JOB.
  497. *
  498. * ENTRY (X7) = DAYFILE MESSAGE ADDRESS.
  499. *
  500. * EXIT JOB ABORTED.
  501. *
  502. *
  503. * MACROS ABORT, MESSAGE.
  504.  
  505.  
  506. ABT MESSAGE X7
  507. ABORT
  508. ACH SPACE 4
  509. ** ACH - ASSEMBLE CHANNEL.
  510. *
  511. * ENTRY (X5) = PARAMETER SEPARATOR.
  512. * (A5) = ADDRESS OF PARAMETER SEPARATOR IN LIST.
  513. *
  514. * EXIT (N) = CONVERTED CHANNEL NUMBER.
  515. * (A5) = ADDRESS OF PARAMETER LIST.
  516. *
  517. * ERROR *ERM* CALLED IF PARAMETER ERROR.
  518. * (X7) = ERROR MESSAGE ADDRESS.
  519. *
  520. * USES A - 1, 6, 5.
  521. * B - 2, 3.
  522. * X - 1, 5, 6, 7.
  523. *
  524. * CALLS ASD, ERM.
  525.  
  526.  
  527. ACH SB2 X5-1R= CHECK SEPARATOR
  528. SX7 =C* EQUIVALENCE MISSING.*
  529. NZ B2,ERM IF NOT *=*
  530. SA5 A5+1 ASSEMBLE CHANNEL
  531. SX6 X5-1RC
  532. ZR X6,ACH2 IF CONCURRENT CHANNEL
  533. RJ ASD ASSEMBLE OCTAL DIGITS
  534. SB2 X6-34B CHECK CHANNEL
  535. SB3 X6-20B
  536. SX7 =C* INCORRECT CHANNEL NUMBER.*
  537. PL B2,ERM IF CHANNEL NUMBER OUT OF RANGE
  538. PL B3,ACH1 IF CHANNEL IN RANGE
  539. SB2 X6-14B
  540. PL B2,ERM IF CHANNEL OUT OF RANGE
  541. ACH1 SA1 N SET CHANNEL IN REQUEST
  542. MX7 -6
  543. LX1 -48
  544. BX1 X7*X1
  545. BX6 X1+X6
  546. LX6 48
  547. SA6 A1
  548. EQ TCSX RETURN
  549.  
  550. ACH2 SA5 A5+1
  551. RJ ASD
  552. SX7 =C* INCORRECT CHANNEL NUMBER.*
  553. SB2 X6-12B
  554. PL B2,ERM IF CHANNEL OUT OF RANGE
  555. SX6 X6+40B SET CONCURRENT BIAS
  556. BX7 X6
  557. LX7 12 SET CHANNEL IN *CPM* CALL
  558. SA7 PRSC
  559. SA7 CCHF FLAG CONCURRENT CHANNEL
  560. SA1 =10H CCC, CHH
  561. BX7 X1
  562. SA7 TTL+1 SET NEW TITLE LINE
  563. EQ ACH1 SET CHANNEL IN *DCC* CALL
  564. AFN SPACE 4
  565. ** AFN - ASSEMBLE FILE NAME.
  566. *
  567. * ENTRY (X5) = PARAMETER SEPARATOR.
  568. * (A5) = ADDRESS OF PARAMETER SEPARATOR IN LIST.
  569. * (X2) = TRANSLATION TABLE ENTRY.
  570. *
  571. * EXIT FILENAME SET IN *FET* (*0* = NO FILE).
  572. *
  573. * USES A - 1, 5, 7.
  574. * B - 2, 3.
  575. * X - 0, 1, 2, 5, 6, 7.
  576. *
  577. * CALLS ASN.
  578.  
  579.  
  580. AFN SB2 X5-1R= CHECK SEPARATOR
  581. AX2 18 GET ASSUMED FILE NAME
  582. SA1 X2
  583. AX2 18 SET FET ADDRESS
  584. MX6 42
  585. SB3 X2
  586. BX6 X6*X1
  587. NZ B2,AFN1 IF NOT *=*
  588. SA5 A5+B1 SKIP SEPARATOR
  589. BX0 X2
  590. RJ ASN ASSEMBLE NAME
  591. NZ X7,AFN3 IF ERROR IN FILE NAME
  592. SX7 1R0 CHECK NAME
  593. LX7 54
  594. BX2 X0
  595. BX7 X7-X6
  596. ZR X7,AFN2 IF *0*
  597. AFN1 SA1 X2 REPLACE FILE NAME
  598. MX7 42
  599. BX1 -X7*X1
  600. BX7 X1+X6
  601. NZ X1,AFN2 IF STATUS IS SET
  602. SX1 B1
  603. BX7 X1+X6
  604. AFN2 SA7 X2
  605. EQ TCSX RETURN
  606.  
  607. AFN3 SX7 =C* UNRECOGNIZED FILE NAME.*
  608. EQ ERM
  609. ARG SPACE 4
  610. ** ARG - PROCESS ARGUMENTS.
  611. *
  612. * ENTRY (ISB) = STRING BUFFER CONTAINING CONTROL CARD IMAGE.
  613. *
  614. * EXIT (X1) = ZERO.
  615. * ALL PARAMETERS PROCESSED.
  616. *
  617. * ERROR *ABT* CALLED IF PARAMETER ERROR.
  618. * (X7) = ERROR MESSAGE ADDRESS.
  619. *
  620. * USES A - 1, 2, 3, 4, 5.
  621. * B - 2, 3.
  622. * X - ALL.
  623. *
  624. * CALLS ABT, ASN, TCS.
  625. *
  626. * MACROS MESSAGE.
  627.  
  628.  
  629. ARG SUBR ENTRY/EXIT
  630. SA5 ISB FIRST CHARACTER
  631. RJ ASN ASSEMBLE NAME
  632. ARG1 SB2 X5-1R)
  633. SB3 X5-1R.
  634. ZR B2,ARGX IF END OF COMMAND
  635. ZR B3,ARGX IF END OF COMMAND
  636. SA5 A5+1 SKIP SEPARATOR
  637. SX0 CST
  638. RJ TCS TRANSLATE CONTROL STATEMENT
  639. SA1 EM
  640. ZR X1,ARG1 LOOP IF NO ERROR MESSAGE
  641. MESSAGE X1
  642. SX7 ARGA
  643. EQ ABT ABORT JOB
  644.  
  645. ARGA DATA C* CONTROL STATEMENT ERROR.*
  646. ASD SPACE 4
  647. ** ASD - ASSEMBLE DIGITS.
  648. *
  649. * ENTRY (X5) = FIRST CHARACTER TO ASSEMBLE.
  650. * (A5) = ADDRESS OF CHARACTER STRING.
  651. * (B2) = ZERO IF OCTAL BASE ASSUMED.
  652. * = NON-ZERO IF DECIMAL BASE ASSUMED.
  653. *
  654. * EXIT (X6) = ASSEMBLED DIGITS.
  655. * (X5) = NEXT CHARACTER TO BE PROCESSED.
  656. * (A5) = ADDRESS OF NEXT CHARACTER.
  657. *
  658. * ERROR *ERM* CALLED IF VALUE ERROR.
  659. * (X7) = ERROR MESSAGE ADDRESS.
  660. *
  661. * USES A - 5, 6.
  662. * B - 2, 3, 4, 5, 6.
  663. * X - 1, 2, 3, 5, 6, 7.
  664. *
  665. * CALLS ERM.
  666.  
  667.  
  668. ASD1 LX3 X7,B4 DECIMAL*10
  669. SX5 X5+B3 CONVERT CHARACTER
  670. IX7 X3+X7
  671. LX6 3 OCTAL*8
  672. LX7 1
  673. BX6 X6+X5 OCTAL+NEW DIGIT
  674. IX7 X7+X5 DECIMAL+NEW DIGIT
  675. AX5 3 NOTE *8*/*9*
  676. SB5 B5+X5
  677. SA5 A5+B1 NEXT CHARACTER
  678. SB6 X5 CHECK CHARACTER
  679. LX3 X1,B6
  680. NG X3,ASD1 IF DIGIT
  681. SX1 X5-1RD CHECK NEXT CHARACTER
  682. SX2 X5-1RB
  683. NZ X1,ASD2 IF NOT *D*
  684. SA5 A5+B1 SKIP CHARACTER
  685. BX6 X7 RETURN DECIMAL
  686. EQ ASDX RETURN
  687.  
  688. ASD2 NZ X2,ASD3 IF NOT *B*
  689. SA5 A5+1 SKIP CHARACTER
  690. ZR B5,ASDX IF *8*/*9* NOT PRESENT
  691. SX7 =C* 8/9 NOT ALLOWED IN OCTAL FIELD.*
  692. EQ ERM PROCESS ERROR
  693.  
  694. ASD3 SB2 B2+B5 SET BASE
  695. ZR B2,ASDX IF OCTAL
  696. BX6 X7 RETURN DECIMAL
  697.  
  698. ASD SUBR ENTRY/EXIT
  699. MX1 10 MASK FOR *0* - *9*
  700. SB3 -1R0
  701. SB4 B1+B1
  702. LX1 -1R0
  703. SX6 A5 SET ERROR POINTER
  704. SB5 B0 CLEAR *8*/*9* PRESENCE
  705. SB6 X5 CHECK CHARACTER
  706. MX7 0 CLEAR DECIMAL ASSEMBLY
  707. SA6 EP
  708. BX6 X6-X6 CLEAR OCTAL ASSEMBLY
  709. LX3 X1,B6
  710. NG X3,ASD1 IF DIGIT
  711.  
  712. SX7 =C* NUMERIC FIELD MUST NOT BE BLANK.*
  713. EQ ERM PROCESS ERROR
  714. ASN SPACE 4
  715. ** ASN - ASSEMBLE NAME.
  716. *
  717. * ENTRY (X5) = FIRST CHARACTER IN NAME.
  718. * (A5) = ADDRESS OF FIRST CHARACTER.
  719. *
  720. * EXIT (X6) = ASSEMBLED NAME.
  721. * (X5) = NEXT CHARACTER TO BE PROCESSED.
  722. * (A5) = ADDRESS OF NEXT CHARACTER.
  723. * (X7) = 0, IF NO ERROR.
  724. * (X7) = 1, IF ERROR ENCOUNTERED.
  725. *
  726. * USES A - 5, 7.
  727. * B - 2, 4.
  728. * X - 1, 2, 5, 6, 7.
  729.  
  730.  
  731. ASN1 LX5 X5,B2 MERGE
  732. NG B2,ASNX IF ASSEMBLY FULL
  733. BX6 X6+X5
  734. SA5 A5+B1 NEXT CHARACTER
  735. SB2 B2-6
  736. SB4 X5
  737. ASN2 AX2 X1,B4
  738. LX2 59
  739. NG X2,ASN1 IF LETTER OR DIGIT
  740. SX7 B0+ SET NO ERROR
  741.  
  742. ASN SUBR ENTRY/EXIT
  743. MX1 36 MASK FOR LETTERS AND DIGITS
  744. SB2 54
  745. BX6 X6-X6 CLEAR ASSEMBLY
  746. SX7 A5 SET ERROR POINTER
  747. LX1 37
  748. SB4 X5+
  749. SA7 EP
  750. SX7 B1+ PRESET ERROR
  751. EQ ASN2 ASSEMBLE NAME
  752. TCS SPACE 4
  753. ** TCS - TRANSLATE CONTROL STATEMENT.
  754. *
  755. * ENTRY (X0) = ADDRESS OF STATEMENT TRANSLATION TABLE.
  756. *
  757. * EXIT PROCESSOR DEFINED FOR PARAMETER ENTERED.
  758. *
  759. * ERROR *ERM* CALLED PROCESSOR NOT DEFINED FOR PARAMETER.
  760. * (X7) = ERROR MESSAGE ADDRESS.
  761. *
  762. * USES A - 1, 2, 6, 7.
  763. * B - 2.
  764. * X - 1, 2, 3, 6, 7.
  765. *
  766. * CALLS ERM.
  767.  
  768.  
  769. ERM SA2 EC ADVANCE ERROR COUNTER
  770. SA7 EM SET ERROR MESSAGE ADDRESS
  771. SX6 X2+B1
  772. SA6 A2
  773.  
  774. TCS SUBR ENTRY/EXIT
  775. RJ ASN ASSEMBLE NAME
  776. NZ X7,TCS1.1 IF ERROR
  777. SA1 X0 START NAME SEARCH
  778. TCS1 BX3 X1-X6
  779. SA2 A1+B1
  780. ZR X3,TCS2 IF MATCH FOUND
  781. SA1 A2+B1 NEXT ENTRY
  782. NZ X1,TCS1 LOOP TO END OF TABLE
  783. TCS1.1 SX7 TCSA
  784. EQ ERM
  785.  
  786. TCS2 SB2 X2 PROCESS STATMENT
  787. JP B2
  788.  
  789. TCSA DATA C* INCORRECT DIRECTIVE NAME.*
  790. UCS SPACE 4
  791. ** UCS - UNPACK C-FORMAT TO S-FORMAT.
  792. *
  793. * UCS UNPACKS A C-FORMAT LINE TO AN S-FORMAT LINE (1 CHARACTER/
  794. * WORD). TRAILING SPACES ARE DELETED, AND THE END OF LINE IS
  795. * MARKED BY A NEGATIVE WORD (BITS 0-58 = 0, BIT 59 = 1).
  796. *
  797. * ENTRY (A1) = FIRST WORD ADDRESS OF C-FORMAT BUFFER.
  798. * (X1) = FIRST WORD OF C-FORMAT BUFFER.
  799. * (B2) = FIRST WORD ADDRESS OF S-FORMAT BUFFER.
  800. *
  801. * EXIT (A1) = ADDRESS OF LAST WORD OF C-FORMAT BUFFER.
  802. * (A6) = ADDRESS+1 OF LAST CHARACTER OF S-FORMAT BUFFER.
  803. *
  804. * USES A - 1, 2, 3, 6, 7.
  805. * B - 3, 4.
  806. * X - 0, 1, 2, 3, 5, 6, 7.
  807.  
  808.  
  809. UCS SUBR ENTRY/EXIT
  810. SA2 B2-B1 PRESET A6
  811. MX3 1
  812. SB3 -1R
  813. SX6 B0
  814. BX7 X2
  815. MX2 -6
  816. SA6 A2
  817. SX0 1R
  818. UCS1 LX1 6 NEXT CHARACTER
  819. BX6 -X2*X1
  820. LX3 6
  821. BX1 X2*X1
  822. IX5 X6-X0
  823. ZR X5,UCS1.5 IF LEADING SPACE
  824. SA6 A6+B1
  825. SX0 3R
  826. UCS1.5 PL X3,UCS2 IF NOT END OF WORD
  827. SA1 A1+1 NEXT WORD
  828. UCS2 NZ X6,UCS1 IF NOT ZERO CHARACTER
  829. NZ X1,UCS1 IF NOT END OF LINE
  830. NG X1,UCS1 GET NEXT CHARACTER
  831. SA3 A6-B1 DELETE TRAILING SPACES
  832. MX6 1
  833. UCS3 SB4 X3+B3
  834. SA3 A3-B1
  835. ZR B4,UCS3 IF NEXT CHARACTER ZERO
  836. SX3 -B3
  837. SA7 A2+ RESTORE WORD BEFORE LINE
  838. BX6 X6+X3
  839. SA6 A3+2 SET END OF LINE
  840. EQ UCSX RETURN
  841. CON 0
  842. ISB EQU * STRING BUFFER
  843. SPACE 4
  844. END
cdc/nos2.source/opl871/dmpccc.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator