User Tools

Site Tools


cdc:nos2.source:opl871:lo72

Table of Contents

LO72

Table Of Contents

  • [00009] LO72 - COMPRESS OUTPUT FILES.
  • [00010] PROGRAM DOCUMENTATION.
  • [00011] LIST OUTPUT 72 COLUMNS.
  • [00146] MACROS AND ASSEMBLY CONSTANTS.
  • [00159] FETS, BUFFERS, AND STORAGE AREAS.
  • [00203] LO72 - MAIN PROGRAM.
  • [00204] MAIN PROGRAM LOOP.
  • [00235] PEJ - PAGE EJECT AND SET HEADER LINE.
  • [00281] BATCH SUBROUTINES.
  • [00283] BAT1 - SET UP MISC. SOURCE INPUT.
  • [00301] COMPASS SUBROUTINES.
  • [00303] CKS - CHECK SUBTITLE.
  • [00337] LSL - LIST A LINE FROM COMPASS.
  • [00426] STA - LIST STORAGE ALLOCATION
  • [00446] REF - LIST CROSS REFERENCE TABLE.
  • [00500] MODIFY SUBROUTINES.
  • [00502] LMO - PROCESS MODIFICATIONS
  • [00517] DKS - PROCESS DECK STATUS
  • [00587] STS - PROCESS STATISTICS
  • [00608] GENERAL SUBROUTINES.
  • [00609] BOB - BLANK OUTPUT BUFFER
  • [00635] MMS - MOVE MAIN SECTIONS
  • [00719] PRESET SUBROUTINES.
  • [01036] TERMINAL I/O ROUTINE.
  • [01038] CKI - CHECK INPUT FROM TTY.
  • [01409] SFP - SET FET PARAMETERS
  • [01438] SOB - STRIP OFF BLANKS

Source Code

LO72.txt
  1. IDENT LO72,FETS,LO72
  2. *COMMENT LO72 - COMPASS REFORMATTER.
  3. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  4. ABS
  5. SST
  6. ENTRY LO72
  7. ENTRY RFL=
  8. SYSCOM B1 DEFINE (B1) = 1
  9. TITLE LO72 - COMPRESS OUTPUT FILES.
  10. TITLE PROGRAM DOCUMENTATION.
  11. *** LO72 - LIST OUTPUT 72 COLUMNS.
  12. *
  13. * J. K. DOWTY, JR. 70/08/01.
  14. *
  15. SPACE 4
  16. *** LIST OUTPUT 72 (LO72) IS A UTILITY PROGRAM WHICH CAN
  17. * BE USED TO RE-FORMAT FILES ORIGINALLY INTENDED FOR A
  18. * LINE PRINTER. PROPER USE OF THE PARAMETERS ALLOWS THE
  19. * USER TO REARRANGE EACH OUTPUT LINE AS HE DESIRES, OR
  20. * THE PROGRAM WILL SELECT DEFAULT VALUES ACCORDING TO
  21. * THE TYPE OF SOURCE INPUT. THE DEFAULT VALUES COMPRESS
  22. * ALL OUTPUT TO 72 COLUMNS FOR LISTING ON A TELETYPE.
  23. * IF THE JOB ORIGINATED FROM A TELETYPE, LO72 WILL
  24. * ASK THE ORIGINATOR IF HE DESIRES TO CHANGE ANY OF THE
  25. * RE-FORMAT PARAMETERS. IF HE ENTERS *YES* THE PROGRAM
  26. * PRINTS THE CURRENT NAME OF THE INPUT FILE ON HIS TTY AND
  27. * THE USER CAN THEN ENTER THE NEW FILE NAME OR JUST *CR*
  28. * (CARRIAGE RETURN). THE *CR* WILL NOT CHANGE ANYTHING AND
  29. * THE PROGRAM WILL OUTPUT THE NEXT VALUE. THIS PROCEDURE
  30. * CONTINUES UNTIL ALL THE PARAMETERS HAVE BEEN COVERED.
  31. * IF AN *I* PARAMETER IS SPECIFIED, I.E. LO72(I=FNAME),
  32. * THEN EACH RECORD OF FILE *FNAME* MUST END WITH A
  33. * TERMINATOR CHARACTER. THE FOLLOWING EXAMPLE OF FILE
  34. * *FNAME* REQUESTS LO72 TO READ A COMPASS TYPE SOURCE FILE
  35. * *SOURCE*, RE-FORMAT IT TO WRITE A 105 CHARACTER LINE
  36. * CONTAINING THE "P" ADDRESS (N1), THE OCTAL WORD
  37. * REPRESENTATION (N2), AND THE CONTENTS OF EACH COMMAND (N3)
  38. * TO THE OUTPUT FILE *OUTFILE*. THE OUTPUT FILE WILL
  39. * EVENTUALLY BE LISTED ON A LINE PRINTER(LP), BUT IT IS NOT
  40. * TO BE REWOUND AT THIS TIME(NR).
  41. *
  42. * COL. NO. 1 2 3
  43. * 1 1 1 1
  44. * S=SOURCE,O=OUTFILE,T=C,H=105,LP,NR.
  45. * N1=7,N2=21,N3=73.
  46. * I1=9,I2=16,I3=40.
  47. * O1=1,O2=8,O3=29.
  48. * EOF.
  49. *
  50. SPACE 4
  51. *** THE COMMAND.
  52. *
  53. * LO72(I,S,L,T,H,NR)
  54. SPACE 4
  55. *** PARAMETERS.
  56. *
  57. * I RE-FORMAT PARAMETERS ARE ON FILE *INPUT*.
  58. * I=FNAME RE-FORMAT PARAMETERS ARE ON FILE *FNAME*.
  59. * I=0 RE-FORMAT PARAMETERS ARE ON THE COMMAND OR
  60. * SELECT THE APPROPRIATE DEFAULT VALUES.
  61. *
  62. * S DATA TO BE RE-FORMATTED IS ON FILE *SCR*.
  63. * S=FNAME DATA TO BE RE-FORMATTED IS ON FILE *FNAME*.
  64. *
  65. * L RE-FORMATTED DATA LISTED TO FILE *OUTPUT*.
  66. * L=FNAME RE-FORMATTED DATA LISTED TO FILE *FNAME*.
  67. *
  68. * T FILE TO BE RE-FORMATTED IS OF TYPE B(BATCH).
  69. * T=X FILE TO BE RE-FORMATTED IS OF TYPE X, WHERE X
  70. * CAN BE: M FOR MODIFY SOURCE DATA,
  71. * C FOR COMPASS SOURCE DATA, OR
  72. * B FOR MISCELLANEOUS SOURCE DATA.
  73. * T=0 FILE TYPE IS NOT GIVEN.
  74. *
  75. * H NUMBER OF CHARACTERS PER OUTPUT LINE IS 72.
  76. * H=X-X NUMBER OF CHARACTERS PER OUTPUT LINE IS X-X
  77. * (MAXIMUM ALLOWED IS 150 CHARACTERS).
  78. *
  79. * LP OUTPUT WILL BE FORMATTED FOR THE LINE PRINTER.
  80. *
  81. * NR OUTPUT FILE WILL NOT BE REWOUND.
  82. *
  83. * NX=Y SPECIFY NUMBER OF CHARACTERS TO BE MOVED.
  84. * X=1 THRU 6; Y = NUMBER OF CHARACTERS.
  85. *
  86. * IX=Y SPECIFY FIRST COLUMN OF DATA TO BE MOVED.
  87. * X=1 THRU 6; Y = COLUMN NUMBER.
  88. *
  89. * OX=Y SPECIFY FIRST COLUMN TO RECEIVE THE DATA.
  90. * X=1 THRU 6; Y = COLUMN NUMBER.
  91. *
  92. * IT IGNORE TERMINAL. IF SET, THE TERMINAL OPTION TO
  93. * ALTER COMMAND PARAMETERS WILL BE SUPPRESSED.
  94. *
  95. * NOTE: N1+N2+...+N6 MUST BE LESS THAN OR EQUAL TO H.
  96. *
  97. EJECT
  98. *** PARAMETER DEFAULT VALUES LISTED BY SOURCE FILE TYPES.
  99. * B(BATCH) C(COMPASS) M(MODIFY)
  100. *
  101. * I=0 I=0 I=0
  102. * S=SCR S=SCR S=SCR
  103. * L=OUTPUT L=OUTPUT L=OUTPUT
  104. * T=B T=C T=M
  105. * H=72 H=72 H=72
  106. * NR NOT SET NR NOT SET NR NOT SET
  107. * LP NOT SET LP NOT SET LP NOT SET
  108. * N1=72 N1=7 N1=2
  109. * N2 THRU N6=0 N2=50 N2=48
  110. * I1=1 N3=15 N3=22
  111. * I2 THRU I6=0 N4 THRU N6=0 N4 THRU N6=0
  112. * O1=1 I1=9 I1=6
  113. * O2 THRU O6=0 I2=41 I2=10
  114. * I3=112 I3=82
  115. * I4 THRU I6=0 I4 THRU I6=0
  116. * O1=1 O1=1
  117. * O2=8 O2=3
  118. * O3=58 O3=51
  119. * O4 THRU O6=0 O4 THRU O6=0
  120. *
  121. SPACE 4
  122. *** DAYFILE MESSAGES.
  123. *
  124. * *ARGUMENT ERROR.* = ARGUMENT PROCESSOR *COMCARG* RETURNED AN
  125. * ERROR STATUS. CORRECT AND RE-SUBMIT THE JOB.
  126. * *INPUT FILE ERROR.* = AN ERROR WAS ENCOUNTERED BY *COMCUPC*
  127. * (UNPACK COMMAND) WHILE UNPACKING AN INPUT RECORD.
  128. * *UNRECOGNIZABLE TYPE SPECIFIED.* = THE TYPE SPECIFIED WAS
  129. * NOT *B*, *C*, OR *M*.
  130. * *FILE NAME CONFLICT.* = SOURCE AND OUTPUT FILE NAMES
  131. * ARE THE SAME.
  132. * *IX OR OX NOT DEFINED.* = THE *I* OR *O* PARAMETER WAS
  133. * NOT SPECIFIED FOR A SPECIFIED *N*, AND THERE ARE
  134. * NO DEFAULTS.
  135. * *INCORRECT PARAMETER.* = THE *S* OR *L* PARAMETER
  136. * WERE ENTERED AS ZERO.
  137. * *H VALUE INCORRECT.* = THE *H* PARAMETER ENTERED WAS
  138. * ZERO OR GREATER THAN BUFFER LENGTH.
  139. * *INCORRECT LINE LENGTH.* = ONE OF THE FOLLOWING OUT
  140. * OF BOUNDS CONDITIONS EXISTS WITH RESPECT TO
  141. * *IX*, *NX*, *OX* AND *H*.
  142. * WHERE X = 1...6.
  143. * ( O(X) + N(X) .GT. H ) OR
  144. * ( I(X) + N(X) .GT. BUFFER LENGTH ).
  145.  
  146. TITLE MACROS AND ASSEMBLY CONSTANTS.
  147. **** ASSEMBLY CONSTANTS.
  148. IBUFL EQU 1001B
  149. OBUFL EQU 1001B
  150. IBUFF EQU 101B
  151. NPM EQU 6 NUMBER OF MOVES POSSIBLE
  152. ****
  153. SPACE 4
  154. * COMMON DECKS.
  155.  
  156.  
  157. *CALL COMCMAC
  158. *CALL COMSTCM
  159. TITLE FETS, BUFFERS, AND STORAGE AREAS.
  160. **** FETS AND BUFFERS.
  161. ORG 103B
  162. FETS BSS 0
  163.  
  164. S BSS 0
  165. SCR FILEC IBUF,IBUFL
  166.  
  167. O BSS 0
  168. OUTPUT FILEC OBUF,OBUFL
  169.  
  170. XBUF BSS 150
  171. XBUFL EQU *-XBUF
  172.  
  173. YBUF BSS 150
  174. YBUFL EQU *-YBUF
  175.  
  176. FETSL BSS 0
  177. ****
  178.  
  179. ** STORAGE AREA FOR INPUT VALUES.
  180. N1 CON 1R*
  181. N2 CON 1R*
  182. N3 CON 1R*
  183. N4 CON 1R*
  184. N5 CON 1R*
  185. N6 CON 1R*
  186. I1 DATA 0
  187. I2 DATA 0
  188. I3 DATA 0
  189. I4 DATA 0
  190. I5 DATA 0
  191. I6 DATA 0
  192. O1 DATA 0
  193. O2 DATA 0
  194. O3 DATA 0
  195. O4 DATA 0
  196. O5 DATA 0
  197. O6 DATA 0
  198.  
  199. T VFD 60D/1LB TYPE
  200. H VFD 60D/2L72 NUMBER OF CHARS./LINE
  201. LP DATA 0 LINE PRINTER FLAG
  202. NR DATA 0 NO REWIND FLAG(OUTPUT FILE ONLY)
  203. TITLE LO72 - MAIN PROGRAM.
  204. ** LO72 - MAIN PROGRAM LOOP.
  205. *
  206. * EXIT- OUTPUT STRING BUFFER WRITTEN TO CIO BUFFER.
  207. *
  208. * USES- X - 1, 6.
  209. * B - 1, 2.
  210. * A - 0, 1.
  211.  
  212.  
  213. LO721 READ S,R
  214. EQ LO723
  215.  
  216. LO722 SA1 H
  217. WRITES O,YBUF,X1
  218. LO723 READS S,XBUF,XBUFL
  219. NG X1,LO724 IF EOF
  220. NZ X1,LO721 IF EOR
  221. SA1 XBUF
  222. SX6 X1-1R1
  223. ZR X6,PEJ
  224. SB2 A0 PROCESS A LINE
  225. JP B2
  226.  
  227. LO724 WRITEF O
  228. SA1 NR
  229. NZ X1,LO725
  230. REWIND O
  231. LO725 MESSAGE (=C* LO72 COMPLETE.*)
  232. ENDRUN R
  233. EJECT
  234.  
  235. ** PEJ - PAGE EJECT AND SET HEADER LINE.
  236. *
  237. * EXIT (A0) = ADDRESS OF THE NEXT ROUTINE.
  238. * PAGE EJECT AND HEADER LINE IN OUTPUT STRING BUFFER.
  239. * USES X - 1, 2, 3, 5, 7.
  240. * B - 1, 2, 7.
  241. * A - 0, 1, 2, 3, 5.
  242.  
  243.  
  244. PEJ RJ BOB BLANK OUTPUT BUFFER
  245. SA5 LP
  246. ZR X5,PEJ0 IF FLAG NOT SET
  247. MOVE 1,XBUF,YBUF
  248. EQ PEJ0.5
  249.  
  250. PEJ0 WRITEC O,EJCT
  251. PEJ0.5 MOVE 42,XBUF+8,YBUF+X5
  252. MOVE 20,XBUF+90,YBUF+42
  253. MOVE 5,XBUF+115,YBUF+62
  254. MOVE 5,XBUF+121,YBUF+67
  255. SA1 T
  256. SB2 X1
  257. JP B2
  258.  
  259. PEJ1 SA0 CKS CHECK SUBTITLE LINE
  260. EQ LO722
  261. PEJ2 SB7 XBUF+10 SET ADDRESS
  262. RJ ASC ASSEMBLE CHARACTERS
  263. SA2 PEJA GET FIRST LIST AREA
  264. SB2 B1+B1
  265. PEJ3 BX7 X1-X2
  266. SA3 A2+B1
  267. ZR X2,PEJ4 IF CHARACTERS MATCH AREA
  268. SA2 A2+B2
  269. NZ X7,PEJ3
  270. PEJ4 SA0 X3 SET THE ADDRESS
  271. EQ LO722
  272.  
  273. PEJ5 SA0 BAT1 SET BATCH ADDRESS
  274. EQ LO722
  275.  
  276. EJCT CON 0
  277. PEJA VFD 24D/4LDECK,36D/0
  278. VFD 42D/0,18D/DKS
  279. CON 10HSTATISTICS,STS
  280. CON 0,LMO
  281. TITLE BATCH SUBROUTINES.
  282.  
  283. ** BAT1 - SET UP MISC. SOURCE INPUT.
  284. *
  285. * EXIT (A0) = ADDRESS OF THE NEXT ROUTINE.
  286. * SUBTITLE LINE IN OUTPUT STRING BUFFER.
  287. * USES X - 5.
  288. * B - NONE.
  289. * A - 0, 5.
  290.  
  291.  
  292. BAT1 RJ BOB
  293. SA5 LP
  294. MOVE 43,XBUF+8,YBUF+X5 SET UP SUBTITLE LINE
  295. SA0 BAT2
  296. MOVE 29,XBUF+70,YBUF+43
  297. EQ LO722
  298.  
  299. BAT2 RJ MMS
  300. EQ LO722
  301. TITLE COMPASS SUBROUTINES.
  302.  
  303. ** CKS - CHECK SUBTITLE.
  304. *
  305. * EXIT (A0) = ADDRESS OF THE NEXT ROUTINE.
  306. * SUBTITLE LINE IN OUTPUT STRING BUFFER.
  307. * USES - X - 1, 2, 3, 5, 7.
  308. * B - 1, 2, 7.
  309. * A - 0, 2, 3, 5.
  310.  
  311.  
  312. CKS RJ BOB
  313. SA5 LP
  314. MOVE 43,XBUF+8,YBUF+X5
  315. MOVE 29,XBUF+70,YBUF+43
  316. SB7 XBUF+8 SET ADDRESS
  317. RJ ASC ASSEMBLE CHARACTERS
  318. SA2 CKSA GET SUBTITLE
  319. SB2 B1+B1
  320. CKS1 BX7 X1-X2
  321. SA3 A2+B1 GET ASSOCIATED ADDRESS
  322. ZR X2,CKS2 IF LAST WORD
  323. SA2 A2+B2
  324. NZ X7,CKS1 IF SUBTITLES NOT EQUAL
  325. CKS2 SA0 X3
  326. EQ LO722
  327.  
  328. CKSA VFD 42D/7LSTORAGE,18D/0
  329. VFD 42D/0,18D/STA
  330. VFD 48D/8LSYMBOLIC,12D/0
  331. VFD 42D/0,18D/REF
  332. CKSB VFD 30D/5LERROR,30D/0
  333. VFD 42D/0,18D/LSL7
  334. CON 0,LSL
  335.  
  336. LSL SPACE 4
  337. ** LSL - LIST A LINE FROM COMPASS.
  338. *
  339. * EXIT (A0) = ADDRESS OF NEXT ROUTINE IF END CARD NOT FOUND.
  340. * A LINE OF COMPASS SOURCE CODE PROCESSED.
  341. * USES X - 0, 1, 2, 5, 6, 7.
  342. * B - 2, 3, 7.
  343. * A - 0, 1, 2, 5.
  344.  
  345.  
  346. LSL RJ MMS
  347. SB7 XBUF+50
  348. RJ ASC ASSEMBLE OP-CODE
  349. SA2 LSLA
  350. BX7 X1-X2
  351. NZ X7,LO722 IF NOT *END*
  352.  
  353. ** PROCESS -STORAGE USED-, ETC.
  354. *
  355. SA0 LSL2
  356. EQ LO722
  357.  
  358. LSL2 RJ BOB
  359. SB7 XBUF+40
  360. RJ ASC
  361. SA2 CKSA
  362. BX6 X1-X2
  363. NZ X6,LSL3 IF NOT -STORAGE USED- LINE
  364. MOVE 17,XBUF+80,2 SAVE -XXXXXXXXX SYMBOLS-
  365. SA5 LP
  366. MOVE 9,XBUF+27,YBUF+X5 -STORAGE USED-
  367. MOVE 13,XBUF+39,YBUF+10
  368. MOVE 22,XBUF+58,YBUF+23 -STATEMENTS-
  369. MOVE 27,XBUF+99,YBUF+45 -INVENTED SYMBOLS-
  370. EQ LO722
  371.  
  372. LSL3 SB7 XBUF+51
  373. RJ ASC
  374. ZR X1,LMO
  375. MX0 30
  376. BX1 X0*X1 MASK THE *S* IN *ERRORS*
  377. SA2 CKSB
  378. BX6 X1-X2
  379. ZR X6,LSL5 IF THERE WERE ASSEMBLY ERRORS
  380. SA5 LP
  381. MOVE 15,XBUF+38,YBUF+X5 -ASSEMBLY-
  382. MOVE 18,XBUF+59,YBUF+16 -SECONDS-
  383. MOVE 21,XBUF+80,YBUF+34 -REFERENCES-
  384. MOVE 17,2,YBUF+55 -SYMBOLS-
  385. MOVE 8,XBUF+29,2
  386. EQ LO722
  387.  
  388. LSL5 SA5 LP
  389. MOVE 55,XBUF+40,YBUF+X5 -ERRORS IN-
  390. EQ LO722
  391.  
  392. ** PROCESS ERROR DIRECTORY
  393. *
  394. LSL7 SA1 XBUF+21
  395. SX1 X1-1R
  396. ZR X1,LMO
  397. RJ BOB
  398. SA5 LP
  399. MOVE 13,XBUF+14,YBUF+X5 -TYPE ERROR-
  400. MOVE 59,XBUF+40,YBUF+14 DESCRIPTION OF ERROR
  401. SA0 LSL8
  402. EQ LO722
  403.  
  404. LSL8 SB7 XBUF+21
  405. RJ ASC
  406. SA2 CKSB
  407. BX6 X1-X2
  408. ZR X6,LSL7 IF *ERROR*
  409. RJ BOB
  410. SA5 LP
  411. MOVE 18,XBUF+21,YBUF+X5
  412. MX0 1
  413. LX0 6
  414. SB2 XBUF+44
  415. SB3 YBUF+18
  416. LSL9 MOVE 6,B2,B3 MOVE THE PAGE NUMBERS
  417. LX0 6
  418. SB2 B2+10
  419. SB3 B3+6
  420. PL X0,LSL9
  421. EQ LO722
  422.  
  423. LSLA VFD 18D/3LEND,42D/0
  424.  
  425. STA SPACE 4
  426. ** STA - LIST STORAGE ALLOCATION
  427. *
  428. * EXIT STORAGE ALLOCATION CODE PROCESSED.
  429. * USES X - 1, 5, 6.
  430. * B - NONE.
  431. * A - 1, 5.
  432.  
  433.  
  434. STA RJ BOB
  435. SA5 LP
  436. SA1 XBUF+26 CHECK LINE TYPE
  437. SX6 X1-1R
  438. ZR X6,STA1 IF NOT ALLOCATION
  439. MOVE 72,XBUF+18,YBUF+X5
  440. EQ LO722
  441.  
  442. STA1 MOVE 72,XBUF+38,YBUF+X5
  443. EQ LO722
  444.  
  445. REF SPACE 4
  446. ** REF - LIST CROSS REFERENCE TABLE.
  447. *
  448. * EXIT CROSS REFERENCE TABLE CODE PROCESSED.
  449. * USES X - 1, 5, 6, 7.
  450. * B - 1, 2, 3, 4.
  451. * A - 1, 5, 7.
  452.  
  453.  
  454. REF RJ BOB
  455. SA1 6 CHECK FOR EXTRA PAGE/LINE
  456. SX6 X1-1R
  457. ZR X6,REF2 IF NONE SAVED
  458. SA1 XBUF+22
  459. SX6 X1-1R
  460. ZR X6,REF1 IF NOT NEW SYMBOL LINE
  461. MOVE 8,2,YBUF+16
  462. SA1 H
  463. WRITES O,YBUF,X1
  464. EQ REF2
  465.  
  466. REF1 MOVE 8,2,XBUF+15
  467. REF2 MOVE 8,XBUF+29,2 BLANK OUT THE SAVE AREA
  468. SA1 XBUF+67
  469. SX6 X1-1R=
  470. NZ X6,REF3 IF NOT QUALIFIER LINE
  471. SA5 LP
  472. MOVE 24,XBUF,YBUF+X5
  473. MOVE 48,XBUF+49,YBUF+24
  474. EQ LO722
  475.  
  476. REF3 SA5 LP
  477. MOVE 16,XBUF+8,YBUF+X5
  478. SB2 XBUF+40
  479. SB3 7 SET COUNTER
  480. SB4 YBUF+16
  481. REF4 SA1 B2+9
  482. SX6 X1-1R
  483. ZR X6,REF5 IF NOT DEFINITION
  484. SX7 1R
  485. SA7 B2+5 BLANK OUT THE */*
  486. SA7 A7+B1 AND LINE NUMBER.
  487. SA7 A7+B1
  488. REF5 ZR B3,REF6 IF SEVEN PAGE/LINES LISTED
  489. MOVE 8,B2,B4
  490. SB2 B2+10 INCREMENT XBUF ADDRESS
  491. SB3 B3-B1
  492. SB4 B4+8 INCREMENT YBUF ADDRESS
  493. EQ REF4
  494.  
  495. REF6 SA1 XBUF+114
  496. SX6 X1-1R
  497. ZR X6,LO722 IF NO EIGHTH PAGE/LINE
  498. MOVE 8,B2,2 SAVE EIGHTH PAGE/LINE
  499. EQ LO722
  500. TITLE MODIFY SUBROUTINES.
  501.  
  502. ** LMO - PROCESS MODIFICATIONS
  503. *
  504. * EXIT A LINE OF MODIFY SOURCE CODE PROCESSED.
  505. * USES X - 5.
  506. * B - 2.
  507. * A - 5.
  508.  
  509.  
  510. LMO SB2 XBUF+10
  511. LMO1 RJ BOB
  512. SA5 LP
  513. MOVE 72,B2,YBUF+X5
  514. EQ LO722
  515.  
  516. DKS SPACE 4
  517. ** DKS - PROCESS DECK STATUS
  518. *
  519. * EXIT DECK STATUS CODE; MODIFIER NAMES CODE; OR ACTIVE,
  520. * INACTIVE, AND INSERTED CARD(S) CODE PROCESSED.
  521. * USES X - 1, 2, 5, 6, 7.
  522. * B - 2, 7.
  523. * A - 0, 1, 2, 5, 6.
  524.  
  525.  
  526. DKS SA0 DKS1
  527. SB2 XBUF+13
  528. EQ LMO1
  529.  
  530. ** CHECK FOR MODIFIERS
  531. *
  532. DKS1 SA1 XBUF+10
  533. SX1 X1-1R
  534. ZR X1,LMO IF NOT *MODIFIERS.* LINE
  535. SA0 DKS2
  536. SA1 DKS
  537. MX2 42
  538. LX2 30
  539. BX1 X1*X2 MASK OUT DKS1 ADDRESS
  540. SX2 DKS2 GET DKS2 ADDRESS
  541. LX2 30
  542. BX6 X1+X2 INSERT DKS2 ADDRESS
  543. SA6 A1 RE-STORE THE INSTRUCTION
  544. SB2 XBUF+2
  545. EQ LMO1
  546.  
  547. ** CHECK FOR MODIFIER NAMES, ACTIVE CARDS, OR MAIN SECTION.
  548. *
  549. DKS2 SA1 XBUF+5
  550. SA2 XBUF+6
  551. SX1 X1-1R
  552. NZ X1,BAT2 IF IT IS *A* LINE
  553. SX2 X1-1R
  554. NZ X1,BAT2 IF IT IS *D* LINE
  555. RJ BOB
  556. SB7 XBUF+21
  557. RJ ASC
  558. SA2 DKSA GET *ACTIVE*
  559. BX7 X1-X2
  560. NZ X7,DKS3 IF IT IS MODIFIER NAMES(S)
  561. SA5 LP
  562. MOVE 23,XBUF+14,YBUF+X5 -ACTIVE CARD(S)-
  563. MOVE 25,XBUF+44,YBUF+23 -INACTIVE CARD(S)-
  564. MOVE 24,XBUF+74,YBUF+48 -INSERTED CARD(S)-
  565. EQ LO722
  566.  
  567. ** PROCESS MODIFIER NAME(S)
  568. *
  569. DKS3 SA1 XBUF+11
  570. SX1 X1-1R
  571. ZR X1,LMO IF NO FIRST NAME
  572. SA5 LP
  573. MOVE 41,XBUF+10,YBUF+X5
  574. SA1 H
  575. WRITES O,YBUF,X1
  576. SA1 XBUF+51
  577. SX1 X1-1R
  578. ZR X1,LO723 IF NO FIFTH NAME
  579. RJ BOB
  580. SA5 LP
  581. MOVE 41,XBUF+50,YBUF+X5
  582. EQ LO722
  583.  
  584. DKSA VFD 36D/6LACTIVE,24D/0
  585.  
  586. STS SPACE 4
  587. ** STS - PROCESS STATISTICS
  588. *
  589. * EXIT STATISTICS CODE PROCESSED.
  590. * USES X - 1, 5.
  591. * B - NONE.
  592. * A - 1, 5.
  593.  
  594.  
  595. STS SA1 XBUF+81
  596. SX1 X1-1R
  597. ZR X1,LMO
  598. RJ BOB
  599. SA5 LP
  600. MOVE 60,XBUF+10,YBUF+X5
  601. SA1 H
  602. WRITES O,YBUF,X1
  603. RJ BOB
  604. SA5 LP
  605. MOVE 60,XBUF+70,YBUF+X5
  606. EQ LO722
  607.  
  608. TITLE GENERAL SUBROUTINES.
  609. ** BOB - BLANK OUTPUT BUFFER
  610. * ENTRY- (B1) = 1.
  611. * USES- X - 0.
  612. * B - 3, 4.
  613. * A - NONE.
  614. * EXIT THE OUTPUT STRING BUFFER CONTAINS SPACE CODE
  615. * IN ALL 150 WORDS.
  616. *
  617.  
  618.  
  619. BOB SUBR ENTRY/EXIT
  620. MX0 1
  621. SB3 YBUF SET ADDRESS
  622. SB4 15 SET INCREMENT
  623. BOB1 LX0 6
  624. MOVE 15,SPACES,B3 BLANK OUT YBUF
  625. SB3 B3+B4
  626. PL X0,BOB1 IF NOT 10 TIMES
  627. EQ BOBX RETURN
  628.  
  629. SPACES VFD 60D/1R
  630. DUP 14
  631. VFD 60D/1R
  632. ENDD
  633.  
  634. MMS SPACE 4
  635. ** MMS - MOVE MAIN SECTIONS
  636. * ENTRY- (B1) = 1.
  637. * USES- X - 1, 2, 3.
  638. * B - 2, 3.
  639. * A - 1, 2, 3.
  640. * EXIT THE OUTPUT STRING BUFFER CONTAINS THE CODE SPECIFIED
  641. * BY THE PARAMETERS IN THE PROGRAM.
  642. *
  643.  
  644.  
  645. MMS SUBR ENTRY/EXIT
  646. RJ BOB
  647. SB2 B0
  648. SB3 NPM SET LOOP COUNTER
  649. MMS2 SA1 B2+N1 GET NO. OF CHARACTERS
  650. ZR X1,MMS3
  651. SA2 B2+I1 GET INPUT ADDRESS
  652. SA3 B2+O1 GET OUTPUT ADDRESS
  653. MOVE X1,X2,X3
  654. MMS3 SB2 B2+B1 INCREMENT THE ADDRESS
  655. SB3 B3-B1
  656. NZ B3,MMS2 IF NOT NPM TIMES THRU
  657. EQ MMSX RETURN
  658.  
  659. ASC SPACE 4
  660. ** ASC ASSEMBLE CHARACTERS
  661. * ENTRY- (B7) = ADDRESS OF FIRST CHARACTER.
  662. * (B1) = 1.
  663. * USES: X - 1.
  664. * B - 4, 5, 6.
  665. * A - 2.
  666. * EXIT- (X1) = THE CHARACTERS, LEFT JUSTIFIED, WITH
  667. * TRAILING ZEROS.
  668. *
  669. * ASSEMBLES UP TO TEN CHARACTERS INTO (X1) UNLESS A LEFT
  670. * PAREN, A COMMA, A PERIOD, OR A BLANK IS ENCOUNTERED
  671. * FIRST.
  672. *
  673.  
  674.  
  675. ASC SUBR ENTRY/EXIT
  676. SB5 60 SET SHIFT COUNTER
  677. SB6 6
  678. BX1 X1-X1
  679. ASC1 LX1 6
  680. SA2 B7 GET A CHARACTER
  681. SB5 B5-B6 DECREMENT THE SHIFT COUNTER
  682. SB4 X2-1R
  683. ZR B4,ASC2 IF A BLANK
  684. SB4 X2-1R(
  685. ZR B4,ASC2 IF A LEFT PAREN
  686. SB4 X2-1R,
  687. ZR B4,ASC2 IF A COMMA
  688. SB4 X2-1R.
  689. ZR B4,ASC2 IF A PERIOD
  690. BX1 X1+X2 ADD IN THE CHARACTER
  691. NG X1,ASCX
  692. SB7 B7+B1 INCREMENT THE ADDRESS
  693. NZ B5,ASC1 IF NOT 10 CHARACTERS
  694. ASC2 ZR B5,ASCX
  695. LX1 B5,X1 LEFT JUSTIFY
  696. EQ ASCX RETURN
  697. SPACE 4
  698. * COMMON DECKS.
  699.  
  700. *CALL COMCCIO
  701. *CALL COMCMVE
  702. *CALL COMCRDC
  703. *CALL COMCRDS
  704. *CALL COMCRDW
  705. *CALL COMCWTC
  706. *CALL COMCWTS
  707. *CALL COMCWTW
  708. *CALL COMCSYS
  709.  
  710. BUFFERS SPACE 4
  711. **** BUFFERS
  712. *
  713. USE //
  714. IBUF EQU *
  715. OBUF EQU IBUF+IBUFL
  716. RFL= EQU OBUF+OBUFL DEFAULT FIELD LENGTH
  717. USE *
  718. ****
  719. TITLE PRESET SUBROUTINES.
  720.  
  721. ORG IBUF
  722. SEG
  723. PRS SPACE 4
  724. ** PRESET SUBROUTINES.
  725. *
  726. * THIS AREA IS OVERLAID BY THE I/O BUFFERS.
  727. *
  728. * USES X - ALL.
  729. * B - ALL.
  730. * A - ALL.
  731.  
  732.  
  733. I BSS 0
  734. TEMP1 FILEC I+15D,IBUFF
  735.  
  736. OUT BSS 0
  737. TEMP2 FILEC I+16D+IBUFF,IBUFF
  738.  
  739. ORG I
  740. VFD 60D/1
  741. ORG OUT
  742. VFD 60D/5
  743. ORG I+17D+IBUFF+IBUFF
  744.  
  745. ** CHECK THE JOB ORIGIN CODE.
  746. *
  747. LO72 SB1 1 (B1) = 1
  748. PRS MX0 48
  749. SA1 JOPR GET JOB ORIGIN CODE (BITS 24-35)
  750. AX1 24 RIGHT ADJUST BYTE 2
  751. BX2 -X0*X1 GET JOB ORIGIN CODE
  752. SX6 X2-TXOT
  753. SA6 TTO SET TTY ORIGIN FLAG
  754. PRS1 SA1 ACTR GET ARGUMENT COUNT
  755. SB4 X1
  756. ZR B4,PRS2 IF NO ARGUMENTS
  757. SB5 COPT SET ARGUMENT TABLE ADDRESS
  758. SA4 ARGR GET FIRST ARGUMENT
  759. RJ ARG
  760. NZ X1,PRSB IF ERROR FOUND
  761. PRS2 SB2 NPM
  762. SB3 B0
  763.  
  764. ** VERIFY IF TYPE OF SOURCE FILE IS LEGAL
  765. *
  766. SA1 T CHECK TYPE
  767. ZR X1,PRS12
  768. LX1 6 RIGHT JUSTIFY
  769. SX2 X1-1RB
  770. NZ X2,PRS3 IF TYPE NOT = B
  771. SB4 BN1
  772. EQ PRS8
  773.  
  774. PRS3 SX2 X1-1RM
  775. NZ X2,PRS4 IF TYPE NOT = M
  776. SB4 MN1
  777. EQ PRS8
  778.  
  779. PRS4 SX2 X1-1RC
  780. NZ X2,PRS5 IF TYPE NOT = C
  781. SB4 CN1
  782. EQ PRS8
  783.  
  784. PRS5 SA1 TTO
  785. ZR X1,PRS12 IF TERMINAL AVAILABLE
  786. PRS6 MESSAGE (=C*UNRECOGNIZABLE TYPE SPECIFIED.*)
  787. PRS7 ABORT R
  788. PRS8 SA1 B3+N1
  789. SB5 X1-1R*
  790. ZR B5,PRS10 IF *N* VALUE WAS NOT GIVEN
  791.  
  792. * INSERT *IX* AND *OX* DEFAULTS IF NOT SPECIFIED WHEN
  793. * *NX* IS CHANGED.
  794.  
  795. SA3 B4+B3
  796. SA3 A3+NPM GET *IX* DEFAULT VALUE
  797. SA2 A1+NPM
  798. NZ X2,PRS8.3 IF *IX* SPECIFIED
  799. NZ X3,PRS8.2 IF *IX* DEFAULT DEFINED
  800. PRS8.1 MESSAGE (=C* IX OR OX NOT DEFINED.*)
  801. EQ PRS7 ABORT
  802.  
  803. PRS8.2 BX6 X3 SET *IX* DEFAULT VALUE
  804. SA6 A2
  805. PRS8.3 SA2 A2+NPM GET *OX* VALUE
  806. NZ X2,PRS9 IF *OX* SPECIFIED
  807. SA3 A3+NPM
  808. ZR X3,PRS8.1 IF NO *OX* DEFAULT
  809. BX6 X3 SET *OX* DEFAULT VALUE
  810. SA6 A2
  811. PRS9 SB3 B3+B1
  812. SB2 B2-B1
  813. NZ B2,PRS8
  814. EQ PRS12
  815.  
  816. ** INSERT DEFAULT VALUES FOR EACH TYPE IF NEEDED.
  817. *
  818. PRS10 SX4 A1
  819. SB5 3
  820. SB6 B4
  821. PRS11 SA2 B3+B6 GET PROPER DEFAULT VALUE
  822. BX6 X2
  823. SA6 X4 STORE THE VALUE
  824. SX4 X4+NPM INCREMENT ADDRESS
  825. SB6 B6+NPM
  826. SB5 B5-B1 DECREMENT COUNTER
  827. NZ B5,PRS11
  828. EQ PRS9
  829.  
  830. PRS12 SA1 TTO
  831. NZ X1,PRS13 IF TERMINAL NOT AVAILABLE
  832. SA1 I GET FILE NAME
  833. RJ SFP SET FET PARAMETERS
  834. SA2 =5LINPUT
  835. MX0 42
  836. BX6 X0*X1
  837. SA6 CKID SAVE ORIGINAL FILE NAME
  838. BX3 -X0*X1
  839. BX6 X2+X3
  840. SA6 A1 INSERT *INPUT* INTO FET
  841. SA1 O GET FILE NAME
  842. BX6 X0*X1
  843. SA6 CKIG SAVE ORIGINAL FILE NAME
  844. BX6 -X0*X1
  845. SA6 A1 ZREO OUT FILE NAME
  846. SA1 OUT
  847. RJ SFP SET FET PARAMETERS
  848. SA2 =6LOUTPUT
  849. SX6 A1
  850. BX6 X2+X6 ADD FET ADDRESS TO FILE NAME
  851. SA6 B1+B1 INSERT OUTPUT FET ADDRESS AT RA+2
  852. BX6 X1+X2
  853. SA6 A1 SET FILE NAME OUTPUT FOR TTY
  854. EQ CKI
  855. PRS13 SA1 I
  856. MX0 42
  857. BX2 X0*X1 MASK OFF FILE NAME
  858. ZR X2,PRS14 IF NO FILE NAME
  859.  
  860. ** READ THE INPUT FILE.
  861. *
  862. RIF RJ SFP SET FET PARAMETERS
  863. SX0 B1+B1 FIRST ADDRESS
  864. RIF1 READ I,R
  865. READH I,XBUF,XBUFL READ INPUT FILE
  866. NG X1,RIF3 IF -EOF-
  867. NZ X1,RIF1 IF -EOR-
  868. SB7 X0
  869. SA5 XBUF GET FIRST WORD
  870. RJ UPC UNPACK INPUT FILE
  871. SX0 B6+B7
  872. ZR X6,RIF1 IF NO UNPACK ERROR
  873. MESSAGE (=C*INPUT FILE ERROR.*)
  874. EQ PRS7
  875.  
  876. ** PROCESS ARGUMENTS FROM INPUT FILE
  877. *
  878. RIF3 SB4 X0-2 SET ARGUMENT COUNT
  879. SA4 ARGR GET FIRST ARGUMENT
  880. SB5 COPT GET ARGUMENT TABLE ADDR.
  881. RJ ARG PROCESS ARGUMENTS
  882. NZ X1,PRSB IF ERROR FOUND
  883.  
  884. ** CHECK FOR OUTPUT FILE NAME " SOURCE FILE NAME
  885. *
  886. PRS14 SA1 S GET *SCR* FILE NAME
  887. SA2 O GET *OUTPUT* FILE NAME
  888. MX0 42D
  889. BX1 X0*X1
  890. ZR X1,PRSC IF SOURCE FILE NAME NOT GIVEN
  891. BX2 X0*X2
  892. ZR X2,PRSC IF OUTPUT FILE NAME NOT GIVEN
  893. BX3 X1-X2
  894. NZ X3,PRS15
  895. MESSAGE (=C*FILE NAME CONFLICT.*)
  896. EQ PRS7
  897.  
  898. ** SET NX VALUES AS BINARY NUMBERS
  899. *
  900. PRS15 SB7 B0
  901. SA5 H
  902. RJ DXB
  903. ZR X7,PRSD IF OUTPUT LINE LENGTH NOT GIVEN
  904. SA7 A5
  905. SX7 X7-XBUFL-1
  906. PL X7,PRSD IF OUTPUT LENGTH .GT. XBUFL
  907. SB6 NPM-1 SET COUNTER + ADDRESS INCREMENT
  908. PRS16 SA5 B6+N1 GET NX VALUE
  909. ZR X5,PRS17
  910. RJ DXB
  911. SA7 A5 RE-STORE AS BINARY NUMBER
  912.  
  913. ** SET IX VALUES AS XBUF ADDRESSES
  914. *
  915. SA5 A5+NPM GET IX VALUE
  916. RJ DXB
  917. SX7 X7-1
  918. SX2 XBUFL GET INPUT LINE LENGTH
  919. SA3 B6+N1 ADD *NX* + *IX* VALUES
  920. IX6 X7+X3
  921. IX6 X2-X6
  922. NG X6,PRSE IF *IX* + *NX* .GT. INPUT BUFFER LENGTH
  923. SX7 X7+XBUF
  924. SA7 A5 RE-STORE AS AN ADDRESS
  925.  
  926. ** SET OX VALUES AS YBUF ADDRESSES
  927. *
  928. SA5 A5+NPM GET OX VALUE
  929. RJ DXB
  930. SX7 X7-1
  931. SA2 H GET OUTPUT LINE LENGTH
  932. SA3 B6+N1 ADD *OX* + *NX* VALUES
  933. IX6 X7+X3
  934. IX6 X2-X6
  935. NG X6,PRSE IF *OX* + *NX* .GT. OUTPUT LENGTH
  936. SX7 X7+YBUF
  937. SA7 A5 RE-STORE AS AN ADDRESS
  938. PRS17 SB6 B6-B1
  939. PL B6,PRS16 IF NOT *NPM* TIMES THRU
  940.  
  941. ** CONVERT T TO AN ADDRESS FOR *PEJ* ROUTINE
  942. *
  943. PRS19 SB2 B0
  944. MX0 42 SET ADDRESS MASK
  945. SA2 T GET TYPE
  946. MX1 6 SET CHARACTER MASK
  947. PRS20 SA3 B2+PRSA GET FIRST CHARACTER AND ADDRESS
  948. ZR X3,PRS6 IF END OF TABLE
  949. BX4 X1*X3 GET THE CHARACTER
  950. IX4 X2-X4
  951. ZR X4,PRS21 IF A MATCH
  952. SB2 B2+B1
  953. EQ PRS20
  954. PRS21 BX6 -X0*X3
  955. SA6 T SET ADDRESS INTO *TYPE* LOCATION
  956.  
  957. ** RESET FET PARAMETERS
  958. *
  959. SA1 O
  960. RJ SFP SET FET PARAMETERS
  961. SA1 NR
  962. NZ X1,PRS11.2 IF NO REWIND
  963. REWIND O,R
  964. PRS11.2 SA1 S
  965. RJ SFP SET FET PARAMETERS
  966. REWIND S,R
  967.  
  968. ** ADD LINE PRINTER FLAG TO FIRST YBUF ADDRESS
  969. *
  970. SB3 B0
  971. SX2 YBUF
  972. PRS22 SA1 B3+O1 GET OUTPUT ADDRESSES
  973. SA0 BAT2 SET DEFAULT ADDRESS
  974. IX3 X1-X2
  975. ZR X3,PRS23 IF ADDRESSES THE SAME
  976. SB3 B3+B1
  977. SB5 B3-NPM
  978. ZR B5,LO721 IF NPM TIMES
  979. EQ PRS22
  980.  
  981. PRS23 SA2 LP
  982. IX6 X1+X2 ADD LINE PRINTER FLAG TO FIRST ADDR
  983. SA6 A1
  984. EQ LO721 RETURN
  985.  
  986.  
  987. PRSA VFD 6/1LB,54D/PEJ5
  988. VFD 6/1LC,54D/PEJ1
  989. VFD 6/1LM,54D/PEJ2
  990. CON 0
  991.  
  992.  
  993. PRSB MESSAGE (=C* ARGUMENT ERROR.*)
  994. EQ PRS7
  995.  
  996. PRSC MESSAGE (=C* INCORRECT PARAMETER.*)
  997. EQ PRS7
  998.  
  999. PRSD MESSAGE (=C* H VALUE INCORRECT.*)
  1000. EQ PRS7 ABORT
  1001.  
  1002. PRSE MESSAGE (=C* INCORRECT LINE LENGTH.*)
  1003. EQ PRS7 ABORT
  1004.  
  1005. COPT BSS 0
  1006. S ARG =0LSCR,S
  1007. I ARG =0LINPUT,I
  1008. L ARG =0LOUTPUT,O
  1009. T ARG T,T
  1010. H ARG H,H
  1011. N1 ARG BN1,N1
  1012. I1 ARG BI1,I1
  1013. O1 ARG BO1,O1
  1014. N2 ARG BN2,N2
  1015. I2 ARG BI2,I2
  1016. O2 ARG BO2,O2
  1017. N3 ARG BN3,N3
  1018. I3 ARG BI3,I3
  1019. O3 ARG BO3,O3
  1020. N4 ARG BN4,N4
  1021. I4 ARG BI4,I4
  1022. O4 ARG BO4,O4
  1023. N5 ARG BN5,N5
  1024. I5 ARG BI5,I5
  1025. O5 ARG BO5,O5
  1026. N6 ARG BN6,N6
  1027. I6 ARG BI6,I6
  1028. O6 ARG BO6,O6
  1029. LP ARG -DFLP,LP
  1030. NR ARG -*,NR
  1031. IT ARG -*,TTO
  1032. ARG
  1033.  
  1034. DFLP CON 1 DEFAULT PRINTER OPTION
  1035. TTO CON 0 TERMINAL AVAILABLE OPTION
  1036. TITLE TERMINAL I/O ROUTINE.
  1037.  
  1038. ** CKI - CHECK INPUT FROM TTY.
  1039. *
  1040. * ENTRY - ORIGIN CODE (JOPR) CHECKED AND FOUND TO BE TELEX.
  1041. *
  1042. * EXIT - ALL RE-FORMAT PARAMETERS CHECKED BY THE TERMINAL USER.
  1043. *
  1044. * USES X - ALL.
  1045. * B - ALL.
  1046. * A - ALL.
  1047.  
  1048.  
  1049. CKI WRITEC OUT,CKIA
  1050.  
  1051. WRITEC OUT,CKIA1
  1052. CKI0 READ I
  1053. READC I,XBUF,8D
  1054.  
  1055. ** CHECK IF ANY ARGUMENT CHANGES ARE NEEDED
  1056. *
  1057. NZ X1,CKI26 IF *CR*
  1058. SA1 XBUF GET THE INPUT WORD
  1059. RJ SFN
  1060. SA2 CKIB
  1061. BX3 X6-X2
  1062. ZR X3,CKI1 IF *YES*
  1063. SA2 A2+B1
  1064. BX3 X2-X1
  1065. ZR X3,CKI26 IF *NO*
  1066. SX6 CKI0
  1067. SA6 SOBC SET ERROR ADDRESS
  1068. EQ SOB4
  1069.  
  1070. ** CHANGE INPUT FILE NAME(I)
  1071. *
  1072. CKI1 MX0 42
  1073. SA1 CKID GET INPUT FILE NAME
  1074. RJ SFN SPACE FILL NAME
  1075. BX6 X0*X6
  1076. SA5 CKIC2 GET MESSAGE WORD
  1077. BX6 X5+X6
  1078. SA6 A5 STORE INTO MESSAGE
  1079. WRITEC OUT,CKIC
  1080. WRITEC OUT,CKIC1
  1081. CKI2 READ I
  1082. READC I,XBUF,8D
  1083. NZ X1,CKI3 IF *CR*
  1084. SB3 CKI2 SET ERROR ADDRESS
  1085. SA1 XBUF GET THE INPUT WORD
  1086. RJ SOB STRIP OFF BLANKS
  1087. SA6 CKID TEMPORARILY STORE INPUT FILE NAME
  1088.  
  1089. ** CHANGE SOURCE FILE NAME(S)
  1090. *
  1091. CKI3 SA5 S GET *SCR* FILE NAME
  1092. BX1 X0*X5
  1093. RJ SFN
  1094. BX6 X0*X6
  1095. SA5 CKIE1 GET MESSAGE WORD
  1096. BX6 X5+X6
  1097. SA6 A5 STORE INTO MESSAGE
  1098. WRITEC OUT,CKIE
  1099. CKI4 READ I
  1100. READC I,XBUF,8D
  1101. NZ X1,CKI5 IF *CR*
  1102. SB3 CKI4 SET ERROR ADDRESS
  1103. SA1 XBUF GET THE INPUT WORD
  1104. RJ SOB STRIP OFF BLANKS
  1105. BX1 -X0*X5
  1106. BX6 X6+X1
  1107. SA6 S STORE *SCR* FILE NAME
  1108.  
  1109. ** CHANGE OUTPUT FILE NAME(O)
  1110. *
  1111. CKI5 SA1 CKIG GET OUTPUT FILE NAME
  1112. RJ SFN
  1113. BX6 X0*X6
  1114. SA5 CKIF1 GET MESSAGE WORD
  1115. BX6 X5+X6
  1116. SA6 A5 STORE INTO MESSAGE
  1117. WRITEC OUT,CKIF
  1118. CKI6 READ I
  1119. READC I,XBUF,8D
  1120. NZ X1,CKI7 IF *CR*
  1121. SB3 CKI6 SET ERROR ADDRESS
  1122. SA1 XBUF GET THE INPUT WORD
  1123. RJ SOB STRIP OFF BLANKS
  1124. BX1 -X0*X5
  1125. BX6 X6+X1
  1126. SA6 CKIG TEMPORARILY STORE OUTPUT FILE NAME
  1127.  
  1128. ** CHANGE TYPE OF SOURCE FILE(T)
  1129. *
  1130. CKI7 SA1 T
  1131. NZ X1,CKI8 IF TYPE NOT EMPTY
  1132. SA2 CKIJ
  1133. EQ CKI12
  1134.  
  1135. CKI8 LX1 6 RIGHT JUSTIFY
  1136. SX2 X1-1RB
  1137. NZ X2,CKI9 IF TYPE NOT BATCH
  1138. SA2 CKIK
  1139. EQ CKI12
  1140.  
  1141. CKI9 SX2 X1-1RM
  1142. NZ X2,CKI10 IF TYPE NOT MODIFY
  1143. SA2 CKIL
  1144. EQ CKI12
  1145.  
  1146. CKI10 SX2 X1-1RC
  1147. NZ X2,CKI12.1 IF TYPE NOT COMPASS
  1148. SA2 CKIM
  1149. CKI12 BX6 X2
  1150. SA6 CKIH1 STORE INTO MESSAGE
  1151. BX7 X7-X7 SET END-OF-LINE
  1152. SA7 A6+B1
  1153. CKI12.1 WRITEC OUT,CKIH
  1154. CKI13 READ I
  1155. READC I,XBUF,8D
  1156. NZ X1,CKI15 IF *CR*
  1157. MX0 6
  1158. SA1 XBUF GET THE INPUT WORD
  1159. BX6 X0*X1 PICK OFF FIRST CHARACTER
  1160. BX1 X6
  1161. LX1 6 RIGHT JUSTIFY
  1162. SX2 X1-1RB
  1163. ZR X2,CKI14 IF TYPE = B
  1164. SX2 X1-1RM
  1165. ZR X2,CKI14 IF TYPE = M
  1166. SX2 X1-1RC
  1167. ZR X2,CKI14 IF TYPE = C
  1168. SX6 CKI13
  1169. SA6 SOBC SET ERROR ADDRESS
  1170. EQ SOB4
  1171. CKI14 SA6 T STORE NEW TYPE
  1172.  
  1173. ** CHANGE LENGTH OF OUTPUT LINE(H)
  1174. *
  1175. CKI15 SA1 H GET NO. OF CHARACTERS/LINE
  1176. NZ X1,CKI16
  1177. SA1 =1L0
  1178. CKI16 MX0 6
  1179. SA3 =1L
  1180. SB2 B1+B1
  1181. CKI17 LX1 6
  1182. BX2 X0*X1
  1183. NZ X2,CKI18 IF THERE IS A CHAR.
  1184. BX1 X1+X3 ADD A SPACE
  1185. CKI18 SB2 B2-B1
  1186. NZ B2,CKI17
  1187. LX1 48 SHIFT INTO BYTE 0
  1188. SA2 CKIN1
  1189. MX0 18
  1190. BX2 -X0*X2 ALLOW RESET OF *H* CODED VALUE
  1191. BX6 X1+X2
  1192. SA6 A2 STORE INTO MESSAGE
  1193. WRITEC OUT,CKIN
  1194. CKI19 READ I
  1195. READC I,XBUF,8D
  1196. NZ X1,CKI20 IF *CR*
  1197. SB3 CKI19 SET ERROR ADDRESS
  1198. SA1 XBUF GET THE INPUT WORD
  1199. RJ SOB STRIP OFF BLANKS
  1200. SA6 H STORE NEW NO. OF CHARS.
  1201. BX5 X6
  1202. RJ DXB CONVERT *H* TO DECIMAL VALUE
  1203. ZR X7,CKI19.1 IF ZERO LENGTH SPECIFIED
  1204. SX7 X7-XBUFL-1
  1205. NG X7,CKI20 IF OUTPUT LENGTH .LT. XBUFL
  1206. CKI19.1 WRITEC OUT,CKIU
  1207. EQ CKI19 ALLOW RE-ENTRY OF *H* VALUE
  1208.  
  1209. ** CHANGE NX, IX, AND OX VALUES
  1210.  
  1211. CKI20 WRITEC OUT,CKIO
  1212. WRITEC OUT,CKIO1
  1213. WRITEC OUT,CKIO2
  1214. SB3 CKIP
  1215. SA1 B3-B1 GET COPY OF CKIP
  1216. BX6 X1
  1217. SA6 B3 RESTORE CKIP
  1218. MX5 6
  1219. LX5 30
  1220. BX0 X0-X0
  1221. CKI21 SB6 CKIQ
  1222. MX2 54
  1223. SX7 B1
  1224. SA3 CKIP
  1225. LX3 12
  1226. IX6 X3+X7 INCREMENT X
  1227. LX6 48
  1228. SA6 A3
  1229. SA1 X0+N1 GET NX VALUES
  1230. SB2 3
  1231. SX4 55B
  1232. CKI22 NZ X1,CKI23 IF NX IS SET
  1233. SX1 1R0
  1234. CKI23 LX1 6
  1235. BX3 -X2*X1
  1236. NZ X3,CKI23 IF THERE IS A CHAR.
  1237. IX1 X1+X4 ADD IN A BLANK
  1238. BX3 X5*X1
  1239. ZR X3,CKI23 IF NOT TO BIT 30
  1240. BX6 X1+X6
  1241. SA6 B6 STORE INTO MESSAGE
  1242. SB6 B6+B1 INCREMENT CKIQ ADDRESS
  1243. SB2 B2-B1 DECREMENT COUNTER
  1244. SA1 A1+NPM GET NEXT VALUES (IX + OX)
  1245. SA3 B1+CKIP GET SECOND WORD
  1246. BX6 X3
  1247. NZ B2,CKI22
  1248. SX0 X0+B1
  1249. WRITEC OUT,CKIQ
  1250. SX4 X0-NPM
  1251. NZ X4,CKI21 IF NOT NPM TIMES
  1252. WRITEC OUT,CKIR
  1253. WRITEC OUT,CKIR1
  1254. WRITEC OUT,CKIR2
  1255. WRITEC OUT,CKIR3
  1256. WRITEC OUT,CKIR4
  1257. WRITEC OUT,CKIR5
  1258. MX0 18
  1259. SA0 B0 INITIALIZE ARGUMENT COUNTER
  1260. SA5 YBUF SET ADDRESS FOR NEW VALUES
  1261.  
  1262. ** READ NEW NX, IX, AND OX VALUES
  1263.  
  1264. CKI24 READ I
  1265. READC I,XBUF,8D
  1266. NZ X1,CKI25 IF *CR*
  1267. SB3 CKI24 SET ERROR ADDRESS
  1268. SA1 XBUF GET THE INPUT WORD
  1269. RJ SOB STRIP OFF BLANKS
  1270. SX5 54B SET EQUAL SIGN
  1271. BX7 -X0*X6
  1272. MX1 12
  1273. BX6 X1*X6
  1274. IX6 X6+X5 COMPLETE FIRST WORD
  1275. LX7 18 LEFT JUSTIFY THE SECOND WORD
  1276. SA6 A5 SET FIRST HALF OF ARGUMENT
  1277. SA0 A0+B1 INCREMENT ARGUMENT COUNTER
  1278. SA5 A5+B1 INCREMENT ADDRESS
  1279. SA7 A5 SET SECOND HALF OF ARGUMENT
  1280. SA0 A0+B1 INCREMENT ARGUMENT COUNTER
  1281. SA5 A5+B1 INCREMENT ADDRESS
  1282. EQ CKI24
  1283. CKI25 SB4 A0 SET ARGUMENT COUNT
  1284. ZR B4,CKI26 IF NO ARGUMENTS
  1285. SB5 COPT SET ARGUMENT TABLE ADDRESS
  1286. SA4 YBUF GET FIRST ARGUMENT
  1287. RJ ARG PROCESS ARGUMENTS
  1288. ZR X1,CKI26 IF NO ARGUMENT ERRORS
  1289. WRITEC OUT,CKIT
  1290. MX0 18
  1291. SA0 B0 INITIALIZE ARGUMENT COUNTER
  1292. SA5 YBUF SET ADDRESS FOR NEW VALUES
  1293. EQ CKI24
  1294.  
  1295. CKI26 SB6 NPM-1 SET COUNTER + ADDRESS INCREMENT
  1296. MX0 54 SINGLE CHAR. MASK.
  1297. CKI27 SA5 B6+N1 GET NX
  1298. ZR X5,CKI28 IF NX=0
  1299. RJ DXB CONVERT DISPLAY CODE TO BINARY
  1300. SA7 SNX SAVE *NX* VALUE
  1301. SA5 A5+NPM CONVERT *IX* VALUE
  1302. RJ DXB
  1303. SA4 SNX ADD *NX* + *IX* VALUES
  1304. IX4 X4+X7
  1305. SX4 X4-XBUFL-2 COMPARE SUM WITH BUFFER LENGTH
  1306. PL X4,CKI32 IF *NX* + *IX* .GT. XBUFL + 1
  1307. SA5 A5+NPM CONVERT *OX* CODED VALUE
  1308. RJ DXB
  1309. SA7 SOX SAVE *OX* VALUE
  1310. SA5 H CONVERT *H* CODED VALUE
  1311. RJ DXB
  1312. NZ X4,CKI19.1 IF INCORRECT *H* PARAMETER
  1313. ZR X7,CKI19.1 IF *H* VALUE = 0
  1314. SX6 X6-XBUFL-1 COMPARE *H* WITH BUFFER LENGTH
  1315. PL X6,CKI19.1 IF *H* VALUE .GT. XBUFL
  1316. SA3 A7 ADD *OX* + *NX* VALUES
  1317. SA4 A4
  1318. IX4 X3+X4 COMPARE SUM WITH OUTPUT LENGTH
  1319. SX7 X7+B1
  1320. IX4 X7-X4
  1321. NG X4,CKI32 IF *NX* + *OX* .GT. (*H* + 1)
  1322. CKI28 ZR B6,CKI33 IF FIELD PARAMETER VALIDATION COMPLETE
  1323. SB6 B6-B1
  1324. EQ CKI27
  1325.  
  1326. CKI32 WRITEC OUT,CKIS
  1327. WRITEC OUT,CKIS1
  1328. EQ CKI15
  1329.  
  1330. CKI33 SA1 CKIG
  1331. SA2 O
  1332. MX0 42
  1333. BX2 -X0*X2
  1334. BX6 X1+X2
  1335. SA6 A2 SET COMBINED NAME AND STATUS
  1336. SA1 CKID
  1337. ZR X1,PRS14 IF NO INPUT FILE NAME
  1338. SA2 I
  1339. BX2 -X0*X2
  1340. BX6 X1+X2
  1341. SA6 A2 SET COMBINED NAME AND STATUS
  1342. BX1 X6
  1343. EQ RIF READ INPUT FILE
  1344.  
  1345. **** MESSAGES OUTPUT TO TTY BY *CKI*.
  1346. *
  1347. CKIA DIS 5,DO YOU WANT TO CHANGE ANY CONTROL ARGUMENT VALUES-
  1348. CON 0
  1349. CKIA1 DATA 10HENTER: YES
  1350. VFD 36/6L OR NO,24/0
  1351. CKIB DATA 3HYES
  1352. VFD 60D/2LNO
  1353. CKIC DIS 2,ARGUMENT
  1354. VFD 36/6LVALUE ,24/0
  1355. CKIC1 DIS 2,INPUT FILE NAME:
  1356. CKIC2 VFD 42/0,18/3H "CB"
  1357. CON 0
  1358. CKID CON 0 INPUT FILE NAME STORAGE
  1359. CKIE DIS 2,SOURCE FILE NAME:
  1360. CKIE1 VFD 42/0,18/3H "CB"
  1361. CON 0
  1362. CKIF DIS 2,OUTPUT FILE NAME:
  1363. CKIF1 VFD 42/0,18/3H "CB"
  1364. CON 0
  1365. CKIG CON 0 OUTPUT FILE NAME STORAGE
  1366. CKIH DIS 2,SOURCE FILE TYPE:
  1367. CKIH1 DATA C*NOT IDENTIFIABLE"CB"*
  1368. CKIJ DATA C*NONE"CB"*
  1369. CKIK DATA C*BATCH "CB"*
  1370. CKIL DATA C*MODIFY"CB"*
  1371. CKIM DATA C*COMPASS "CB"*
  1372. CKIN DIS 2,OUTPUT LINE LENGTH:
  1373. CKIN1 VFD 18D/0,42D/7L CHARS.
  1374. DATA C*"CB"*
  1375. CKIO DIS 3, NO. OF MOVED FROM MOVED T
  1376. VFD 12/2LO ,48/0
  1377. CKIO1 DIS 3, CHARS. COLUMN COLUMN
  1378. CON 0
  1379. CKIO2 DIS 2,(X) (NX) (IX)
  1380. VFD 48/8L (OX),12/0
  1381. CON 0
  1382. VFD 30D/5L 0. ,30D/0
  1383. CKIP VFD 30D/5L 0. ,30D/0
  1384. VFD 30D/5L ,30D/0
  1385. CKIQ CON 0
  1386. CON 0
  1387. CON 0
  1388. CON 0
  1389. CKIR DATA C*ENTER CHANGES IN THE FOLLOWING FORMAT: *
  1390. CKIR1 DATA 10HNX=AA*CR*
  1391. CON 0
  1392. CKIR2 DATA 10HIX=BB*CR*
  1393. CON 0
  1394. CKIR3 DATA 10HOX=CC*CR*
  1395. CON 0
  1396. CKIR4 VFD 24/4LETC.,36/0
  1397. CKIR5 DATA C/TO CONTINUE, ENTER *CR* ONLY. "CB"/
  1398. CKIS DIS 5,ERROR- OUTPUT LINE LENGTH (H) IS TOO SMALL OR TOTA
  1399. VFD 12/2LL ,48/0
  1400. CKIS1 DIS 5,NUMBER OF CHARACTERS TO BE MOVED (NX) IS TOO LARGE
  1401. VFD 12/2L. ,48/0
  1402. CKIT DIS 5,ARGUMENT ERROR. RE-ENTER ALL NX, IX, AND OX PARAME
  1403. VFD 36/6LTERS. ,24/0
  1404. CKIU DATA C* LENGTH INCORRECT. CORRECT AND RE-ENTER.*
  1405. CON 0
  1406. ****
  1407. SPACE 4
  1408.  
  1409. ** SFP - SET FET PARAMETERS
  1410. * ENTRY- (B1) = 1.
  1411. * (A1) = ADDRESS OF FILE NAME.
  1412. * (X1) = FILE NAME.
  1413. * USES- X - 2, 6.
  1414. * B - NONE.
  1415. * A - 2, 6.
  1416. *
  1417. * SETS A 1 IN BIT ZERO OF WORD 1 IF NEEDED AND RESETS
  1418. * IN = OUT = FIRST.
  1419. *
  1420.  
  1421.  
  1422. SFP SUBR ENTRY/EXIT
  1423. BX6 X1
  1424. LX6 59
  1425. NG X6,SFP1 IF BIT ZERO SET
  1426. SX2 B1
  1427. LX6 1
  1428. IX6 X6+X2 SET BIT ZERO
  1429. BX1 X6
  1430. SA6 A1
  1431. SFP1 SA2 A1+B1 GET FIRST
  1432. BX6 X2
  1433. SA6 A2+B1 SET IN = FIRST
  1434. SA6 A6+B1 SET OUT = FIRST
  1435. EQ SFPX RETURN
  1436. SPACE 4
  1437.  
  1438. ** SOB - STRIP OFF BLANKS
  1439. * ENTRY- (X1) = DISPLAY CODE WITH TRAILING BLANKS POSSIBLE.
  1440. * (B1) = 1.
  1441. * (B3) = RETURN ADDRSS IF ERROR ENCOUNTERED.
  1442. * USES- X - 1, 2, 3, 6.
  1443. * B - 3, 4, 5, 6, 7.
  1444. * A - 1, 6.
  1445. * EXIT- (X6) = SAME DISPLAY CODE EXCEPT ZERO FILLED.
  1446. *
  1447.  
  1448.  
  1449. SOB SUBR ENTRY/EXIT
  1450. SX6 B3
  1451. SA6 SOBC SAVE ERROR ADDRESS
  1452. SB4 6
  1453. SB5 54D SHIFT COUNTER
  1454. MX2 54D SINGLE CHARACTER MASK
  1455. BX6 X6-X6
  1456. BX1 X2*X1
  1457. SOB1 LX1 6
  1458. BX3 -X2*X1 GET A CHARACTER
  1459. ZR X3,SOB3 IF NO MORE CHARACTERS
  1460. SB6 B5-6
  1461. ZR B6,SOB6 IF INPUT TOO LONG
  1462. SB7 X3-1R+
  1463. NG B7,SOB2 IF NOT SPECIAL CHARACTER
  1464. SB7 X3-1R
  1465. ZR B7,SOB1 IF SPACE CHARACTER
  1466. SB7 X3-1R=
  1467. NZ B7,SOB4 IF NOT EQUALS(=) CHARACTER
  1468. SB7 B5-42D
  1469. NZ B7,SOB4 IF NOT THE THIRD CHARACTER
  1470. SOB2 SB5 B5-B4
  1471. BX6 X3+X6 BUILD UP LEGAL INPUT
  1472. LX6 6
  1473. EQ SOB1 LOOP
  1474. SOB3 LX6 B5,X6 LEFT JUSTIFY
  1475. NZ X6,SOBX RETURN IF INPUT GOOD
  1476. SOB4 WRITEC OUT,SOBA
  1477. SOB5 SA1 SOBC
  1478. SB3 X1 RESET ERROR ADDRESS
  1479. JP B3 RETURN TO READ AGAIN
  1480. SOB6 WRITEC OUT,SOBB
  1481. EQ SOB5
  1482. SOBA DIS 3,INPUT ERROR. RE-ENTER SAME PAR
  1483. VFD 48/8LAMETER. ,12/0
  1484. DATA 2BS48
  1485. SOBB DIS 4,PARAMETER TOO LONG. CORRECT AND RE-ENTER
  1486. VFD 12/2L. ,12/0,12/2,24/0
  1487. SOBC CON 0
  1488. SPACE 4
  1489.  
  1490. ** DEFAULT VALUES FOR BATCH.
  1491.  
  1492. BN1 VFD 60D/2L72
  1493. BN2 DATA 0
  1494. BN3 DATA 0
  1495. BN4 DATA 0
  1496. BN5 DATA 0
  1497. BN6 DATA 0
  1498. BI1 VFD 60D/1L1
  1499. BI2 DATA 0
  1500. BI3 DATA 0
  1501. BI4 DATA 0
  1502. BI5 DATA 0
  1503. BI6 DATA 0
  1504. BO1 VFD 60D/1L1
  1505. BO2 DATA 0
  1506. BO3 DATA 0
  1507. BO4 DATA 0
  1508. BO5 DATA 0
  1509. BO6 DATA 0
  1510.  
  1511. ** DEFAULT VALUES FOR COMPASS.
  1512.  
  1513. CN1 VFD 60D/1L7
  1514. CN2 VFD 60D/2L50
  1515. CN3 VFD 60D/2L15
  1516. CN4 DATA 0
  1517. CN5 DATA 0
  1518. CN6 DATA 0
  1519. CI1 VFD 60D/1L9
  1520. CI2 VFD 60D/2L41
  1521. CI3 VFD 60D/3L112
  1522. CI4 DATA 0
  1523. CI5 DATA 0
  1524. CI6 DATA 0
  1525. CO1 VFD 60D/1L1
  1526. CO2 VFD 60D/1L8
  1527. CO3 VFD 60D/2L58
  1528. CO4 DATA 0
  1529. CO5 DATA 0
  1530. CO6 DATA 0
  1531.  
  1532. ** DEFAULT VALUES FOR MODIFY.
  1533.  
  1534. MN1 VFD 60D/1L2
  1535. MN2 VFD 60D/2L48
  1536. MN3 VFD 60D/2L22
  1537. MN4 DATA 0
  1538. MN5 DATA 0
  1539. MN6 DATA 0
  1540. MI1 VFD 60D/1L6
  1541. MI2 VFD 60D/2L10
  1542. MI3 VFD 60D/2L82
  1543. MI4 DATA 0
  1544. MI5 DATA 0
  1545. MI6 DATA 0
  1546. MO1 VFD 60D/1L1
  1547. MO2 VFD 60D/1L3
  1548. MO3 VFD 60D/2L51
  1549. MO4 DATA 0
  1550. MO5 DATA 0
  1551. MO6 DATA 0
  1552. SNX DATA 0 *NX* VALUE
  1553. SOX DATA 0 *OX* VALUE
  1554.  
  1555. SPACE 4,10
  1556. ** COMMON DECKS.
  1557.  
  1558.  
  1559. *CALL COMCARG
  1560. *CALL COMCDXB
  1561. *CALL COMCRDH
  1562. *CALL COMCSFN
  1563. *CALL COMCUPC
  1564.  
  1565. END
cdc/nos2.source/opl871/lo72.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator