User Tools

Site Tools


ibm:vm370-lib:cms:dmsedi.assemble_src

DMSEDI Source

References

Source Listing

DMSEDI.ASSEMBLE.txt
  1. EDI TITLE 'DMSEDI (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *********************************************************************** 00003000
  4. * 00004000
  5. * MACROS FOR EDIT 00005000
  6. * 00006000
  7. *********************************************************************** 00007000
  8. SPACE 2 00008000
  9. * 00009000
  10. ************** 00010000
  11. * 00011000
  12. * REQ SETS UP THE DECLARATIONS FOR A REQUEST 00012000
  13. * (SEE TABLE OF REQUESTS -- PRQUEST ET SEQ.) 00013000
  14. * 00014000
  15. ************** 00015000
  16. SPACE 00016000
  17. MACRO 00017000
  18. &LOC REQ &NAME,&MIN,&ADDR,&TRAV 00018000
  19. LCLA &M,&L,&K 00019000
  20. LCLC &A 00020000
  21. &M SETA 1 00021000
  22. AIF (N'&MIN EQ 0).SEQ1 00022000
  23. &M SETA &MIN 00023000
  24. .SEQ1 ANOP 00024000
  25. &L SETA K'&NAME 00025000
  26. &A SETC '&NAME' 00026000
  27. AIF (N'&ADDR EQ 0).SEQ2 00027000
  28. &A SETC '&ADDR' 00028000
  29. .SEQ2 ANOP 00029000
  30. &K SETA 0 00030000
  31. AIF (N'&TRAV EQ 0).SEQ3 00031000
  32. &K SETA 1 00032000
  33. .SEQ3 ANOP 00033000
  34. &LOC DC AL1(&M,&L,&K),C'&NAME',AL2(&A-EDIT) 00034000
  35. MEND 00035000
  36. EJECT 00036000
  37. * 00037000
  38. ************** 00038000
  39. * 00039000
  40. * WTYPE TYPES A LINE AT THE TERMINAL 00040000
  41. * 00041000
  42. ************** 00042000
  43. SPACE 00043000
  44. MACRO 00044000
  45. &LOC WTYPE &TEXT,&NUM,&RETURN=,&VERIFY= 00045000
  46. LCLA &A 00046000
  47. LCLC &SUF 00047000
  48. AIF (N'&VERIFY EQ 0).SEQ1 00048000
  49. AIF ('&VERIFY' NE 'YES').SEQ1 00049000
  50. &SUF SETC '1' 00050000
  51. .SEQ1 ANOP 00051000
  52. &LOC LA 1,&TEXT 00052000
  53. AIF (N'&NUM EQ 0).SEQ1A 00053000
  54. &A SETA &NUM 00054000
  55. AGO .SEQ2 00055000
  56. .SEQ1A ANOP 00056000
  57. &A SETA L'&TEXT 00057000
  58. .SEQ2 LA 0,&A 00058000
  59. AIF (N'&RETURN EQ 0).SEQ3 00059000
  60. LA 14,&RETURN 00060000
  61. B WRTYPE&SUF 00061000
  62. MEXIT 00062000
  63. .SEQ3 BAL 14,WRTYPE&SUF 00063000
  64. MEND 00064000
  65. SPACE 2 00065000
  66. * 00066000
  67. ************** 00067000
  68. * 00068000
  69. * VTYPE TYPES A LINE IF IN VERIFY MODE 00069000
  70. * 00070000
  71. ************** 00071000
  72. SPACE 00072000
  73. MACRO 00073000
  74. &LOC VTYPE &TEXT,&NUM,&RETURN= 00074000
  75. &LOC WTYPE &TEXT,&NUM,RETURN=&RETURN,VERIFY=YES 00075000
  76. MEND 00076000
  77. EJECT 00077000
  78. * 00078000
  79. ************** 00079000
  80. * 00080000
  81. * VERIFY VERIFIES THE CURRENT LINE 00081000
  82. * 00082000
  83. ************** 00083000
  84. SPACE 00084000
  85. MACRO 00085000
  86. &NAME VERIFY &RETURN= 00086000
  87. AIF (N'&RETURN EQ 0).SEQ1 00087000
  88. &NAME LA 14,&RETURN 00088000
  89. B VERSUB 00089000
  90. MEXIT 00090000
  91. .SEQ1 ANOP 00091000
  92. &NAME BAL 14,VERSUB 00092000
  93. MEND 00093000
  94. SPACE 2 00094000
  95. * 00095000
  96. ************** 00096000
  97. * 00097000
  98. * CMS SETS UP THE CALLING SEQUENCE FOR SVC 202. 00098000
  99. * 00099000
  100. ************** 00100000
  101. SPACE 00101000
  102. MACRO 00102000
  103. &NAME CMS &PLIST,&PROG=,&ERROR= 00103000
  104. &NAME LA 1,&PLIST 00104000
  105. AIF (N'&PROG EQ 0).SEQ2 00105000
  106. MVC 0(8,1),=CL8'&PROG' 00106000
  107. .SEQ2 SVC X'CA' 00107000
  108. AIF (N'&ERROR EQ 0).SEQ1 00108000
  109. AIF ('&ERROR' EQ 'IGNORE').SEQ3 00109000
  110. AIF ('&ERROR' EQ 'DIE').SEQ4 00110000
  111. DC AL4(&ERROR) 00111000
  112. MEXIT 00112000
  113. .SEQ4 DC AL4(*) ...'DIE' IF UNEXPECTED CMS ERROR... 00113000
  114. MEXIT 00114000
  115. .SEQ3 DC AL4(*+4) 00115000
  116. .SEQ1 MEND 00116000
  117. EJECT 00117000
  118. *. 00118000
  119. * 00119000
  120. * MODULE NAME: 00120000
  121. * 00121000
  122. * DMSEDI (EDIT) 00122000
  123. * 00123000
  124. * FUNCTION: 00124000
  125. * 00125000
  126. * TO MODIFY THE CONTENTS OF AN EXISTING FILE OR TO CREATE 00126000
  127. * A NEW FILE. 00127000
  128. * 00128000
  129. * ATTRIBUTES: 00129000
  130. * 00130000
  131. * DISK RESIDENT 00131000
  132. * 00132000
  133. * ENTRY POINTS: 00133000
  134. * 00134000
  135. * DMSEDI - SEE FUNCTION DESCRIPTION 00135000
  136. * 00136000
  137. * ENTRY CONDITIONS: 00137000
  138. * 00138000
  139. * GPR1 - A(EDCB) 00139000
  140. * 00140000
  141. * EXIT CONDITIONS: 00141000
  142. * 00142000
  143. * NORMAL - GPR15 = 0 00143000
  144. * 00144000
  145. * ERROR - GPR15 ยฌ= 0 00145000
  146. * 00146000
  147. * GPR15 = 20 INVALID CHARACTER 00147000
  148. * 00148000
  149. * 24 INCOMPLETE FILEID 00149000
  150. * 24 INVALID OPTION 00150000
  151. * 24 INVALID LRECL PARAMETER 00151000
  152. * 00152000
  153. * 28 EDIT WORK-FILE "EDIT CMSUT1" EXISTS. 00153000
  154. * IF IT IS WANTED, RENAME THE FILENAME OR FILETYPE; 00154000
  155. * OTHERWISE, ERASE IT. 00155000
  156. * 00156000
  157. * 88 RECORD LENGTH TOO LARGE FOR EDIT 00157000
  158. * 00158000
  159. * 40 GIVE A LARGER RECORD-LENGTH IN THE LRECL PARAMETE 00159000
  160. * 00160000
  161. * 88 FILE TOO LARGE FOR EDIT - INSUFFICIENT STORAGE 00161000
  162. * 00162000
  163. * 100 I/O ERROR, READING/WRITING FILE 00163000
  164. * 00164000
  165. * 00165000
  166. * CALLS TO OTHER ROUTINES: 00166000
  167. * 00167000
  168. * DMSSCR - WRITE TO DISPLAY TERMINAL 00168000
  169. * DMSBWR - WRITE A FILE TO DISK 00169000
  170. * DMSBRD - READ A FILE FROM DISK 00170000
  171. * DMSSTT - VERIFY EXISTENCE OF A FILE 00171000
  172. * DMSRNM - ALTER FILEID 00172000
  173. * DMSCWRB - TYPE INFORMATION TO USER CONSOLE 00173000
  174. * DMSCWT - WAIT ON CONSOLE I/O 00174000
  175. * DMSCRD - WAIT ON CONSOLE RESPONSE 00175000
  176. * DMSCAT - STACK CONSOLE INPUT 00176000
  177. * DMSERS - ERASE UTILITY FILES 00177000
  178. * DMSFNS - 'CLOSE' A FILE 00178000
  179. * 00179000
  180. * EXTERNAL REFERENCES: 00180000
  181. * 00181000
  182. * EDCANON - EXTERNAL CANONICALIZATION ROUTINE 00182000
  183. * 00183000
  184. * EDCMS - 00184000
  185. * EDAFSTFN: ADDRESS OF FINISHED READ BUFFER IN 00185000
  186. * CMS 'NUCON'. 00186000
  187. * 00187000
  188. * EDASTRIN: ADDRESS OF STORAGE INITIALIZATION ROUTINE 00188000
  189. * ('STRINIT') IN CMS 'NUCON'. 00189000
  190. * 00190000
  191. * OPERATION: 00191000
  192. * 00192000
  193. * THE EDIT MODULE IS LOADED INTO STORAGE BY THE EDIT 00193000
  194. * INITIALIZATION MODULE, DMSEDX. IT MAY RESIDE IN A 00194000
  195. * DISCONTIGUOUS SEGMENT OR IN USER STORAGE. DMSEDX 00195000
  196. * GETS FREE STORAGE FOR AND INITIALIZES THE EDIT 00196000
  197. * FREE WORKING STORAGE (EDCB), THEN LOADS AND 00197000
  198. * BRANCHES TO THE EDIT MODULEWITH REGISTER 1 00198000
  199. * CONTAINING THE ADDRESS OF EDCB. 00199000
  200. * UPON ENTRY, A MESSAGE IS TYPED TELLING THE 00200000
  201. * USER HE IS IN THE EDIT ENVIRONMENT AND 'WAITRD' IS CALLED 00201000
  202. * TO READ A LINE FROM THE TERMINAL. IF A NULL LINE IS ENTERED, 00202000
  203. * ANOTHER READ FROM THE TERMINAL IS EXECUTED. 00203000
  204. * IF THE LINE IS NOT NULL, THE FIRST ENTRY ON THE LINE IS 00204000
  205. * ASSUMED TO BE AN EDIT SUB-COMMAND; IF IT IS, A BRANCH IS 00205000
  206. * TAKEN TO THE APPROPRIATE EDIT SUB-ROUTINE TO PROCESS THE 00206000
  207. * COMMAND. 00207000
  208. * IF THE FIRST ENTRY IS NOT RECOGNIZED AS A SUB-COMMAND, 00208000
  209. * AN ERROR MESSAGE IS ISSUED TO THE TERMINAL AND ANOTHER 00209000
  210. * READ IS ISSSUED TO THE TERMINAL. 00210000
  211. * 00211000
  212. *. 00212000
  213. EJECT 00213000
  214. PUNCH 'SPB' @VM03178 00214000
  215. DMSEDI START X'0' 00215000
  216. EDIT EQU * 00216000
  217. LR R10,R14 ADDRESSABILITY FOR 1ST PAGE @V305614 00217000
  218. LA 15,4095 00218000
  219. LA 11,1(10,15) ... FOR 2ND PAGE 00219000
  220. LA 12,1(11,15) ... FOR 3RD PAGE 00220000
  221. USING DMSEDI,10 00221000
  222. USING DMSEDI+4096,11 00222000
  223. USING DMSEDI+8192,12 00223000
  224. USING NUCON,0 @V200714 00224000
  225. USING EDCB,R13 @V305614 00225000
  226. LR R13,R1 SET FREE STOR ADDRESSABILITY @V305614 00226000
  227. DMSKEY USER RUN WITH USER KEY(FOR SAFETY)@VA04825 00227000
  228. SSM FE ALLOW INPUT WHILE EDITTING @VA04825 00228000
  229. CMS CWAIT SYNCHRONIZE OUTPUT @VA04825 00229000
  230. SPACE 1 00230000
  231. REFRESH EQU * @V2D3913 00231000
  232. NI FLAG2,255-INMODE CANNOT BE 'INPUT' MODE @V2D3913 00232000
  233. TM FLAG2,TUBE IS THIS A DISPLAY TERMINAL ? @V2D3913 00233000
  234. BNO PEDIT IF NOT, TYPE 'EDIT:' @V2D3913 00234000
  235. VERIFY RETURN=PEDIT1 @V2D3913 00235000
  236. SPACE 1 00236000
  237. DS 0F @VM03243 00237000
  238. CWAIT DC CL8'CONWAIT' @VM03243 00238000
  239. EJECT 00239000
  240. *********************************************************************** 00240000
  241. * 00241000
  242. * PRINT OUT 'EDIT:' AND ENTER EDIT MODE - ACCEPTING 00242000
  243. * REQUESTS FROM THE USER. 00243000
  244. * 00244000
  245. *********************************************************************** 00245000
  246. SPACE 00246000
  247. MPEDIT EQU * @VA07347 00247000
  248. TM FLAG2,VER IS THIS VERIFY MODE? @VA07347 00248000
  249. BO PEDIT BRANCH IF YES @VA07347 00249000
  250. OI TWITCH,VEROVER SET VERIFY OVERRIDE FLAG @VA07347 00250000
  251. SPACE 1 00251000
  252. PEDIT VTYPE EDITXX @V2D3913 00252000
  253. SPACE 00253000
  254. PEDIT1 EQU * 00254000
  255. EX 0,NEXT6 ZERO X-Y COUNT 00255000
  256. SPACE 00256000
  257. NEXT EQU * NORMAL RETURN POINT FOR NEXT REQUEST 00257000
  258. NI SIGNAL,255-REPL ENSURE REPLACE FUNC IS OFF @VA04196 00258000
  259. TM TWITCH,TOPSW+EOF ENDRANGE? @V2D3913 00259000
  260. BZ NEXT4 BRANCH IF NOT 00260000
  261. NEXT6 EQU * 00261000
  262. XC XYCNT,XYCNT CLEAR X-Y COUNT JUST IN CASE 00262000
  263. NEXT4 EQU * RETURN FROM X OR Y COMMAND 00263000
  264. NI TWITCH,255-(TRUNC+UPWARD) RESET TWITCH, @V2D3913 00264000
  265. MVI SCRFLGS,X'00' SCRFLGS, AND SCRFLG2 FOR @V2D3913 00265000
  266. MVI SCRFLG2,X'00' THE NEXT COMMAND @V2D3913 00266000
  267. L 2,XYCNT GET X-Y COUNT 00267000
  268. LTR 2,2 IS IT ZERO? 00268000
  269. BZ NEXT8 BRANCH IF SO 00269000
  270. BCTR 2,0 MINUS ONE 00270000
  271. ST 2,XYCNT STORE NEW VALUE 00271000
  272. B NEXT5 00272000
  273. SPACE 00273000
  274. NEXT8 EQU * 00274000
  275. NI XYFLAG,255-(XACT+YACT) CLEAR X-ACTIVE AND Y-ACTIVE 00275000
  276. TM SIGNAL,QUOD WAS LAST REQUEST ? OR "? 00276000
  277. BO NEXT10 BRANCH IF SO 00277000
  278. LH 1,COUNT LENGTH OF REQUEST 00278000
  279. STH 1,SAVCNT SAVE IT 00279000
  280. LTR 1,1 TEST IT 00280000
  281. BZ NEXT10 BRANCH IF NOUGHT 00281000
  282. BCTR 1,0 DECREASE FOR EXEC 00282000
  283. EX 1,SAVREQ SAVE THE REQUEST IN TABLIN 00283000
  284. OI SIGNAL,QUOD LIE THAT IT'S A ? OR " (MAY BE NULL LINE) 00284000
  285. NEXT10 EQU * 00285000
  286. BAL 14,RDTYPE READ A LINE FROM THE TERMINAL 00286000
  287. BNZ CKLINSEQ HANDLE EDIT LINE INPUT @VA08152 00286250
  288. NI UTILFLAG,255-LINSEQ RESET ERROR FLAG @VA08152 00286500
  289. B MPEDIT CC=0 MEANS NULL LINE @VA08152 00286750
  290. CKLINSEQ EQU * 00287000
  291. TM UTILFLAG,LINSEQ LINE-NUMBER CONSTRICTION? @VA08152 00287250
  292. BO NEXT10 PURGE INPUT LINES @VA08152 00287500
  293. NI SIGNAL,255-(QUOD+OVER) CLEAR ? AND " AND OVERLAY FLAGS 00288000
  294. XC DITCNT,DITCNT CLEAR DITCNT 00289000
  295. SPACE 00290000
  296. NEXT5 EQU * COME HERE IS IT'S AN X OR Y REQUEST 00291000
  297. XC EDCT,EDCT CLEAR EDCT 00292000
  298. BAL 14,GET GET EDIT TOKEN 00293000
  299. BZ INVREQ INVALID REQUEST IF CC = 0 00294000
  300. NEXT1 EQU * @VA06391 00295000
  301. TM GETFLAG,ALPHA+NONALNUM 00296000
  302. BZ SFIND TOKEN NUMERIC - FIND LINENO. 00297000
  303. SPACE 00298000
  304. LA 2,PRQUEST ADDRESS OF PRE-REQUEST TABLE 00299000
  305. LA 3,PRQEND END OF PRE-REQUEST TABLE 00300000
  306. BAL 14,REQSUB SEARCH TABLE 00301000
  307. LA 14,1 LOAD UP A CONSTANT OF 1 @V200713 00302000
  308. ST 14,REPCNT RESET REPCNT @V200713 00303000
  309. LA 2,RQUEST ADDRESS OF MAIN REQUEST TABLE 00304000
  310. LA 3,REQEND END OF MAIN REQUEST TABLE 00305000
  311. BAL 14,REQSUB SEARCH TABLE 00306000
  312. B INVREQ BRANCH IF NOT FOUND 00307000
  313. SPACE 00308000
  314. SAVREQ MVC TABLIN(*-*),EDLIN SAVE THE LAST REQUEST 00309000
  315. SPACE 00310000
  316. EDITXX DC C'EDIT:' 00311000
  317. EJECT 00312000
  318. ************** 00313000
  319. * 00314000
  320. * SUBROUTINE TO SEARCH REQUEST TABLE. 00315000
  321. * 00316000
  322. * CALL: 00317000
  323. * BAL 14,REQSUB 00318000
  324. * 00319000
  325. * ON ENTRY: 00320000
  326. * R1 HOLDS LENGTH-1 OF GIVEN REQUEST 00321000
  327. * R2 HOLDS STARTING ADDRESS OF REQUEST TABLE 00322000
  328. * R3 HOLDS END ADDRESS OF REQUEST TABLE 00323000
  329. * 00324000
  330. * IF MATCH IS FOUND, A DIRECT BRANCH IS TAKEN FROM HERE 00325000
  331. * TO THE APPROPRIATE ROUTINE. OTHERWISE WE RETURN TO CALLER. 00326000
  332. * 00327000
  333. * (LEVEL 1 SUBROUTINE, CALLED FROM PEDIT. USES REGSAV.) 00328000
  334. * 00329000
  335. ************** 00330000
  336. SPACE 00331000
  337. REQSUB DS 0H 00332000
  338. LA R4,XXXCWD-1(R1) POINT TO END OF ARG @V2D3913 00333000
  339. SR R15,R15 EMPTY A REGISTER @V2D3913 00334000
  340. LR R5,R1 SAVE A COPY OF REG(1) @V2D3913 00335000
  341. CLC 0(2,R4),=CL2'UP' WAS UP SPECIFIED? @V2D3913 00336000
  342. BNE ISITU WASN'T CL2'UP', SO GO ON @V2D3913 00337000
  343. BCTR R1,R0 DECREMENT THE COUNT REGISTER @V2D3913 00338000
  344. B UORUP GO TO COMMON CODE @V2D3913 00339000
  345. ISITU CLI 1(R4),C'U' MAYBE JUST U? @V2D3913 00340000
  346. BNE REQLOOP IF NOT, NOT UPWARD @V2D3913 00341000
  347. UORUP BCTR R1,R0 DECREMENT COUNT REGISTER @V2D3913 00342000
  348. OI TWITCH,UPWARD TURN ON THE UP FLAG @V2D3913 00343000
  349. LTR R1,R1 ANY COUNT LEFT? @V2D3913 00344000
  350. BM NEXLIN IF NOT, IT'S JUST "UP" @V2D3913 00345000
  351. SPACE 1 00346000
  352. REQLOOP EQU * SEARCH THE TABLE 00347000
  353. IC 15,0(2) PICK UP MINIMUM LENGTH OF REQUEST 00348000
  354. BCTR 15,0 DECREASE FOR COMPARISON 00349000
  355. CR 1,15 ENOUGH CHARACTERS TYPED IN? 00350000
  356. IC 15,1(2) (PICK UP MAXIMUM LENGTH ANYWAY) 00351000
  357. BL REQLP1 BRANCH IF NOT ENOUGH CHARACTERS 00352000
  358. CR 1,15 TOO MANY CHARACTERS TYPED IN? 00353000
  359. BNL REQLP1 BRANCH IF SO 00354000
  360. EX 1,REQCOMP DO WE HAVE A MATCH? 00355000
  361. BE REQGO BRANCH IF SO 00356000
  362. REQLP1 LA R2,5(R15,R2) ADDRESS OF NEXT ENTRY IN TABLE. @V2D3913 00357000
  363. CR 2,3 HAVE WE REACHED AND OF TABLE? 00358000
  364. BL REQLOOP LOOP IF NOT 00359000
  365. LR R1,R5 GET BACK THE OLD REG(1) @V2D3913 00360000
  366. BR 14 RETURN 00361000
  367. SPACE 00362000
  368. REQGO EQU * WE MAY HAVE FOUND THE ROUTINE @V2D3913 00363000
  369. TM TWITCH,UPWARD DID IT LOOK LIKE UP @V2D3913 00364000
  370. BNO REQGO1 NOT AT ALL @V2D3913 00365000
  371. CLI 2(R2),X'01' IS UPWARD ALLOWED @V2D3913 00366000
  372. BE REQGO1 O.K. IF SO @V2D3913 00367000
  373. LA R5,4(R2,R1) INDEX INTO VALID COMMAND FORM @V2D3913 00368000
  374. CLI 0(R5),C'U' DOES A 'U' HAPPEN TO BE THERE ? @V2D3913 00369000
  375. BNER R14 DEFINITE ERROR IF NOT @V2D3913 00370000
  376. CLC 0(2,4),=CL2'UP' BUT NOW YOU CAN'T GO UP @V2D3913 00371000
  377. BER R14 ERROR IF YOU TRY @V2D3913 00372000
  378. REQGO1 LA R2,3(R15,R2) GET OFFSET TO APPROVED ROUTINE @V2D3913 00373000
  379. ICM 15,B'0011',0(2) GET DISPL TO COMMAND RTN @V200713 00374000
  380. LA 15,EDIT(15) OFFSET BY BASE @V200713 00375000
  381. BR 15 GO THERE @V200713 00376000
  382. SPACE 2 00377000
  383. REQCOMP CLC XXXCWD(*-*),3(R2) @V2D3913 00378000
  384. EJECT 00379000
  385. * 00380000
  386. ************** 00381000
  387. * 00382000
  388. * DEAL WITH INVALID REQUEST 00383000
  389. * 00384000
  390. ************** 00385000
  391. SPACE 00386000
  392. INVREQ DS 0H INVALID EDIT REQUEST. TELL HIM SO. 00387000
  393. TM FLAG2,LONGSW ARE WE IN LONG MODE? @V1D1613 00388000
  394. BO INVREQ1 BRANCH IF SO 00389000
  395. WTYPE INVD,1,RETURN=INVREQX @V200713 00390000
  396. SPACE 00391000
  397. INVDOT EQU * INVALID MACRO REQUEST 00392000
  398. TM FLAG2,LONGSW ARE WE IN LONG MODE? @V1D1613 00393000
  399. BO INVREQ1 BRANCH IF SO 00394000
  400. WTYPE INVD,2,RETURN=INVREQX @V200713 00395000
  401. SPACE 00396000
  402. INVREQ1 EQU * 00397000
  403. MVC INVLD(L'INVLDHDR),INVLDHDR SET MSG HEADER @VA04733 00398000
  404. LA 1,INVLD ADDRESS OF ERROR MESSAGE 00399000
  405. LA 0,EDLIN-INVLD LENGTH OF '?EDIT: ' 00400000
  406. AH 0,COUNT ADD LENGTH OF REQUEST 00401000
  407. BAL 14,WRTYPE TYPE MESSAGE 00402000
  408. SPACE 00403000
  409. INVREQX EQU * ERROR MESSAGE ALREADY GIVEN 00404000
  410. LH 2,DITCNT GET DITCNT 00405000
  411. LTR 2,2 TEST IT 00406000
  412. BZ NEXT6 BRANCH IF ZERO 00407000
  413. L 3,AFSTFNRD ADDR. TO TEST EXISTENCE OF STACK 00408000
  414. SPACE 1 00409000
  415. UNDITTO EQU * CLEAR THE STACK 00410000
  416. L 1,0(3) VALUE OF FSTFINRD (DOES STACK EXIST?) 00411000
  417. LTR 1,1 00412000
  418. BZ NEXT6 BRANCH IF STACK IS EMPTY 00413000
  419. BAL 14,RDTYPE READ ONE STACKED LINE 00414000
  420. BCT 2,UNDITTO AND LOOP UNTIL DONE 00415000
  421. B NEXT6 00416000
  422. SPACE 2 00417000
  423. INVD DC C'ยฌ$' SHORT FORMS FOR INVALID EDIT REQUEST 00418000
  424. EJECT 00419000
  425. *********************************************************************** 00420000
  426. * 00421000
  427. * ENTER INPUT MODE AND ACCEPT LINES FROM THE CONSOLE 00422000
  428. * AS NEW LINES TO BE PUT IN THE FILE. A NULL LINE 00423000
  429. * TERMINATES THIS MODE AND REVERTS TO EDIT MODE. 00424000
  430. * 00425000
  431. *********************************************************************** 00426000
  432. SPACE 00427000
  433. PINPUT DS 0H TYPE 'INPUT:' IF IN VERIFY MODE 00428000
  434. TM FLAG2,REMOTE+TUBE DISPLAY MODE WITH REMOTE ? @V2D3914 00429000
  435. BNO PINPUT0 NO...BR @V2D3914 00430000
  436. OI SCRFLG2,CANCB DON'T CAUSE MORE STATUS @VM01093 00431000
  437. BAL R14,WRTYPEX ISSUE CONCEL OP TO SCREEN @VM01093 00432000
  438. XI FLAG2,TUBE+SWITCH FLIP TUBE FLAG AND REMEMBER @V2D3914 00433000
  439. PINPUT0 EQU * @V2D3914 00434000
  440. OI FLAG2,INMODE GRAPHICS FLAG @V200714 00435000
  441. TM FLAG2,TUBE DISPLAY TERMINAL ? @V2D3913 00436000
  442. BNO PINPUT1 TYPE 'INPUT:' IF NOT @V2D3913 00437000
  443. TM FLAG2,VER VERIFY ON? @VA04074 00438000
  444. BNO INPUT NO ... BR @VA04074 00439000
  445. MVI SCRFLGS,WRSTATB REWRITE STATUS LINE @VA04074 00440000
  446. VERIFY @V2D3913 00441000
  447. MVI SCRFLGS,WRCLUPB WRITE FROM CL UP @V2D3914 00442000
  448. B INPUT NOW GET NEXT LINE @V2D3913 00443000
  449. SPACE 1 00444000
  450. PINPUT1 EQU * @V2D3913 00445000
  451. VTYPE INPUTXX INDICATE INPUT MODE 00446000
  452. SPACE 00447000
  453. INPUT EQU * 00448000
  454. NI SIGNAL,255-QUOD CLEAR ? AND " FLAG 00449000
  455. TM FLAG,RIGHT+LEFT LINEMODE ON? 00450000
  456. BM PROMPTER GO TO PROMPTING ROUTINE 00451000
  457. SPACE 1 00452000
  458. INP1 EQU * 00453000
  459. BAL 14,RDTYPE READ INPUT LINE 00454000
  460. BNZ INP2 BR IF NOT NULL ENTRY @V2D3914 00455000
  461. NI SIGNAL,255-REPL RESET REPLACE FLAG IF ON @VA04074 00456000
  462. MVI SCRFLGS,WRSTATB CHANGE STATUS FIELD @V2D3914 00457000
  463. TM FLAG2,SWITCH IF WE SET TUBE FLAG OFF, @V2D3914 00458000
  464. BNO REFRESH THEN RESET IT @V2D3914 00459000
  465. XI FLAG2,SWITCH+TUBE ....... @V2D3914 00460000
  466. OI SCRFLGS,WRTOPB CAUSE A FULL DISPLAY @V2D3914 00461000
  467. B REFRESH CLEAN UP AND GO TO EDIT @V2D3914 00462000
  468. INP2 XC EDCT(2),EDCT CLEAR EDIT COUNT @V2D3914 00463000
  469. BAL R4,TAKELINE GO DO THE RIGHT THING @V2D3913 00464000
  470. B INPUT GET THE NEXT LINE @V2D3913 00465000
  471. SPACE 1 00466000
  472. INPUTXX DC C'INPUT:' 00467000
  473. EJECT 00468000
  474. ************************************************************** 00469000
  475. * 00470000
  476. * 'REPLACE' REPLACES THE CURRENT LINE BY THE LINE 00471000
  477. * FOLLOWING THE COMMAND. IF 'REPLACE' IS TYPED ALONE, 00472000
  478. * INPUT MODE IS ENTERED. 00473000
  479. * 00474000
  480. *********************************************************************** 00475000
  481. SPACE 00476000
  482. RETYPE DS 0H TR 00477000
  483. LA R2,1 SET THE REPLACE SIGNAL @V2D3913 00478000
  484. TM TWITCH,TOPSW+EOF ARE WE AT TOP OR EOF? 00479000
  485. BZ RTYP1 FLAG IS CORRECT @V2D3913 00480000
  486. SPACE 1 00481000
  487. INSERT EQU * @V2D3913 00482000
  488. SR R2,R2 SET THE INSERT FLAG @V2D3913 00483000
  489. SPACE 00484000
  490. RTYP1 EQU * 00485000
  491. CLC EDCT(2),COUNT WAS NULL LINE ENTERED? 00486000
  492. BL RTYP4 BRANCH IF NOT 00487000
  493. LTR 2,2 IS THIS INSERT 00488000
  494. BZ PINPUT THEN GO DIRECTLY TO INPUT @V2D3913 00489000
  495. OI SIGNAL,REPL SET TRICKY REPLACE MODE 00490000
  496. B PINPUT NOW GO TO INPUT @V2D3913 00491000
  497. SPACE 00492000
  498. RTYP4 EQU * 00493000
  499. TM FLAG,LEFT+RIGHT LINEMODE ON? 00494000
  500. BM INVREQ ERROR IF SO 00495000
  501. MVI SCRFLGS,WRCLUPB WRITE ALL CHANGES @V2D3914 00496000
  502. LTR R2,R2 IS THIS INSERT? @V2D3913 00497000
  503. BZ RTYP5 ALL SET IN THAT CASE @V2D3913 00498000
  504. SPACE 1 00499000
  505. RTYP4A EQU * @V2D3913 00500000
  506. OI SIGNAL,REPL SET THE REPLACE FLAG @V2D3913 00501000
  507. MVI SCRFLGS,WRCLB ONLY CL CHANGED @V2D3914 00502000
  508. SPACE 1 00503000
  509. RTYP5 EQU * 00504000
  510. BAL R4,TAKELINE GO DO THE RIGHT THING @V2D3913 00505000
  511. B NEXT ALL DONE @V2D3913 00506000
  512. EJECT 00507000
  513. ************** 00508000
  514. * 00509000
  515. * TAKELINE INSERTS OR REPLACES LINES IN STORAGE 00510000
  516. * ACCORDING TO THE SETTING OF THE REPL SWITCH IN FLAG 00511000
  517. * 00512000
  518. ************** 00513000
  519. SPACE 1 00514000
  520. TAKELINE DS 0H @V2D3913 00515000
  521. BAL R14,SPREAD UN-TAB THE LINE @V2D3913 00516000
  522. NI CHNGFLAG,255-DTYPE TURN OFF DISPLAY TYPE FLAG @VA04851 00517000
  523. L R14,ITEM GET THE ITEM LENGTH @V2D3913 00518000
  524. BCTR R14,R0 LESS 1 FOR EXECUTE @V2D3913 00519000
  525. EX R14,INMOVE MOVE CHARACTERS TO 'LINE' @V2D3913 00520000
  526. LA R1,LINE WHERE IS LINE? @V2D3913 00521000
  527. TM FLAG,LEFT+RIGHT LINEMODE ON? @V2D3913 00522000
  528. BZ TL1 SKIP IF NOT. @V2D3913 00523000
  529. LR R3,R1 MAKE A COPY OF A(LINE) @V2D3913 00524000
  530. TM SIGNAL,REPL DISPLAY TYPE CHANGE ? @V2D3914 00525000
  531. BNO TL0 NO ... BR @V2D3914 00526000
  532. L R3,PTR2 SAVE THE OLD LINE NUMBER @V2D3914 00527000
  533. AH R3,LMSTART ADD LINENUMBER OFFSET @V2D3914 00528000
  534. MVC PADBUF+3(5),8(R3) FROM THE CORE CHAIN @V2D3914 00529000
  535. TM FLAG,LINE8 LONG LINE NUMBERS ? @V2D3914 00530000
  536. BNO TL0 NO ... BR @V2D3914 00531000
  537. MVC PADBUF(8),8(R3) MOVE IN OLD NUMBER @V2D3914 00532000
  538. TL0 LR R3,R1 MAKE A COPY OF A(LINE) @V2D3914 00533000
  539. AH R3,LMSTART GET LINENUMBER OFFSET @V2D3913 00534000
  540. TM FLAG,RIGHT LINEMODE RIGHT ? @V2D3914 00535000
  541. BO TLRIGHT YES ... BR @V2D3914 00536000
  542. MVC 0(5,R3),PADBUF+3 MOVE 5 DIGIT LINENUMBER @V2D3913 00537000
  543. TM FLAG,LINE8 IS THIS A LONG LINENUMBER? @V2D3913 00538000
  544. BNO TL1 ALL DONE IF NOT. @V2D3913 00539000
  545. MVC 0(8,R3),PADBUF CHANGE THE LINENUMBER @V2D3913 00540000
  546. B TL1 DONE WITH LONG LINENUMBERS @V2D3914 00541000
  547. TLRIGHT MVC 0(5,R3),PADBUF+3 CHANGE RIGHT LINENUMBER @V2D3914 00542000
  548. TL1 TM SIGNAL,REPL TRICKY REPLACE MODE? @V2D3913 00543000
  549. BNZ TL2 YEP ... BR @VA04074 00544000
  550. BAL R14,XWRITE WRITE OUT THE LINE @V2D3913 00545000
  551. BNL TL3 BRANCH IF NO OVERFLOW. @V2D3913 00546000
  552. TLERR EQU * COME HERE IF AUTOSAVE ERROR @VA04190 00547000
  553. NI FLAG2,255-INMODE RESET INPUT MODE FLAG @VA04190 00548000
  554. TM FLAG2,TUBE DISPLAY TERMINAL? @VA04190 00549000
  555. BNO MPEDIT NO ... GO TYPE 'EDIT' @VA04190 00550000
  556. OI SCRFLG2,MOREB MAKE SURE SEES PREV MSG @VA04190 00551000
  557. MVI SCRFLGS,WRSTATB CHG STATUS TO EDIT @VA04190 00552000
  558. TM FLAG2,VER VERIFY ON? @VA04190 00553000
  559. BZ MPEDIT NO ... JUST TYPE 'EDIT' @VA04190 00554000
  560. OI SCRFLGS,WRFULLB REWRITE SCREEN AND @VA04190 00555000
  561. B MPEDIT GO TYPE 'EDIT' @VA04190 00556000
  562. SPACE 1 00557000
  563. TL2 NI SIGNAL,255-REPL ONLY HAPPENS ONCE @V2D3913 00558000
  564. BAL R14,XREPLX REPLACE THE CURRENT LINE. @V2D3913 00559000
  565. TL3 TM TWITCH,TRUNC TRUNCATED? @V2D3913 00560000
  566. BO TL4 IF NOT, CONTINUE @V2D3913 00561000
  567. TM FLAG2,TUBE GRAPHICS? @V2D3913 00562000
  568. BNOR R4 IF NOT, ALL DONE. @V2D3913 00563000
  569. BAL R14,VERSUB SHOW THE NEW LINE. @V2D3913 00564000
  570. BR R4 NOW RETURN @V2D3913 00565000
  571. SPACE 1 00566000
  572. TL4 WTYPE TRUNCX @V2D3913 00567000
  573. NI TWITCH,255-TRUNC RESET TRUNCATION FLAG @V2D3913 00568000
  574. TM FLAG2,TUBE IS THIS A SCREEN @V2D3913 00569000
  575. BOR R4 ALL DONE IF SO @V2D3913 00570000
  576. LH R0,TRUNCOL SET THE TYPING LENGTH @V2D3913 00571000
  577. LA R1,LINE AND THE TARGET ADDRESS. @V2D3913 00572000
  578. BAL R14,WRTYPE3 DISPLAY THE CURRENT RESULT @V2D3913 00573000
  579. BR R4 @V2D3913 00574000
  580. EJECT 00575000
  581. *********************************************************************** 00576000
  582. * 00577000
  583. * 'TYPE' WILL PRINT OUT THE CURRENT LINE AND THE 00578000
  584. * NEXT N-1 LINES. 00579000
  585. * 00580000
  586. *********************************************************************** 00581000
  587. SPACE 00582000
  588. PRINT DS 0H 00583000
  589. BAL 14,NUM GET PARM 00584000
  590. BAL 14,STARCHK IF NOT NUMERIC, HOPEFULLY * 00585000
  591. LR 2,0 SAVE IN R2 00586000
  592. LH R3,VERLEN SAVE VERIFY LENGTH FOR LATER @V2D3914 00587000
  593. LH R4,VERCOL1 AND THE 1ST VERIFY COLUMN @V2D3914 00588000
  594. BCTR R4,R0 MINUS 1 AS AN INDEX TO THE LINE@V2D3914 00589000
  595. BAL 14,NUM LOOK FOR SECOND ARGUMENT 00590000
  596. B PRINSTAR CHECK FOR '*' IF NOT NUMERIC 00591000
  597. BL PRINT1 BRANCH IF NOTHING THERE (USE VERCOL) 00592000
  598. C 0,ITEM COMPARE WITH ITEM LENGTH 00593000
  599. BH INVREQ BRANCH IF GREATER (INVALID) 00594000
  600. LR 3,0 SET COLUMN LIMIT AS GIVEN 00595000
  601. LTR R3,R3 CHECK IF NUMBER OF COLUMNS = 0 @VA07129 00596000
  602. BZ INVREQ YES (INVALID REQUEST) @VA07129 00597000
  603. PRINCHK EQU * CHECK NO MORE ARGUMENTS 00598000
  604. BAL 14,PARMCHK CHECK NO MORE PARMS 00599000
  605. PRINT1 EQU * 00600000
  606. LTR R0,R2 HOW MANY LINES? @V2D3913 00601000
  607. BZ NEXT BRANCH IF NONE 00602000
  608. TM FLAG2,TUBE DISPLAY TERMINAL ? @V200714 00603000
  609. BNO PRINTSK NO...BR @V200714 00604000
  610. OI TWITCH,VEROVER SET VERIFY OVERRIDE @V2D3913 00605000
  611. BCT R0,TYPIN DECREMENT COUNT + USE NEXT @V2D3914 00606000
  612. B LOCFND1 UNLESS NO COUNT @V2D3914 00607000
  613. SPACE 1 00608000
  614. PRINTSK EQU * @V200714 00609000
  615. L R1,PTR2 GET THE CL POINTER @V2D3913 00610000
  616. BAL R14,EORCHK TEST FILE BOUNDS @V2D3913 00611000
  617. B PRINTLP1 MUST TYPE 'TOF' OR 'EOF' @V2D3913 00612000
  618. B PRINTLP2 GO TYPE THE CURENT LINE @V2D3913 00613000
  619. SPACE 00614000
  620. PRINTLP EQU * 00615000
  621. BAL R14,XNEXT GET POINTER TO NEXT LINE @V2D3913 00616000
  622. TM TWITCH,TOPSW+EOF ENDRANGE? @V2D3913 00617000
  623. BZ PRINTLP2 CONTINUE IF NOT @V2D3913 00618000
  624. PRINTLP1 LA R2,1 FUDGE LOOP-COUNT @V2D3913 00619000
  625. SPACE 1 00620000
  626. PRINTLP2 EQU * @V2D3913 00621000
  627. LR R0,R3 REFRESH VERIFY COLUMN @V2D3913 00622000
  628. LA R1,8(R4,R1) POINT TO THE VERIFICATION COLUMN @V2D3914 00623000
  629. BAL 14,WRTYPE2 TYPE LINE 00624000
  630. BCT R2,PRINTLP LOOP 'TIL COUNT EXHAUSTED @V2D3913 00625000
  631. B NEXT BRANCH IF ALL DONE 00626000
  632. SPACE 00627000
  633. PRINSTAR EQU * CHECK UP ON '*' 00628000
  634. BAL 14,STARCHK IF NOT '*', ERROR - DON'T RETURN 00629000
  635. L 3,ITEM SET COLUMN LIMIT TO ITEM LENGTH 00630000
  636. SR R4,R4 IGNOR VERIFY COLUMN @VA04968 00631000
  637. B PRINCHK GO CHECK NO MORE ARGUMENTS 00632000
  638. EJECT 00633000
  639. *********************************************************************** 00634000
  640. ** 00635000
  641. ** XWRITE--INSERT A LINE INTO CORE 00636000
  642. ** 00637000
  643. ** INPUT-- 00638000
  644. ** R1--ADDRESS OF LINE TO BE WRITTEN 00639000
  645. ** R14--RETURN ADDRESS 00640000
  646. ** 00641000
  647. ** OUTPUT-- 00642000
  648. ** THE UPDATED LIST 00643000
  649. ** PTR2=>INSERT (AS IF INSERT HAS JUST BEEN READ) 00644000
  650. ** (LINE JUST READ)=>INSERT=>(NEXT LINE) 00645000
  651. ** 00646000
  652. ** EXIT-- 00647000
  653. ** RETURN VIA R14 00648000
  654. ** CC SET NEGATIVE IF CORE EXHAUSTED 00649000
  655. ** 00650000
  656. ** (LEVEL 1 SUBROUTINE. USES REGSAV.) 00651000
  657. ** 00652000
  658. *********************************************************************** 00653000
  659. SPACE 00654000
  660. XWRITE DS 0H 00655000
  661. NI TWITCH,255-(TOPSW+EOF) NOT AT TOP OR BOTTOM 00656000
  662. ST 14,REGSAV SAVE RETURN 00657000
  663. L 14,SPARES NUMBER OF SPARES LEFT IN CORE 00658000
  664. LTR 14,14 ANY? 00659000
  665. BZ CORBUST BRANCH IF NOT 00660000
  666. BCTR 14,0 REDUCE BY 1 00661000
  667. ST 14,SPARES AND STORE AS NEW VALUE OF SPARES 00662000
  668. L 15,FPTR LOAD FREE-LIST POINTER 00663000
  669. LTR 15,15 IS LIST EMPTY 00664000
  670. BNZ XWRIT08 NO, WE'RE OK 00665000
  671. L 15,AEXTEND LIMIT TO WHICH WE'VE GONE SO FAR 00666000
  672. SR 0,0 CLEAR FORWARD CHAIN OF NEW LINE 00667000
  673. ST 0,0(,15) 00668000
  674. LR 0,15 COMPUTE NEW BOUND 00669000
  675. A 0,CORITEM 00670000
  676. ST 0,AEXTEND AND SAVE IN AEXTEND 00671000
  677. SPACE 00672000
  678. XWRIT08 EQU * 00673000
  679. L 0,0(,15) LOAD NEXT ENTRY ADDRESS 00674000
  680. ST 0,FPTR AND UPDATE FREE-LIST POINTER 00675000
  681. L 14,ITEM LOAD ITEM LENGTH 00676000
  682. BCTR 14,0 MINUS '1' FOR 'EX' 00677000
  683. EX 14,XWRIT02 MOVE IN LINE 00678000
  684. L 1,PTR2 GR1=A(OLD ITEM) 00679000
  685. ST 15,PTR2 READ PTR POINTS TO ITEM 00680000
  686. L 14,0(,1) GR14=A(OLD+1) 00681000
  687. ST 14,0(,15) E =>OLD+1 00682000
  688. LTR 14,14 IS OLD+1=EOF 00683000
  689. BNZ XWRIT08A NO ... BR @V2D3913 00684000
  690. ST R15,PTR3 RESET BOTTOM LINE POINTER @V2D3913 00685000
  691. B XWRIT08B CONTINUE @V2D3913 00686000
  692. EJECT 00687000
  693. XWRIT08A EQU * @V2D3913 00688000
  694. ST 15,4(,14) NO, E <= OLD+1 00689000
  695. XWRIT08B EQU * @V2D3913 00690000
  696. ST 1,4(,15) OLD <= E 00691000
  697. ST 15,0(,1) OLD => E 00692000
  698. BAL 14,AUTOCHEK CHECK FOR AUTO. SAVING @V200706 00693000
  699. L 14,SPARES 00694000
  700. LTR 14,14 HOW MANY SPARES LEFT? 00695000
  701. BZ CORFULL BRANCH IF NONE 00696000
  702. SR 15,15 CLEAR CONDITION CODE 00697000
  703. XWRITEX EQU * RETURN FROM 'XWRITE' 00698000
  704. L 14,REGSAV RESTORE RETURN ADDRESS 00699000
  705. BR 14 RETURN TO CALLER 00700000
  706. SPACE 00701000
  707. XWRIT02 MVC 8(*-*,15),0(1) BLANK 'MVC' FOR 'EX' 00702000
  708. EJECT 00703000
  709. ****************************************************************** 00704000
  710. * 00705000
  711. * 'AUTOCHEK' IS CALLED TO CHECK FOR ACTIVE AUTOMATIC SAVING 00706000
  712. * OF THE UPDATED FILE. ANY UPDATING SUBROUTINE (XWRITE, 00707000
  713. * XREPL OR XDELE) CALLS BY BAL 14,AUTOCHEK . 00708000
  714. * 00709000
  715. * (LEVEL 2 SUBROUTINE. USES AUTOREG.) 00710000
  716. * 00711000
  717. ****************************************************************** 00712000
  718. SPACE 1 00713000
  719. AUTOCHEK EQU * COME HERE TOO FROM 'REPLACE'@V200706 00714000
  720. TM SIGNAL,AUTOFLAG AUTO. SAVE ACTIVE? @V200706 00715000
  721. BCR 8,14 IF NOT, RETURN @V200706 00716000
  722. STM 13,9,AUTOREG SAVE CALLER'S STUFF @V200706 00717000
  723. LH 1,AUTOCURR IF SO, BUMP THE LINE COUNT @V200706 00718000
  724. LA 1,1(,1) @V200706 00719000
  725. CH 1,AUTOCNT AND CHEK FOR LIMIT @V200706 00720000
  726. BL UPAUTO @V200706 00721000
  727. OI SIGNAL,AUTOSVFL IF LIMIT REACHED, SAVE. @V200706 00722000
  728. MVC NEWNAME(18),FNAME MAKE SURE WE IDENTIFY IT @V200706 00723000
  729. B FILE1 @V200706 00724000
  730. UPAUTO STH 1,AUTOCURR @V200706 00725000
  731. SAVRET EQU * COME HERE AFTER AUTO. SAVE @V200706 00726000
  732. LM 13,9,AUTOREG @V200706 00727000
  733. BR 14 RETURN TO CALLING SUBROUTINE@V200706 00728000
  734. EJECT 00729000
  735. *********************************************************************** 00730000
  736. ** 00731000
  737. ** XREPL--REPLACE A LINE IN CORE 00732000
  738. ** 00733000
  739. ** INPUT-- 00734000
  740. ** UPDATE LINE IN 'LINE' 00735000
  741. ** R14--RETURN REGISTER 00736000
  742. ** 00737000
  743. ** OUTPUT-- 00738000
  744. ** UPDATED LINE IN CORE 00739000
  745. ** 00740000
  746. ** EXITS-- 00741000
  747. ** RETURN TO CALLER 00742000
  748. ** 00743000
  749. * (LEVEL N SUBROUTINE. USES REGSAV ) 00744000
  750. ** 00745000
  751. *********************************************************************** 00746000
  752. SPACE 00747000
  753. XREPL DS 0H @V2D3914 00748000
  754. TM FLAG,CAN CANONICALIZATION ON? 00749000
  755. BZ XREPLX BRANCH IF NOT 00750000
  756. LA 1,LINE 00751000
  757. L 0,ITEM ITEM LENGTH IN R0 00752000
  758. BAL 15,CANON GO CANONICALIZE 00753000
  759. SPACE 00754000
  760. XREPLX EQU * 00755000
  761. ST 14,REGSAV SAVE CALLER'S ADDRESS @V200706 00756000
  762. L 15,PTR2 LOAD READ POINTER 00757000
  763. L 1,ITEM LOAD ITEM LENGTH 00758000
  764. BCTR 1,0 MINUS '1' FOR 'EX' 00759000
  765. EX 1,XREPL01 UPDATE RECORD IN LIST 00760000
  766. TM TWITCH,SAVOVER OVERRIDE AUTOSAVE ? @V2D3914 00761000
  767. BO NOSAV YES ... BR @V2D3914 00762000
  768. BAL 14,AUTOCHEK CHECK FOR AUTO. SAVING @V200706 00763000
  769. NOSAV L R14,REGSAV RESTORE RETURN REG @V2D3914 00764000
  770. BR 14 AND RETURN TO CALLER 00765000
  771. SPACE 00766000
  772. XREPL01 MVC 8(*-*,15),LINE BLANK 'MVC' FOR 'EX' 00767000
  773. EJECT 00768000
  774. *********************************************************************** 00769000
  775. ** 00770000
  776. ** XREAD--READ AN LINE FROM CORE 00771000
  777. ** 00772000
  778. ** INPUT-- 00773000
  779. ** R14--RETURN ADDRESS 00774000
  780. ** 00775000
  781. ** OUTPUT-- 00776000
  782. ** THE NEXT LINE IN 'LINE' 00777000
  783. ** 00778000
  784. ** EXITS-- 00779000
  785. ** VIA R14 ONLY 00780000
  786. ** (EOF FLAG SET IF AT EOF) 00781000
  787. ** 00782000
  788. ** (LEVEL 1 SUBROUTINE. USES REGSAV.) 00783000
  789. ** 00784000
  790. *********************************************************************** 00785000
  791. SPACE 00786000
  792. XREAD DS 0H 00787000
  793. ST 14,REGSAV SAVE R14 00788000
  794. BAL 14,XNEXT CALL XNEXT TO DO THE WORK 00789000
  795. L 14,REGSAV RESTORE R14 00790000
  796. SPACE 00791000
  797. XREADB EQU * SECONDARY ENTRY POINT 00792000
  798. L 15,ITEM LOAD ITEM LENGTH 00793000
  799. L R1,PTR2 REFRESH POINTER TO CL @V2D3913 00794000
  800. BCTR 15,0 MINUS '1' FOR 'MVC' 00795000
  801. EX 15,XREAD02 MOVE DATA INTO 'LINE' 00796000
  802. BR 14 AND RETURN TO CALLER 00797000
  803. SPACE 2 00798000
  804. XREAD02 MVC LINE(*-*),8(1) BLANK 'MVC' FOR 'EX' 00799000
  805. EJECT 00800000
  806. *********************************************************************** 00801000
  807. ** 00802000
  808. ** XNEXT (AND XNEXTA) -- CHAIN TO NEXT LINE IN CORE 00803000
  809. ** WITHOUT MOVING THE CONTENTS 00804000
  810. ** 00805000
  811. ** CALL: 00806000
  812. ** BAL 14,XNEXT (OR BAL 14,XNEXTA) 00807000
  813. ** 00808000
  814. ** ACTION: 00809000
  815. ** SETS NEW VALUE OF READ POINTER (PTR2); 00810000
  816. * SETS EOF OR TOPSW AS APPROPRIATE. 00811000
  817. ** 00812000
  818. ** EXIT: 00813000
  819. ** BR 14 00814000
  820. ** 00815000
  821. ** (LEVEL 1 SUBROUTINE; LEVEL N WHEN CALLED FROM 00816000
  822. ** XREAD OR XDELE.) 00817000
  823. ** 00818000
  824. *********************************************************************** 00819000
  825. SPACE 00820000
  826. XNEXT DS 0H 00821000
  827. L R15,PTR2 GET THE CURRENT LINE POINTER @V2D3913 00822000
  828. TM TWITCH,UPWARD IS THIS AN UP REQUEST @V2D3913 00823000
  829. BO XNEXTA IF SO, GO HANDLE @V2D3913 00824000
  830. L R1,0(,R15) GR1 = A(OLD+1) @V2D3913 00825000
  831. LTR R1,R1 IS OLD+1 = EOF ? @V2D3913 00826000
  832. BNZ XNEXTB NO ... BR @V2D3913 00827000
  833. OI TWITCH,EOF TURN ON THE EOF INDICATOR @V2D3913 00828000
  834. NI TWITCH,255-TOPSW TURN OFF TOF INDICATOR @V2D3913 00829000
  835. LR R1,R15 LOAD PTR INTO PARM REG @V2D3913 00830000
  836. BR R14 RETURN @V2D3913 00831000
  837. SPACE 1 00832000
  838. XNEXTA L R1,4(,R15) GR1 = A(OLD-1) @V2D3913 00833000
  839. LTR R1,R1 IS OLD-1= TOF ? @V2D3913 00834000
  840. BZ XNEXTC YES ... BR @V2D3913 00835000
  841. C R15,PTR1 ARE WE AT TOF ? @V2D3913 00836000
  842. BNE XNEXTB NO ... BR @V2D3913 00837000
  843. TM TWITCH,EOF ARE WE AT EOF ? @V2D3913 00838000
  844. BO XNEXTB YES ... BR @V2D3913 00839000
  845. LA R15,PTR1 SET CURRENT LINE POINTER @V2D3913 00840000
  846. ST R15,PTR2 TO TOF AND @V2D3913 00841000
  847. B XNEXTC SET FLAG @V2D3913 00842000
  848. SPACE 1 00843000
  849. XNEXTB TM TWITCH,EOF ARE WE AT EOF ? @V2D3913 00844000
  850. BZ XNEXTB1 NO ... BR @V2D3913 00845000
  851. LR R1,R15 DON'T CHANGE CURRENT LINE PTR @V2D3913 00846000
  852. XNEXTB1 ST R1,PTR2 LOAD CURRENT LINE PTR @V2D3913 00847000
  853. NI TWITCH,255-(TOPSW+EOF) RESET LIMIT FLAGS @V2D3913 00848000
  854. BR R14 RETURN @V2D3913 00849000
  855. SPACE 1 00850000
  856. XNEXTC OI TWITCH,TOPSW SET TOF @V2D3913 00851000
  857. NI TWITCH,255-EOF RESET EOF @V2D3913 00852000
  858. LR R1,R15 LOAD PTR INTO PARM REG @V2D3913 00853000
  859. BR R14 RETURN @V2D3913 00854000
  860. EJECT 00855000
  861. *********************************************************************** 00856000
  862. * 00857000
  863. * CLOSE IS A SUBROUTINE WHICH SETS THE TOP LINE AS THE 00858000
  864. * CURRENT LINE UNLESS AT TOF WHEN GOING UPWARD 00859000
  865. * IN WHICH CASE EOF IS SET. 00860000
  866. * 00861000
  867. * CALL: 00862000
  868. * BAL 14,CLOSE 00863000
  869. * 00864000
  870. * (LEVEL 1 SUBROUTINE) 00865000
  871. * 00866000
  872. *********************************************************************** 00867000
  873. SPACE 00868000
  874. CLOSE DS 0H 00869000
  875. TM TWITCH,UPWARD+TOPSW TOF & UPWARD? @V2D3913 00870000
  876. BO CLOSE1 HANDLE IF SO @V2D3913 00871000
  877. OI TWITCH,TOPSW BACK AT TOP OF FILE 00872000
  878. NI TWITCH,255-EOF CLEAR EOF BIT 00873000
  879. LA 0,PTR1 POINT TO 'TOP' OF FILE 00874000
  880. CLOSEX EQU * @V2D3913 00875000
  881. ST 0,PTR2 RESET READ POINTER 00876000
  882. BR 14 AND RETURN TO CALLER 00877000
  883. SPACE 1 00878000
  884. CLOSE1 OI TWITCH,EOF SET END-OF-FILE @V2D3913 00879000
  885. NI TWITCH,255-TOPSW TURN OFF TOF @V2D3913 00880000
  886. L R0,PTR3 LOAD BOTTOM LINE PTR @V2D3913 00881000
  887. B CLOSEX JOIN COMMON CODE @V2D3913 00882000
  888. SPACE 3 00883000
  889. *************************************************************** 00884000
  890. * 00885000
  891. * EORCHK CHECKS FOR TOPSW+UPWARD OR EOF+ยฌUPWARD 00886000
  892. * 00887000
  893. *************************************************************** 00888000
  894. SPACE 1 00889000
  895. EORCHK DS 0H @V2D3913 00890000
  896. TM TWITCH,TOPSW+UPWARD UPPER BOUND? @V2D3913 00891000
  897. BOR R14 RETURN, IF SO. @V2D3913 00892000
  898. TM TWITCH,UPWARD IS THE DIRECTION UPWARD AT ALL? @V2D3913 00893000
  899. BO 4(,R14) NO PROBLEM, IF SO. @V2D3913 00894000
  900. TM TWITCH,EOF THEN, IS IT END-OF-FILE? @V2D3913 00895000
  901. BOR R14 RETURN, IF SO. @V2D3913 00896000
  902. B 4(,R14) ALL ELSE IS OK @V2D3913 00897000
  903. EJECT 00898000
  904. *************************************************************** 00899000
  905. * 00900000
  906. * 'NOTFOUND' AND 'ENDRANGE' ARE BRANCHED TO FROM ALL 00901000
  907. * OVER THE PLACE AND TYPE 'EOF' OR 'TOF' AS REQUIRED 00902000
  908. * 00903000
  909. *********************************************************************** 00904000
  910. SPACE 00905000
  911. NOTFOUND DS 0H (COME HERE FROM FIND, LOCATE AND CHANGE) 00906000
  912. MVI SCRFLGS,WRFULLB REWRITE ALL TEXT @V2D3913 00907000
  913. WTYPE FLDNTFND TELL HIM FIELD NOT FOUND 00908000
  914. TM FLAG2,TUBE DISPLAY TUBE? @V2D3913 00909000
  915. BO NEXT SCREEN LOOKS FINE IF SO @V2D3913 00910000
  916. SPACE 1 00911000
  917. ENDRANGE TM TWITCH,EOF+TOPSW ENDRANGE? @V2D3913 00912000
  918. BZ NEXT NOPE, SO GET NEXT REQUEST @V2D3913 00913000
  919. ENDRANG1 OI SCRFLGS,WRFULLB @V2D3913 00914000
  920. VERIFY RETURN=NEXT @V2D3913 00915000
  921. SPACE 1 00916000
  922. EOFREC DC C'EOF:' 00917000
  923. TOPMSG DC C'TOF:' @V200713 00918000
  924. EJECT 00919000
  925. *********************************************************************** 00920000
  926. * 00921000
  927. * VERSUB--VERIFY SUBROUTINE (IT FIGURES) 00922000
  928. * 00923000
  929. * INPUT-- 00924000
  930. * R14--RETURN REGISTER 00925000
  931. * 00926000
  932. * OUTPUT-- 00927000
  933. * TYPED OUT LINE IF IN VERIFY MODE 00928000
  934. * 00929000
  935. * EXITS-- 00930000
  936. * RETURN VIA R14 ONLY 00931000
  937. * 00932000
  938. * (LEVEL 1 SUBROUTINE; ALSO CALLED AS LEVEL 2 SUBROUTINE 00933000
  939. * FROM REPT ONLY. USES REGSAV.) 00934000
  940. * 00935000
  941. *********************************************************************** 00936000
  942. SPACE 00937000
  943. VERSUB DS 0H 00938000
  944. TM FLAG2,VER VERIFY MODE? @V1D1613 00939000
  945. BO MVERSUB YES ... BR @V2D3913 00940000
  946. TM TWITCH,VEROVER IMMEDIATE VERIFY(OVERRIDE)? @V2D3913 00941000
  947. BZR R14 NO ... BR @V2D3913 00942000
  948. NI TWITCH,255-VEROVER RESET OVERRIDE FLAG @V2D3913 00943000
  949. MVERSUB STM 14,1,REGSAV @V2D3913 00944000
  950. TM SCRFLGS,WRCLB+WRCLUPB+WRCLDNB+WRSTATB @V2D3913 00945000
  951. BNZ VERTYP JUST DISPLAY AS SPECIFIED @V2D3913 00946000
  952. OI SCRFLGS,WRTOPB WRITE ALL IF NO SPECIFIC REQUEST @V2D3913 00947000
  953. VERTYP LH R0,VERLEN LOAD VERIFY LENGTH @V2D3914 00948000
  954. L R1,PTR2 POINT TO THE CURRENT LINE @V2D3913 00949000
  955. LH R14,VERCOL1 SET VERIFY INDEX FOR @V2D3914 00950000
  956. BCTR R14,R0 WRTYPE @V2D3914 00951000
  957. LA R1,8(R14,R1) POINT TO DATA PORTION @V2D3914 00952000
  958. BAL 14,WRTYPE2 TYPE LINE 00953000
  959. LM 14,1,REGSAV RESTORE REGISTERS 00954000
  960. BR 14 RETURN TO CALLER 00955000
  961. EJECT 00956000
  962. *********************************************************************** 00957000
  963. * 00958000
  964. * PARMCHK CHECKS WHETHER WE HAVE REACHED THE END OF THE 00959000
  965. * ARGUMENT LIST. 00960000
  966. * IF WE HAVE, IT RETURNS IMMEDIATELY. 00961000
  967. * OTHERWISE IT JUMPS TO INVREQ. 00962000
  968. * 00963000
  969. * CALL: 00964000
  970. * BAL 14,PARMCHK 00965000
  971. * 00966000
  972. * (LEVEL 1 SUBROUTINE) 00967000
  973. * 00968000
  974. *********************************************************************** 00969000
  975. SPACE 00970000
  976. PARMCHK DS 0H 00971000
  977. STM 14,1,REGSAV SAVE REGS 00972000
  978. LH 1,COUNT 00973000
  979. SH 1,EDCT NO OF CHARS LEFT 00974000
  980. BZ PARMRET NONE - RETURN PRONTO 00975000
  981. BAL 14,GET CALL GET 00976000
  982. BNZ INVREQ BRANCH IF PARMS 00977000
  983. PARMRET EQU * 00978000
  984. LM 14,1,REGSAV RESTORE REGS 00979000
  985. BR 14 RETURN 00980000
  986. SPACE 4 00981000
  987. *********************************************************************** 00982000
  988. * 00983000
  989. * STARCHK CHECKS WHETHER XXXCWD CONTAINS '*' AND RETURNS WITH 00984000
  990. * R0 = -1 AND CC +VE IF IT DOES. 00985000
  991. * OTHERWISE IT JUMPS TO INVREQ. 00986000
  992. * 00987000
  993. * CALL: 00988000
  994. * BAL 14,STARCHK 00989000
  995. * 00990000
  996. * (LEVEL 1 SUBROUTINE) 00991000
  997. * 00992000
  998. *********************************************************************** 00993000
  999. SPACE 00994000
  1000. STARCHK DS 0H 00995000
  1001. CLI XXXCWD,C'*' 00996000
  1002. BNE INVREQ 00997000
  1003. SR 0,0 00998000
  1004. BCTR 0,0 SET FOR INFINITE LOOP 00999000
  1005. LPR 1,0 SET CC +VE 01000000
  1006. BR 14 RETURN 01001000
  1007. EJECT 01002000
  1008. *********************************************************************** 01003000
  1009. * 01004000
  1010. * GET SCANS EDLIN FROM EDCT AND PUTS THE NEXT TOKEN IN XXXCWD. 01005000
  1011. * 01006000
  1012. * CALL: 01007000
  1013. * BAL 14,GET 01008000
  1014. * 01009000
  1015. * WILL BRANCH DIRECTLY TO INVREQ (INVALID EDIT REQUEST) IF 01010000
  1016. * A TOKEN IS LONGER THAN 8 CHARACTERS, OR IF IT IS NOT 01011000
  1017. * APPROPRIATELY DELIMITED. 01012000
  1018. * 01013000
  1019. * (LEVEL 1 SUBROUTINE; LEVEL 2 WHEN CALLED FROM PARMCHK OR 01014000
  1020. * NUM. USES REGSAVX.) 01015000
  1021. * 01016000
  1022. *********************************************************************** 01017000
  1023. SPACE 01018000
  1024. GET DS 0H 01019000
  1025. MVC XXXCWD(8),XXXCWD-1 CLEAR XXXCWD 01020000
  1026. MVI GETFLAG,X'00' CLEAR GETFLAG 01021000
  1027. LH 1,EDCT START SCANNING HERE. 01022000
  1028. LH 0,COUNT DO THE NEXT COUNT-EDCT CHARACTERS. 01023000
  1029. SR 0,1 01024000
  1030. BNH GET3E IF NO MORE - RETURN EMPTY. 01025000
  1031. STM 2,4,REGSAVX 01026000
  1032. SR 2,2 NO. OF CHARS IN WORD 01027000
  1033. SPACE 01028000
  1034. GET1A EQU * @V200714 01029000
  1035. LA 3,EDLIN(1) 01030000
  1036. CLI 0(3),C' ' COMPARE FOR BLANK. 01031000
  1037. BE GET2 YES. 01032000
  1038. TM SIGNAL,GETCAT TEST GETCAT FLAG 01033000
  1039. BO GET3D BRANCH IF ON 01034000
  1040. BAL 4,CHARTYPE FIND CHARTYPE 01035000
  1041. BL GETNONAN BRANCH IF NOT ALPHANUMERIC 01036000
  1042. BH GETNUM BRANCH IF NUMERIC 01037000
  1043. TM SIGNAL,HEXSW HEX FLAG SET? 01038000
  1044. BZ GETALPH BRANCH IF NOT (ALPHABETIC) 01039000
  1045. MVI BYTE,X'40' PREPARE TO CONVERT TO UPPER CASE 01040000
  1046. OC BYTE(1),0(3) USE 'BYTE' (A USEFUL TEMP) 01041000
  1047. CLI BYTE,C'F' HEX? 01042000
  1048. BNH GETNUM BRANCH IF SO (TREAT AS NUMERIC) 01043000
  1049. SPACE 01044000
  1050. GETALPH EQU * IT'S ALPHABETIC 01045000
  1051. LTR 2,2 ANYTHING FOUND YET? 01046000
  1052. BNZ GETALPH1 BRANCH IF SO 01047000
  1053. OI GETFLAG,ALPHA SET THE ALPHABETIC FLAG 01048000
  1054. B GET3B AND CONTINUE 01049000
  1055. GETALPH1 EQU * 01050000
  1056. TM GETFLAG,ALPHA WAS THAT ALPHABETIC TOO? 01051000
  1057. BZ GET5 BRANCH IF NOT 01052000
  1058. B GET3C AND CONTINUE 01053000
  1059. SPACE 01054000
  1060. GETNONAN EQU * NOT ALPHANUMERIC 01055000
  1061. LTR 2,2 ANYTHING FOUND YET? 01056000
  1062. BNZ GET5 BRANCH IF SO (TERMINATE PRONTO) 01057000
  1063. OI GETFLAG,NONALNUM SET NON-ALPHANUMERIC FLAG 01058000
  1064. B GET3B AND CONTINUE 01059000
  1065. SPACE 01060000
  1066. GETNUM EQU * IT'S A NUMBER 01061000
  1067. LTR 2,2 ANYTHING FOUND YET? 01062000
  1068. BZ GET3B BRANCH IF NOT 01063000
  1069. TM GETFLAG,ALPHA+NONALNUM WAS THAT NUMERIC TOO? 01064000
  1070. BNZ GET5 BRANCH IF NOT (QUIT) 01065000
  1071. B GET3C CONTINUE 01066000
  1072. SPACE 01067000
  1073. GET3D EQU * 01068000
  1074. LTR 2,2 ANYTHING FOUND YET? 01069000
  1075. BNZ GET3C BRANCH IF SO 01070000
  1076. GET3B EQU * 01071000
  1077. STH 1,EDCT SAVE START OF TOKEN 01072000
  1078. GET3C EQU * 01073000
  1079. LA 2,1(2) INCREMENT TOKEN LENGTH 01074000
  1080. GET3A EQU * 01075000
  1081. LA 1,1(1) LOOK AT NEXT CHAR 01076000
  1082. BCT 0,GET1A AND LOOP UNTIL EDLIN EXHAUSTED @V200714 01077000
  1083. SPACE 01078000
  1084. LTR 2,2 ANYTHING FOUND? 01079000
  1085. BNZ GET5 BRANCH IF SO 01080000
  1086. LM 2,4,REGSAVX RESTORE REGISTERS 01081000
  1087. GET3E EQU * 01082000
  1088. NI SIGNAL,255-(GETCAT+HEXSW) CLEAR SPECIAL GET FLAGS 01083000
  1089. SR 1,1 SET CONDITION CODE 01084000
  1090. BR 14 RETURN 01085000
  1091. SPACE 01086000
  1092. GET2 EQU * FOUND A BLANK 01087000
  1093. LTR 2,2 ANYTHING FOUND YET? 01088000
  1094. BZ GET3A BRANCH IF NOT 01089000
  1095. LA 1,1(1) RESUME SEARCH AT NEXT CHARACTER 01090000
  1096. SPACE 01091000
  1097. GET5 EQU * 01092000
  1098. LH 0,EDCT SAVE STARTING POSITION 01093000
  1099. STH 1,EDCT STORE NEW START OF LOOK. 01094000
  1100. LR 1,0 01095000
  1101. LA 1,EDLIN-1(1) FORM STARTING ADDRESS. 01096000
  1102. LA 4,8 MAX ARGUMENT LENGTH @V200713 01097000
  1103. CR 2,4 SHOULDN'T BE GREATER @V200713 01098000
  1104. BH GETBUST BRANCH IF IT ISN'T 01099000
  1105. TM SIGNAL,GETCAT IS GETCAT SET? 01100000
  1106. BZ GET7 BRANCH IF NOT 01101000
  1107. CLI 0(1),C' ' CHECK THAT PRECEDING CHAR WAS BLANK 01102000
  1108. BNE GETBUST BRANCH IF IT WASN'T 01103000
  1109. SPACE 01104000
  1110. GET7 EQU * 01105000
  1111. LR 4,2 SAVE FOR SETTING COND. CODE PRESENTLY 01106000
  1112. BCTR 2,0 DECREASE FOR EXEC 01107000
  1113. EX 2,MOVCWD MOVE TOKEN INTO XXXCWD 01108000
  1114. CLI CASESW,C'S' LOWER-CASE FILE? 01109000
  1115. BNE GET9 BRANCH IF NOT 01110000
  1116. TM SIGNAL,HEXSW IS THIS A SPECIAL HEXSW CALL? 01111000
  1117. BO GET9 BRANCH IF SO 01112000
  1118. EX 2,UPCASE CONVERT TO UPPER CASE 01113000
  1119. SPACE 01114000
  1120. GET9 EQU * 01115000
  1121. NI SIGNAL,255-(GETCAT+HEXSW) CLEAR SPECIAL GET FLAGS 01116000
  1122. LR 1,2 RETURN VALUE 01117000
  1123. LTR 4,4 SET CONDITION CODE 01118000
  1124. LM 2,4,REGSAVX RESTORE REGS 01119000
  1125. BR 14 RETURN. 01120000
  1126. SPACE 01121000
  1127. GETBUST EQU * 01122000
  1128. NI SIGNAL,255-(GETCAT+HEXSW) CLEAR SPECIAL GET FLAGS 01123000
  1129. B INVREQ 01124000
  1130. SPACE 01125000
  1131. MOVCWD MVC XXXCWD(*-*),1(1) 01126000
  1132. EJECT 01127000
  1133. *********************************************************************** 01128000
  1134. * 01129000
  1135. * 'NUM' ACTS AS GET DOES, BUT DEALS WITH A NUMERIC TOKEN. 01130000
  1136. * LEAVES THE ANSWER IN R0. 01131000
  1137. * 01132000
  1138. * CALL: 01133000
  1139. * BAL 14,NUM 01134000
  1140. * 01135000
  1141. * NORMAL RETURN: 01136000
  1142. * B 4(,14) 01137000
  1143. * ERROR RETURN: 01138000
  1144. * BR 14 01139000
  1145. * 01140000
  1146. * IF NO FIELD IS PRESENT, CC IS SET -VE AND R0 = 1. 01141000
  1147. * 01142000
  1148. * (LEVEL 1 SUBROUTINE. USES REGSAV.) 01143000
  1149. * 01144000
  1150. *********************************************************************** 01145000
  1151. SPACE 01146000
  1152. NUM DS 0H 01147000
  1153. ST 14,REGSAV SAVE REGISTER 14. 01148000
  1154. BAL 14,GET CALL FOR NEXT FIELD INTO XXXCWD. 01149000
  1155. BNZ CHEKNUM BNZ IF SPECIFIED, CHECK NUMERIC-IND. 01150000
  1156. BCTR 1,0 01151000
  1157. LTR 1,1 01152000
  1158. LA 0,1 01153000
  1159. B NUM1 01154000
  1160. SPACE 01155000
  1161. CHEKNUM EQU * 01156000
  1162. TM GETFLAG,ALPHA+NONALNUM CHECK WHETHER NUMERIC TOKEN 01157000
  1163. BZ NUM2 VALID NUMERICAL ENTRY. TR 01158000
  1164. L 14,REGSAV OBTAIN RETURN ADDRESS TR 01159000
  1165. BR 14 ERROR RETURN TR 01160000
  1166. SPACE 01161000
  1167. NUM2 EQU * TR 01162000
  1168. LA 0,1(,1) SET R0 TO NUMBER OF CHARACTERS JS 01163000
  1169. LA 1,XXXCWD CALL FOR CONVERSION 01164000
  1170. BAL 14,DECBIN 01165000
  1171. LTR 0,1 RETURN CONDITION CODE. 01166000
  1172. SPACE 01167000
  1173. NUM1 EQU * 01168000
  1174. L 14,REGSAV RESTORE RETURN. 01169000
  1175. B 4(,14) NORMAL RETURN. TR 01170000
  1176. EJECT 01171000
  1177. *********************************************************************** 01172000
  1178. * 01173000
  1179. * 'SPREAD' ACCEPTS A LINE WHICH MAY CONTAIN TABS AND 01174000
  1180. * BACKSPACES, AND WHICH STARTS AT EDLIN(EDCT), AND SPREADS 01175000
  1181. * IT OUT ACCORDING TO THE CURRENT TAB SETTINGS. 01176000
  1182. * CHARACTERS ARE NOT AFFECTED BY BEING BACKSPACED OVER; 01177000
  1183. * CHARACTERS WHICH ARE MOVED OVER FORWARDS ARE REPLACED. 01178000
  1184. * 01179000
  1185. * IF CANONICALIZATION IS IN EFFECT, TABS AND BACKSPACES ARE 01180000
  1186. * NOT REPLACED; INSTEAD THE LINE IS PROCESSED BY THE CANAONI- 01181000
  1187. * CALIZING ROUTINE. 01182000
  1188. * 01183000
  1189. * IF 'IMAGE' IS OFF, THE LINE IS PASSED THROUGH AS TYPED. 01184000
  1190. * 01185000
  1191. * CALL: 01186000
  1192. * BAL 14,SPREAD 01187000
  1193. * 01188000
  1194. * (LEVEL 1 SUBROUTINE. USES REGSAV.) 01189000
  1195. * 01190000
  1196. *********************************************************************** 01191000
  1197. SPACE 01192000
  1198. SPREAD DS 0H 01193000
  1199. STM 2,6,REGSAV SAVE REGS 01194000
  1200. NI TWITCH,255-TRUNC CLEAR TRUNCATION BIT 01195000
  1201. L 1,ITEM ITEM LENGTH 01196000
  1202. BCTR 1,0 DECREASE FOR EXEC 01197000
  1203. EX 1,TABCLR CLEAR TABLIN AS FAR AS THE ITEM LENGTH 01198000
  1204. SR 5,5 CLEAR MAX. COLUMN COUNT 01199000
  1205. LA 4,TABS+1 GET LOCATION OF TABS TABLE 01200000
  1206. LH 3,COUNT NUMBER OF TYPED CHARACTERS. 01201000
  1207. LA R2,1 SET INITIAL OFFSET @VA03027 01202000
  1208. TM FLAG,LEFT @VA03536 01203000
  1209. BO BYPS YES, THEN DONT CHECK DISPLAY FLAG@VA03536 01204000
  1210. TM CHNGFLAG,DTYPE IS DISPLAY BIT ON? @VA03027 01205000
  1211. BNO BYPS NO, USE FIRST TAB @VA08298 01205300
  1212. CLI TABS,X'01' FIRST TAB BEYOND COLUMN 1? @VA08298 01205600
  1213. BNH NOTAB NO, BRANCH @VA08298 01205900
  1214. BCTR R4,0 POINT TO FIRST TAB SETTING @VA08298 01206200
  1215. B NOTAB ALL TABS AVAILABLE NOW @VA08298 01206500
  1216. BYPS SR 2,2 @VA03536 01207000
  1217. IC 2,TABS FIRST TAB IS START COLUMN 01208000
  1218. NOTAB LH 1,EDCT NUMBER CHARS ALREADY SCANNED @VA03027 01209000
  1219. SR 0,0 01210000
  1220. SR 3,1 COMPUTE NO. OF CHARACTERS LEFT TO SCAN. 01211000
  1221. BZ SPRET NONE LEFT. 01212000
  1222. LA 1,EDLIN(1) 01213000
  1223. LA 15,135 HANDY IF NOT CANON @V200713 01214000
  1224. SPACE 01215000
  1225. * CHECK FOR CANONICALIZATION ... 01216000
  1226. SPACE 01217000
  1227. TM FLAG,CAN CANONICALIZATION REQUIRED? 01218000
  1228. BZ SLOOP BRANCH IF NOT 01219000
  1229. LR 0,3 LENGTH IN R0 01220000
  1230. BCTR 3,0 DECREMENT FOR EXEC 01221000
  1231. EX 3,MOVSCRPT MOVE THE TYPED LINE INTO TABLIN 01222000
  1232. LA 1,TABLIN 01223000
  1233. BAL 15,CANON GO CANONICALIZE 01224000
  1234. LR 5,0 PUT NEW LWNGTH IN R5 01225000
  1235. B TRUNCO AND GO CHECK FOR TRUNCATION 01226000
  1236. SPACE 01227000
  1237. MOVSCRPT MVC TABLIN(0),0(1) 01228000
  1238. SPACE 01229000
  1239. * CANONICALIZATION NOT REQUIRED ... 01230000
  1240. SPACE 01231000
  1241. SLOOP EQU * 01232000
  1242. TM FLAG,IMNOT LINE IMAGE SUPPRESSED? 01233000
  1243. BO SLOOP2 BRANCH IF SO 01234000
  1244. CLI 0(1),TAB CHECK FOR TAB CHARACTER RAM 01235000
  1245. BE STBLP BRANCH IF A TAB @V200713 01236000
  1246. CLI 0(1),BACKSPAC NO, IS THIS REAL BACKSPACE 01237000
  1247. BNE SLOOP2 KEEP ON IF NOT @V200713 01238000
  1248. LA 4,TABS GET BEGINNING OF TABS @V200713 01239000
  1249. BCT 2,SLOOP1 DECREMENT COUNT @V200713 01240000
  1250. LA 2,1 @V200713 01241000
  1251. B SLOOP1 @V200713 01242000
  1252. SPACE 1 01243000
  1253. SLOOP2 EQU * 01244000
  1254. CH 2,TRUNCOL BEYOND TRUNC COL? 01245000
  1255. BH TRUNCATE BRANCH IF SO 01246000
  1256. SLOOP4 EQU * 01247000
  1257. IC 0,0(,1) PICK UP THE CHAR 01248000
  1258. STC 0,TABLIN-1(2) AND PUT IT INTO LINE IMAGE 01249000
  1259. CR 2,5 IS THIS A NEW COLUMN MAXIMUM? 01250000
  1260. BNH SLOOP3 BRANCH IF NOT 01251000
  1261. LR 5,2 SET COLUMN MAXIMUM 01252000
  1262. SLOOP3 EQU * 01253000
  1263. LA 2,1(,2) MOVE TO NEXT SPOT 01254000
  1264. SLOOP1 EQU * 01255000
  1265. LA 1,1(,1) ADVANCE INPUT IMAGE POINTER. 01256000
  1266. BCT 3,SLOOP AND GET NEXT CHARACTER. 01257000
  1267. SPACE 01258000
  1268. TRUNCO EQU * CHECK FOR TRUNCATION 01259000
  1269. LH 2,TRUNCOL TRUNCATION COLUMN 01260000
  1270. SR 5,2 LENGTH TO CHECK FOR BLANKS 01261000
  1271. BNH SPRET BRANCH IF NOTHING TO CHECK 01262000
  1272. LA 2,TABLIN(2) SPOT TO START 01263000
  1273. TRUNCLP EQU * 01264000
  1274. CLI 0(2),C' ' BLANK? 01265000
  1275. BE TRUNCLP1 BRANCH IF SO 01266000
  1276. TM SIGNAL,OVER OVERLAY FLAG SET? 01267000
  1277. BZ TRUNCLP2 BRANCH IF NOT 01268000
  1278. CLI 0(2),C'_' IS IT AN UNDERSCORE? 01269000
  1279. BE TRUNCLP1 BRANCH IF SO (THAT'S OK) 01270000
  1280. TRUNCLP2 EQU * 01271000
  1281. OI TWITCH,TRUNC SET TRUNCATION FOR REAL 01272000
  1282. MVI 0(2),C' ' CLEAR THE BYTE 01273000
  1283. TRUNCLP1 EQU * 01274000
  1284. LA 2,1(2) LOOK AT NEXT CHAR 01275000
  1285. BCT 5,TRUNCLP LOOP UNTIL FULLY CHECKED 01276000
  1286. SPACE 01277000
  1287. SPRET EQU * RETURN FROM SPREAD 01278000
  1288. LM 2,6,REGSAV RESTORE REGS 01279000
  1289. BR 14 01280000
  1290. SPACE 01281000
  1291. TRUNCATE EQU * 01282000
  1292. CLI 0(1),C' ' BLANK? 01283000
  1293. BE SPRUNC BRANCH IF SO 01284000
  1294. TM SIGNAL,OVER OVERLAY? 01285000
  1295. BZ TRUNOTO BRANCH IF NOT 01286000
  1296. CLI 0(1),C'_' UNDERSCORE? 01287000
  1297. BE SPRUNC BRANCH IF SO 01288000
  1298. TRUNOTO EQU * 01289000
  1299. CR 2,15 COMPARE WITH 135 @V200713 01290000
  1300. BNH SLOOP4 BRANCH IF NOT 01291000
  1301. OI TWITCH,TRUNC SET TRUNCATION FOR REAL 01292000
  1302. SPRUNC EQU * 01293000
  1303. CR 2,15 COMPARE WITH 135 @V200713 01294000
  1304. BNH SLOOP4 BRANCH IF SO 01295000
  1305. B SLOOP3 01296000
  1306. SPACE 01297000
  1307. STBLP EQU * 01298000
  1308. IC 0,0(,4) GET TAB VALUE 01299000
  1309. LTR 0,0 END OF TABS? 01300000
  1310. BZ SETRUNC BRANCH IF SO 01301000
  1311. LA 4,1(,4) ADVANCE TO NEXT TAB VALUE 01302000
  1312. CR 2,0 ARE WE PAST IT? 01303000
  1313. BL STBGOT BRANCH IF NOT (GOT IT) 01304000
  1314. B STBLP LOOP 01305000
  1315. SPACE 01306000
  1316. SETRUNC EQU * SET FOR TRUNCATION LATER 01307000
  1317. LA 0,255 01308000
  1318. SPACE 01309000
  1319. STBGOT EQU * 01310000
  1320. LA 6,X'40' INSERT A BLANK INTO R5 01311000
  1321. TABPADLP EQU * 01312000
  1322. CR 2,15 COMPARE WITH 135 @V200713 01313000
  1323. BH SETLCOL BRANCH IF SO 01314000
  1324. STC 6,TABLIN-1(2) PUT A BLANK INTO THE LINE IMAGE 01315000
  1325. LA 2,1(,2) MOVE ALONG ONE 01316000
  1326. CR 2,0 REACHED THE TAB STOP YET? 01317000
  1327. BL TABPADLP LOOP IF NOT 01318000
  1328. SETLCOL EQU * 01319000
  1329. LR 2,0 01320000
  1330. B SLOOP1 01321000
  1331. SPACE 01322000
  1332. TABCLR MVC TABLIN(*-*),TABLIN-1 BLANK MVC FOR CLEARING TABLIN 01323000
  1333. EJECT 01324000
  1334. *********************************************************************** 01325000
  1335. * 01326000
  1336. * NUMBER CONVERSION UTILITY ROUTINE 01327000
  1337. * 01328000
  1338. * CALL: 01329000
  1339. * BAL 14,DECBIN 01330000
  1340. * 01331000
  1341. * (LEVEL N SUBROUTINE) 01332000
  1342. * 01333000
  1343. *********************************************************************** 01334000
  1344. SPACE 01335000
  1345. DECBIN DS 0H 01336000
  1346. IC 15,PACK+1 FORM EXECUTABLE PACK INSTRUCTION 01337000
  1347. BCTR 0,0 01338000
  1348. OR 15,0 01339000
  1349. EX 15,PACK GET PACKED DECIMAL 01340000
  1350. OI DECIMAL+7,X'0F' FORCE PLUS 01341000
  1351. CVB 1,DECIMAL GET BINARY VALUE 01342000
  1352. BR 14 AND RETURN TO CALLER 01343000
  1353. SPACE 01344000
  1354. PACK PACK DECIMAL(8),0(0,1) PACK FOR 'EX' 01345000
  1355. EJECT 01346000
  1356. *********************************************************************** 01347000
  1357. * 01348000
  1358. * CHARTYPE SETS CONDITION CODE ACCORDING TO TYPE OF CHAR 01349000
  1359. * POINTED TO BY R3. 01350000
  1360. * 01351000
  1361. * -VE: NON-ALPHANUMERIC 01352000
  1362. * 0: ALPHABETIC 01353000
  1363. * +VE: NUMERIC 01354000
  1364. * 01355000
  1365. * CALL: 01356000
  1366. * BAL 4,CHARTYPE 01357000
  1367. * 01358000
  1368. * (LEVEL N SUBROUTINE) 01359000
  1369. * 01360000
  1370. *********************************************************************** 01361000
  1371. SPACE 01362000
  1372. CHARTYPE DS 0H 01363000
  1373. CLI 0(3),X'80' 01364000
  1374. BCR 4,4 RETURN IF NON-ALPHANUMERIC 01365000
  1375. CLI 0(3),X'F9' 01366000
  1376. BH EXOTIC BRANCH IF > '9' 01367000
  1377. CLI 0(3),X'EF' 01368000
  1378. BCR 2,4 RETURN IF NUMERIC 01369000
  1379. SR 15,15 SET CC = 0 01370000
  1380. BR 4 ALPHABETIC 01371000
  1381. SPACE 01372000
  1382. EXOTIC EQU * 01373000
  1383. SR 15,15 SET CC = -VE 01374000
  1384. BCTR 15,0 01375000
  1385. LTR 15,15 01376000
  1386. BR 4 01377000
  1387. SPACE 3 01378000
  1388. *********************************************************************** 01379000
  1389. * 01380000
  1390. * INTERFACE FOR EDCANON, CANONICALIZING ROUTINE. 01381000
  1391. * 01382000
  1392. * CALL: 01383000
  1393. * BAL 15,CANON 01384000
  1394. * 01385000
  1395. * (LEVEL N SUBROUTINE, CALLED FROM XREPL, SPREAD, STRING1. 01386000
  1396. * USES REGSAVX.) 01387000
  1397. * 01388000
  1398. *********************************************************************** 01389000
  1399. SPACE 01390000
  1400. CANON DS 0H 01391000
  1401. STM 14,15,REGSAVX SAVE REGISTERS 01392000
  1402. L 15,=V(EDCANON) CALL EDCANON 01393000
  1403. BALR 14,15 01394000
  1404. LM 14,15,REGSAVX RESTORE REGS 01395000
  1405. BR 15 RETURN 01396000
  1406. EJECT 01397000
  1407. *********************************************************************** 01398000
  1408. * 01399000
  1409. * RDTYPE -- READ A LINE FROM THE TERMINAL 01400000
  1410. * 01401000
  1411. * CALL: 01402000
  1412. * BAL 14,RDTYPE 01403000
  1413. * 01404000
  1414. * (LEVEL 1 SUBROUTINE) 01405000
  1415. * 01406000
  1416. *********************************************************************** 01407000
  1417. SPACE 01408000
  1418. RDTYPE DS 0H 01409000
  1419. MVC CASEREAD(1),CASESW USE CURRENT SETTING 01410000
  1420. CMS TIN CALL FOR WAITRD 01411000
  1421. LH 0,TIN+14 SET UP 'COUNT' 01412000
  1422. STH 0,COUNT 01413000
  1423. LTR 0,0 SET CONDITION CODE 01414000
  1424. BR 14 01415000
  1425. EJECT 01416000
  1426. *********************************************************************** 01417000
  1427. * 01418000
  1428. * WRTYPE -- TYPE A LINE AT THE TERMINAL 01419000
  1429. * WRTYPE1 -- TYPE A LINE IF IN VERIFY MODE 01420000
  1430. * WRTYPE2 -- TYPE A LINE WITH LEFT LINE NO., IF REQUIRED 01421000
  1431. * WRTYPE3 -- AS ABOVE IF IN VERIFY MODE 01422000
  1432. * 01423000
  1433. * CALL: 01424000
  1434. * BAL 14,WRTYPE (OR BAL 14,WRTYPE1) 01425000
  1435. * 01426000
  1436. * ON INPUT: 01427000
  1437. * R0 = LENGTH OF STRING TO BE TYPED 01428000
  1438. * R1 = ADDRESS OF STRING TO BE TYPED 01429000
  1439. * 01430000
  1440. * (LEVEL N SUBROUTINES) 01431000
  1441. * 01432000
  1442. *********************************************************************** 01433000
  1443. SPACE 01434000
  1444. WRTYPE1 DS 0H 01435000
  1445. TM FLAG2,VER VERIFY MODE? @V1D1613 01436000
  1446. BO WRTYPE YES ... BRANCH @VA04014 01437000
  1447. TM TWITCH,VEROVER IMMEDIATE VERIFY OVERRIDE? @VA04014 01438000
  1448. BCR 8,14 NO, RETURN WITH NO TYPING 01439000
  1449. NI TWITCH,255-VEROVER RESET OVERRIDE FLAG @VA04014 01440000
  1450. SPACE 01441000
  1451. WRTYPE EQU * 01442000
  1452. OI SCRFLGS,WRMSGB MESSAGE LINE ENTRY @V2D3913 01443000
  1453. WRTYPEX EQU * @V2D3913 01444000
  1454. TM MSGFLAGS,NOTYPING HT IN EFFECT ? @V200714 01445000
  1455. BO WROUT YES ... BR @V2D3913 01446000
  1456. TM FLAG2,TUBE DISPLAY TERMINAL ? @V200714 01447000
  1457. BNO NOTGRAF NO...BR @V200714 01448000
  1458. ST R14,REGSAVX SAVE RETURN REGISTER @V2D3913 01449000
  1459. L R15,=V(DMSSCR) @V200714 01450000
  1460. BALR R14,R15 LOAD BUFFERS AND DISPLAY @V200714 01451000
  1461. BNZ IOERR BR..IF ERROR FROM SCR @VM08823 01452000
  1462. L R14,REGSAVX RESTORE RETURN @V2D3913 01453000
  1463. MVI SCRFLG2,X'00' CLEAR MORE STATUS FLAG @V2D3913 01454000
  1464. WROUT NI SCRFLGS,255-WRMSGB RESET MESSAGE FLAG @V2D3913 01455000
  1465. BR R14 RETURN TO CALLER @V200714 01456000
  1466. NOTGRAF STH 0,TOUT+14 STORE NO BYTES TO OUTPUT @V200714 01457000
  1467. STCM 1,B'0111',TOUT+9 STORE NEW ADDRESS @V200713 01458000
  1468. CMS TOUT CALL CMS 01459000
  1469. BR 14 RETURN. 01460000
  1470. WRTYPE3 EQU * 01461000
  1471. TM FLAG2,VER VERIFY MODE? @V1D1613 01462000
  1472. BCR 8,14 NO,RETURN WITH NO TYPING 01463000
  1473. WRTYPE2 EQU * 01464000
  1474. TM TWITCH,TOPSW+EOF AT TOF OR EOF ? @V2D3913 01465000
  1475. BZ WRTYPE2A NO ... BR @VA04074 01466000
  1476. LA R1,EOFREC POINT TO 'EOF:' STRING @V2D3913 01467000
  1477. LA R0,4 SET LENGTH OF MESSAGE @V2D3913 01468000
  1478. TM TWITCH,EOF AT EOF ? @V2D3913 01469000
  1479. BO WRTYPEX YES ... BR @V2D3913 01470000
  1480. LA R1,TOPMSG POINT TO 'TOF:' STRING @V2D3913 01471000
  1481. B WRTYPEX @V2D3913 01472000
  1482. WRTYPE2A EQU * @VA04074 01473000
  1483. TM FLAG,RIGHT LINEMODE RIGHT? @VA04074 01474000
  1484. BZ WRTYPEX NO ... BR @VA04074 01475000
  1485. TM FLAG2,TUBE DISPLAY TERMINAL? @VA04074 01476000
  1486. BO WRTYPEX YES ... BR @VA04074 01477000
  1487. L R15,PTR2 GET PTR TO CURRENT LINE @VA04074 01478000
  1488. AH R15,LMSTART OFFSET TO LINE NUMBER @VA04074 01479000
  1489. MVC LINENO(5),8(R15) MOVE IN NUMBER @VA04074 01480000
  1490. LR R15,R0 GET VERIFY LINE LENGTH @VA04074 01481000
  1491. EX R15,WREADX MOVE VERIFY DATA INTO 'LINE' @VA04074 01482000
  1492. LA 1,6 NOW GET 6 POSITION OFFSET @VA04074 01483000
  1493. AR 0,1 AND OFFSET THE LINE LENGTH @VA04074 01484000
  1494. LA 1,LINENO BACKUP START @VA04074 01485000
  1495. B WRTYPEX @VA04074 01486000
  1496. WREADX MVC LINE(*-*),0(R1) BLANK 'MVC' FOR 'EX' @VA04074 01487000
  1497. EJECT 01488000
  1498. *********************************************************************** 01489000
  1499. * 01490000
  1500. * TABLE OF REQUESTS (IN A NICE COMPACT FORM) 01491000
  1501. * 01492000
  1502. * REQ MACRO HAS FORM: 01493000
  1503. * 01494000
  1504. * REQ NAME<,MIN-LENGTH<,ROUTINE-NAME>> 01495000
  1505. * 01496000
  1506. * DEFAULTS ARE: MIN-LENGTH = 1; ROUTINE-NAME = NAME 01497000
  1507. * 01498000
  1508. *********************************************************************** 01499000
  1509. SPACE 01500000
  1510. PRQUEST EQU * REQUESTS WHICH DO NOT RESET THE FOR COUNT 01501000
  1511. REQ OVERLAY,1,OVRLAY 01502000
  1512. REQ X,1,XXX 01503000
  1513. REQ Y,1,YYY 01504000
  1514. REQ ?,1,QUERY 01505000
  1515. REQ REUSE,5,DITTO 01506000
  1516. REQ =,1,DITTO P3123 01507000
  1517. PRQEND EQU * 01508000
  1518. SPACE 01509000
  1519. RQUEST EQU * REQUESTS WHICH RESET THE FOR COUNT 01510000
  1520. REQ INPUT,1,INSERT 01511000
  1521. REQ REPLACE,1,RETYPE 01512000
  1522. REQ TYPE,1,PRINT 01513000
  1523. REQ TOP,3 01514000
  1524. REQ DELETE,3,DELETE @V2D3914 01515000
  1525. REQ DSTRING,2,DSTRING @V2D3914 01516000
  1526. REQ BOTTOM 01517000
  1527. REQ NEXT,1,NEXLIN 01518000
  1528. REQ DOWN,2,NEXLIN 01519000
  1529. REQ FIND 01520000
  1530. REQ /,1,PRELOC 01521000
  1531. REQ LOCATE 01522000
  1532. REQ ALTER,2 01523000
  1533. REQ CHANGE 01524000
  1534. REQ REPEAT,6,REPEAT P3123 01525000
  1535. REQ TRUNC,5,TRUNCIT 01526000
  1536. REQ ZONE 01527000
  1537. REQ TABSET,4 01528000
  1538. REQ CASE,4 01529000
  1539. REQ IMAGE,5 01530000
  1540. REQ VERIFY 01531000
  1541. REQ LONG,4 01532000
  1542. REQ SHORT,5 01533000
  1543. REQ PRESERVE,3 01534000
  1544. REQ RESTORE,3 01535000
  1545. REQ STACK,5 01536000
  1546. REQ $,1,DOT 01537000
  1547. REQ FNAME,2,NAME 01538000
  1548. REQ FMODE,2,MODE 01539000
  1549. REQ RECFM,3,RECFORM P3123 01540000
  1550. REQ SERIAL,3 01541000
  1551. REQ CMS,3 01542000
  1552. REQ QUIT,4 01543000
  1553. REQ GETFILE 01544000
  1554. REQ SAVE,4 01545000
  1555. REQ FILE,4 01546000
  1556. REQ LINEMODE,4 01547000
  1557. REQ PROMPT,6 01548000
  1558. REQ AUTOSAVE,4 @V200706 01549000
  1559. REQ SCROLL,1,,UP @V2D3913 01550000
  1560. REQ FORWARD,2,NEXLIN @V200714 01551000
  1561. REQ BACKWARD,2,BACKWD @V2D3914 01552000
  1562. REQ RENUM,3 @V242801 01553000
  1563. REQ FORMAT,4,FORMAT @V2D3914 01554000
  1564. REQEND EQU * 01555000
  1565. EJECT 01556000
  1566. *********************************************************************** 01557000
  1567. * 01558000
  1568. * EXEC INSTRUCTIONS AND MISCELLANEOUS CONSTANTS 01559000
  1569. * 01560000
  1570. *********************************************************************** 01561000
  1571. SPACE 2 01562000
  1572. LINECLR MVC LINE(*-*),LINE-1 CLEAR 'LINE' (PAGE 3) 01563000
  1573. INMOVE MVC LINE(*-*),TABLIN MOVE IN SPREAD LINE 01564000
  1574. UPCASE OC XXXCWD(*-*),CAPS CONVERT TOKEN TO UPPER CASE 01565000
  1575. SPACE 01566000
  1576. CAPS DC 8X'40' BLANKS FOR UPCASE 01567000
  1577. SPACE 01568000
  1578. TRUNCX DC C'TRUNCATED' 01569000
  1579. * NEXT TWO MESSAGE STRINGS MUST BE KEPT IN ORDER 01570000
  1580. LINNOT DC C'LINE ' @V200713 01571000
  1581. FLDNTFND DC C'NOT FOUND' 01572000
  1582. EJECT 01573000
  1583. *********************************************************************** 01574000
  1584. * 01575000
  1585. * 'DELETE' REMOVES THE NEXT N LINES FROM THE FILE. IF N IS 01576000
  1586. * OMITTED, A VALUE OF 1 IS ASSUMED. 01577000
  1587. * 01578000
  1588. *********************************************************************** 01579000
  1589. SPACE 01580000
  1590. DELETE DS 0H @V2D3913 01581000
  1591. BAL 14,NUM GET NUM OF DELETES TR 01582000
  1592. BAL 14,STARCHK THEN HOPEFULLY IT'S A STAR 01583000
  1593. BAL 14,PARMCHK CHECK NO MORE ARGUMENTS GIVEN 01584000
  1594. DSENT LTR R2,R0 DID THE USER SPECIFY ZERO? @V2D3914 01585000
  1595. BZ NEXT WE ARE ALL DONE IF HE DID. @V2D3913 01586000
  1596. BAL R14,EORCHK CHECK THE CURRENT BOUNDS @V2D3913 01587000
  1597. B ENDRANGE TYPE TOF OR EOF IF APPROPRIATE @V2D3913 01588000
  1598. L R3,PTR2 PICK UP THE CURRENT LINE POINTER @V2D3913 01589000
  1599. DELNEXT BAL R14,XNEXT GET THE NEXT POINTER @V2D3913 01590000
  1600. TM TWITCH,TOPSW+EOF AT A BOUDARY YET? @V2D3913 01591000
  1601. BNZ DELEND NO MORE LOOPING IF SO. @V2D3913 01592000
  1602. BCT R2,DELNEXT KEEP INDEXING @V2D3913 01593000
  1603. DELEND TM TWITCH,TOPSW+EOF IS IT TOF/EOF? @V2D3914 01594000
  1604. BZ DELSKIP SKIP IF NOT. @V2D3914 01595000
  1605. BCTR R2,R0 MORE ADJUSTING @V2D3913 01596000
  1606. DELSKIP L R14,4(,R3) GET OLD BACK POINTER @V2D3914 01597000
  1607. LTR R14,R14 WERE WE AT TOF ? @V2D3914 01598000
  1608. BNZ NODELTOF BR IF NOT @V2D3914 01599000
  1609. LA R4,1 COUNT IS ONE PLUS IF @V2D3914 01600000
  1610. AR R2,R4 STARTING AT TOF @V2D3914 01601000
  1611. L R3,0(,R3) AND POINT TO REAL 1ST LINE @V2D3914 01602000
  1612. MVI SCRFLGS,WRFULLB UPPER DISPLAY WILL CHANGE @V2D3914 01603000
  1613. NODELTOF SR R0,R2 HOW MANY DID WE REALLY DELETE ? @V2D3914 01604000
  1614. BZ ENDRANG1 NONE, IF ZERO @V2D3914 01605000
  1615. L R14,SPARES GET THE FREE-LINES COUNT. @V2D3914 01606000
  1616. AR R14,R0 INCREMENT IT BY DECREMENT COUNT. @V2D3913 01607000
  1617. ST R14,SPARES SAVE AS NEW FREE COUNT. @V2D3913 01608000
  1618. TM TWITCH,UPWARD GOING UP? @V2D3913 01609000
  1619. BO DELUP REQUIRES DIFFERENT PROCESSING @V2D3913 01610000
  1620. OI SCRFLGS,WRCLDNB LOWER DISPLAY WILL CHANGE @V2D3914 01611000
  1621. L R2,4(,R3) GET THE BACK POINTER @V2D3913 01612000
  1622. SR R4,R4 @V2D3914 01613000
  1623. TM TWITCH,EOF @V2D3913 01614000
  1624. BNO NOTEOF BR IF NOT EOF @V2D3914 01615000
  1625. ST R2,PTR2 SET NEW CL POINTER @V2D3914 01616000
  1626. ST R2,PTR3 SET NEW BOTTOM POINTER @V2D3914 01617000
  1627. B DELEOF MAKE SURE FWD PTR IS ZERO @V2D3914 01618000
  1628. NOTEOF LR R4,R1 GET THE NEW FORWARD PONTER @V2D3914 01619000
  1629. ST R2,4(,R1) @V2D3913 01620000
  1630. DELEOF ST R4,0(,R2) @V2D3914 01621000
  1631. B DELFCHN GO SET FREE LIST @V2D3914 01622000
  1632. SPACE 1 01623000
  1633. DELUP OI SCRFLGS,WRCLUPB UPPER DISPLAY WILL CHANGE @V2D3914 01624000
  1634. L R2,0(,R3) GET OLD FWD POINTER @V2D3914 01625000
  1635. ST R2,0(,R1) PUT IT IN NEW FWD POINTER @V2D3914 01626000
  1636. LTR R2,R2 WAS IT EOF ? @V2D3914 01627000
  1637. BZ SETPTR3 YES....BR @V2D3914 01628000
  1638. ST R1,4(,R2) SET BACK POINTER @V2D3914 01629000
  1639. B DELFCHN GO SET FREE LIST @V2D3914 01630000
  1640. SPACE 1 01631000
  1641. SETPTR3 ST R1,PTR3 SET NEW BOTTOM POINTER @V2D3914 01632000
  1642. BCTR R0,R0 AND DECREMENT COUNT @V2D3914 01633000
  1643. OI SCRFLGS,WRCLDNB LOWER AREA WILL CHANGE @V2D3914 01634000
  1644. SPACE 1 01635000
  1645. DELFCHN EQU * @V2D3914 01636000
  1646. L R2,FPTR GET OLD FREE LIST PTR @V2D3914 01637000
  1647. TM TWITCH,UPWARD GOING UP ? @V2D3914 01638000
  1648. BO DELEUP YES...BR @V2D3914 01639000
  1649. L R4,0(,R3) GET OLD FORWARD PTR @V2D3914 01640000
  1650. B DELRDY .... @V2D3914 01641000
  1651. DELEUP L R4,4(,R3) USE BACK PTR FOR DELETE UP @V2D3914 01642000
  1652. DELRDY ST R2,0(,R3) FPTR BECOMES NEW FWD PTR @V2D3914 01643000
  1653. ST R3,FPTR LOAD NEW FPTR @V2D3914 01644000
  1654. LR R3,R4 POINT TO NEXT LINE @V2D3914 01645000
  1655. BCT R0,DELFCHN DELETE SPECIFIED NUMBER @V2D3914 01646000
  1656. BAL R14,AUTOCHEK PERFORM AUTOSAVE FUNCTION @V2D3914 01647000
  1657. TM TWITCH,TOPSW+EOF AT TOP OR END OF FILE ? @VM01077 01648000
  1658. BNZ DELVER YES, THEN VERIFY FOR HIM @VM01077 01649000
  1659. TM FLAG2,TUBE NO VERIFICATION FOR @V2D3914 01650000
  1660. BNO NEXT TYPEWRITER TERMINAL @V2D3914 01651000
  1661. DELVER VERIFY RETURN=NEXT @VM01077 01652000
  1662. EJECT 01653000
  1663. *************************************************************** 01654000
  1664. * 01655000
  1665. * 'TOP' POSITIONS THE USER AT THE TOP OF HIS FILE. 01656000
  1666. * 01657000
  1667. *************************************************************** 01658000
  1668. SPACE 1 01659000
  1669. TOP DS 0H @V2D3913 01660000
  1670. BAL R14,PARMCHK NO MORE PARAMETERS ALLOWED @V2D3913 01661000
  1671. BAL R14,CLOSE BACK TO THE TOP @V2D3913 01662000
  1672. B ENDRANGE PRINT TOF @V2D3913 01663000
  1673. SPACE 4 01664000
  1674. ********************************************************************** 01665000
  1675. * 01666000
  1676. * 'BOTTOM' WILL POINT TO THE LAST LINE OF FILE. 01667000
  1677. * 01668000
  1678. *********************************************************************** 01669000
  1679. SPACE 01670000
  1680. BOTTOM EQU * START OF "BOTTOM" COMMAND TR 01671000
  1681. BAL 14,PARMCHK CHECK WHETHER LAST PARM 01672000
  1682. SPACE 1 01673000
  1683. BTM2 EQU * @V2D3913 01674000
  1684. L R1,PTR3 GET BOTTOM LINE POINTER @V2D3913 01675000
  1685. LA R14,PTR1 AND TOF POINTER @V2D3913 01676000
  1686. CR R1,R14 AND COMPARE @V2D3913 01677000
  1687. BNE BTM3 BR, IF NOT A NULL FILE @V2D3913 01678000
  1688. BAL R14,CLOSE IF NULL, SET TOF FLAG @V2D3913 01679000
  1689. B ENDRANGE AND TYPE TOF MESSAGE @V2D3913 01680000
  1690. SPACE 1 01681000
  1691. BTM3 EQU * @V2D3913 01682000
  1692. ST R1,PTR2 CL PTR-> BOTTOM LINE @V2D3913 01683000
  1693. NI TWITCH,255-(EOF+TOPSW) RESET FILE LIMIT FLAGS @V2D3913 01684000
  1694. B LOCFND VERIFY @V2D3913 01685000
  1695. EJECT 01686000
  1696. *********************************************************************** 01687000
  1697. * 01688000
  1698. * 'NEXT' SKIPS THROUGH THE FILE N LINES. IF N IS OMITTED, 01689000
  1699. * THE NEXT LINE IS ASSUMED. 01690000
  1700. * 01691000
  1701. *********************************************************************** 01692000
  1702. SPACE 01693000
  1703. NEXLIN DS 0H 01694000
  1704. BAL 14,NUM GO TO NEXT (N) LINES. 01695000
  1705. B INVREQ ERROR RETURN. TR 01696000
  1706. BAL 14,PARMCHK CHECK NO MORE ARGUMENTS GIVEN 01697000
  1707. SPACE 1 01698000
  1708. TYPIN EQU * @V2D3913 01699000
  1709. LTR 2,0 01700000
  1710. BZ LOCFND JUST TYPE IT. @V2D3913 01701000
  1711. BAL R14,EORCHK CHECK CURRENT BOUNDS @V2D3913 01702000
  1712. B ENDRANGE TYPE TOF,EOF MESSAGE @V2D3913 01703000
  1713. SPACE 01704000
  1714. NEXLOOP EQU * REWRITTEN TO IMPROVE SPEED 01705000
  1715. BAL 14,XNEXT CHAIN DOWN THROUGH FILE 01706000
  1716. TM TWITCH,TOPSW+EOF ENDRANGE? @V2D3913 01707000
  1717. BNZ ENDRANGE TYPE EOF OR TOF @V2D3913 01708000
  1718. BCT 2,NEXLOOP LOOP UNTIL DONE 01709000
  1719. B LOCFND SHOW THE LINE @V2D3913 01710000
  1720. SPACE 4 01711000
  1721. ************************************************************** 01712000
  1722. * 01713000
  1723. * 'BACKWARD' PERFORMS THE SAME FUNCTION AS 'UP'. 01714000
  1724. * HOWEVER, UP IS TREATED AS A SPECIAL CASE, SO THIS 01715000
  1725. * CODE IS NECESSARY. 01716000
  1726. * 01717000
  1727. ************************************************************** 01718000
  1728. SPACE 1 01719000
  1729. BACKWD DS 0H @V2D3914 01720000
  1730. OI TWITCH,UPWARD TURN ON THE UP FLAG @V2D3914 01721000
  1731. B NEXLIN LET THE COMMAN ROUTINE DO IT @V2D3914 01722000
  1732. EJECT 01723000
  1733. *********************************************************************** 01724000
  1734. * 01725000
  1735. * 'FIND' LOOKS FOR AN EXACT MATCH IN THE NON-BLANK 01726000
  1736. * COLUMNS OF THE EDIT LINE. IT WILL STOP AT EOF. 01727000
  1737. * 01728000
  1738. *********************************************************************** 01729000
  1739. SPACE 01730000
  1740. FIND DS 0H TR 01731000
  1741. LH 2,TRUNCOL SAVE TRUNCOL VALUE TR 01732000
  1742. L 4,ITEM ITEM LENGTH 01733000
  1743. STH 4,TRUNCOL USE IT (TEMPORARILY) AS TRUNC. COL. 01734000
  1744. BAL 14,SPREAD SPREAD THE EDIT LINE 01735000
  1745. STH 2,TRUNCOL RESTORE PERMANENT TRUNCOL VALUE 01736000
  1746. BAL R14,EORCHK CHECK CURRENT BOUNDS @V2D3913 01737000
  1747. BAL R14,CLOSE CALL CLOSE ROUTINE @V2D3913 01738000
  1748. SPACE 1 01739000
  1749. FIND2 EQU * 01740000
  1750. BAL 14,XNEXT MOVE TO NEXT LINE 01741000
  1751. TM TWITCH,TOPSW+EOF ENDRANGE? @V2D3913 01742000
  1752. BNZ NOTFOUND REQUIRES NOT FOUND MSG @V2D3913 01743000
  1753. LA 2,TABLIN POINT TO THE SPREAD LINE 01744000
  1754. LR 3,4 SET R3 TO ITEM-LENGTH 01745000
  1755. SPACE 01746000
  1756. FIND3 EQU * 01747000
  1757. CLI 0(2),C' ' COMPARE FOR BLANK. 01748000
  1758. BE FIND4 BRANCH IF IT IS (DON'T COMPARE HERE) 01749000
  1759. CLC 0(1,2),8(1) MAKE THE COMPARISON 01750000
  1760. BNE FIND2 BRANCH IF THEY DON'T MATCH 01751000
  1761. SPACE 01752000
  1762. FIND4 EQU * 01753000
  1763. LA 1,1(,1) MOVE TO NEXT CHARACTER IN LINE OF FILE 01754000
  1764. LA 2,1(,2) AND NEXT CHARACTER IN GIVEN LINE 01755000
  1765. BCT 3,FIND3 LOOP UNTIL WE'VE EXAMINED THEM ALL 01756000
  1766. B LOCFND BRANCH INTO LOCATE ROUTINE 01757000
  1767. EJECT 01758000
  1768. *********************************************************************** 01759000
  1769. * 01760000
  1770. * 'LOCATE' SEARCHES THOSE COLUMNS OF THE FILE SPECIFIED 01761000
  1771. * BY THE CURRENT SETTINGS OF 'ZONE' FOR A MATCH WITH THE 01762000
  1772. * GIVEN DELIMITED STRING. IT WILL STOP AT EOF. 01763000
  1773. * 01764000
  1774. *********************************************************************** 01765000
  1775. SPACE 01766000
  1776. PRELOC DS 0H SPECIAL LOCATE FORM ENTRY 01767000
  1777. STH 0,EDCT SET EDCT BACK (GET TELLS US WHERE VIA R0) 01768000
  1778. SPACE 01769000
  1779. LOCATE EQU * 01770000
  1780. BAL 14,STRING1 SCAN STRING1 01771000
  1781. BAL 14,PARMCHK CHECK NO MORE PARMS 01772000
  1782. BAL R14,EORCHK CHECK CURRENT BOUNDS @V2D3913 01773000
  1783. BAL R14,CLOSE CALL CLOSE ROUTINE @V2D3913 01774000
  1784. LA R9,LOCEND THIS IS FOR LATER BRANCH @V2D3914 01775000
  1785. SPACE 1 01776000
  1786. LOCSUB EQU * @V2D3914 01777000
  1787. SR R8,R8 CLEAR LINE COUNT REG @V2D3914 01778000
  1788. LH 4,ZONE1 COLUMN TO START 01779000
  1789. LH 5,ZONE2 COLUMN TO END 01780000
  1790. SR 5,4 NO. OF COLS. TO SEARCH 01781000
  1791. SR 5,3 NO. OF COMPARISONS TO MAKE 01782000
  1792. SPACE 01783000
  1793. LOCATE2 EQU * 01784000
  1794. BAL 14,XNEXT MOVE TO NEXT LINE 01785000
  1795. LA R8,1(,R8) BUMP LINE COUNT @V2D3914 01786000
  1796. LTR R3,R3 NULL STRING IS AUTOMATIC @V2D3914 01787000
  1797. BL 4(,R9) NEXT LINE @V2D3914 01788000
  1798. TM TWITCH,TOPSW+EOF ENDRANGE? @V2D3913 01789000
  1799. BNZ 0(,R9) NOTFOUND OR NOSTRING @V2D3914 01790000
  1800. AR 1,4 R1 NOW POINTS TO FIRST COLUMN TO SEARCH 01791000
  1801. LR 0,5 AND R0 GIVES NO. OF SEPARATE COMPARISONS 01792000
  1802. SPACE 01793000
  1803. LOCLOOP EQU * 01794000
  1804. EX 3,LOCCOM COMPARE CLC 8(*-*,1),0(2) 01795000
  1805. BE 4(,R9) LOCATE OR STRING FOUND @V2D3914 01796000
  1806. LA 1,1(,1) LOOK AT NEXT SPOT 01797000
  1807. BCT 0,LOCLOOP AND LOOP 01798000
  1808. B LOCATE2 (NOT FOUND IN THIS LINE) 01799000
  1809. SPACE 01800000
  1810. LOCEND B NOTFOUND HERE IF STRING NOT FOUND @V2D3914 01801000
  1811. LOCFND EQU * 01802000
  1812. MVI SCRFLGS,WRFULLB TEXT CHANGED @V2D3914 01803000
  1813. LOCFND1 VERIFY RETURN=NEXT @V2D3914 01804000
  1814. SPACE 01805000
  1815. LOCCOM CLC 8(*-*,1),0(2) 01806000
  1816. EJECT 01807000
  1817. ************************************************************** 01808000
  1818. * 01809000
  1819. * 'DSTRING' CAUSES DELETION OF LINES UP TO A LINE 01810000
  1820. * CONTAINING THE SPECIFIED CHARACTER STRING. 01811000
  1821. * 01812000
  1822. ************************************************************** 01813000
  1823. SPACE 1 01814000
  1824. DSTRING DS 0H @V2D3914 01815000
  1825. BAL R14,STRING1 DELIMIT STRING @V2D3914 01816000
  1826. BAL R14,PARMCHK STRING MUST BE LAST PARAMETER @V2D3914 01817000
  1827. L R6,PTR2 SAVE CL PTR @V2D3914 01818000
  1828. IC R7,TWITCH AND CL FLAGS @V305614 01819000
  1829. BAL R14,EORCHK IF AT EOF, CAN'T POSSIBLY @V2D3914 01820000
  1830. B NOWAY FIND IT @V2D3914 01821000
  1831. SPACE 1 01822000
  1832. BAL R9,LOCSUB GO FIND LINE WITH THIS STRING @V2D3914 01823000
  1833. B NOSTRING RETURN HERE IF NOT FOUND @V2D3914 01824000
  1834. ST R6,PTR2 IF FOUND, RESTORE THE CL PTR @V2D3914 01825000
  1835. STC R7,TWITCH AND CL FLAGS @V305614 01826000
  1836. LR R0,R8 GET NUMBER OF LINES FOR DELETE @V2D3914 01827000
  1837. B DSENT AND USE DELETE TO EXECUTE @V2D3914 01828000
  1838. SPACE 1 01829000
  1839. NOSTRING ST R6,PTR2 RESTORE ORIGINAL CL PTR @V2D3914 01830000
  1840. STC R7,TWITCH AND FLAGS @V305614 01831000
  1841. NOWAY WTYPE NOSTR,RETURN=NEXT @V2D3914 01832000
  1842. SPACE 1 01833000
  1843. NOSTR DC C'STRING NOT FOUND, NO DELETIONS MADE.' @V2D3914 01834000
  1844. EJECT 01835000
  1845. * 01836000
  1846. LTORG @V305614 01837000
  1847. SPACE 4 01838000
  1848. ************************************* 01839000
  1849. ************************************* 01840000
  1850. ***** ***** 01841000
  1851. ***** END OF PAGE 1 ***** 01842000
  1852. ***** ***** 01843000
  1853. ************************************* 01844000
  1854. ************************************* 01845000
  1855. SPACE 4 01846000
  1856. *********************************************************************** 01847000
  1857. * 01848000
  1858. * PAGE 1 MAY (PHYSICALLY) EXTEND A FEW HUNDRED BYTES BEYOND 01849000
  1859. * THIS POINT. PAGE 2 IS ARRANGED TO TAKE ADVANTAGE 01850000
  1860. * OF THIS BY HAVING AT THE BEGINNING ROUTINES WHICH ARE 01851000
  1861. * OFTEN USED AND DO NOT CALL SOUBROUTINES OR USE DATA OUTSIDE 01852000
  1862. * OF PAGE 1 OR THE BEGINNING OF PAGE 2. 01853000
  1863. * 01854000
  1864. *********************************************************************** 01855000
  1865. EJECT 01856000
  1866. *********************************************************************** 01857000
  1867. * 01858000
  1868. * 'ALTER' ENABLES ARBITRARY CHARACTERS TO BE MANIPULATED. 01859000
  1869. * AFTER DECODING THE FIRST TWO ARGUMENTS, IT TRANSFERS INTO 01860000
  1870. * THE CHANGE ROUTINE. 01861000
  1871. * 01862000
  1872. *********************************************************************** 01863000
  1873. SPACE 01864000
  1874. ALTER DS 0H 01865000
  1875. LA 2,ALCHAR1 POINT TO SPOT FOR FIRST CHAR 01866000
  1876. BAL 4,ALTSUB PUT THE FIRST ARGUMENT THERE 01867000
  1877. LA 2,ALCHAR2 POINT TO SPOT FOR SECOND CHAR 01868000
  1878. BAL 4,ALTSUB PUT THE SECOND ARGUMENT THERE 01869000
  1879. LA 2,ALCHAR1 POINT R2 TO CHAR1 01870000
  1880. SR 3,3 SET R3 = 0 01871000
  1881. LA 4,ALCHAR2 POINT R4 TO SECOND CHAR 01872000
  1882. LA 5,1(4) AND R5 ONE UP FROM THAT 01873000
  1883. B CHNGTRNS TRANSFER INTO CHANGE 01874000
  1884. SPACE 01875000
  1885. ALTSUB EQU * ALTER SUBROUTINE 01876000
  1886. OI SIGNAL,HEXSW SET HEX FLAG FOR GET 01877000
  1887. BAL 14,GET GET THE ARGUMENT 01878000
  1888. BZ INVREQ BRANCH IF NONE GIVEN 01879000
  1889. LTR 1,1 HOW MANY CHARS? 01880000
  1890. BNZ ALHEX BRANCH IF > 1 (MUST BE HEX) 01881000
  1891. MVC 0(1,2),XXXCWD MOVE THE ARGUMENT INTO THE SPOT 01882000
  1892. BR 4 RETURN 01883000
  1893. SPACE 01884000
  1894. ALHEX LA R5,1 DECODE HEX ARGUMENT @V2D3913 01885000
  1895. CR R1,R5 EXACTLY TWO CHARACTERS? @V2D3913 01886000
  1896. BNE INVREQ BRANCH IF NOT (NO GOOD) 01887000
  1897. EX 1,UPCASE CONVERT TO UPPER CASE 01888000
  1898. LA 5,XXXCWD POINT TO THE FIRST HEX DIGIT 01889000
  1899. BAL 14,HEXSUB GET IT 01890000
  1900. BCTR 0,0 AND CORRECT IT 01891000
  1901. LR 3,0 SAVE IT IN R3 01892000
  1902. LA 5,1(5) LOOK AT SECOND HEX DIGIT 01893000
  1903. BAL 14,HEXSUB GET IT 01894000
  1904. BCTR 0,0 CORRECT IT 01895000
  1905. SLL 3,4 MOVE UP THE OLD VALUE 01896000
  1906. AR 0,3 GET THE TOTAL VALUE 01897000
  1907. STC 0,0(2) STORE IT WHERE TOLD 01898000
  1908. BR 4 RETURN 01899000
  1909. SPACE 01900000
  1910. HEXSUB EQU * GET VALUE OF HEX DIGIT 01901000
  1911. LA 0,16 01902000
  1912. LA 1,HEX+15 POINT TO LAST HEX CHAR (F) 01903000
  1913. HEXSUBLP CLC 0(1,5),0(1) DOES IT MATCH? @V200713 01904000
  1914. BCR 8,14 RETURN IF SO (R0 HOLDS THE VALUE + 1) 01905000
  1915. BCTR 1,0 DECREMENT THE SPOT IN HEX 01906000
  1916. BCT 0,HEXSUBLP AND LOOP UNTIL HEX EXHAUSTED 01907000
  1917. B INVREQ CHARACTER NOT FOUND 01908000
  1918. SPACE 01909000
  1919. HEX DC C'0123456789ABCDEF' 01910000
  1920. EJECT 01911000
  1921. *********************************************************************** 01912000
  1922. * * 01913000
  1923. * 'CHANGE' WILL REPLACE THE FIRST DELIMITED FIELD BY THE * 01914000
  1924. * SECOND, FOR THE CURRENT LINE OR FOR MANY LINES, FOR * 01915000
  1925. * THE FIRST OCCURRENCE IN THE LINE OR FOR ALL OCCURRENCES. * 01916000
  1926. * THE COLUMNS AFFECTED ARE CONTROLLED BY 'ZONE'. * 01917000
  1927. * * 01918000
  1928. * (THIS ROUTINE HAS BEEN MODIFIED SO THAT STRING1 MAY BE * 01919000
  1929. * NULL, IN WHICH CASE STRING2 IS INSERTED AT THE BEGINNING * 01920000
  1930. * OF THE ZONE, AND THE 'GLOBAL' OPTION IS INVALID. * 01921000
  1931. * * 01922000
  1932. *********************************************************************** 01923000
  1933. SPACE 01924000
  1934. CHANGE DS 0H 01925000
  1935. TM FLAG2,TUBE DISPLAY TERMINAL ? @V200714 01926000
  1936. BNO SKT NO...BR @V200714 01927000
  1937. CLC EDCT(2),COUNT ANY PARAMETERS SPECIFIED ? @V2D3913 01928000
  1938. BNE SKT YES...BR @V200714 01929000
  1939. TM TWITCH,TOPSW+EOF TOF OR EOF ? @V200714 01930000
  1940. BM NOTFOUND IF SO, CAN'T CHANGE @V200714 01931000
  1941. MVI SCRFLG2,WRCLINB SET FLAG FOR DISPLAY RTN @V2D3913 01932000
  1942. OI CHNGFLAG,DTYPE SET DISPLAY TYPE ON @VA07968 01932500
  1943. BAL 14,WRTYPEX WRITE LINE TO INPUT AREA @V2D3913 01933000
  1944. NI CHNGFLAG,255-DTYPE SET DISPLAY TYPE OFF @VA07968 01933500
  1945. BAL R14,RDTYPE READ THE LINE IN. @V2D3913 01934000
  1946. BZ NEXT EXIT, IF MIND HAS CHANGED. @V2D3913 01935000
  1947. OI CHNGFLAG,DTYPE TURN ON DISPLAY TYPE FLAG @VA07258 01936000
  1948. XC EDCT(2),EDCT CLEAR EDIT COUNT @V2D3913 01937000
  1949. B RTYP4A NOW REPLACE THE LINE. @V2D3913 01938000
  1950. SKT EQU * @VA04193 01939000
  1951. XC TRNCNUM(4),TRNCNUM ZERO TRUNCATE COUNT @VA04193 01940000
  1952. BAL 14,STRING1 DECODE STRING 1 @VA04193 01941000
  1953. LH 6,COUNT COMPUTE LENGTH OF REPLACEMENT FIELD. 01942000
  1954. LR 5,4 POSSIBLE. 01943000
  1955. LA 14,EDLIN POINT TO INPUT SPEC @V200713 01944000
  1956. SR 5,14 @V200713 01945000
  1957. SR 6,5 01946000
  1958. LR 5,4 01947000
  1959. BZ CHNG2A BRANCH IF R6=0 01948000
  1960. CHNG2 EX 7,CHNGCOMP CLI 0(5),** 01949000
  1961. BE CHNG1 01950000
  1962. LA 5,1(,5) 01951000
  1963. BCT 6,CHNG2 01952000
  1964. CHNG2A EQU * 01953000
  1965. LR R8,R5 ALLOW NO CLOSING DELIMITER @V305614 01954000
  1966. BCTR R8,R0 @V305614 01955000
  1967. B *+6 01956000
  1968. SPACE 01957000
  1969. CHNG1 EQU * CHECK FOR MULTIPLE LINES AND GLOBAL 01958000
  1970. LR R8,R5 @V305614 01959000
  1971. SR R8,R14 SUBTRACT A(EDLIN) @V305614 01960000
  1972. LA R8,1(,R8) BUMP IT @V305614 01961000
  1973. STH R8,EDCT SAVE FOR 'GET' @V305614 01962000
  1974. EJECT 01963000
  1975. CHNGTRNS EQU * @V2D3913 01964000
  1976. NI CHNGFLAG,255-(NULLSW1+NULLSW2+GLOBSW+FLDFND+CHNGSW) 01965000
  1977. BAL 14,NUM CHECK FOR NUMBER OF LINES SUPPLIED. 01966000
  1978. BAL 14,STARCHK NON-NUMERIC RETURN. TR 01967000
  1979. ST R0,CHNGNUM SAVE COUNT OF NO. OF LINES @V305614 01968000
  1980. OI SCRFLGS,WRFULLB REWRITE ALL TEXT @V2D3914 01969000
  1981. BAL R14,GET GET NEXT TOKEN @V2D3913 01970000
  1982. BZ CHNG4 NO GOOD IF CC = 0 01971000
  1983. CLC XXXCWD(2),=CL2'G ' MAYBE HE USED 'G' 01972000
  1984. BE CHNG3 BRANCH IF SO @V2D3913 01973000
  1985. BAL 14,STARCHK BETTER BE ASTERISK @V2D3913 01974000
  1986. CHNG3 EQU * 01975000
  1987. BAL 14,PARMCHK CHECK NO MORE PARMS 01976000
  1988. OI CHNGFLAG,GLOBSW INDICATE GLOBAL CHANGE REQ. 01977000
  1989. CHNG4 EQU * 01978000
  1990. SR R6,R6 CLEAR REGISTER @V2D3913 01979000
  1991. LTR 3,3 IS STRING1 NULL? 01980000
  1992. BNL CHNG5 BRANCH IF NOT 01981000
  1993. TM CHNGFLAG,GLOBSW WAS GLOBAL REQUESTED? 01982000
  1994. BO INVREQ BRANCH IF SO (THAT'S NOT ON) 01983000
  1995. OI CHNGFLAG,NULLSW1 SET TWITCH 01984000
  1996. CHNG5 EQU * 01985000
  1997. L R14,CHNGNUM ANY LINES TO CHANGE ? @V305614 01986000
  1998. LTR R14,R14 ..... @V305614 01987000
  1999. BZ NOTFOUND INDICATE NO CHANGE @VA07942 01988000
  2000. BAL R14,EORCHK CHECK CURRENT BOUNDS @V2D3913 01989000
  2001. B CEOFILE ALL DONE IN THIS CASE @V2D3913 01990000
  2002. BAL R14,XREADB FILL COMPARE BUFFER @V2D3913 01991000
  2003. SR 5,4 LENGTH OF REPLACEMENT FIELD 01992000
  2004. LTR 5,5 WAS FIELD NULL. 01993000
  2005. BZ *+10 YES. 01994000
  2006. BCTR 5,0 DECREMENT FOR ACCURATE REPLACEMENT. 01995000
  2007. B *+8 01996000
  2008. OI CHNGFLAG,NULLSW2 YES - INDICATE TO PROCESS NULL. 01997000
  2009. TM TWITCH,TOPSW+EOF @V2D3913 01998000
  2010. BZ CHNGSTRT BRANCH IF NOT 01999000
  2011. B CHNGNXT1 02000000
  2012. EJECT 02001000
  2013. CHNGNXT3 OI CHNGFLAG,CHNGSW INDICATE LINE CHANGED. 02002000
  2014. CR 3,5 COMP LENGTHS OF ORIGINAL & CHANGED. 02003000
  2015. BE DOCHNG SAME LENGTH; REPLACE ONLY. 02004000
  2016. BH MOVELEFT SHORTER - REQUIRES SHIFT TO LEFT. 02005000
  2017. * LONGER - REQUIRES SHIFT TO RIGHT. TR 02006000
  2018. LH 7,ZONE2 GET TRUNCATION COLUMN 02007000
  2019. LA 7,LINE(7) ADJUST TO COL LOCATION TR 02008000
  2020. LR 9,7 LOAD REG 9 02009000
  2021. BCTR 9,0 DECREMENT GR 9. TO POINTER TR 02010000
  2022. SR 7,1 NO. OF COLS. AVAILABLE FOR STRING2 02011000
  2023. SR 7,5 NO. OF COLS. LEFT OVER IN ZONE + 1 02012000
  2024. BH CHNG7 CHANGE FIELD WILL NOT BE TRUNCATED TR 02013000
  2025. BCTR 7,0 CHANGED FLD WILL BE TRUNCATED. TR 02014000
  2026. SPACE 02015000
  2027. * SO STRING2 IS TO BE TRUNCATED. LET'S SEE WHETHER ANY NON- 02016000
  2028. * BLANKS ARE BEING LOST. (CJS) 02017000
  2029. SPACE 02018000
  2030. * R4: START OF STRING2 02019000
  2031. * R5: LENGTH-1 OF STRING2 02020000
  2032. * R7: -(NO. OF CHARS TO THROW AWAY) 02021000
  2033. * R14 AND R15: AVAILABLE FOR SCRATCH 02022000
  2034. SPACE 02023000
  2035. LA 15,0(4,5) ADDRESS OF LAST CHAR IN STRING2 02024000
  2036. LPR 14,7 NO. OF CHARS TO THROW AWAY FROM STRING2 02025000
  2037. SPACE 02026000
  2038. STR2LP EQU * LOOP HEAD 02027000
  2039. CLI 0(15),C' ' BLANK? 02028000
  2040. BNE SIGLOST BRANCH IF NOT (SIGNIFICANT CHARS LOST) 02029000
  2041. BCTR 15,0 LOOK AT PREVIOUS CHAR 02030000
  2042. BCT 14,STR2LP AND LOOP 02031000
  2043. EJECT 02032000
  2044. * IF WE GET HERE, WE KNOW THAT SIGNIFICANT CHARACTERS ARE NOT 02033000
  2045. * BEING LOST FROM STRING2. 02034000
  2046. * BUT WHAT ABOUT THAT PART OF THE EXISTING LINE WHICH IS BEING 02035000
  2047. * PUSHED OVER THE EDGE? 02036000
  2048. SPACE 02037000
  2049. * R1: ADDRESS OF FIRST CHARACTER TO BE CHANGED 02038000
  2050. * R3: LENGTH-1 OF STRING1 02039000
  2051. * R9: ADDRESS OF LAST CHAR IN ZONE 02040000
  2052. SPACE 02041000
  2053. LR 15,9 ADDRESS OF LAST CHAR IN ZONE 02042000
  2054. LR 14,9 SAME THING 02043000
  2055. SR 14,1 TOTAL NO. OF CHARS TO BE REMOVED - 1 02044000
  2056. SR 14,3 NO. OF CHARS TO BE LOST NON-EXPLICITLY 02045000
  2057. BZ SIGNTLST BRANCH IF NONE (SIG CHARS NOT LOST) 02046000
  2058. SPACE 02047000
  2059. LOSTLP EQU * LOOP HEAD 02048000
  2060. CLI 0(15),C' ' BLANK? 02049000
  2061. BNE SIGLOST BRANCH IF NOT (SIGNIFICANT CHARS LOST) 02050000
  2062. BCTR 15,0 LOOK AT PREVIOUS CHAR 02051000
  2063. BCT 14,LOSTLP AND LOOP 02052000
  2064. B SIGNTLST SIGNIFICANT CHARS NOT LOST 02053000
  2065. SPACE 02054000
  2066. SIGLOST EQU * SIGNIFICANT CHARS ARE BEING LOST 02055000
  2067. OI TWITCH,TRUNC SET TRUNC SWITCH 02056000
  2068. SPACE 02057000
  2069. SIGNTLST EQU * SIGNIFICANT CHARS NOT LOST 02058000
  2070. AR 7,5 REDUCED LENGTH OF STRING2 02059000
  2071. B DOCHNG2 GO AND PERFORM THE CHANGE 02060000
  2072. EJECT 02061000
  2073. * END OF CHECK FOR WHETHER NON-BLANKS ARE LOST FROM STRING2 02062000
  2074. * OR FROM THAT PART OF THE EXISTING LINE WHICH IS BEING THROWN 02063000
  2075. * AWAY, IN THE CASE WHEN STRING2 IS TRUNCATED. 02064000
  2076. SPACE 02065000
  2077. CHNG7 EQU * TR 02066000
  2078. LNR 8,5 1 - L'STRING2 02067000
  2079. AR 8,3 L'STRING1 - L'STRING2 02068000
  2080. BZ DOCHNG 02069000
  2081. LPR 15,8 NO. OF BYTES TO BE DISCARDED INTO R15, JS 02070000
  2082. AR 8,9 R8 POINTS TO LAST BYTE TO BE MOVED 02071000
  2083. LR 14,8 WHERE-TO-START (LESS 1) INTO R14, JS 02072000
  2084. JCLI14 CLI 1(14),C' ' IS CHARACTER-TO-BE-DISCARDED A BLANK ? JS 02073000
  2085. BE JLAR14 BE IF YES (NO PROBLEM SO FAR) JS 02074000
  2086. OI TWITCH,TRUNC IF NOT, SET TRUNCATED-BIT AND JS 02075000
  2087. B MOVERT START MOVING AS USUAL. JS 02076000
  2088. JLAR14 LA 14,1(,14) ADVANCE TO NEXT CHARACTER, JS 02077000
  2089. BCT 15,JCLI14 AND CHECK ALL CHARACTERS THROWN AWAY. JS 02078000
  2090. MOVERT MVC 0(1,9),0(8) 02079000
  2091. BCTR 9,0 02080000
  2092. BCTR 8,0 02081000
  2093. BCT 7,MOVERT 02082000
  2094. DOCHNG EQU * SET UP TO PERFORM CHANGE 02083000
  2095. LR 7,5 LENGTH-1 OF STRING2 02084000
  2096. DOCHNG2 EQU * PERFORM CHANGE 02085000
  2097. EX 7,MOVEIN (THERE) 02086000
  2098. CHNGSCOL EQU * UPDATE R1 TO NEXT COLUMN TO CHANGE 02087000
  2099. LA 1,1(1,5) STARTING POSITION + L'STRING2 02088000
  2100. B CHNGNEXT 02089000
  2101. EJECT 02090000
  2102. MOVELEFT EQU * CHANGE INVOLVES MOVE TO LEFT 02091000
  2103. LR 15,3 L'STRING1-1 02092000
  2104. LA 8,1(1,15) ADDR. OF BYTE AFTER OCCURRENCE OF STRING1 02093000
  2105. LA 9,0(5,8) 02094000
  2106. SR 9,15 02095000
  2107. LH 7,ZONE2 GET TRUNCATION COLUMN 02096000
  2108. LA 7,LINE(7) TR 02097000
  2109. LR 14,7 SAVE COL ADDRESS TR 02098000
  2110. SR 7,8 02099000
  2111. BNH *+10 IF NOT GT 0, DO NOT MOVE ANYTHING. TR 02100000
  2112. BCTR 7,0 02101000
  2113. EX 7,MOVER 02102000
  2114. EX 5,MOVEIN GR 5 = NUMB OF REPLACING CHARACTERS 02103000
  2115. SR 15,5 02104000
  2116. BCTR 15,0 GR 15 = NUMB OG BLANKS TO BE MOVED IN 02105000
  2117. LR 9,14 LOAD REG 9 TR 02106000
  2118. BCTR 9,0 TR 02107000
  2119. SR 9,15 02108000
  2120. MVI 0(9),C' ' SET UP ONE BLANK 02109000
  2121. BCTR 15,0 COUNT-1 02110000
  2122. LTR 15,15 WAS THERE ONLY ONE BLANK 02111000
  2123. BL *+8 YES, SKIP 'EX' 02112000
  2124. EX 15,MOVEBL NO, MVC 1(*-*,9),0(9) 02113000
  2125. B CHNGSCOL 02114000
  2126. EJECT 02115000
  2127. DONULL EQU * STRING2 IS NULL, STRING1 NOT NULL 02116000
  2128. OI CHNGFLAG,CHNGSW INDICATE CHANGE MADE 02117000
  2129. LR 9,1 MOVE INTO HERE. 02118000
  2130. LA 8,1(3,9) ADDR. OF BYTE AFTER OCCURRENCE OF STRING1 02119000
  2131. LH 7,ZONE2 GET TRUNCATION COLUMN 02120000
  2132. LA 7,LINE(7) COMPUTE ADDRESS OF COL. BEYOND EOZ 02121000
  2133. SR 7,8 NO. OF ACTIVE COLS. AFTER STRING1 02122000
  2134. BNH DONULL1 BRANCH IF NONE 02123000
  2135. BCTR 7,0 DECREASE FOR EXEC 02124000
  2136. EX 7,MOVER MOVE THEM OVER 02125000
  2137. LA 9,1(9,7) POINT TO COL. AFTER WHAT WE'VE MOVED 02126000
  2138. DONULL1 EQU * (JUMP HERE IF NOUGHT TO MOVE OVER) 02127000
  2139. MVI 0(9),C' ' MOVE IN ONE BLANK 02128000
  2140. LR 15,3 L'STRING1-1 = NO. OF BLANKS LEFT TO PAD 02129000
  2141. BCTR 15,0 DECREASE FOR EXEC 02130000
  2142. LTR 15,15 WAS THERE AT LEAST ONE? 02131000
  2143. BL *+8 SKIP IF NOT 02132000
  2144. EX 15,MOVEBL MVC 1(*-*,9),0(9) 02133000
  2145. LH 7,CHNGCNT ITERATION COUNT FOR THIS LINE 02134000
  2146. BCTR 7,0 MINUS... 02135000
  2147. SR 7,3 ...L'STRING1. 02136000
  2148. BNH CHNGNXT1 BRANCH IF WE'VE EXHAUSTED THE ZONE 02137000
  2149. STH 7,CHNGCNT SAVE DECREMENTED VALUE OF CHNGCNT 02138000
  2150. SPACE 02139000
  2151. CHNGNEXT TM CHNGFLAG,GLOBSW IS GLOBAL REQUESTED. 02140000
  2152. BZ CHNGNXT1 NO. 02141000
  2153. LA 0,LINE GET LINE ADDRESS TR 02142000
  2154. AH 0,ZONE2 GET TRUNCATION COL ADDRESS 02143000
  2155. SR 0,1 02144000
  2156. SR 0,3 02145000
  2157. BH CHNGNXT2 LOOP PROTECTOR TR 02146000
  2158. EJECT 02147000
  2159. CHNGNXT1 L R14,CHNGNUM GET THE LINE COUNT @V305614 02148000
  2160. BCTR R14,R0 DECREMENT IT @V305614 02149000
  2161. ST R14,CHNGNUM AND PUT IT BACK @V305614 02150000
  2162. OI TWITCH,SAVOVER OVERRIDE AUTOSAVE @V2D3914 02151000
  2163. TM CHNGFLAG,CHNGSW HAS THE LINE BEEN CHANGED? @V2D3913 02152000
  2164. BZ CHNGNXT7 NO. 02153000
  2165. BAL 14,XREPL YES, REPLACE LINE 02154000
  2166. LA R6,1(,R6) INCREASE NUMBER OF LINES CHANGED @V2D3913 02155000
  2167. TM TWITCH,TRUNC WAS LINE TRUNCATED? 02156000
  2168. BZ CHNGVER2 NO 02157000
  2169. L R1,TRNCNUM GET TRUNCATE COUNT @VA04193 02158000
  2170. LA R1,1(R1) INCREMENT COUNT @VA04193 02159000
  2171. ST R1,TRNCNUM STORE NEW COUNT @VA04193 02160000
  2172. TM FLAG2,VER VERIFY OFF? @VA04193 02161000
  2173. BZ CHNGCLR YES ... BR @VA04193 02162000
  2174. TM FLAG2,TUBE DISPLAY TERMINAL? @VA04193 02163000
  2175. BO CHNGCLR YES ... BR @VA04193 02164000
  2176. WTYPE TRUNCX YES 02165000
  2177. CHNGVER2 TM FLAG2,TUBE DISPLAY TERMINAL ? @V2D3913 02166000
  2178. BO CHNGCLR YES ... BR @V2D3913 02167000
  2179. VERIFY @V2D3913 02168000
  2180. CHNGCLR NI TWITCH,255-TRUNC RESET TRUNC FLAG @VA04193 02169000
  2181. NI CHNGFLAG,255-CHNGSW CLEAR TWITCH. 02170000
  2182. CHNGNXT7 L R14,CHNGNUM ANY LINES LEFT TO DO ? @V305614 02171000
  2183. LTR R14,R14 ..... @V305614 02172000
  2184. BZ CEOFILE STANDARD EXIT (NOW) @V2D3913 02173000
  2185. BAL R14,XREAD READ ANOTHER LINE. @V2D3913 02174000
  2186. TM TWITCH,TOPSW+EOF ARE WE AT EITHER EXTREME? @V2D3913 02175000
  2187. BNZ CEOFILE ALL DONE, IF SO. @V2D3913 02176000
  2188. CHNGSTRT EQU * CHANGE START 02177000
  2189. LH 1,ZONE1 BEGINNING ZONE-1 02178000
  2190. LH 0,ZONE2 END ZONE 02179000
  2191. SR 0,1 WIDTH OF ZONE FIELD 02180000
  2192. STH 0,CHNGCNT SAVE FOR DONULL (MAX. INTERATION COUNT) 02181000
  2193. LA 1,LINE(1) START SEARCH HERE 02182000
  2194. TM CHNGFLAG,NULLSW1 IS STRING1 NULL? 02183000
  2195. BO CHNGNXT6 BRANCH IF SO 02184000
  2196. SR 0,3 LOOP COUNT 02185000
  2197. CHNGNXT2 EX 3,CHNGCOM 02186000
  2198. BE CHNGNXT6 FOUND STRING 02187000
  2199. LA 1,1(,1) UPDATE STARTING COLUMN. 02188000
  2200. BCT 0,CHNGNXT2 02189000
  2201. B CHNGNXT1 NOT FOUND HERE. 02190000
  2202. SPACE 02191000
  2203. CHNGNXT6 OI CHNGFLAG,FLDFND RAM 02192000
  2204. TM CHNGFLAG,NULLSW2 IS STRING2 NULL? RAM 02193000
  2205. BZ CHNGNXT3 BRANCH IF IT'S NOT 02194000
  2206. TM CHNGFLAG,NULLSW1 IS STRING1 NULL? 02195000
  2207. BO CHNGNXT1 BRANCH IF SO (BEHAVE AS NO-OP) 02196000
  2208. B DONULL ATTEND TO CASE OF STRING2 = NULL 02197000
  2209. SPACE 02198000
  2210. CEOFILE NI TWITCH,255-SAVOVER RESET SAVE OVERRIDE @V2D3914 02199000
  2211. TM CHNGFLAG,FLDFND DID WE CHANGE ANYTHING ? @V2D3914 02200000
  2212. BNO NOTFOUND NO ... BR @V2D3913 02201000
  2213. BAL R14,AUTOCHEK NOW CHECK FOR AUTOSAVE @V2D3914 02202000
  2214. TM FLAG2,TUBE DISPLAY TERMINAL ? @V2D3913 02203000
  2215. BO CHMSG YES ... BR @VA04193 02204000
  2216. TM FLAG2,VER VERIFY ON? @VA04193 02205000
  2217. BO ENDRANGE YES ... BR @VA04193 02206000
  2218. ICM R0,15,TRNCNUM GET TRUNC COUNT; IS IT ZERO? @VA04193 02207000
  2219. BZ NEXT YES ... BR @VA04193 02208000
  2220. LA R1,CHGTRUNC GET TRUNCATE MESSAGE ADDR @VA04193 02209000
  2221. LA R6,22 AND LENGTH @VA04193 02210000
  2222. B CNVTRUNC AND GO CONVERT @VA04193 02211000
  2223. CHMSG LR R0,R6 GET NUMBER OF LINES CHANGED @V2D3914 02212000
  2224. BAL R14,BINDEC CONVERT NUMBER @V2D3913 02213000
  2225. MVC CHNGMSG(4),AREA+4 PLUG INTO MESSAGE @V2D3913 02214000
  2226. LA R1,CHNGMSG LOAD MESSAGE ADDR AND @VA04193 02215000
  2227. LA R6,20 LOAD INIT MSG LENGTH @VA04193 02216000
  2228. ICM R0,15,TRNCNUM GET TRUNC COUNT; IS IT ZERO? @VA04193 02217000
  2229. BZ TYPCHMSG YES ... BR @VA04193 02218000
  2230. LA R6,44 LOAD LONG MSG LENGTH @VA04193 02219000
  2231. CNVTRUNC EQU * 02220000
  2232. BAL R14,BINDEC CONVERT TRUNC NUMBER AND @VA04193 02221000
  2233. MVC CHGTRUNC(4),AREA+4 PLUG INTO MESSAGE @VA04193 02222000
  2234. B TYPCMSG1 TYPE, REGARDLESS OF VERIFICATION @VA05355 02223000
  2235. TYPCHMSG EQU * @VA05355 02224000
  2236. TM FLAG2,VER VERIFICATION ON ? @VA05355 02225000
  2237. BNO NEXT NO, GET NEXT COMMAND @VA05355 02226000
  2238. TYPCMSG1 EQU * BR HERE IF TRUNC OCCURRED @VA05355 02227000
  2239. LR R0,R6 GET MSG LENGTH @VA04193 02228000
  2240. LA R14,NEXT AND RETURN ADDR @VA04193 02229000
  2241. B WRTYPE AND GO TO IT! @VA04193 02230000
  2242. SPACE 1 02231000
  2243. SPACE 1 02232000
  2244. MOVER MVC 0(*-*,9),0(8) 02233000
  2245. MOVEIN MVC 0(*-*,1),0(4) 02234000
  2246. MOVEBL MVC 1(*-*,9),0(9) 02235000
  2247. CHNGCOMP CLI 0(5),*-* 02236000
  2248. CHNGCOM CLC 0(*-*,1),0(2) 02237000
  2249. EJECT 02238000
  2250. *********************************************************************** 02239000
  2251. * 02240000
  2252. * 'STRING1' IS A SUBROUTINE WHICH IS CALLED FROM 'LOCATE' 02241000
  2253. * AND 'CHANGE' TO DELIMIT STRING1. 02242000
  2254. * 02243000
  2255. * CALL: 02244000
  2256. * BAL 14,STRING1 02245000
  2257. * 02246000
  2258. * ON EXIT: 02247000
  2259. * R2 POINTS TO START OF STRING1 (WHICH WILL HAVE BEEN 02248000
  2260. * MOVED INTO TABLIN); 02249000
  2261. * R3 CONTAINS LENGTH-1 OF STRING1; 02250000
  2262. * R4 POINTS TO NEXT FIELD IN EDLIN; 02251000
  2263. * R7 CONTAINS THE DELIMITER (IN THE LOW-ORDER BYTE). 02252000
  2264. * 02253000
  2265. * IF THE LENGTH OF STRING1 IS GREATER THEN THE ZONE WIDTH, 02254000
  2266. * THE MESSAGE 'ZONE ERROR' IS TYPED, AND A DIRECT BRANCH IS 02255000
  2267. * TAKEN TO INVREQX (INVALID REQUEST, BUT DON'T SAY SO). 02256000
  2268. * 02257000
  2269. * (LEVEL 1 SUBROUTINE) 02258000
  2270. * 02259000
  2271. *********************************************************************** 02260000
  2272. SPACE 02261000
  2273. STRING1 DS 0H 02262000
  2274. LA 2,TABLIN POINT R2 TO TABLIN 02263000
  2275. LH 3,EDCT SPOT IN EDLIN TO START LOOKING 02264000
  2276. LA 4,EDLIN(3) CONVERT TO ACTUAL ADDRESS 02265000
  2277. LH 5,COUNT LENGTH OF EDLIN 02266000
  2278. SR 5,3 LENGTH OF PIECE TO LOOK AT 02267000
  2279. BNH INVREQ BRANCH IF NONE (TELL HIM BAD REQUEST) 02268000
  2280. SPACE 02269000
  2281. STRG4 EQU * LOOK FOR OPENING DELIMITER 02270000
  2282. CLI 0(4),C' ' IS THIS IT? 02271000
  2283. BNE STRG1 BRANCH IF SO 02272000
  2284. LA 4,1(,4) LOOK AT NEXT BYTE 02273000
  2285. BCT 5,STRG4 LOOP UNTIL WE FIND IT 02274000
  2286. B INVREQ BRANCH IF STRING EXHAUSTED 02275000
  2287. SPACE 02276000
  2288. STRG1 EQU * WE'VE FOUND THE OPENING DELIMITER 02277000
  2289. IC 7,0(,4) PUT IT IN R7 02278000
  2290. LA 4,1(,4) LOOK AT NEXT BYTE 02279000
  2291. LR 1,4 SAVE THE SPOT IN R1 02280000
  2292. LR 3,4 AND IN R3 02281000
  2293. BCTR 5,0 LENGTH REMAINING 02282000
  2294. LTR 5,5 IS THERE ANY? 02283000
  2295. BZ STRG2 BRANCH IF NOT 02284000
  2296. SPACE 02285000
  2297. STRG3 EQU * SEARCH FOR CLOSING DELIMITER 02286000
  2298. EX 7,STRGCOMP IS THIS IT? 02287000
  2299. BE STRG2 BRANCH IF SO 02288000
  2300. LA 4,1(,4) LOOK AT NEXT BYTE 02289000
  2301. BCT 5,STRG3 LOOP 02290000
  2302. SPACE 02291000
  2303. STRG2 EQU * WE'VE DELIMITED STRING1 02292000
  2304. SR 3,4 COMPUTE ITS LENGTH 02293000
  2305. LPR 3,3 AND PUT IT IN R3 02294000
  2306. BCTR 3,0 (NOW LENGTH-1) 02295000
  2307. LTR 5,5 WAS THE CLOSING DELIMITER GIVEN? 02296000
  2308. BZ *+8 SKIP IF NOT 02297000
  2309. LA 4,1(,4) POINT TO NEXT BYTE 02298000
  2310. LA 0,EDLIN COMPUTE NEW VALUE FOR EDCT 02299000
  2311. SR 0,4 02300000
  2312. LPR 0,0 02301000
  2313. STH 0,EDCT AND PUT IT THERE 02302000
  2314. LTR 3,3 TEST LENGTH OF STRING1 02303000
  2315. BCR 4,14 RETURN IF ZERO (LENGTH-1 -VE) 02304000
  2316. SPACE 02305000
  2317. EX 3,STRGMOV MOVE STRING1 INTO TABLIN 02306000
  2318. TM FLAG,CAN CANONICALIZATION REQUIRED? 02307000
  2319. BZ STRG6 BRANCH IF NOT 02308000
  2320. SPACE 02309000
  2321. * CANONICALIZE THE STRING 02310000
  2322. SPACE 02311000
  2323. LA 0,1(3) LENGTH OF STRING1 INTO R0 02312000
  2324. LR 1,2 ADDRESS INTO R1 02313000
  2325. BAL 15,CANON CALL CANONICALIZING ROUTINE 02314000
  2326. LR 3,0 NEW LENGTH INTO R3 02315000
  2327. BCTR 3,0 (NOW LENGTH-1) 02316000
  2328. SPACE 02317000
  2329. STRG6 EQU * 02318000
  2330. LH 0,ZONE2 END ZONE 02319000
  2331. SH 0,ZONE1 MINUS STARTING ZONE 02320000
  2332. CR 3,0 IS STRING1 TOO LONG FOR ZONE? 02321000
  2333. BCR 4,14 RETURN IF NOT 02322000
  2334. WTYPE ZONERRMS,,RETURN=INVREQX @V200713 02323000
  2335. SPACE 02324000
  2336. STRGCOMP CLI 0(4),X'00' (WE FILL IN THE IMMEDIATE FIELD VIA EXEC) 02325000
  2337. STRGMOV MVC TABLIN(*-*),0(1) 02326000
  2338. SPACE 02327000
  2339. ZONERRMS DC C'ZONE ERROR' 02328000
  2340. EJECT 02329000
  2341. *********************************************************************** 02330000
  2342. * 02331000
  2343. * 'OVERLAY' REPLACES THE CHARACTERS OF A LINE WITH ANY 02332000
  2344. * CHARACTERS IN THE INPUT LINE WHICH ARE NON-BLANK. 02333000
  2345. * 02334000
  2346. * AN UNDERSCORE IS THE INPUT LINE FORCES A BLANK INTO THE 02335000
  2347. * LINE BEING OVERLAID. 02336000
  2348. * 02337000
  2349. *********************************************************************** 02338000
  2350. SPACE 02339000
  2351. OVRLAY DS 0H 02340000
  2352. NC REPCNT,REPCNT TEST REPCNT 02341000
  2353. LA R3,1 GET AN AMIABLE COUNT @V2D3913 02342000
  2354. BNZ OVRL2 BRANCH IF NOT ZERO 02343000
  2355. ST R3,REPCNT RESET THE REPEAT COUNT @V2D3913 02344000
  2356. B NEXT AND GET NEXT REQUEST 02345000
  2357. SPACE 1 02346000
  2358. OVRL2 BAL R14,EORCHK CHECK THE CURRENT BOUNDS @V2D3913 02347000
  2359. B REPSET ALL DONE @V2D3913 02348000
  2360. BAL R14,XREADB REFRESH LINE @V2D3913 02349000
  2361. TM FLAG2,TUBE DISPLAY TERMINAL ? @V200714 02350000
  2362. BNO SPREDOVR NO...BR @V200714 02351000
  2363. CLC EDCT(2),COUNT CHECK LENGTH @V2D3913 02352000
  2364. BNE SPREDOVR YES...BR @V200714 02353000
  2365. BAL 14,RDTYPE GET NEW LINE @V200714 02354000
  2366. XC EDCT,EDCT POINT AT FIRST CHAR FOR SPREAD @V200714 02355000
  2367. SPREDOVR OI SIGNAL,OVER SET OVERLAY FLAG FOR SPREAD @V200714 02356000
  2368. BAL 14,SPREAD SPREAD THE LINE 02357000
  2369. TM TWITCH,TRUNC TRUNCATION? @VA04193 02358000
  2370. BZ OVRLEOR NO ... BR @VA04193 02359000
  2371. WTYPE TRUNCX SET UP TRUNCATION MESSAGE @VA04193 02360000
  2372. OI SCRFLG2,MOREB MAKE SURE IT'S SEEN @VA04193 02361000
  2373. OVRLEOR EQU * @VA04193 02362000
  2374. TM TWITCH,TOPSW+EOF ENDRANGE? @V2D3913 02363000
  2375. BZ *+8 SKIP IF NOT 02364000
  2376. BAL 2,REPT1 LET REPT1 HANDLE IF SO 02365000
  2377. SPACE 02366000
  2378. OVRL EQU * 02367000
  2379. OI TWITCH,SAVOVER OVERRIDE AUTOSAVE @V2D3914 02368000
  2380. LH R0,TRUNCOL SET NUMBER OF CHARS TO OVLAY @V2D3914 02369000
  2381. LA 1,TABLIN POINT TO THE SPREAD LINE 02370000
  2382. LA 2,LINE AND THE LINE TO BE OVERLAID 02371000
  2383. OVRL1 CLI 0(R1),C' ' CHECK FOR BLANK @V2D3913 02372000
  2384. BE OVRL7 IF SO IGNORE 02373000
  2385. CLI 0(1),C'_' IS CHARACTER AN UNDERLINE? 02374000
  2386. BNE OVRL6 BRANCH IF NOT 02375000
  2387. MVI 0(2),C' ' FORCE A BLANK 02376000
  2388. B OVRL7 02377000
  2389. OVRL6 MVC 0(1,R2),0(R1) REPLACE OLD WITH NEW @V2D3913 02378000
  2390. OVRL7 AR R2,R3 MOVE ON. @V2D3913 02379000
  2391. AR R1,R3 HERE, AS WELL. @V2D3913 02380000
  2392. BCT 0,OVRL1 LOOP UNTIL DONE 02381000
  2393. BAL 2,REPT CHECK FOR MORE 02382000
  2394. B OVRL 02383000
  2395. EJECT 02384000
  2396. *********************************************************************** 02385000
  2397. * 02386000
  2398. * 'FOR' WILL CAUSE AN OVERLAY REQUEST TO BE DUPLICATED 02387000
  2399. * ON THE NEXT 'N' LINES. 02388000
  2400. * 02389000
  2401. * (REPT AND REPT1 ARE LEVEL 1 SUBROUTINES, CALLED FROM OVRLAY. 02390000
  2402. * CALL IS: BAL 2,REPT; OR BAL 2,REPT1.) 02391000
  2403. * 02392000
  2404. *********************************************************************** 02393000
  2405. SPACE 02394000
  2406. REPEAT DS 0H 02395000
  2407. BAL 14,NUM GET PARM 02396000
  2408. BAL 14,STARCHK MUST BE A STAR (HOPE) 02397000
  2409. BAL 14,PARMCHK CHECK NO MORE PARMS 02398000
  2410. ST 0,REPCNT STORE AS REPCNT 02399000
  2411. B NEXT 02400000
  2412. SPACE 02401000
  2413. REPT EQU * 02402000
  2414. BAL 14,XREPL UPDATE LINE 02403000
  2415. REPT1 L R6,REPCNT GET REPEAT COUNT @V2D3914 02404000
  2416. BCTR R6,R0 DECREMENT THE COUNT @V2D3914 02405000
  2417. TM FLAG2,TUBE IS THIS A DISPLAY TERMINAL ? @V2D3914 02406000
  2418. BNO REPTA NO ... BR @V2D3914 02407000
  2419. SPACE 1 02408000
  2420. LTR R6,R6 IS REPEAT COUNT ZERO ? @V2D3914 02409000
  2421. BNZ REPTB IF NOT, SKIP VERIFICATION @V2D3914 02410000
  2422. MVI SCRFLGS,WRTOPB REWRITE EVERYTHING @VM01058 02411000
  2423. SPACE 1 02412000
  2424. REPTA VERIFY @V2D3914 02413000
  2425. LTR R6,R6 IS REPEAT COUNT ZERO ? @V2D3914 02414000
  2426. BNZ REPTB CONTINUE IF NOT @V2D3914 02415000
  2427. BAL R14,AUTOCHEK CHECK FOR AUTOSAVE @V2D3914 02416000
  2428. NI TWITCH,255-SAVOVER RESET SAVE OVERRIDE @V2D3914 02417000
  2429. B NEXT RETURN @V2D3914 02418000
  2430. SPACE 1 02419000
  2431. REPTB ST R6,REPCNT SAVE NEW REPEAT COUNT @V2D3914 02420000
  2432. BAL R14,XREAD READ THE NEXT LINE OF TEXT @V2D3914 02421000
  2433. TM TWITCH,TOPSW+EOF AT FILE LIMIT ? @V2D3914 02422000
  2434. BZR R2 RETURN IF NOT @V2D3914 02423000
  2435. SPACE 02424000
  2436. REPSET EQU * 02425000
  2437. LA 14,1 GET A 1 @V200713 02426000
  2438. ST 14,REPCNT RESET REPCNT @V200713 02427000
  2439. B ENDRANGE TYPE EOF OR TOF @V2D3913 02428000
  2440. EJECT 02429000
  2441. *********************************************************************** 02430000
  2442. * 02431000
  2443. * X & Y COMMANDS-- 02432000
  2444. * 02433000
  2445. * FORMS-- 02434000
  2446. * 1. (X OR Y) COMMAND 02435000
  2447. * 2. (X OR Y) <NUMBER> 02436000
  2448. * 02437000
  2449. * FORM 1 CAUSES THE COMMAND TO BE SAVED. 02438000
  2450. * FORM 2 CAUSES THE SAVED COMMAND TO BE EXECUTED ONCE, OR 02439000
  2451. * THE NUMBER OF TIMES SPECIFIED. 02440000
  2452. * 02441000
  2453. *********************************************************************** 02442000
  2454. SPACE 02443000
  2455. XXX DS 0H 'X' REQUEST 02444000
  2456. LA 3,XACT NOTE THAT IT'S AN 'X' REQUEST 02445000
  2457. LA 4,XAREA POINT TO 'X' COMMAND AREA 02446000
  2458. B XYCOM AND ON TO COMMON ROUTINE 02447000
  2459. SPACE 02448000
  2460. YYY EQU * 'Y' REQUEST 02449000
  2461. LA 3,YACT NOTE THAT IT'S A 'Y' REQUEST 02450000
  2462. LA 4,YAREA POINT TO 'Y' COMMAND AREA 02451000
  2463. SPACE 02452000
  2464. XYCOM EQU * 'X' OR 'Y' REQUEST 02453000
  2465. LH 2,EDCT REMEMBER EDCT NOW 02454000
  2466. BAL 14,NUM TEST FOR NUMBER 02455000
  2467. B XYSAVE ERROR, MUST BE ALPHA, SAVE IT 02456000
  2468. BAL 14,PARMCHK CHECK NO MORE PARMS 02457000
  2469. L 1,XYCNT GET EXISTING XY COUNT 02458000
  2470. LTR 1,1 TEST IT 02459000
  2471. BNZ INVREQ BRANCH IF NOT ZERO (INVALID) 02460000
  2472. IC 1,XYFLAG PICK UP OLD VALUE OF XYFLAG 02461000
  2473. LR 2,1 SAME THING 02462000
  2474. NR 2,3 IS THIS REQUEST ALREADY ACTIVE? 02463000
  2475. BNZ INVREQ BRANCH IF SO (RECURSIVE ERROR) 02464000
  2476. OR 1,3 MAKE IT ACTIVE NOW 02465000
  2477. STC 1,XYFLAG 02466000
  2478. ST 0,XYCNT SAVE X-Y COUNT 02467000
  2479. MVC COUNT(2),0(4) GET COUNT 02468000
  2480. MVC EDLIN(L'EDLIN),2(4) MOVE IN SAVED COMMAND 02469000
  2481. B NEXT4 AND EXECUTE SAVED COMMAND 02470000
  2482. SPACE 02471000
  2483. XYSAVE EQU * 02472000
  2484. LH 1,COUNT LOAD LINE COUNT 02473000
  2485. SR 1,2 MINUS POINTER=CHARS TO MOVE 02474000
  2486. STH 1,0(4) SAVE COUNT 02475000
  2487. BCTR 1,0 MINUS 1 FOR 'EX' 02476000
  2488. LA 3,EDLIN(2) POINT TO START OF MOVE 02477000
  2489. EX 1,XYMVC MOVE IN LINE 02478000
  2490. B NEXT AND BACK TO MAIN LOOP 02479000
  2491. SPACE 02480000
  2492. XYMVC MVC 2(*-*,4),0(3) BLANK 'MVC' FOR 'EX' 02481000
  2493. EJECT 02482000
  2494. *********************************************************************** 02483000
  2495. * 02484000
  2496. * TRUNCIT SETS THE COLUMN OF TRUNCATION. 02485000
  2497. * 02486000
  2498. *********************************************************************** 02487000
  2499. SPACE 02488000
  2500. TRUNCIT DS 0H 02489000
  2501. BAL 14,NUM GET PARM 02490000
  2502. B TRUSTAR BRANCH IF NOT A NUMBER 02491000
  2503. BZ INVREQ TRUNC = 0, NOT ALLOWED 02492000
  2504. BM TRUNCTYP NOTHING THERE - TYPE CURRENT SETTINGS 02493000
  2505. C 0,ITEM TOO BIG? 02494000
  2506. BH INVREQ BRANCH IF SO 02495000
  2507. TRUNCIT1 EQU * 02496000
  2508. BAL 14,PARMCHK CHECK NO MORE PARMS 02497000
  2509. STH 0,TRUNCOL STORE IT 02498000
  2510. B NEXT 02499000
  2511. SPACE 02500000
  2512. TRUSTAR EQU * 02501000
  2513. BAL 14,STARCHK CHECK WHETHER PARM IS A STAR 02502000
  2514. L 0,ITEM USE ITEM LENGTH 02503000
  2515. B TRUNCIT1 02504000
  2516. SPACE 02505000
  2517. TRUNCTYP EQU * TYPE CURRENT TRUNC SETTING 02506000
  2518. LH 0,TRUNCOL LOAD UP R0 WITH SETTING 02507000
  2519. SPACE 1 02508000
  2520. AREATYPE BAL R14,BINDEC @V2D3913 02509000
  2521. WTYPE AREA+3,5,RETURN=NEXT @V2D3913 02510000
  2522. SPACE 3 02511000
  2523. *********************************************************************** 02512000
  2524. * 02513000
  2525. * 'BINDEC' CONVERTS THE BINARY CONTENTS OF R0 TO PACKED DECIMAL 02514000
  2526. * AND EDITS THIS DATA, PROVIDING (ONLY) THE LOW-ORDER FOUR (4) 02515000
  2527. * CHARACTERS FOR TYPING. THE ZONED DATA IS AVAILABLE 02516000
  2528. * IN THE FIELD 'AREA' UPON RETURN FROM BINDEC. 02517000
  2529. * BINDEC IS CALLED BY 'TRUNCIT', 'ZONE', 'VERIFY' AND 'CHANGE' 02518000
  2530. * 02519000
  2531. *********************************************************************** 02520000
  2532. SPACE 02521000
  2533. BINDEC DS 0H 02522000
  2534. CVD 0,DECIMAL 02523000
  2535. MVC AREA(8),PATTERN SUPPLY EDIT PATTERN V0379 02524000
  2536. ED AREA(8),HALF EDIT ALL DIGITS V0379 02525000
  2537. BR 14 RETURN TO CALLER 02526000
  2538. SPACE 1 02527000
  2539. PATTERN DC X'4020202020202021' EDIT PATTERN @V305614 02528000
  2540. EJECT 02529000
  2541. *********************************************************************** 02530000
  2542. * 02531000
  2543. * 'ZONE' Z1 <Z2> SETS THE BEGINNING AND END COLUMN FOR 02532000
  2544. * CHANGE, ALTER AND LOCATE. 02533000
  2545. * 02534000
  2546. *********************************************************************** 02535000
  2547. SPACE 02536000
  2548. ZONE DS 0H 02537000
  2549. BAL 14,NUM GET ARGUMENT 02538000
  2550. BAL 14,STARCHK HOPEFULLY A STAR 02539000
  2551. BM ZONTYPE BRANCH IF NOT GIVEN @VM08700 02540000
  2552. BZ INVREQ BRANCH IF 0 @VM08700 02541000
  2553. LPR 2,0 SAVE IT, OR 1 IF * 02542000
  2554. BAL 14,NUM GET 2ND ARG 02543000
  2555. B ZSTAR HOPEFULLY A STAR IF ERROR RETURN FROM NUM 02544000
  2556. BZ INVREQ BRANCH IF ZERO 02545000
  2557. BL ZONEC BRANCH IF 2ND ARG. ABSENT 02546000
  2558. C 0,ITEM TOO BIG? 02547000
  2559. BH INVREQ BRANCH IF SO 02548000
  2560. ZONEB EQU * 02549000
  2561. BAL 14,PARMCHK CHECK NO MORE ARGS 02550000
  2562. CR 0,2 CHECK END ZONE >= START 02551000
  2563. BL INVREQ BRANCH IF NOT 02552000
  2564. STH 0,ZONE2 SAVE END ZONE 02553000
  2565. B ZONED 02554000
  2566. ZONEC EQU * 2ND ARG IS ABSENT 02555000
  2567. CH 2,ZONE2 COMPARE 1ST WITH EXISTING ZONE2 02556000
  2568. BH INVREQ BRANCH IF GREATER 02557000
  2569. ZONED EQU * 02558000
  2570. BCTR 2,0 DECREMENT START ZONE 02559000
  2571. STH 2,ZONE1 SAVE IT 02560000
  2572. B NEXT 02561000
  2573. SPACE 02562000
  2574. ZSTAR EQU * 02563000
  2575. BAL 14,STARCHK CHECK THAT IT'S A STAR 02564000
  2576. L 0,ITEM USE THE ITEM LENGTH 02565000
  2577. B ZONEB 02566000
  2578. SPACE 2 02567000
  2579. ZONTYPE EQU * TYPE CURRENT ZONES 02568000
  2580. LH 1,ZONE1 FIRST GET ZONE-1 02569000
  2581. LA 1,1(,1) MAKE UP FOR DECREMENT (ABOVE) 02570000
  2582. LR 0,1 PUT IT IN R0 FOR 'BINDEC' 02571000
  2583. BAL 14,BINDEC GO TO EDITTING ROUTINE 02572000
  2584. MVC RANGE(4),AREA+4 SET UP ZONE-1 V0379 02573000
  2585. LH 0,ZONE2 NOW LOAD UP ZONE-2 02574000
  2586. BAL 14,BINDEC AND DO IT AGAIN (EDIT) 02575000
  2587. MVC RANGE+4(4),AREA+4 SET UP ZONE-2 V0379 02576000
  2588. WTYPE RANGE,8,RETURN=NEXT @V305614 02577000
  2589. EJECT 02578000
  2590. *********************************************************************** 02579000
  2591. * 02580000
  2592. * 'CASE' SETS THE CASE OF THE FILE TO 'U' (UPPER) OR 02581000
  2593. * 'M' (MIXED). IT AFFECTS LINES OF INPUT FROM THE TERMINAL, 02582000
  2594. * OR LINES WHICH HAVE BEEN 'STACKED'. DEFAULT DEPENDS UPON 02583000
  2595. * THE FILETYPE. 02584000
  2596. * 02585000
  2597. * IT HAS A CONFUSING EFFECT ON ANY OTHER LOGICAL LINES WHICH 02586000
  2598. * ARE STACKED BY MEANS OF THE 'LINEND' CHARACTER AFTER 02587000
  2599. * THE 'CASE' REQUEST, ON THE SAME PHYSICAL LINE. 02588000
  2600. * THESE OTHER LOGICAL LINES ARE INTERPRETED BY CMS BEFORE 02589000
  2601. * THE 'CASE' REQUEST HAS TAKEN EFFECT, AND WILL THEREFORE 02590000
  2602. * BE READ AS IF ISSUED BEFORE THE 'CASE' REQUEST. 02591000
  2603. * 02592000
  2604. *********************************************************************** 02593000
  2605. SPACE 02594000
  2606. CASE DS 0H 02595000
  2607. BAL 14,GET GET THE ARGUMENT 02596000
  2608. BZ CASETELL BRANCH IF NONE GIVEN (TELL HIM) 02597000
  2609. LTR 1,1 HOW MANY CHARACTERS HAS IT? 02598000
  2610. BNZ INVREQ BRANCH IF ยฌ= 1 (WON'T DO) 02599000
  2611. MVC SAVCWD(1),XXXCWD SAVE IT 02600000
  2612. BAL 14,PARMCHK CHECK NO MORE PARMS 02601000
  2613. CLI SAVCWD,C'U' IS IT 'CASE U'? 02602000
  2614. BNE CASEM BRANCH IF NOT (CHECK FOR 'CASE M') 02603000
  2615. MVI CASESW,C'U' SET CASESW 02604000
  2616. B NEXT 02605000
  2617. CASEM EQU * CHECK FOR 'CASE M' 02606000
  2618. CLI SAVCWD,C'M' WELL? 02607000
  2619. BNE INVREQ BRANCH IF NOT (INVALID REQUEST) 02608000
  2620. MVI CASESW,C'S' SET CASESW TO 'S' 02609000
  2621. B NEXT 02610000
  2622. SPACE 02611000
  2623. CASETELL EQU * TELL HIM THE CASE 02612000
  2624. MVI SAVCWD,C'U' SUPPOSE IT'S 'U' 02613000
  2625. CLI CASESW,C'U' IS IT? 02614000
  2626. BE *+8 SKIP IS SO 02615000
  2627. MVI SAVCWD,C'M' MUST BE 'M' 02616000
  2628. SPACE 1 02617000
  2629. WTYPE SAVCWD,1,RETURN=NEXT @V200713 02618000
  2630. EJECT 02619000
  2631. *********************************************************************** 02620000
  2632. * 02621000
  2633. * IMAGE TURNS ON OR OFF THE CREATION OF A LINE IMAGE, OR 02622000
  2634. * SETS CANONICAL ORDERING. DEFAULT DEPENDS UPON FILETYPE. 02623000
  2635. * 02624000
  2636. *********************************************************************** 02625000
  2637. SPACE 02626000
  2638. IMAGE DS 0H 02627000
  2639. BAL 14,GET GET PARM 02628000
  2640. BZ IMTYPE IF NOT GIVEN, TYPE CURRENT SETTING 02629000
  2641. MVC SAVCWD(8),XXXCWD SAVE THE ANSWER 02630000
  2642. BAL 14,PARMCHK ENSURE NO MORE PARMS 02631000
  2643. CLC SAVCWD(3),ON ON ? @V2D3914 02632000
  2644. BE IMON BRANCH IF SO 02633000
  2645. CLC SAVCWD(4),OFF OFF ? @V2D3914 02634000
  2646. BE IMOFF BRANCH IF SO 02635000
  2647. CLC SAVCWD(6),=CL6'CANON ' CANON? 02636000
  2648. BNE INVREQ BRANCH IF NOT 02637000
  2649. OI FLAG,CAN SET CANONICAL ORDERING 02638000
  2650. NI FLAG,255-IMNOT AND ENSURE THAT IMAGE IS NOT OFF 02639000
  2651. B NEXT 02640000
  2652. SPACE 02641000
  2653. IMON EQU * 02642000
  2654. NI FLAG,255-(CAN+IMNOT) SET CANONICAL ORDERING OFF... 02643000
  2655. B NEXT (AND IMAGE ON) 02644000
  2656. SPACE 02645000
  2657. IMOFF EQU * 02646000
  2658. OI FLAG,IMNOT SUPPRESS LINE IMAGE 02647000
  2659. NI FLAG,255-CAN AND CANONICAL ORDERING 02648000
  2660. B NEXT 02649000
  2661. SPACE 2 02650000
  2662. IMTYPE EQU * TYPE CURRENT IMAGE SETTING 02651000
  2663. TM FLAG,CAN IS 'CANON' ACTIVE ? 02652000
  2664. BZ IMOFFCK NO 02653000
  2665. MVC RANGE(5),=CL6'CANON ' 02654000
  2666. B ITYPE TYPE 'CANON' 02655000
  2667. IMOFFCK TM FLAG,IMNOT IS 'OFF' ACTIVE ? 02656000
  2668. BO LMW2 @V2D3913 02657000
  2669. IMONTYP MVC RANGE(5),ON @V2D3914 02658000
  2670. SPACE 2 02659000
  2671. ITYPE WTYPE RANGE,5,RETURN=NEXT @V200713 02660000
  2672. SPACE 1 02661000
  2673. ON DC CL5'ON' @V2D3914 02662000
  2674. OFF DC CL5'OFF' @V2D3914 02663000
  2675. EJECT 02664000
  2676. *********************************************************************** 02665000
  2677. * 02666000
  2678. * LINEMODE SWITCHES LINE-EDITING MODE ON OR OFF 02667000
  2679. * VALID FORMS ARE 02668000
  2680. * LINEMODE LEFT (COLS 1-5) 02669000
  2681. * LINEMODE RIGHT (COLS 76-80) 02670000
  2682. * LINEMODE OFF 02671000
  2683. * LINEMODE TELLS YOU WHICH MODE 02672000
  2684. *********************************************************************** 02673000
  2685. SPACE 02674000
  2686. LINEMODE DS 0H 02675000
  2687. BAL 14,GET 02676000
  2688. BZ LMWHICH TELL THE USER WHERE HE'S AT 02677000
  2689. MVC SAVCWD(8),XXXCWD SAVE THE PARAMETER @V2D3913 02678000
  2690. BAL R14,PARMCHK SHOULD ONLY BE 1. @V2D3913 02679000
  2691. CLC SAVCWD(4),MOFF IS IT "OFF"? @V2D3913 02680000
  2692. BE LMOFF GO HANDLE @V2D3913 02681000
  2693. CLC SAVCWD(2),=CL2'L' L FOR LEFT IS ALLOWED @VA03087 02682000
  2694. BE LMLEFT .... @VA03087 02683000
  2695. CLC SAVCWD(5),MLEFT IS IT "LEFT"? @V2D3913 02684000
  2696. BE LMLEFT GO HANDLE @V2D3913 02685000
  2697. CLC SAVCWD(6),MRIGHT MIGHT BE RIGHT @V2D3913 02686000
  2698. BE LMRIGHT .... @VA03087 02687000
  2699. CLC SAVCWD(2),=CL2'R' R FOR RIGHT IS ALLOWED @VA03087 02688000
  2700. BNE INVREQ IF NOT, BAD ARGUMENT @VA03087 02689000
  2701. LMRIGHT EQU * 02690000
  2702. CLI FV,C'F' F FORMAT FILE? 02691000
  2703. BNE SERBAD BRANCH IF NOT 02692000
  2704. CLI ITEM+3,80 ITEM LENGTH 80? 02693000
  2705. BNE SERBAD BRANCH IF NOT 02694000
  2706. OI FLAG,RIGHT SET MODE 02695000
  2707. MVI TRUNCOL+1,72 TRUNCATION COLUMN=72 02696000
  2708. TM FLAG2,TUBE DISPLAY TERMINAL? @VA04074 02697000
  2709. BO LMOK YES ... BR @VA04074 02698000
  2710. CLI VERCOL1+1,72 START VERIFY COL > 72 @VA04074 02699000
  2711. BNH LMCOL2 NO ... BR @VA04074 02700000
  2712. MVI VERCOL1+1,72 RESET TO 72 (=VERCOL2) @VA04074 02701000
  2713. LMCOL2 EQU * @VA04074 02702000
  2714. MVI VERCOL2+1,72 END VERIFY COL = 72 @VA04074 02703000
  2715. LH R3,VERCOL1 GET START AND @VA04074 02704000
  2716. LA R4,73 END+1 COLUMN POSITIONS @VA04074 02705000
  2717. SR R4,R3 CALC VERIFY LENGTH @VA04074 02706000
  2718. STH R4,VERLEN STORE NEW LENGTH @VA04074 02707000
  2719. LMOK EQU * @VA04074 02708000
  2720. MVI ZONE1+1,0 NEAR ZONE = 1 @VA00984 02709000
  2721. MVI ZONE2+1,72 FAR ZONE=72 02710000
  2722. LMR1 EQU * LMOFF JOINS HERE 02711000
  2723. NI FLAG,255-LEFT NOT LEFT 02712000
  2724. MVI LMSTART+1,75 SET COLUMN WHERE NUMBERS START 02713000
  2725. MVI PADCHAR,C'0' PAD WITH ZEROS 02714000
  2726. MVI TABS,1 RESET FIRST TAB 02715000
  2727. B NEXT 02716000
  2728. LMOFF EQU * 02717000
  2729. NI FLAG,255-RIGHT MODE NOT RIGHT 02718000
  2730. B LMR1 02719000
  2731. LMLEFT EQU * 02720000
  2732. TM FLAG,LINE8 8-DIGIT LINE NUMBERS? @VA08342 02720150
  2733. BNO LMLEFT1 VALID COMMAND IF NOT @VA08342 02720300
  2734. TM FLAG,LEFT LINEMODE ALREADY ON? @VA08342 02720450
  2735. BO NEXT BYPASS REDUNDANT REQUEST @VA08342 02720600
  2736. B INVREQ LINEMODE LEFT WAS CANCELLED @VA08342 02720750
  2737. LMLEFT1 EQU * @VA08342 02720900
  2738. NI FLAG,255-RIGHT CLEAR RIGHT BIT 02721000
  2739. OI FLAG,LEFT SET MODE LEFT 02722000
  2740. MVI PADCHAR,C' ' PAD WITH BLANKS 02723000
  2741. MVI LMSTART+1,0 SET COLUMN WHERE NUMBERS START 02724000
  2742. CLI ZONE1+1,6 MAY NEED TO RESET ZONE 02725000
  2743. BH LML1 OK - NOW CHECK TABS 02726000
  2744. MVI ZONE1+1,6 NOT OK - RESET TO 7 02727000
  2745. CLI ZONE2+1,6 TEST FAR ZONE 02728000
  2746. BH LML1 OK - NOW CHECK TABS 02729000
  2747. MVI ZONE2+1,6 ELSE SET NEW VALUE 02730000
  2748. LML1 EQU * CHECK TABS 02731000
  2749. CLI TABS,7 STARTING COLUMN > 7? @VA08142 02732000
  2750. BH LML2 YES, INSERT COLUMN 7 TAB @VA08142 02733000
  2751. MVI TABS,7 ELSE RESET TO 7 02734000
  2752. LML3 EQU * 02735000
  2753. CLI TABS+1,8 IS FIRST TAB GE 8? 02736000
  2754. BNL NEXT YES - ALL DONE 02737000
  2755. CLI TABS+1,0 OR ZERO? 02738000
  2756. BE NEXT YES - THAT'S OK TOO 02739000
  2757. MVC TABS+1(ENDTABS-TABS-2),TABS+2 SHIFT TABS LEFT 02740000
  2758. B LML3 REPEAT IF NECESSARY 02741000
  2759. LML2 MVC TEMPTAB(ENDTABS-TABS-1),TABS STORE FOR SHIFT @VA08142 02741150
  2760. MVI TABS,7 INSERT FIXED TAB @VA08142 02741300
  2761. MVC TABS+1(ENDTABS-TABS-2),TEMPTAB SHIFT TO RIGHT @VA08142 02741450
  2762. B NEXT FINISHED @VA08142 02741600
  2763. SPACE 1 02742000
  2764. LMWHICH EQU * 02743000
  2765. TM FLAG,RIGHT IS LINEMODE RIGHT? 02744000
  2766. BZ LMW1 BRANCH IF NOT 02745000
  2767. WTYPE MRIGHT,,RETURN=NEXT @V200713 02746000
  2768. SPACE 1 02747000
  2769. LMW1 EQU * 02748000
  2770. TM FLAG,LEFT IS LINEMODE LEFT? 02749000
  2771. BZ LMW2 BRANCH IF NOT 02750000
  2772. WTYPE MLEFT,,RETURN=NEXT @V200713 02751000
  2773. SPACE 1 02752000
  2774. LMW2 EQU * 02753000
  2775. WTYPE OFF,3,RETURN=NEXT @V2D3914 02754000
  2776. SPACE 1 02755000
  2777. SERBAD EQU * 02756000
  2778. VTYPE SERBMSG,,RETURN=NEXT @V200713 02757000
  2779. SPACE 1 02758000
  2780. SERBMSG DC C'WRONG FILE FORMAT FOR LINEMODE RIGHT' 02759000
  2781. MRIGHT DC C'RIGHT ' 02760000
  2782. MLEFT DC C'LEFT ' 02761000
  2783. MOFF DC CL5'OFF' @V200706 02762000
  2784. MON DC CL5'ON' @V200706 02763000
  2785. EJECT 02764000
  2786. *********************************************************************** 02765000
  2787. * 02766000
  2788. * 'SUPERFIND' AND 'SUPERFIX' 02767000
  2789. * VALID FORMS ARE 02768000
  2790. * NNN (FIND LINE NNN) 02769000
  2791. * NNN TEXT (INSERT/REPLACE LINE NNN) 02770000
  2792. * 02771000
  2793. *********************************************************************** 02772000
  2794. SPACE 02773000
  2795. SFIND DS 0H 02774000
  2796. TM FLAG,RIGHT+LEFT LINEMODE ON? V0263 02775000
  2797. BZ INVREQ DISABLED IF NOT V0263 02776000
  2798. LA 3,1 GET A 1 @V200713 02777000
  2799. ST 3,REPCNT RESET REPCNT @V200713 02778000
  2800. CLI PADCHAR,C' ' ARE WE PADDING WITH BLANKS? 02779000
  2801. BNE SF1 BRANCH IF NOT 02780000
  2802. CLI XXXCWD,C'0' NUMBER HAS LEADING ZERO? 02781000
  2803. BE INVREQ BRANCH INVALID IF SO 02782000
  2804. SF1 EQU * 02783000
  2805. LR 3,1 NO OF CHARS LESS ONE 02784000
  2806. LA 0,1(,1) NO OF CHARS 02785000
  2807. LA 4,5 @V1D1613 02786000
  2808. TM FLAG,LINE8 @V1D1613 02787000
  2809. BNO SF1B @V1D1613 02788000
  2810. LA 4,8 @V1D1613 02789000
  2811. SF1B CR 0,4 @V1D1613 02790000
  2812. BH SF6 @V1D1613 02791000
  2813. MVC PADBUF(8),PADCHAR @V1D1613 02792000
  2814. LA 2,PADBUF(4) @V1D1613 02793000
  2815. BCTR 4,0 @V1D1613 02794000
  2816. SR 2,0 MOVE NOS HERE 02795000
  2817. EX 3,SFX1 LEFT PADDING EFFECTED 02796000
  2818. BAL 14,CLOSE GO TO TOP OF FILE 02797000
  2819. SFL1 EQU * 02798000
  2820. BAL R14,XNEXT FIND THE NEXT LINE @V2D3913 02799000
  2821. TM TWITCH,EOF END OF FILE? 02800000
  2822. BO SF1A BRANCH IF EOF @V2D3913 02801000
  2823. LA R1,8(,R1) ELSE GET PAST THE POINTERS @V2D3913 02802000
  2824. AH 1,LMSTART 02803000
  2825. EX 4,CLCNUM @V1D1613 02804000
  2826. BH SFL1 NOT YET - GO LOOP 02805000
  2827. BE SF2 HIT - GO VERIFY 02806000
  2828. LR 0,4 @V1D1613 02807000
  2829. BAL 14,NUMCHECK OVERSHOOT - IS IT VALID? 02808000
  2830. SF1A EQU * @V2D3913 02809000
  2831. OI TWITCH,UPWARD GET SET TO BACK-UP @V2D3913 02810000
  2832. BAL R14,XNEXT NOW DO IT @V2D3913 02811000
  2833. CLC EDCT(2),COUNT NUMBER ONLY? 02812000
  2834. BL SF3 BRANCH IF NOT LOCATE @V2D3913 02813000
  2835. OI SCRFLGS,WRFULLB REWRITE ALL TEXT @V2D3914 02814000
  2836. WTYPE LINNOT,14 @V2D3913 02815000
  2837. B NEXT RETURN TO USER @V2D3914 02816000
  2838. SF1C VERIFY RETURN=NEXT @V2D3913 02817000
  2839. SF2 EQU * @V2D3913 02818000
  2840. CLC EDCT(2),COUNT NUMBER ONLY? @V2D3913 02819000
  2841. BNL SF1C GUESS SO @V2D3913 02820000
  2842. OI SIGNAL,REPL SET REPLACE INDICATOR @V2D3913 02821000
  2843. SF3 EQU * 02822000
  2844. TM FLAG,LINE8 LONG LINENUMBERS? @V2D3914 02823000
  2845. BO RTYP5 THEY'RE OK. @V2D3913 02824000
  2846. MVC PADBUF+5(3),PADBUF+2 @V2D3913 02825000
  2847. MVC PADBUF+3(2),PADBUF @V2D3913 02826000
  2848. B RTYP5 GO INSERT/REPLACE V0263 02827000
  2849. SF6 EQU * 02828000
  2850. VTYPE NONOS,,RETURN=NEXT @V200713 02829000
  2851. SPACE 1 02830000
  2852. SFX1 MVC 0(*-*,2),XXXCWD MOVE NO INTO PAD BUFFER 02831000
  2853. CLCNUM CLC PADBUF(*-*),0(1) @V1D1613 02832000
  2854. EJECT 02833000
  2855. *********************************************************************** 02834000
  2856. * 02835000
  2857. * PROMPTER - COMPUTE NEXT LINE NUMBER AND TYPE IT FOR USER 02836000
  2858. * 02837000
  2859. *********************************************************************** 02838000
  2860. SPACE 02839000
  2861. PROMPTER DS 0H 02840000
  2862. SR 1,1 02841000
  2863. LA 0,5 @V1D1613 02842000
  2864. TM FLAG,LINE8 @V1D1613 02843000
  2865. BNO PRA @V1D1613 02844000
  2866. LA 0,8 @V1D1613 02845000
  2867. PRA LR 4,0 @V1D1613 02846000
  2868. TM TWITCH,TOPSW AT TOP? 02847000
  2869. BO PR0 BRANCH IF SO (LINE=0) 02848000
  2870. L R2,PTR1 GET LINE POINTER @VA02110 02849000
  2871. LTR R2,R2 NULL FILE? @VA02110 02850000
  2872. BNZ PRAB NO,CONTINUE NORMALLY @VA02110 02851000
  2873. BAL R14,CLOSE YES,PRETEND WE ARE AT TOP @VA02110 02852000
  2874. B PR0 AND BRANCH SO @VA02110 02853000
  2875. PRAB L R1,PTR2 GET CURRENT LINE NUMBER @VA02110 02854000
  2876. LA 1,8(,1) GET PAST POINTERS 02855000
  2877. AH 1,LMSTART ON TO WHERE NUMBER IS 02856000
  2878. BAL 14,NUMCHECK CONVERT TO BINARY 02857000
  2879. LR 0,4 @V1D1613 02858000
  2880. TM SIGNAL,REPL IMMEDIATE REPLACE? @VA04074 02859000
  2881. BO PR22 YEP ... BR @VA04074 02860000
  2882. PR0 EQU * 02861000
  2883. ST 1,LMCURR SAVE CURRENT LINE NUMBER 02862000
  2884. * NOW GET NEXT LINE NUMBER. WE DON'T USE XNEXT SINCE 02863000
  2885. * WE WANT TO BACK UP AGAIN IMMEDIATELY 02864000
  2886. L 1,PTR2 CURRENT LINE POINTER 02865000
  2887. L 1,0(,1) NEXT LINE POINTER 02866000
  2888. LTR 1,1 EOF? 02867000
  2889. BNZ PR4 BRANCH IF NOT 02868000
  2890. LH 2,LMINCR COME HERE IF END OF FILE 02869000
  2891. A 2,LMCURR NEW LINE NUMBER 02870000
  2892. C 2,=F'100000' IS IT TOO LARGE? 02871000
  2893. BL PR2 BRANCH IF NOT 02872000
  2894. L 1,=F'100000' MAKE 100000 'NEXT LINE NUMBER' 02873000
  2895. B PR1 02874000
  2896. PR4 EQU * 02875000
  2897. LA 1,8(,1) BYPASS POINTERS 02876000
  2898. AH 1,LMSTART GET TO LINE NUMBER 02877000
  2899. BAL 14,NUMCHECK READ IN BINARY 02878000
  2900. * NOW R1 CONTAINS THE NEXT LINE NUMBER (OR 100000) 02879000
  2901. * LINE,EOF, TOPSW, AND PTR2 ARE UNCHANGED (IN CASE OF ERROR) 02880000
  2902. PR1 EQU * 02881000
  2903. S 1,LMCURR SUBTRACT TO GET DIFFERENCE 02882000
  2904. LA R2,1 GET A ONE @V2D3913 02883000
  2905. CR R1,R2 IS IT A ONE? @V2D3913 02884000
  2906. BNH PR3 YES - MUST RENUMBER 02885000
  2907. LH 2,LMINCR 02886000
  2908. CR 1,2 IS DIFFERENCE LESS THAN INCREMENT? 02887000
  2909. BH PR11 BRANCH IF NOT 02888000
  2910. SRL 1,2 DIVIDE DIFFERENCE BY 4 02889000
  2911. LA 2,1(,1) AND ADD ONE 02890000
  2912. PR11 EQU * 02891000
  2913. A 2,LMCURR COMPUTE NEW LINE NUMBER 02892000
  2914. PR2 EQU * 02893000
  2915. LR 1,2 SAVE R2 - WORK ON R1 02894000
  2916. LH 3,LMINCR 02895000
  2917. SR 0,0 ROUND DOWN TO MEAREST MULTIPLE OF LMINCR 02896000
  2918. DR 0,3 BY DIVIDING 02897000
  2919. MR 0,3 AND MULTIPLYING AGAIN 02898000
  2920. C 1,LMCURR CAN WE USE THIS? 02899000
  2921. BH PR22 ITS GREATER THAN PRESENT LINENO (=OK) 02900000
  2922. LR 1,2 NO - USE PREVIOUSLY CALCULATED NUMBER 02901000
  2923. PR22 EQU * TYPE NUMBER AT TERMINAL WITH NO CR 02902000
  2924. CVD 1,DECIMAL BACK TO DECIMAL 02903000
  2925. UNPK PADBUF(8),DECIMAL(8) @V1D1613 02904000
  2926. OI PADBUF+7,C'0' @V1D1613 02905000
  2927. LA 1,PADBUF 02906000
  2928. CLI PADCHAR,C' ' IS PAD CHARACTER BLANK? 02907000
  2929. BNE PR5 BRANCH IF NOT 02908000
  2930. PRLOOP EQU * 02909000
  2931. CLI 0(1),C'0' IS CHARACTER ZERO 02910000
  2932. BNE PR5 BRANCH IF NOT 02911000
  2933. MVI 0(1),C' ' IF SO MAKE IT BLANK 02912000
  2934. LA 1,1(,1) GET NEXT CHARACTER 02913000
  2935. B PRLOOP 02914000
  2936. PR5 EQU * LINE FIT TO PRINT 02915000
  2937. LA 1,PADBUF+8 @V1D1613 02916000
  2938. SR 0,0 @V1D1613 02917000
  2939. CH 4,=H'5' @V1D1613 02918000
  2940. BNE *+8 @V1D1613 02919000
  2941. LA 0,1 @V1D1613 02920000
  2942. AR 0,4 @V1D1613 02921000
  2943. SR 1,4 @V1D1613 02922000
  2944. OI TYPFLG,CRBIT SUPPRESS CARRIAGE RETURN 02923000
  2945. BAL 14,WRTYPE TYPE NUMBER 02924000
  2946. NI TYPFLG,255-CRBIT RESTORE CARRIAGE RETURN 02925000
  2947. B INP1 RETURN 02926000
  2948. PR3 EQU * 02927000
  2949. NI FLAG2,255-INMODE RESET INPUT FLAG @V200714 02928000
  2950. OI UTILFLAG,LINSEQ NO SPACE FOR LINEMODE INPUT @VA08152 02928500
  2951. OI SCRFLGS,WRSTATB REWRITE STATUS LINE @V2D3913 02929000
  2952. VTYPE NOSPACE,,RETURN=PRGRCK @V200714 02930000
  2953. SPACE 1 02931000
  2954. NUMCHECK EQU * 02932000
  2955. LA 15,0(4,1) @V1D1613 02933000
  2956. NCL EQU * 02934000
  2957. CLI 0(1),C'0' POSITIVE NUMBER? 02935000
  2958. BL NC3 BRANCH IF NOT 02936000
  2959. NC2 EQU * 02937000
  2960. LA 1,1(,1) NEXT CHARACTER 02938000
  2961. CR 1,15 02939000
  2962. BL NCL LOOP IF NOT DONE 02940000
  2963. SR 1,4 @V1D1613 02941000
  2964. B DECBIN ELSE CONVERT TO BINARY 02942000
  2965. NC3 EQU * 02943000
  2966. CLI 0(1),C' ' IS IT A BLANK? 02944000
  2967. BE NC2 BRANCH BACK IF SO 02945000
  2968. NI FLAG2,255-INMODE RESET INPUT FLAG @V200714 02946000
  2969. OI SCRFLGS,WRSTATB REWRITE STATUS LINE @V2D3913 02947000
  2970. WTYPE NUMBAD @V200714 02948000
  2971. PRGRCK EQU * @V200714 02949000
  2972. TM FLAG2,TUBE DISPLAY TERMINAL ? @V200714 02950000
  2973. BNO PEDIT NO...BR @V200714 02951000
  2974. B PEDIT1 @V200714 02952000
  2975. NOSPACE DC C'RENUMBER LINES' 02953000
  2976. NONOS DC C'MAXIMUM LINE NUMBER EXCEEDED' 02954000
  2977. NUMBAD DC C'NON-NUMERIC CHARACTER IN LINE NUMBER COLUMNS' 02955000
  2978. EJECT 02956000
  2979. *********************************************************************** 02957000
  2980. * 02958000
  2981. * PROMPT N - RESET PROMPT INCREMENT TO N 02959000
  2982. * 02960000
  2983. *********************************************************************** 02961000
  2984. SPACE 02962000
  2985. PROMPT DS 0H 02963000
  2986. BAL 14,NUM GET INCREMENT 02964000
  2987. B INVREQ INVALID IF NOT NUMERIC 02965000
  2988. BM PROMTELL TYPE CURRENT INCR IF NO ARGS 02966000
  2989. LTR 0,0 IS IT POSITIVE? 02967000
  2990. BNP INVREQ BRANCH IF NOT 02968000
  2991. CH 0,HALFLIM COMPARE WITH 32767 @V200713 02969000
  2992. BH INVREQ ERROR IF SO V0263 02970000
  2993. STH 0,LMINCR 02971000
  2994. B NEXT 02972000
  2995. SPACE 1 02973000
  2996. PROMTELL EQU * TYPE CURRENT LINE INCR 02974000
  2997. LH 0,LMINCR LOADUP R0 WITH INCR 02975000
  2998. B AREATYPE @V2D3913 02976000
  2999. EJECT 02977000
  3000. ****************************************************************** 02978000
  3001. * 02979000
  3002. * 'PRESERVE' AND 'RESTORE' PRESERVE AND RESTORE THE SETTING 02980000
  3003. * OF TRUNC, VERIFY, ZONE, LONG, TABS, IMAGE, SCOPE, SERIAL, 02981000
  3004. * CASE, NAME, MODE AND RECFORM. 02982000
  3005. * 02983000
  3006. ****************************************************************** 02984000
  3007. SPACE 1 02985000
  3008. PRESERVE DS 0H @V200713 02986000
  3009. BAL 14,PARMCHK CHECK NO PARM @V200713 02987000
  3010. MVC JAR(ENDBLOC-BLOC),BLOC SAVE DATA IN PRESERVING@V200713 02988000
  3011. B NEXT @V200713 02989000
  3012. SPACE 1 02990000
  3013. RESTORE DS 0H @V200713 02991000
  3014. BAL 14,PARMCHK CHECK NO PARM @V200713 02992000
  3015. MVC BLOC(ENDBLOC-BLOC),JAR RESTORE DATA FROM JAR @V200713 02993000
  3016. B NEXT @V200713 02994000
  3017. EJECT 02995000
  3018. ****************************************************************** 02996000
  3019. * 02997000
  3020. * 'AUTOSAVE' ALLOWS THE EDIT USER TO AUTOMATICALLY SAVE THE 02998000
  3021. * CURRENT COPY OF HIS FILE AFTER EVERY 'N' LINES HAVE BEEN 02999000
  3022. * ADDED, REPLACED OR DELETED. IF NO PARAMETERS ARE GIVEN, 03000000
  3023. * THE CURRENT LINE LIMIT IS TYPED. IF 'OFF' IS SPECIFIED, 03001000
  3024. * THE AUTOSAVE FEATURE IS SET OFF. 03002000
  3025. * 03003000
  3026. ****************************************************************** 03004000
  3027. SPACE 1 03005000
  3028. AUTOSAVE DS 0H @V200706 03006000
  3029. BAL 14,NUM READ THE ARGUMENT @V200706 03007000
  3030. B AUTOFF IF NON-NUMERIC TOKEN @V200706 03008000
  3031. BM AUTOTELL IF NO TOKEN @V200706 03009000
  3032. LTR 0,0 IS NUMERIC POSITIVE? @V200706 03010000
  3033. BNP INVREQ ERROR IF NOT @V200706 03011000
  3034. CH 0,HALFLIM 'N' > 32767? @V200706 03012000
  3035. BH INVREQ ERROR IF SO @V200706 03013000
  3036. BAL 14,PARMCHK NO MORE TOKENS, PLEASE. @V200706 03014000
  3037. SPACE 1 03015000
  3038. STH 0,AUTOCNT SAVE THE LIMIT @V200706 03016000
  3039. OI SIGNAL,AUTOFLAG OBVIOUSLY. @V200706 03017000
  3040. B NEXT GET NEXT EDIT SUBCOMMAND @V200706 03018000
  3041. SPACE 1 03019000
  3042. AUTOFF CLC XXXCWD(4),OFF ONLY 'OFF' ALLOWED @V2D3914 03020000
  3043. BNE INVREQ TOO BAD. @V200706 03021000
  3044. NI SIGNAL,255-AUTOFLAG TURN IT ALL OFF @V200706 03022000
  3045. XC AUTOCNT(4),AUTOCNT CLEAR LIMIT AND CURRENT NO. @V200706 03023000
  3046. B NEXT GET NEXT COMMAND @V200706 03024000
  3047. SPACE 1 03025000
  3048. AUTOTELL LH 0,AUTOCNT GET LIMIT COUNT @V200706 03026000
  3049. LTR 0,0 CHEK FOR NO ENTRY @V200706 03027000
  3050. BZ LMW2 BR, IF NO ENTRY @V2D3913 03028000
  3051. B AREATYPE AND DISPLAY IT @V2D3913 03029000
  3052. SPACE 1 03030000
  3053. HALFLIM DC H'32767' HALFWORD LIMIT @V200706 03031000
  3054. EJECT 03032000
  3055. *************************************************************** 03033000
  3056. * 03034000
  3057. * 'TABSET' REDEFINES THE TAB STOPS 03035000
  3058. * 03036000
  3059. *************************************************************** 03037000
  3060. SPACE 1 03038000
  3061. TABSET DS 0H @V2D3913 03039000
  3062. LA R2,ENDTABS-TABS LENGTH OF TAB AREA @V2D3913 03040000
  3063. SR R4,R4 @V2D3913 03041000
  3064. LA R5,L'LINE GET LENGTH OF LINE @V2D3913 03042000
  3065. LA R3,TEMPTAB @V2D3913 03043000
  3066. BAL R14,NUM GET FIRST ARGUMENT @V2D3913 03044000
  3067. B INVREQ NON-NUMERIC, ERROR @V2D3913 03045000
  3068. BL INVREQ NO ARG ENTERED, ERROR @V2D3913 03046000
  3069. LA R6,7 STANDARD TAB FOR LINEMODE LEFT @VA08142 03046500
  3070. B TABBIG CONTINUE CHECKS @V2D3913 03047000
  3071. SPACE 1 03048000
  3072. TABSET1 EQU * @V2D3913 03049000
  3073. BAL R14,NUM GET FIELD. @V2D3913 03050000
  3074. B INVREQ ERROR RETURN. @V2D3913 03051000
  3075. BL TABSET2 END. @V2D3913 03052000
  3076. SR R6,R6 RESET FIRST-TIME INDICATOR @VA08142 03052500
  3077. TABBIG CR R0,R5 COMPARE WITH L'LINE @V2D3913 03053000
  3078. BH INVREQ BRANCH IF SO @V2D3913 03054000
  3079. CR R0,R4 BIGGER THAN LAST ONE? @V2D3913 03055000
  3080. BNH INVREQ BRANCH IF NOT @V2D3913 03056000
  3081. LR R4,R0 SAVE IT @V2D3913 03057000
  3082. TM FLAG,LEFT LINEMODE LEFT? @VA08142 03057060
  3083. BNO TABSET3 NO, STORE IN BUFFER @VA08142 03057120
  3084. LTR R6,R6 FIRST TIME THROUGH? @VA08142 03057180
  3085. BZ TABSET3 NO, STORE IN BUFFER @VA08142 03057240
  3086. TM FLAG,LINE8 8-DIGIT NUMBER FIELD? @VA08142 03057300
  3087. BNO COMPTAB NO, 5-DIGIT FIELD @VA08142 03057360
  3088. LA R6,9 FIRST TAB FOR FREEFORT @VA08142 03057420
  3089. COMPTAB EQU * @VA08142 03057480
  3090. CR R0,R6 TO RIGHT OF FIXED MARGIN? @VA08142 03057540
  3091. BNH TABSET3 NO, STORE IN BUFFER @VA08142 03057600
  3092. STC R6,0(,R3) YES, STORE FIXED TAB FIRST @VA08142 03057660
  3093. LA R3,1(,R3) POINT TO NEXT POSITION @VA08142 03057720
  3094. BCTR R2,0 REDUCE REMAINDER @VA08142 03057780
  3095. TABSET3 EQU * @VA08142 03057840
  3096. STC R0,0(,R3) HERE TOO @V2D3913 03058000
  3097. LA R3,1(,R3) @V2D3913 03059000
  3098. BCT R2,TABSET1 @V2D3913 03060000
  3099. B INVREQ TOO MANY TABS @V2D3913 03061000
  3100. SPACE 1 03062000
  3101. TABSET2 EQU * @V2D3913 03063000
  3102. XC 0(1,R3),0(R3) ZERO OUT LAST TAB SETTING @V2D3913 03064000
  3103. MVC TABS(ENDTABS-TABS),TEMPTAB MOVE IN NEW TABS @V2D3913 03065000
  3104. B NEXT @V2D3913 03066000
  3105. EJECT 03067000
  3106. *************************************************************** 03068000
  3107. * 03069000
  3108. * DITTO STACKS (LIFO) THE LAST EDIT REQUEST WHICH (WHETHER 03070000
  3109. * VALID OR NOT) DID NOT START WITH A DOUBLE-QUOTE OR A 03071000
  3110. * QUESTION MARK. 03072000
  3111. * 03073000
  3112. *********************************************************************** 03074000
  3113. SPACE 03075000
  3114. DITTO DS 0H 03076000
  3115. OI SIGNAL,QUOD SET ? AND " FLAG 03077000
  3116. L 1,XYCNT GET XY COUNT 03078000
  3117. LTR 1,1 MAKE SURE IT'S ZERO 03079000
  3118. BNZ INVREQ (CONFUSION REINS IF IT'S NOT) 03080000
  3119. LA 1,TABLIN @V200713 03081000
  3120. ST 1,ATTNLEN SET INTO ATTN PLIST @V200713 03082000
  3121. LH 1,DITCNT 03083000
  3122. LA 1,1(1) ADD ONE TO DITCNT 03084000
  3123. STH 1,DITCNT 03085000
  3124. LH 1,SAVCNT LENGTH OF SAVED REQUEST 03086000
  3125. STC 1,ATTNLEN SET THE LENGTH TO STACK @V200713 03087000
  3126. CMS ATTN @V200713 03088000
  3127. BAL 14,GET GET THE NEXT TOKEN 03089000
  3128. BZ NEXT BRANCH IF NONE 03090000
  3129. B NEXT1 03091000
  3130. EJECT 03092000
  3131. ************************************************************** 03093000
  3132. * 03094000
  3133. * FORMAT ALLOWS A DISPLAY TERMINAL USER TO SWITCH BETWEEN 03095000
  3134. * DISPLAY AND TYPEWRITER MODE OF OPERATION WHILE IN AN EDIT 03096000
  3135. * SESSION. 03097000
  3136. * 03098000
  3137. ************************************************************** 03099000
  3138. SPACE 1 03100000
  3139. FORMAT EQU * @VM03203 03101000
  3140. LA R5,INVREQ FOR INVALID REQUEST BRANCH @VM03203 03102000
  3141. TM FLAG2,NODISP NODISP OPTION INCLUDED ? @VM03203 03103000
  3142. BOR R5 INVALID IF SO @VM03203 03104000
  3143. L R4,ADEVTAB POINT TO DEVICE TABLE @VM03203 03105000
  3144. USING DEVTAB,R4 FOR CONSOLE ADDRESS @VM03203 03106000
  3145. LH R2,CONSOLE GET CONSOLE ADDRESS @VA09296 03107000
  3146. DROP R4 ..... @VM03203 03108000
  3147. SPACE 1 03109000
  3148. DC X'83230024' DIAGNOSE FOR CONSOLE CLASS @VA09296 03110000
  3149. BHR R5 INVALID IF DISCONNECTED @VM03203 03111000
  3150. CLM R4,BIN1000,GRAFCON GRAPHICS TERMINAL ! @VM03203 03112000
  3151. BE FORMOK OK, IF SO @VM03203 03113000
  3152. CLM R4,BIN1000,CLASTERM TERMINAL CLASS? @VA09296 03114000
  3153. BNER R5 NO -- ERROR @VA09296 03114200
  3154. CLM R4,BIN0100,TYP3275 3275 DISPLAY? @VA09296 03114400
  3155. BE FORMOK YES -- CONTINUE @VA09296 03114600
  3156. CLM R4,BIN0100,TYP3277 3277 DISPLAY? @VA09296 03114800
  3157. BE FORMOK YES -- CONTINUE @VA09296 03115000
  3158. CLM R4,BIN0100,TYP3278 3278 DISPLAY? @VA09296 03115200
  3159. BNER R5 NO -- ERROR @VA09296 03115400
  3160. SPACE 1 03116000
  3161. FORMOK BAL R14,GET GET OPERAND @VM03203 03117000
  3162. BZ INVREQ MUST HAVE AN OPERAND @V2D3914 03118000
  3163. SPACE 1 03119000
  3164. CLC XXXCWD(4),=C'LINE' LINE SPECIFIED ? @V2D3914 03120000
  3165. BE SNGMODE YES ... BR @V2D3914 03121000
  3166. CLC XXXCWD(7),=C'DISPLAY' OPERAND HAD BETTER @V2D3914 03122000
  3167. BNER R5 BE DISPLAY.. @V2D3914 03123000
  3168. SPACE 1 03124000
  3169. OI FLAG2,TUBE TELL EDIT IT'S A TUBE @V2D3914 03125000
  3170. NI FLAG2,255-INMODE MAKE SURE INPUT FLAG OFF @VA04190 03126000
  3171. OI SCRFLGS,WRTOPB CAUSE A FULL DISPLAY @V2D3914 03127000
  3172. VERIFY RETURN=NEXT @V2D3914 03128000
  3173. SPACE 1 03129000
  3174. SNGMODE NI FLAG2,255-TUBE TELL EDIT IT'S A TYPEWRITER @V2D3914 03130000
  3175. B NEXT @V2D3914 03131000
  3176. SPACE 1 03132000
  3177. GRAFCON DC X'40' GRAPHICS CONSOLE TYPE @VM03203 03133000
  3178. TYP3275 DC X'02' 3275 DISPLAY STATION @VA09296 03134000
  3179. TYP3277 DC X'04' 3277 DISPLAY STATION @VA09296 03134050
  3180. TYP3278 DC X'01' 3278 DISPLAY STATION @VA09296 03134100
  3181. CLASTERM DC X'80' TERMINAL CLASS @VA09296 03134150
  3182. EJECT 03135000
  3183. *********************************************************************** 03136000
  3184. * 03137000
  3185. * 'STACK' HAS 2 FORMS: 03138000
  3186. * 03139000
  3187. * 1. STACK <N> 03140000
  3188. * 2. STACK EDIT-REQUEST 03141000
  3189. * 03142000
  3190. * FORM 1 STACKS (FIFO) N LINES (OR 1 LINE IF N IS OMITTED), 03143000
  3191. * STARTING WITH THE CURRENT LINE AND MAKING THE LAST LINE 03144000
  3192. * STACKED THE NEW CURRENT LINE. 'STACK 0' IS TREATED AS A 03145000
  3193. * SPECIAL CASE, AND STACKS A NULL LINE. 03146000
  3194. * 03147000
  3195. * FORM 2 STACKS (FIFO) THE GIVEN EDIT-REQUEST. 03148000
  3196. * 03149000
  3197. * IN FORM 1, A CHECK IS MADE FOR AN EXCESSIVE NUMBERS OF LINES. 03150000
  3198. * WE WANT TO AVOID RUNNING OUT OF FREE STORAGE (WHICH IS WHERE 03151000
  3199. * LINES THAT ARE STACKED ARE PUT) 03152000
  3200. * 03153000
  3201. *********************************************************************** 03154000
  3202. SPACE 03155000
  3203. STACK DS 0H 03156000
  3204. LH 2,EDCT REMEMBER EDCT 03157000
  3205. L R3,PTR2 GET POINTER TO THE CURRENT LINE @VA04608 03158000
  3206. BAL 14,NUM GET PARM 03159000
  3207. B STACKREQ BARNCH IF NOT NUMERIC 03160000
  3208. BAL 14,PARMCHK CHECK NO MORE PARMS 03161000
  3209. LA 1,LINE ADDRESS FROM WHICH TO STACK LINES 03162000
  3210. LTR 2,0 GET NUMBER OF LINES 03163000
  3211. BZ STACKNUL GO AND STACK NULL LINE IF ZERO 03164000
  3212. LA 1,25 GET THE STACK LIMIT COUNT @V200713 03165000
  3213. CR 2,1 CHECK NUMBER REQUESTED @V200713 03166000
  3214. BH STKBUST BRANCH IF TOO MANY 03167000
  3215. MVC STACKATL(1),TRUNCOL+1 LENGTH OF LINE TO STACK 03168000
  3216. LR R1,R3 INITIALIZE LINE POINTER @VA04608 03169000
  3217. BAL R14,EORCHK CHECK CURRENT RANGE @V2D3913 03170000
  3218. B ENDRANGE ALL DONE IN THIS CASE @V2D3913 03171000
  3219. SPACE 03172000
  3220. TM TWITCH,TOPSW+EOF SOME OTHER BOUNDARY? @V2D3913 03173000
  3221. BNZ STACKIT1 SKIP IT, THEN @V2D3914 03174000
  3222. STACKIT EQU * @V200713 03175000
  3223. LA R1,8(,R1) POINT PAST THE POINTERS @V2D3913 03176000
  3224. STCM R1,B'0111',STACKATL+1 STORE THE DATA ADDRESS @V2D3913 03177000
  3225. STACKIT3 EQU * 03178000
  3226. CMS STACKAT STACK THE LINE 03179000
  3227. STACKIT1 BCT R2,STACKIT2 MORE TO DO ? @V2D3914 03180000
  3228. TM FLAG2,TUBE IS THIS A GRAPHICS DEVICE? @VA04608 03181000
  3229. BNO NEXT NO. THEN WE'RE ALL DONE @VA04608 03182000
  3230. CL R3,PTR2 HAS THE CURRENT LINE MOVED? @VA04608 03183000
  3231. BE NEXT DISPLAY IS CORRECT IF IT HASN'T @VA04608 03184000
  3232. VERIFY RETURN=NEXT @VA04608 03185000
  3233. STACKIT2 BAL R14,XNEXT GET NEXT LINE LOCATION @V2D3914 03186000
  3234. TM TWITCH,TOPSW+EOF @V2D3913 03187000
  3235. BNZ ENDRANGE @V2D3913 03188000
  3236. B STACKIT STACK THIS LINE @V2D3914 03189000
  3237. SPACE 1 03190000
  3238. SPACE 03191000
  3239. STACKREQ EQU * STACK REST OF LINE (AS EDIT REQUEST) 03192000
  3240. LA 1,EDLIN(2) WHERE IN EDLIN TO START 03193000
  3241. ST 1,STACKATL STORE IN 'ATTN' PLIST 03194000
  3242. LH 1,COUNT TOTAL LENGTH OF EDLIN 03195000
  3243. SR 1,2 MINUS EDCT MAKES LENGTH TO STACK 03196000
  3244. STC 1,STACKATL STORE FOR 'ATTN' 03197000
  3245. B STACKONE FORCE STACK COUNT TO ONE @V2D3914 03198000
  3246. STACKNUL EQU * @V200713 03199000
  3247. MVI STACKATL,X'00' STACK A NULL LINE. @V2D3913 03200000
  3248. STACKONE LA R2,1 FUDGE FOR BCT (ONCE) @V2D3914 03201000
  3249. B STACKIT3 PLIST SET TO GO @V2D3914 03202000
  3250. SPACE 03203000
  3251. STKBUST EQU * TOO MANY LINES 03204000
  3252. WTYPE STKBSTMS,,RETURN=INVREQX @V200713 03205000
  3253. SPACE 03206000
  3254. STKBSTMS DC C'TOO MANY LINES TO STACK' 03207000
  3255. EJECT 03208000
  3256. *********************************************************************** 03209000
  3257. * 03210000
  3258. * A MACRO REQUEST (STARTING WITH A PERIOD) GOES TO FIND AN 03211000
  3259. * EXEC FILE VIA CMS SUBSET. 03212000
  3260. * 03213000
  3261. *********************************************************************** 03214000
  3262. SPACE 2 03215000
  3263. DOT DS 0H 03216000
  3264. L 1,XYCNT CHECK UP ON X-Y COUNT 03217000
  3265. LTR 1,1 MUST NOT BE 03218000
  3266. BNZ INVREQ (TOO EASY TO STACK TOO MANY LINES) 03219000
  3267. TM TWITCH,TOPSW TOP OF FILE? V0263 03220000
  3268. BNO CKEOF NO, CHEK EOF V0263 03221000
  3269. LA 1,TOPMSG YES, POINT TO 'TOF' MSG V0263 03222000
  3270. B STPTR ...AND BUILD PLIST V0263 03223000
  3271. CKEOF TM TWITCH,EOF END OF FILE? V0263 03224000
  3272. BNO NOPTR NEITHER, DROP THRU V0263 03225000
  3273. LA 1,EOFREC POINT TO 'EOF' V0263 03226000
  3274. STPTR EQU * V0263 03227000
  3275. ST 1,ATTNLEN SET ADDRESS INTO ATTN PLIST @V200713 03228000
  3276. MVI ATTNLEN,X'03' SET THE LENGTH @V200713 03229000
  3277. CMS ATTN @V200713 03230000
  3278. NOPTR EQU * V0263 03231000
  3279. MVC MACRO(L'MACROHDR),MACROHDR FORCE CALL TO EXEC@VA04733 03232000
  3280. LA R1,MACRO POINT TO 'EXEC $...' COMMAND @VA04733 03233000
  3281. ST 1,ATTNLEN PUT ADDRESS INTO ATTN PLIST @V200713 03234000
  3282. LH R1,COUNT GET THE LENGTH @VA04733 03235000
  3283. LA R1,EDLIN-MACRO(R1) INCREMENTED BY L'EXEC + 1 @VA04733 03236000
  3284. STC 1,ATTNLEN PUT IT INTO THE PLIST @V200713 03237000
  3285. CMS ATTN @V200713 03238000
  3286. CMS SUBSET,ERROR=IGNORE @V200713 03239000
  3287. LTR 15,15 TEST RETURN CODE 03240000
  3288. BZ NEXT BRANCH IF ZERO (OK) 03241000
  3289. LR 2,15 @V200713 03242000
  3290. BAL 4,STACKCLR CLEAR STACK IF NECESSARY V0379 03243000
  3291. LA 2,1(,2) @V200713 03244000
  3292. LTR 2,2 @V200713 03245000
  3293. BZ INVDOT @V200713 03246000
  3294. B NEXT 03247000
  3295. SPACE 1 03248000
  3296. SUBSET DS 0F 03249000
  3297. DC CL8'SUBSET' 03250000
  3298. DC CL8'(RETURN' 03251000
  3299. DC 8X'FF' 03252000
  3300. EJECT 03253000
  3301. *********************************************************************** 03254000
  3302. * 03255000
  3303. * 'CMS' PUTS THE USER INTO CMS SUBSET 03256000
  3304. * 03257000
  3305. *********************************************************************** 03258000
  3306. SPACE 03259000
  3307. CMS DS 0H 03260000
  3308. BAL 14,PARMCHK CHECK NO PARMS 03261000
  3309. TM FLAG2,TUBE DISPLAY TERMINAL ? @V200714 03262000
  3310. BNO MODESW NO...BR @V200714 03263000
  3311. MVI SCRFLG2,CANCB CAUSE TUBE CANCEL OP @V200714 03264000
  3312. BAL R14,WRTYPEX @V2D3913 03265000
  3313. NI SCRFLG2,255-CANCB RESET CANCEL FLAG @VA04074 03266000
  3314. MODESW EQU * @V200714 03267000
  3315. CMS CMSSUB,ERROR=INVREQ CALL CMS SUBSET 03268000
  3316. B REFRESH @V2D3913 03269000
  3317. SPACE 03270000
  3318. CMSSUB DS 0F 03271000
  3319. DC CL8'SUBSET' 03272000
  3320. DC X'FF' 03273000
  3321. SPACE 4 03274000
  3322. *********************************************************************** 03275000
  3323. * 03276000
  3324. * 'QUIT' CAUSES EXIT FROM THE EDITOR, ABANDONING CONTENTS 03277000
  3325. * 03278000
  3326. *********************************************************************** 03279000
  3327. SPACE 03280000
  3328. QUIT DS 0H 03281000
  3329. BAL 14,PARMCHK CHECK NO PARMS 03282000
  3330. XR 2,2 RETURN CODE = 0 03283000
  3331. B EDEXIT1 GO EXIT 03284000
  3332. EJECT 03285000
  3333. *********************************************************************** 03286000
  3334. * 03287000
  3335. * 'STACKCLR' IS A SUBROUTINE WHICH CLEARS THE READ STACK 03288000
  3336. * BY CALLING THE CMS 'DESBUF' FUNCTION. 03289000
  3337. * 03290000
  3338. * CALL: 03291000
  3339. * BAL 4,STACKCLR 03292000
  3340. * 03293000
  3341. * (LEVEL N SUBROUTINE) 03294000
  3342. * 03295000
  3343. *********************************************************************** 03296000
  3344. SPACE 03297000
  3345. STACKCLR DS 0H 03298000
  3346. L 1,AFSTFNRD ADDRESS OF ANCHOR FOR STACKED READS 03299000
  3347. L 1,0(1) ARE THERE ANY? 03300000
  3348. LTR 1,1 03301000
  3349. BCR 8,4 @V200713 03302000
  3350. CMS CONWAIT WAIT FOR PEACE AND QUIET 03303000
  3351. CMS DESBUF DESTROY STACKED LINES 03304000
  3352. WTYPE KILMES TYPE WARNING MESSAGE 03305000
  3353. BR 4 RETURN 03306000
  3354. SPACE 03307000
  3355. CONWAIT DS 0F 03308000
  3356. DC CL8'CONWAIT' 03309000
  3357. DC CL4'CON1' 03310000
  3358. SPACE 03311000
  3359. DESBUF DS 0F 03312000
  3360. DC CL8'DESBUF' 03313000
  3361. SPACE 03314000
  3362. KILMES DC C'STACKED LINES CLEARED' 03315000
  3363. EJECT 03316000
  3364. ************** 03317000
  3365. * 03318000
  3366. * 'KTCLR' IS A SUBROUTINE TO CLEAR THE 'KT' FLAG IN ORDER 03319000
  3367. * TO TYPE AN IMPORTANT MESSAGE WHICH SHOULD NOT BE MISSED. 03320000
  3368. * IT DOES SO BY STACKING A NULL LINE (LIFO) AND THEN 03321000
  3369. * READING IT. 03322000
  3370. * 03323000
  3371. * CALL IS: 03324000
  3372. * BAL 4,KTCLR 03325000
  3373. * 03326000
  3374. * (LEVEL N SUBROUTINE, CALLED FROM XWRITE, SAVE/FILE AND 03327000
  3375. * TERMINAL ERRORS.) 03328000
  3376. * 03329000
  3377. ************** 03330000
  3378. SPACE 03331000
  3379. KTCLR DS 0H 03332000
  3380. ICM R1,3,COUNT GET REQUEST LENGTH @VA04190 03333000
  3381. STH R1,SAVCNT SAVE IT @VA04190 03334000
  3382. BZ KTNEXT BRANCH IF NULL @VA04190 03335000
  3383. BCTR R1,0 MINUS ONE FOR 'EX' @VA04190 03336000
  3384. EX R1,SAVREQ SAVE REQUEST IN TABLIN @VA04190 03337000
  3385. OI SIGNAL,QUOD MAKE LIKE A ? OR " @VA04190 03338000
  3386. KTNEXT EQU * @VA04190 03339000
  3387. MVI ATTNLEN,X'00' STACK ZERO CHARACTERS. @V200713 03340000
  3388. CMS ATTN @V200713 03341000
  3389. BAL 14,RDTYPE THEN READ IT, THEREBY CLEARING KT FLAG 03342000
  3390. BR 4 RETURN 03343000
  3391. EJECT 03344000
  3392. ****************************************************************** 03345000
  3393. * 03346000
  3394. * QUERY TYPES OUT THE LAST EDIT REQUEST WHICH (WHETHER 03347000
  3395. * VALID OR NOT) DID NOT START WITH A DOUBLE QUOTE OR A 03348000
  3396. * QUESTION MARK. 03349000
  3397. * 03350000
  3398. ****************************************************************** 03351000
  3399. SPACE 1 03352000
  3400. QUERY DS 0H @V200713 03353000
  3401. OI SIGNAL,QUOD SET ? AND " FLAG @V200713 03354000
  3402. BAL 14,PARMCHK ENSURE NO MORE PARMS @V200713 03355000
  3403. LH 0,SAVCNT GET LENGTH OF SAVED REQUEST @V200713 03356000
  3404. LA 1,TABLIN AND ADDRESS @V200713 03357000
  3405. OI SCRFLG2,CMDINB SET FLAG FOR DISPLAY RTN @V2D3913 03358000
  3406. LA R14,NEXT WRITE LAST COMMAND TO INPUT AREA @V2D3913 03359000
  3407. B WRTYPEX THEN GET NEXT SUBCOMMAND @V2D3913 03360000
  3408. EJECT 03361000
  3409. ****************************************************************** 03362000
  3410. * 03363000
  3411. * 'LONG' AND 'SHORT' CHANGE BETWEEN LONG AND SHORT 03364000
  3412. * DIAGNOSTIC MESSAGES. 03365000
  3413. * 03366000
  3414. ****************************************************************** 03367000
  3415. SPACE 1 03368000
  3416. LONG DS 0H @V200713 03369000
  3417. BAL 14,PARMCHK AT END OF PARMS? @V200713 03370000
  3418. OI FLAG2,LONGSW SET 'LONG' MODE @V200713 03371000
  3419. B NEXT @V200713 03372000
  3420. SPACE 2 03373000
  3421. SHORT EQU * @V200713 03374000
  3422. BAL 14,PARMCHK AT END OF PARMS? @V200713 03375000
  3423. NI FLAG2,255-LONGSW SET 'SHORT' MODE @V200713 03376000
  3424. B NEXT @V200713 03377000
  3425. EJECT 03378000
  3426. ****************************************************************** 03379000
  3427. * 03380000
  3428. * 'FNAME' RESETS THE FILENAME FOR SUBSEQUENT UNQUALIFIED 03381000
  3429. * AND SAVE REQUESTS. 03382000
  3430. * IF ISSUED WITHOUT AN ARGUMENT, IT DISPLAYS THE CURRENT 03383000
  3431. * NAME 03384000
  3432. ****************************************************************** 03385000
  3433. SPACE 1 03386000
  3434. NAME DS 0H @V200713 03387000
  3435. OI SIGNAL,GETCAT SET GETCAT FLAG @V200713 03388000
  3436. BAL 14,GET GET NAME @V200713 03389000
  3437. BZ NAMETELL BRANCH IF NONE GIVEN @V200713 03390000
  3438. CLI XXXCWD,C'*' NAME STAR WITH A STAR? @V200713 03391000
  3439. BE INVREQ BRANCH IF SO (NO ALLOWED) @V200713 03392000
  3440. MVC SAVCWD(8),XXXCWD SAVE NAME @V200713 03393000
  3441. BAL 14,PARMCHK CHECK NO MORE PARMS @V200713 03394000
  3442. MVC FNAME(8),SAVCWD MOVE IN NEW NAME @V200713 03395000
  3443. B VERSTAT VERIFY IF TUBE TERMINAL @V200714 03396000
  3444. SPACE 1 03397000
  3445. NAMETELL EQU * TYPE THE CURRENT NAME @V200713 03398000
  3446. WTYPE FNAME,8,RETURN=NEXT @V305614 03399000
  3447. EJECT 03400000
  3448. ****************************************************************** 03401000
  3449. * 03402000
  3450. * 'FMODE' RESETS THE FILEMODE FOR THE NEW FILE. 03403000
  3451. * IF CALLED WITHOUT ANY PARM, DISPLAYS THE CURRENT 03404000
  3452. * SETTING 03405000
  3453. ****************************************************************** 03406000
  3454. SPACE 1 03407000
  3455. MODE DS 0H @V200713 03408000
  3456. OI SIGNAL,GETCAT SET GETCAT FLAG @V200713 03409000
  3457. BAL 14,GET GET PARM @V200713 03410000
  3458. BZ MODETELL BRANCH IF NONE @V200713 03411000
  3459. BCTR 1,0 DECREMENT THE COUNT @V200713 03412000
  3460. LTR 1,1 CHECK IT NOW @V200713 03413000
  3461. BP INVREQ ERROR IF TOO MANY @V200713 03414000
  3462. MVC CMODE(4),XXXCWD READY FOR 'MODECHK' @V200713 03415000
  3463. BAL 14,MODECHK GO CHEK FOR VALID MODE @V200713 03416000
  3464. BNZ MODERR ERROR IF CC IS -VE @V200713 03417000
  3465. MVC FMODE(2),CMODE SAVE NEW FILEMODE @V200713 03418000
  3466. BAL 14,PARMCHK NO MORE ARGS, PLEASE @V200713 03419000
  3467. B VERSTAT VERIFY IF TUBE TERMINAL @V200714 03420000
  3468. SPACE 1 03421000
  3469. MODETELL EQU * TYPE THE CURRENT MODE @V200713 03422000
  3470. WTYPE FMODE,2,RETURN=NEXT @V305614 03423000
  3471. VERSTAT EQU * @V200714 03424000
  3472. TM FLAG2,TUBE DISPLAY TERMINAL ? @V200714 03425000
  3473. BNO NEXT NO...BR @V200714 03426000
  3474. MVI SCRFLGS,WRSTATB STATUS CHANGE ONLY @V2D3914 03427000
  3475. VERIFY RETURN=NEXT @V2D3913 03428000
  3476. EJECT 03429000
  3477. LTORG @V200713 03430000
  3478. * *********************************** 03431000
  3479. * *********************************** 03432000
  3480. * ***** ***** 03433000
  3481. * ***** END OF PAGE 2 ***** 03434000
  3482. * ***** ***** 03435000
  3483. * *********************************** 03436000
  3484. * *********************************** 03437000
  3485. EJECT 03438000
  3486. ****************************************************************** 03439000
  3487. * 03440000
  3488. * 'RECFORM' RESETS RECORD FORMAT BETWEEN F AND V. 03441000
  3489. * DEFAULT DEPENDS UPON THE FILETYPE. 03442000
  3490. * 03443000
  3491. ****************************************************************** 03444000
  3492. SPACE 1 03445000
  3493. RECFORM DS 0H @V200713 03446000
  3494. MVI SCRFLGS,WRSTATB MAY CHANGE STATUS LINE @V2D3914 03447000
  3495. BAL 14,GET GET PARM @V200713 03448000
  3496. BZ FORMTELL BRANCH IF NONE @V200713 03449000
  3497. LTR 1,1 HOW MANY CHARS WERE TYPED? @V200713 03450000
  3498. BNZ INVREQ BRANCH IF NOT ONE @V200713 03451000
  3499. MVC SAVCWD(8),XXXCWD AND MOVE INTO SAVCWD @V200713 03452000
  3500. BAL 14,PARMCHK CHECK NO MORE PARMS @V200713 03453000
  3501. CLI SAVCWD,C'F' F? @V200713 03454000
  3502. BNE RECFORM1 BRANCH IF NOT @V200713 03455000
  3503. MVI FV,C'F' SAVE NEW FORMAT @V200713 03456000
  3504. B VERSTAT VERIFY IF TUBE TERMINAL @V200714 03457000
  3505. SPACE 1 03458000
  3506. RECFORM1 EQU * @V200713 03459000
  3507. CLI SAVCWD,C'V' V FORMAT? @V200713 03460000
  3508. BNE INVREQ BRANCH IF NOT @V200713 03461000
  3509. TM FLAG,RIGHT LINEMODE RIGHT? @V200713 03462000
  3510. BZ RECFORM2 SKIP IF NOT @V200713 03463000
  3511. WTYPE SERBMSG,,RETURN=NEXT @V200713 03464000
  3512. SPACE 1 03465000
  3513. RECFORM2 EQU * @V200713 03466000
  3514. MVI FV,C'V' SAVE NEW FORMAT @V200713 03467000
  3515. TM FLAG,SERSW SERIALIZATION? @V200713 03468000
  3516. BZ VERSTAT VERIFY IF TUBE TERMINAL @V200714 03469000
  3517. NI FLAG,255-SERSW TURN SERIALIZATION OFF @V200713 03470000
  3518. OI SCRFLG2,WRTOPB CAUSE FULL WRITE @V200714 03471000
  3519. WTYPE SEROFFMS,,RETURN=NEXT @V200713 03472000
  3520. SPACE 1 03473000
  3521. FORMTELL EQU * @V200713 03474000
  3522. WTYPE FV,1,RETURN=NEXT @V305614 03475000
  3523. SPACE 2 03476000
  3524. SEROFFMS DC C'SERIALIZATION TURNED OFF FOR V FORMAT' @V200713 03477000
  3525. EJECT 03478000
  3526. ************************************************************** 03479000
  3527. * 03480000
  3528. * VERIFY SETS THE VERIFY-MODE AND/OR VERIFY COLUMN 03481000
  3529. * 03482000
  3530. ************************************************************** 03483000
  3531. VERIFY DS 0H @V2D3914 03484000
  3532. LA R5,INVREQ FOR MORE EFFICIENT USE OF CORE @V2D3914 03485000
  3533. SR R3,R3 CLEAR A REG @V2D3914 03486000
  3534. L R2,ITEM GET LINE LENGTH @V2D3914 03487000
  3535. BAL R14,NUM SEE IF NUMERIC PARAMETER @V2D3914 03488000
  3536. B VEROFFCK NO, SEE IF 'OFF' @V2D3914 03489000
  3537. BM VERTYPE BR IF NO PARAMETER @V2D3914 03490000
  3538. BZR R5 ZERO IS INVALID @V2D3914 03491000
  3539. B SETVER USE VALID NUMBER @V2D3914 03492000
  3540. SPACE 1 03493000
  3541. VEROFFCK CLC XXXCWD(4),MOFF WAS 'OFF' SPECIFIED ? @V2D3914 03494000
  3542. BNE VERONCK NO, SEE IF IT WAS 'ON' @V2D3914 03495000
  3543. BCTR R3,R0 SET MINUS AS INDICATOR @V2D3914 03496000
  3544. B VERMORE SEE IF NUMBER SPECIFIED @V2D3914 03497000
  3545. SPACE 1 03498000
  3546. VERONCK CLC XXXCWD(3),MON WAS 'ON' SPECIFIED ? @V2D3914 03499000
  3547. BNE VERSTAR NO, IT BETTER BE ASTERISK @V2D3914 03500000
  3548. LR R3,R2 YES, SET POSITIVE AS INDICATOR @V2D3914 03501000
  3549. VERMORE BAL R14,NUM SEE IF NUMBER SPECIFIED @V2D3914 03502000
  3550. VERSTAR BAL R14,STARCHK BETTER BE ASTERISK @V2D3914 03503000
  3551. BM SETVER5 BR IF NOTHING SPECIFIED @V2D3914 03504000
  3552. BZR R5 ZERO NOT ALLOWED @V2D3914 03505000
  3553. LTR R0,R0 ASTERISK SPECIFIED ? @V2D3914 03506000
  3554. BNM SETVER NO...BR @V2D3914 03507000
  3555. LR R0,R2 VERIFY WHOLE LINE @V2D3914 03508000
  3556. B SETVER2 DO SOME CHECKING @V2D3914 03509000
  3557. SPACE 1 03510000
  3558. SETVER LR R4,R0 SAVE FIRST NUMBER @V2D3914 03511000
  3559. BAL R14,NUM GET NEXT NUMBER @V2D3914 03512000
  3560. BAL R14,STARCHK MIGHT BE AN ASTERISK @V2D3914 03513000
  3561. BNM SETVER1 BR IF 2ND NUMBER EXISTS @V2D3914 03514000
  3562. LR R0,R4 SHIFT 'EM BACK @V2D3914 03515000
  3563. B SETVER2 ..AND CONTINUE @V2D3914 03516000
  3564. SPACE 1 03517000
  3565. SETVER1 LTR R0,R0 ASTERISK SPECIFIED ? @V2D3914 03518000
  3566. BNM SETVER3 NO ... BR @V2D3914 03519000
  3567. LR R0,R2 USE LRECL FOR END COLUMN @V2D3914 03520000
  3568. B SETVER3 DO SOME CHECKING @V2D3914 03521000
  3569. SPACE 1 03522000
  3570. SETVER2 LA R4,1 USE DEFAULT START COLUMN @V2D3914 03523000
  3571. SETVER3 BAL R14,PARMCHK NO MORE PARAMETERS ALLOWED @V2D3914 03524000
  3572. CR R4,R0 2ND NUMBER > OR = 1ST NUMBER ? @V2D3914 03525000
  3573. BHR R5 INVALID IF NOT @V2D3914 03526000
  3574. CR R0,R2 2ND NUMBER > LRECL ? @V2D3914 03527000
  3575. BHR R5 INVALID IF SO @V2D3914 03528000
  3576. SPACE 1 03529000
  3577. SETVER4 STH R4,TVERCOL1 PLUG VALUES INTO TEMPORARY @V2D3914 03530000
  3578. STH R0,TVERCOL2 ATTRIBUTE LIST @V2D3914 03531000
  3579. SR R0,R4 CALCULATE LENGTH OF @V2D3914 03532000
  3580. LR R4,R0 OUTPUT REQUESTED @V2D3914 03533000
  3581. LA R4,1(,R4) ..... @V2D3914 03534000
  3582. STH R4,VERLEN AND PLUG INTO ATTRIBUTE LIST @V2D3914 03535000
  3583. MVC VERCOL1(4),TVERCOL1 ALSO PUT IN COLUMNS @V2D3914 03536000
  3584. SPACE 1 03537000
  3585. SETVER5 LTR R3,R3 CHECK OUR INDICATING REG @V2D3914 03538000
  3586. BZ NEXT BR, IF ONLY NUMBER SPECIFIED @V2D3914 03539000
  3587. BM VEROFF BR, IF 'OFF' SPECIFIED @V2D3914 03540000
  3588. VERON OI FLAG2,VER SET VERIFICATION ON @V2D3914 03541000
  3589. B NEXT GET NEXT COMMAND @V2D3914 03542000
  3590. VEROFF NI FLAG2,255-VER RESET VERIFICATION FLAG @V2D3914 03543000
  3591. B NEXT GET NEXT COMMAND @V2D3914 03544000
  3592. SPACE 1 03545000
  3593. VERTYPE LH R0,VERCOL1 CONVERT BINARY VALUE @V2D3914 03546000
  3594. BAL R14,BINDEC TO DECIMAL @V2D3914 03547000
  3595. MVC RANGE(4),AREA+4 PUT IT INTO AN OUTPUT AREA @V2D3914 03548000
  3596. LH R0,VERCOL2 DO IT AGAIN @V2D3914 03549000
  3597. BAL R14,BINDEC FOR 2ND VALUE @V2D3914 03550000
  3598. MVC RANGE+4(4),AREA+4 ....... @V2D3914 03551000
  3599. WTYPE RANGE,8,RETURN=NEXT AND PRINT IT @VM03203 03552000
  3600. EJECT 03553000
  3601. *********************************************************************** 03554000
  3602. * 03555000
  3603. * 'SERIAL' ALLOWS THE USER TO CONTROL SERIALIZATION. 03556000
  3604. * 03557000
  3605. *********************************************************************** 03558000
  3606. SPACE 03559000
  3607. SERIAL DS 0H 03560000
  3608. MVI SERTSEQ,C' ' SET TEMP. SERIAL DATA TO DEFAULTS 03561000
  3609. MVI SERTSW,X'00' CLEAR TEMPORARY SERNAME SWITCH 03562000
  3610. LA R3,10 KEEP INCREMENT IN R3 (INIT. TO 10 03563000
  3611. OI SIGNAL,GETCAT SET GETCAT FLAG (CONCATENATE EDIT 03564000
  3612. BAL R14,GET GET 1ST PARM 03565000
  3613. BZ INVREQ INVALID FOR NO ARGS 03566000
  3614. CLC XXXCWD(4),MOFF CHECK FOR 'OFF' V0379 03567000
  3615. BE SERIAL1 03568000
  3616. CLC XXXCWD(4),=CL4'ALL' CHECK 'ALL 03569000
  3617. BE SERIAL5 USE 8 DIGITS 03570000
  3618. OI SERTSW,SERNAME SET SERIAL. WITH NAME 03571000
  3619. CLC XXXCWD(3),MON CHECK 'ON' @V200706 03572000
  3620. BE SERIAL5 BRANCH IF EQUAL (FILE USES FN) 03573000
  3621. MVC SERTSEQ(3),XXXCWD FILL IN THE NAME 03574000
  3622. SERIAL5 EQU * 03575000
  3623. BAL R14,NUM LOOK FOR INCREMENT 03576000
  3624. B INVREQ BRANCH IF NOT VALID 03577000
  3625. BL SERIAL4 BRANCH IF NONE GIVEN 03578000
  3626. LR R3,R0 PUT IT INTO R3 03579000
  3627. BAL R14,PARMCHK CHECK NO MORE PARMS 03580000
  3628. SPACE 03581000
  3629. SERIAL4 EQU * 03582000
  3630. CLI FV,C'F' F FORMAT FILE? 03583000
  3631. BNE BADFORM BRANCH IF NOT 03584000
  3632. CLI ITEM+3,80 ITEM LENGTH 80? 03585000
  3633. BNE BADFORM BRANCH IF NOT 03586000
  3634. CLI TRUNCOL+1,72 CHECK TRUNCOL 03587000
  3635. BNH CHKZON IT'S OK 03588000
  3636. MVI TRUNCOL+1,72 SET IT TO 72 03589000
  3637. WTYPE TRUNCMES TELL HIM SO 03590000
  3638. SPACE 03591000
  3639. CHKZON EQU * NOW CHECK ZONES 03592000
  3640. CLI ZONE1+1,72 FINALLY CHECK BEGINNING ZONE 03593000
  3641. BL SERSET BRANCH IF < 03594000
  3642. MVI ZONE1+1,71 SET BEGINNING ZONE TO 72 03595000
  3643. SPACE 03596000
  3644. SERSET EQU * VALID COMMAND -- SET THINGS FOR FILE 03597000
  3645. OI FLAG,SERSW SET SERIALIZATION (FOR REAL) 03598000
  3646. NI FLAG,255-SERNAME CLEAR NAME SWITCH 03599000
  3647. OC FLAG(1),SERTSW AND DO AS TOLD 03600000
  3648. MVC SEQNAME(3),SERTSEQ MOVE IN SEQUENCE NAME (IF ANY) 03601000
  3649. ST R3,CARDINCR AND USE GIVEN (OR DEFAULT) INCREMENT 03602000
  3650. CLI ZONE2+1,72 COMPARE END ZONE TO 72 @V200713 03603000
  3651. BNH NEXT BRANCH IF <= @V200713 03604000
  3652. MVI ZONE2+1,72 SET TO 72 IF NOT @V200713 03605000
  3653. WTYPE ZONMES,,RETURN=NEXT @V200713 03606000
  3654. SPACE 03607000
  3655. BADFORM EQU * 03608000
  3656. WTYPE BADFMES,,RETURN=NEXT @V200713 03609000
  3657. SPACE 03610000
  3658. SERIAL1 EQU * 03611000
  3659. BAL R14,PARMCHK CHECK NO MORE PARMS 03612000
  3660. NI FLAG,255-SERSW INDICATE SERIALIZATION SUPPRESSED 03613000
  3661. B NEXT 03614000
  3662. SPACE 2 03615000
  3663. TRUNCMES DC C'TRUNC SET TO 72' 03616000
  3664. ZONMES DC C'END ZONE SET TO 72' 03617000
  3665. BADFMES DC C'WRONG FILE FORMAT FOR SERIALIZATION' 03618000
  3666. EJECT 03619000
  3667. *********************************************************************** 03620000
  3668. * 03621000
  3669. * GETFILE LOADS A FILE, OR PART OF A FILE, INTO THE FILE BEING 03622000
  3670. * EDITED. 03623000
  3671. * 03624000
  3672. *********************************************************************** 03625000
  3673. SPACE 03626000
  3674. GETFILE DS 0H 03627000
  3675. OI SIGNAL,GETCAT SET GETCAT FLAG (CONCATENATE EDIT TOKS) 03628000
  3676. BAL 14,GET GET FILENAME 03629000
  3677. BZ INVREQ BRANCH IF NOT GIVEN 03630000
  3678. MVC IOLIST+8(8),XXXCWD MOVE IN FILENAME 03631000
  3679. SR 2,2 KEEP ZERO HERE 03632000
  3680. MVC IOLIST+16(8),FTYPE SET CURRENT FILETYPE 03633000
  3681. MVC IOLIST+24(2),=CL2'* ' AND ANY MODE 03634000
  3682. STH 2,IOLIST+26 SET FOR SEQUENTIAL READING 03635000
  3683. SR 3,3 INITIALIZE FLAG FOR READING TO EOF 03636000
  3684. OI SIGNAL,GETCAT RESET GETCAT FLAG (CONCATENATE EDIT TOKS) 03637000
  3685. BAL 14,GET GET FILETYPE (IF GIVEN) 03638000
  3686. BZ GETFGO BRANCH IF NOT GIVEN 03639000
  3687. CLI XXXCWD,C'*' STAR? 03640000
  3688. BNE GETFMVTY BRANCH IF NOT 03641000
  3689. LTR 1,1 ONLY THE ONE CHARACTER GIVEN? 03642000
  3690. BH INVREQ BRANCH IF NOT (WON'T DO) 03643000
  3691. B GETFMODE 03644000
  3692. GETFMVTY EQU * USE THE GIVEN FILETYPE 03645000
  3693. MVC IOLIST+16(8),XXXCWD MOVE IN GIVEN FILETYPE 03646000
  3694. GETFMODE EQU * LOOK FOR GIVEN FILEMODE 03647000
  3695. OI SIGNAL,GETCAT SET GETCAT FLAG (CONCATENATE EDIT TOKS) 03648000
  3696. BAL 14,GET GET FILEMODE 03649000
  3697. BZ GETFGO BRANCH IF NOT GIVEN 03650000
  3698. MVC CMODE(3),XXXCWD PROVIDE GIVEN MODE TO CHECKER 03651000
  3699. BAL 14,MODECHK AND GO THERE... 03652000
  3700. BNZ MODERR ERROR IF MODE INVALID 03653000
  3701. MVC IOLIST+24(2),XXXCWD MOVE IN GIVEN FILEMODE 03654000
  3702. BAL 14,NUM GET STARTING LINE NUMBER 03655000
  3703. B INVREQ BRANCH IF NOT NUMERIC 03656000
  3704. BZ INVREQ OR ZERO 03657000
  3705. STH 0,IOLIST+26 STORE IT 03658000
  3706. BAL 14,NUM GET NO. OF LINES 03659000
  3707. BAL 14,STARCHK IF NOT NUMERIC, HOPEFULLY IT'S * 03660000
  3708. BZ NEXT BRANCH IF NO LINES 03661000
  3709. BL GETFGO BRANCH IF LINES NOT SPECIFIED 03662000
  3710. LR 3,0 SAVE LINES IN R3 03663000
  3711. SPACE 03664000
  3712. GETFGO EQU * 03665000
  3713. BAL 14,PARMCHK CHECK NO MORE PARMS 03666000
  3714. CMS IOLIST,PROG=STATE,ERROR=IGNORE 03667000
  3715. LTR 15,15 ANY ERRORS? 03668000
  3716. BZ GETFST NO, WE FOUND IT 03669000
  3717. CH 15,=H'28' IS THIS A 'NOT FOUND' ERR? 03670000
  3718. BE NOGETF THAT'S RIGHT 03671000
  3719. B INVREQX BAD FILEID, NO MSG PLEASE. 03672000
  3720. GETFST EQU * 03673000
  3721. L 1,IOLIST+28 GET FST 03674000
  3722. L 4,ITEM GET ITEM LENGTH 03675000
  3723. C 4,32(1) COMPARE WITH THAT OF NEW FILE 03676000
  3724. BL BADGETF BRANCH IF NEW ONE TOO LARGE 03677000
  3725. CLC IOLIST+26(2),26(1) CHECK STARTING LINE NO. 03678000
  3726. BH BADGETF1 BRANCH IF NOT ENOUGH LINES 03679000
  3727. MVC IOLIST+24(2),24(1) USE ACTUAL FILEMODE 03680000
  3728. MVC IOLIST+36(2),30(1) AND ACTUAL F OR V 03681000
  3729. LA 1,LINE USE LINE FOR INPUT 03682000
  3730. ST 1,IOLIST+28 STORE ITS ADDRESS IN PARM LIST 03683000
  3731. LA 1,L'LINE LENGTH OF LINE 03684000
  3732. ST 1,IOLIST+32 PUT IN RDBUF PARM LIST 03685000
  3733. TM SIGNAL,AUTOFLAG AUTOSAVE ACTIVE? @VA02879 03686000
  3734. BZ NOTAUT IF NOT GO @VA02879 03687000
  3735. NI SIGNAL,255-AUTOFLAG IF SO DISABLE TEMPORARILY @VA02879 03688000
  3736. OI SIGNAL,AUTOSVFL USE OTHER FLAG TO REMEMBER @VA02879 03689000
  3737. NOTAUT EQU * @VA02879 03690000
  3738. MVI SCRFLGS,WRTOPB REWRITE FULL DISPLAY @V2D3913 03691000
  3739. SPACE 03692000
  3740. DMSKEY NUCLEUS NEED NUCLEUS KEY FOR BALR CALLS @VM03083 03693000
  3741. GETFLOOP EQU * LOOP TO "GET" DESIRED FILE: @VM03083 03694000
  3742. EX 4,LINECLR CLEAR NECESSARY PART OF LINE 03695000
  3743. SSM DISABLE DISABLE INTERRUPTS @VA05354 03696000
  3744. LA R1,IOLIST POINT TO PARAMETER LIST, @VM03083 03697000
  3745. L R15,ARDBUF CALL 'RDBUF' @VM03083 03698000
  3746. BALR R14,R15 (VIA BALR FOR SPEED) @VM03083 03699000
  3747. SSM FE ENABLE INTERRUPTS @VA05354 03700000
  3748. BNZ GETFIN BRANCH IF ERROR (E.G. EOF) @VM03083 03701000
  3749. LA 1,LINE PARM FOR XWRITE 03702000
  3750. BAL 14,XWRITE INSERT THE LINE 03703000
  3751. BH GETFOFL BRANCH IF NO MORE ROOM 03704000
  3752. BL GETCLOS BRANCH IF CORE OVERFLOW (NB: R4 IS LOST) 03705000
  3753. L 0,SPARES LOAD NO. OF SPARES LEFT 03706000
  3754. STH 2,IOLIST+26 ENSURE WE'RE SET FOR SEQUENTIAL 03707000
  3755. BCT 3,GETFLOOP AND READ NEXT LINE 03708000
  3756. GETVER VERIFY @VA03087 03709000
  3757. SPACE 03710000
  3758. GETCLOS EQU * CLOSE THE FILE 03711000
  3759. SSM DISABLE DISABLE INTERRUPTS @VA05354 03712000
  3760. LA R1,IOLIST POINT TO PARAMETER LIST, @VM03083 03713000
  3761. L R15,AFINIS CALL 'FINIS' @VM03083 03714000
  3762. BALR R14,R15 (VIA BALR FOR SPEED) @VM03083 03715000
  3763. SSM FE ENABLE INTERRUPTS @VA05354 03716000
  3764. DMSKEY RESET RESTORE USER KEY AFTER BALR CALLS@VM03083 03717000
  3765. TM SIGNAL,AUTOSVFL ARE WE AUTOSAVING? @V200706 03718000
  3766. BZ NEXT IF NOT, GET NEXT COMMAND @V200706 03719000
  3767. NI SIGNAL,255-AUTOSVFL IF SO, RESTORE AUTO FLAGS @V200706 03720000
  3768. OI SIGNAL,AUTOFLAG @V200706 03721000
  3769. LA 14,NEXT SETUP RETURN ADDRESS @V200706 03722000
  3770. B AUTOCHEK AND PERFORM AN AUTOSAVE @V200706 03723000
  3771. SPACE 03724000
  3772. GETFIN EQU * ERROR FROM RDBUF 03725000
  3773. CH 15,=H'12' EOF? 03726000
  3774. BNE GETFERR BRANCH IF NOT (BAD NEWS) 03727000
  3775. VTYPE REACHEOF TYPE MESSAGE IF IN VER MODE 03728000
  3776. B GETVER @VA03087 03729000
  3777. SPACE 03730000
  3778. GETFERR EQU * BAD ERROR 03731000
  3779. WTYPE GETFERRM TYPE MESSAGE 03732000
  3780. B GETCLOS CLOSE FILE 03733000
  3781. SPACE 03734000
  3782. GETFOFL EQU * CORE OVERFLOW 03735000
  3783. WTYPE GETFOFMS TYPE MESSAGE 03736000
  3784. B GETCLOS CLOSE FILE 03737000
  3785. SPACE 03738000
  3786. NOGETF EQU * FILE NOT FOUND 03739000
  3787. WTYPE FILNTFND,,RETURN=INVREQX @V200713 03740000
  3788. SPACE 03741000
  3789. BADGETF EQU * EXCESSIVE ITEM LENGTH 03742000
  3790. WTYPE BADGETIT,,RETURN=INVREQX @V200713 03743000
  3791. SPACE 03744000
  3792. BADGETF1 EQU * NOT ENOUGH LINES 03745000
  3793. WTYPE GETFSHT,,RETURN=INVREQX @V200713 03746000
  3794. SPACE 2 03747000
  3795. REACHEOF DC C'EOF REACHED' 03748000
  3796. GETFERRM DC C'READ ERROR - GETFILE IS INCOMPLETE' 03749000
  3797. GETFOFMS DC C'GETFILE IS INCOMPLETE' 03750000
  3798. FILNTFND DC C'FILE NOT FOUND' 03751000
  3799. BADGETIT DC C'RECORD LENGTH OF FILE TOO LARGE' 03752000
  3800. GETFSHT DC C'GIVEN STARTING LINE IS BEYOND EOF' 03753000
  3801. EJECT 03754000
  3802. *********************************************************************** 03755000
  3803. * 03756000
  3804. * 'MODECHK' VALIDATES THE FILEMODE IN 'CMODE' PROVIDED BY THE 03757000
  3805. * CALLING ROUTINE. 03758000
  3806. * MODECHK SETS THE CONDITION CODE BEFORE RETURNING VIA R14. ANY 03759000
  3807. * ERROR DETECTED BY MODECHK WILL RESULT IN A NON-ZERO CONDITION 03760000
  3808. * CODE. 03761000
  3809. * 03762000
  3810. *********************************************************************** 03763000
  3811. MODECHK DS 0H 03764000
  3812. CLI CMODE,C'G' 03765000
  3813. BE CONT1 O.K. IF = 'G' 03766000
  3814. BL TESTA CHECK IF A - F 03767000
  3815. CLI CMODE,C'Y' 03768000
  3816. BE CONT1 03769000
  3817. CLI CMODE,C'Z' 03770000
  3818. BE CONT1 03771000
  3819. CLI CMODE,C'S' 03772000
  3820. BE CONT1 03773000
  3821. BCR 15,14 RETURN WITH ERROR CC 03774000
  3822. TESTA CLI CMODE,C'A' MODE LETTER < A 03775000
  3823. BNL CONT1 IF NOT, CONTINUE 03776000
  3824. CLI CMODE,C'*' IF SO, BETTER BE STAR... 03777000
  3825. BCR 7,14 ERROR RETURN IF NOT 03778000
  3826. CLI CMODE+1,C' ' BETTER HAVE BLANK NEXT.. 03779000
  3827. BCR 7,14 ERROR IF NOT 03780000
  3828. B CONT2 CONTINUE 03781000
  3829. CONT1 CLI CMODE+1,C'5' MODE NUMBER GT '5' 03782000
  3830. BCR 2,14 IF SO, ERROR RETURN 03783000
  3831. CLI CMODE+1,C'0' NUMBER LESS THAN ZERO? @V200713 03784000
  3832. BNL CONT2 IF NOT, SHE'S IN THE RANGE... 03785000
  3833. CLI CMODE+1,C' ' IF SO, COULD BE BLANK 03786000
  3834. BCR 7,14 ERROR IF NOT BLANK 03787000
  3835. MVC CMODE+1(1),FMODE+1 DEFAULT TO OLD MODE NUMBER @VA05071 03788000
  3836. CONT2 CLI CMODE+2,C' ' ANYTHING AFTER MODE NUMBER ? 03789000
  3837. BCR 7,14 IF SO, ERROR RETURN 03790000
  3838. SR 15,15 OTHERWISE, 15 = 0 03791000
  3839. LTR 15,15 CC = 0 03792000
  3840. BR 14 NORMAL RETURN... 03793000
  3841. EJECT 03794000
  3842. *********************************************************************** 03795000
  3843. * 03796000
  3844. * 'SAVE' AND 'FILE' WRITE OUT THE CONTENTS OF THE EDITOR, 03797000
  3845. * REPLACING THE EXISTING FILE (IF ANY). 03798000
  3846. * 03799000
  3847. *********************************************************************** 03800000
  3848. SPACE 03801000
  3849. SAVE DS 0H 03802000
  3850. OI SIGNAL,SVFL SET SAVE FLAG 03803000
  3851. B FILEA 03804000
  3852. SPACE 03805000
  3853. FILE EQU * 03806000
  3854. NI SIGNAL,255-SVFL SET SAVE FLAG OFF 03807000
  3855. NI SIGNAL,255-AUTOSVFL SET ALL SAVE FLAGS OFF @VA02449 03808000
  3856. SPACE 03809000
  3857. FILEA EQU * 03810000
  3858. CMS ALTLIST,PROG=ERASE,ERROR=IGNORE 03811000
  3859. MVC NEWNAME(18),FNAME INITIALIZE TO OLD NAME,TYPE AND MODE 03812000
  3860. OI SIGNAL,GETCAT SET GETCAT FLAG (CONCATENATE EDIT TOKS) 03824000
  3861. BAL 14,GET LOOK FOR FILE NAME 03825000
  3862. BZ FILE1 03826000
  3863. CLI XXXCWD,C'*' NO STARS ALLOWED P3123 03827000
  3864. BE INVREQ P3123 03828000
  3865. CLI XXXCWD,C'=' NO EQUALS ALLOWED @VM08629 03829000
  3866. BE INVREQ @VM08629 03830000
  3867. MVC NEWNAME(8),XXXCWD MOVE IN GIVEN NAME 03831000
  3868. OI SIGNAL,GETCAT 03832000
  3869. BAL 14,GET GET NEXT PARM 03833000
  3870. BZ FILE1 CONTINUE IF NOTHING THERE 03834000
  3871. CLI XXXCWD,C'*' NO STARS ALLOWED P3123 03835000
  3872. BE INVREQ P3123 03836000
  3873. CLI XXXCWD,C'=' NO EQUALS ALLOWED @VM08629 03837000
  3874. BE INVREQ @VM08629 03838000
  3875. MVC NEWTYPE(8),XXXCWD IT'S GOOD ENOUGH 03839000
  3876. OI SIGNAL,GETCAT NOW LET'S TRY THE MODE, IF GIVEN 03840000
  3877. BAL 14,GET GET THE PARM 03841000
  3878. BZ FILE1 CONTINUE IF NOTHING THERE 03842000
  3879. MVC CMODE(3),XXXCWD PROVIDE MODE TO CHECKER... 03843000
  3880. BAL 14,MODECHK AND GO TO HIM 03844000
  3881. BNZ MODERR INVALID MODE 03845000
  3882. CLI XXXCWD,C'*' IS IT STAR? 03846000
  3883. BE INVREQ SORRY, THAT'S A NO-NO TOO. 03847000
  3884. MVC NEWMODE(2),CMODE IT'S GOOD 03848000
  3885. BAL 14,PARMCHK CHECK NO MORE PARMS 03849000
  3886. SPACE 03850000
  3887. FILE1 EQU * 03851000
  3888. TM FLAG,RIGHT+SERSW LINEMODE RIGHT? 03852000
  3889. BNO FILE2A SKIP IF NOT 03853000
  3890. VTYPE SERPRESS TELL NOW - SUPRESS LATER 03854000
  3891. FILE2A EQU * 03855000
  3892. DMSKEY NUCLEUS NEED NUCLEUS KEY FOR BALR CALLS @VM03083 03856000
  3893. LA R1,IOLIST POINT TO PARAMETER LIST @VA08977 03856050
  3894. SSM DISABLE DISABLE INTERRUPTS @VA08977 03856100
  3895. MVC IOID(IDL18),NEWNAME MOVE IN NEW FILEID @VA08977 03856150
  3896. L R15,ASTATE STATE FUNCTION WILL @VA08977 03856200
  3897. BALR R14,R15 VALIDATE FILEID @VA08977 03856250
  3898. SSM FE ENABLE INTERRUPTS @VA08977 03856300
  3899. CLM R15,BIN0001,INVCHAR RETURN CODE 20? @VA08977 03856350
  3900. BE ALTERR YES,INVALID ID @VA08977 03856400
  3901. L 2,PTR1 LOAD TOP PTR 03857000
  3902. LTR 2,2 IS FILE NULL ? 03858000
  3903. BZ NULLFILE YES, TELL USER 03859000
  3904. SR 0,0 PUT ZERO HERE 03860000
  3905. MVC EDCT(2),COUNT TO FOOL 'INPUT' (IF SAVE REQ.) 03861000
  3906. MVC IOLIST+8(16),ALTLIST+8 SET WORK-FILE NAME,TYPE 03862000
  3907. MVC IOLIST+24(2),NEWMODE 03863000
  3908. STH 0,IOLIST+26 ENSURE WE'RE SET FOR SEQUENTIAL 03864000
  3909. MVC IOLIST+32(4),ITEM SET UP ITEM LENGTH IN PARM 03865000
  3910. MVC IOLIST+36(1),FV SET FV BYTE 03866000
  3911. ST 0,CARDNO INITIALIZE SEQUENCE NO. 03867000
  3912. MVC SERSAV(8),72+8(R2) SAVE COLS 73-80 FOR ERROR @VA04190 03868000
  3913. SPACE 03869000
  3914. FILE3 EQU * 03870000
  3915. LA 1,8(,2) POINT TO DATA AREA ON RECORD 03871000
  3916. ST 1,IOLIST+28 STORE IN PARM LIST 03872000
  3917. TM FLAG,SERSW IS SERIALIZATION REQUIRED 03873000
  3918. BZ FILE5 NO, SKIP THIS JAZZ 03874000
  3919. TM FLAG,RIGHT LINEMODE RIGHT? 03875000
  3920. BO FILE7 YES, SKIP SERIAL'N. 03876000
  3921. TM FLAG,SERNAME SERIALIZATION WITH NAME? 03877000
  3922. BZ FILE4A BRANCH IF NOT 03878000
  3923. CLI SEQNAME,C' ' CHECK FOR ALPHA SUPPLIED 03879000
  3924. BNE FILE4 BRANCH IF THEY ARE 03880000
  3925. MVC 72(3,1),NEWNAME USE CURRENT FILENAME 03881000
  3926. B FILE4A 03882000
  3927. FILE4 EQU * 03883000
  3928. MVC 72(3,1),SEQNAME MOVE IN ALPHA SEQUENCE 03884000
  3929. SPACE 03885000
  3930. FILE4A EQU * 03886000
  3931. L 0,CARDNO CARD NUMBER 03887000
  3932. A 0,CARDINCR INCREMENT IT 03888000
  3933. ST 0,CARDNO UPDATE COUNT 03889000
  3934. CVD 0,DECIMAL CONVERT TO PACKED 03890000
  3935. TM FLAG,SERNAME SERIALIZATION WITH NAME? 03891000
  3936. BO FILE4C BRANCH IF SO 03892000
  3937. UNPK 72(8,1),DECIMAL(8) 8 DIGIT SERIALIZATION 03893000
  3938. B FILE4D 03894000
  3939. FILE4C EQU * 03895000
  3940. UNPK 75(5,1),DECIMAL(8) 5 DIGIT SERIALIZATION 03896000
  3941. FILE4D EQU * 03897000
  3942. OI 79(1),C'0' CORRECT LOUSY SIGN 03898000
  3943. SPACE 03899000
  3944. FILE5 EQU * 03900000
  3945. CLI FV,C'V' V FORMAT FILE? 03901000
  3946. BNE FILE7 BRANCH IF NOT 03902000
  3947. CLC FTYPE,=CL8'VSBDATA' VSBASIC DATA CAN SPAN RCDS @VA04596 03903000
  3948. BE FILE7 TRAILING BLANKS MAY BE DATA @VA04596 03904000
  3949. LR 0,1 03905000
  3950. AH 1,ITEM+2 DELETE ALL TRAILING BLANKS 03906000
  3951. BCTR 1,0 POINT TO LAST BYTE 03907000
  3952. SPACE 03908000
  3953. FILE5A EQU * 03909000
  3954. CLI 0(1),C' ' 03910000
  3955. BNE FILE8 IF NOT BLANK, SEARCH IS OVER 03911000
  3956. BCT 1,FILE5A LOOK AGAIN 03912000
  3957. SPACE 03913000
  3958. FILE8 EQU * 03914000
  3959. SR 1,0 03915000
  3960. BNM FILE8A 03916000
  3961. SR 1,1 03917000
  3962. FILE8A EQU * 03918000
  3963. LA 1,1(,1) CORRECT LENGTH 03919000
  3964. ST 1,IOLIST+32 STORE IT IN PARAMETER LIST 03920000
  3965. SPACE 03921000
  3966. FILE7 EQU * 03922000
  3967. SSM DISABLE DISABLE INTERRUPTS @VA05354 03923000
  3968. LA R1,IOLIST POINT TO PARAMETER LIST, @VM03083 03924000
  3969. L R15,AWRBUF CALL 'WRBUF' @VM03083 03925000
  3970. BALR R14,R15 (VIA BALR FOR SPEED) @VM03083 03926000
  3971. SSM FE ENABLE INTERRUPTS @VA05354 03927000
  3972. BNZ FILERR BRANCH IF ERROR WRITING FILE @VM03083 03928000
  3973. L 2,0(,2) LOAD NEXT RECORD ADDRESS 03929000
  3974. LTR 2,2 ARE WE AT EOF 03930000
  3975. BNZ FILE3 NO, OUTPUT NEXT RECORD 03931000
  3976. BAL 4,UPDLINE UPDATE 'LINE' IF NECESSARY 03932000
  3977. SPACE 03933000
  3978. FILCLOS EQU * COME HERE FROM 'NULLFILE' V0263 03934000
  3979. SSM DISABLE DISABLE INTERRUPTS @VA05354 03935000
  3980. LA R1,IOLIST CLOSE TEMP FILE @VM03083 03936000
  3981. L R15,AFINIS CALL 'FINIS' @VM03083 03937000
  3982. BALR R14,R15 (VIA BALR FOR SPEED) @VM03083 03938000
  3983. SPACE 03939000
  3984. MVC IOLIST+8(8),NEWNAME MOVE IN NEW FILENAME 03940000
  3985. MVC IOLIST+16(8),NEWTYPE AND THE FILETYPE 03941000
  3986. TM TWITCH,NULL NULL FILE ? @VM08785 03942000
  3987. BNO ERASCLOS NO..BR @VM08785 03943000
  3988. MVC IOMODE(2),NEWMODE YES..INCLUDE FM @VM08785 03944000
  3989. ERASCLOS EQU * @VM08785 03945000
  3990. LA R1,IOLIST ERASE OLD FILE (IF ANY), @VM03083 03946000
  3991. L R15,AERASE CALL 'ERASE' @VM03083 03947000
  3992. BALR R14,R15 (VIA BALR FOR SPEED) @VM03083 03948000
  3993. DMSKEY RESET RESTORE USER KEY AFTER BALR CALLS@VM03083 03950000
  3994. SPACE 03951000
  3995. TM TWITCH,NULL NULL FILE? V0263 03952000
  3996. BZ FILREN NO, RENAME AS USUAL V0263 03953000
  3997. STCM R15,1,CMODE GET LAST BYTE OF RETURN CODE @VA04190 03954000
  3998. TM CMODE,X'0C' CHECK FOR FILEMODE ERRORS @VA04190 03955000
  3999. BNM FILEND NO ... SKIP RENAME @VA04190 03956000
  4000. SSM FE ENABLE INTERRUPTS @VA07669 03956100
  4001. NI TWITCH,255-NULL TURN OFF NULL FLAG @VA04190 03957000
  4002. B MODERR AND GO TYPE ERROR MSG @VA04190 03958000
  4003. FILREN EQU * V0263 03959000
  4004. MVC ALTLIST+32(16),IOLIST+8 SET UP RENAME LIST 03960000
  4005. MVC ALTLIST+24(2),NEWMODE 03961000
  4006. MVC ALTLIST+48(2),NEWMODE 03962000
  4007. CMS ALTLIST,PROG=RENAME,ERROR=ALTERR RENAME WORK @VA00984 03963000
  4008. TM FLAG,SERSW SERIALIZATION DONE? @VA04190 03964000
  4009. BNO FILEND NO ... BR @VA04190 03965000
  4010. TM FLAG,RIGHT LINEMODE RIGHT? @VA04190 03966000
  4011. BO FILEND YES ... BR @VA04190 03967000
  4012. CLC VERCOL2(2),=H'80' VERIFY TO 80? @VA04190 03968000
  4013. BL FILEND NO ... BR @VA04190 03969000
  4014. MVI SCRFLGS,WRTOPB FORCE FULL DISPLAY REWRITE @VA04190 03970000
  4015. SPACE 03971000
  4016. FILEND EQU * 03972000
  4017. SSM FE ENABLE INTERRUPTS @VA07669 03972100
  4018. TM SIGNAL,SVFL+AUTOSVFL ANY SAVE BEING DONE? @V200706 03973000
  4019. BZ EDEXIT1 NO, MUST BE 'FILE' @V200706 03974000
  4020. LA 2,PEDIT LOAD RETURN ADDRESS @VA04190 03975000
  4021. TM SIGNAL,AUTOSVFL+AUTOFLAG ANY 'AUTO' ACTIVE? @V200706 03976000
  4022. BZ CKNULL NO, 'SAVE' W/O AUTO @VA04190 03977000
  4023. BNO ZERAUTO 'SAVE' WITH AUTO ACTIVE @VA04190 03978000
  4024. LA 2,SAVRET WE'VE COME A LONG WAY, BABY @V200706 03979000
  4025. NI SIGNAL,255-AUTOSVFL MUST BE AUTO SAVE @V200706 03980000
  4026. ZERAUTO EQU * CLEAR THE CURRENT LINE COUNT@V200706 03981000
  4027. XR 1,1 @V200706 03982000
  4028. STH 1,AUTOCURR @V200706 03983000
  4029. VTYPE AUTOMSG TELL USER IT'S SAVED @V200706 03984000
  4030. MVI SCRFLGS,WRTOPB FORCE FULL DISPLAY REWRITE @V2D3913 03985000
  4031. SPACE 03986000
  4032. CKNULL EQU * @VA04190 03987000
  4033. TM TWITCH,NULL CK FOR NULL FILE @VA04190 03988000
  4034. BZR R2 NO ... RETURN @VA04190 03989000
  4035. WTYPE NULLMES TELL USER FILE EMPTY @VA04190 03990000
  4036. NI TWITCH,255-NULL TURN OFF NULL FLAG @VA04190 03991000
  4037. TM FLAG2,TUBE DISPLAY TERMINAL? @VA04190 03992000
  4038. BO PEDIT1 YES ... GET NEXT REQUEST @VA04190 03993000
  4039. BR R2 NO ... GO TYPE 'EDIT' @VA04190 03994000
  4040. SPACE 03995000
  4041. NULLFILE EQU * FILE IS EMPTY 03996000
  4042. OI TWITCH,NULL SIGNAL NULL FILE V0263 03997000
  4043. B FILCLOS MAKE SURE OLD FILE IS ERASED V0263 03998000
  4044. SPACE 03999000
  4045. FILERR EQU * ERROR FROM WRBUF 04000000
  4046. TM FLAG,SERSW HAVE WE BEEN SERIALIZING? 04001000
  4047. BZ *+10 SKIP IF NOT 04002000
  4048. MVC 8+72(8,2),SERSAV RESTORE COLS 73-80 04003000
  4049. BAL 4,UPDLINE UPDATE 'LINE' IF NECESSARY 04004000
  4050. CH 15,=H'13' IS IT ERROR 13 (DISK FULL)? 04005000
  4051. BE DISKFUL BRANCH IF SO 04006000
  4052. LR R14,R15 IF NOT 13, REMEMBER ERROR CODE, @VM03083 04007000
  4053. DMSKEY RESET RESTORE USER KEY AFTER BALR CALLS@VM03083 04008000
  4054. C 2,PTR1 FIRST LINE? 04009000
  4055. BNE ERR105S BRANCH IF NOT (FATAL ERROR) 04010000
  4056. CH R14,=H'10' TOO MANY FILES ? @VM03083 04011000
  4057. BE DISKFUL1 BRANCH IF SO 04012000
  4058. MODERR BAL 4,KTCLR CLEAR THE 'KT' FLAG 04013000
  4059. MVC FILEMS+12(4),=CL4'MODE' PATCH THE MESSAGE 04014000
  4060. WTYPE FILEMS,26 TYPE SOME GOOD ADVICE @V305614 04015000
  4061. B SVFLERR 04016000
  4062. SPACE 04017000
  4063. DISKFUL EQU * 04018000
  4064. SSM DISABLE DISABLE INTERRUPTS @VA05354 04019000
  4065. LA R1,IOLIST ERASE WORK-FILE, @VM03083 04020000
  4066. L R15,AERASE CALL 'ERASE' @VM03083 04021000
  4067. BALR R14,R15 (VIA BALR FOR SPEED) @VM03083 04022000
  4068. SSM FE ENABLE INTERRUPTS @VA05354 04023000
  4069. DMSKEY RESET RESTORE USER KEY AFTER BALR CALLS@VM03083 04024000
  4070. OI SCRFLGS,WRMSGB REWRITE MESSAGE LINE @V2D3913 04025000
  4071. TM FLAG,SERSW ARE WE DOING SERIALIZATION? 04026000
  4072. BZ DISKFUL1 BRANCH IF NOT 04027000
  4073. WTYPE SERMS TYPE A WARNING 04028000
  4074. OI SCRFLG2,MOREB MAKE SURE ALL DISPLAYED @VM08703 04029000
  4075. DISKFUL1 EQU * 04030000
  4076. BAL 4,KTCLR CLEAR THE 'KT' FLAG 04031000
  4077. WTYPE DISKMS TYPE SOME GOOD ADVICE 04032000
  4078. B SVFLERR 04033000
  4079. SPACE 04034000
  4080. ALTERR EQU * ERROR FROM RENAME 04035000
  4081. SSM FE ENABLE INTERRUPTS @VA07669 04035100
  4082. DMSKEY RESET RESET KEY @VA08977
  4083. BAL 4,KTCLR CLEAR THE 'KT' FLAG 04036000
  4084. MVC FILEMS+12(4),=CL4'NAME' PATCH THE MESSAGE 04037000
  4085. WTYPE FILEMS,26 SOME ADVICE (MAY NOT BE GOOD) @V305614 04038000
  4086. SPACE 04039000
  4087. SVFLERR EQU * ERROR RETURN FROM SAVE AND FILE 04040000
  4088. NI SIGNAL,255-AUTOSVFL INCASE 'AUTO' ACTIVE @V200706 04041000
  4089. OI SCRFLG2,MOREB MAKES SURE SEES ERROR MSG @VA04190 04042000
  4090. OI SCRFLGS,WRTOPB ALONG WITH SCREEN @VA04190 04043000
  4091. BAL 4,STACKCLR CLEAR THE STACK, SINCE HE EXPECTED TO GO 04044000
  4092. NI SCRFLG2,255-MOREB TURN OFF MORE FLAG @VA04190 04045000
  4093. TM FLAG2,TUBE GRAPHICS? @VA03883 04046000
  4094. BNO MPEDIT NO ... GO TYPE 'EDIT' @VA04190 04047000
  4095. TM FLAG2,INMODE INPUT MODE? @VA04190 04048000
  4096. BO TLERR YES ... GO CHG STATUS TO 'EDIT' @VA04190 04049000
  4097. B NEXT ELSE, GET ANOTHER REQUEST @VA04190 04050000
  4098. SPACE 1 04051000
  4099. FE DC X'FE' @VM03120 04052000
  4100. DISABLE DC X'00' DISABLE ALL CHANNELS @VA06347 04053000
  4101. INVCHAR DC X'14' RETURN CODE 20 @VA06347 04054000
  4102. IDL18 EQU 18 FILEID LENGTH = 18 BYTES @VA06347 04055000
  4103. EJECT 04056000
  4104. * 04057000
  4105. ************** 04058000
  4106. * 04059000
  4107. * SUBROUTINE TO UPDATE 'LINE' IF NECESSARY AFTER SERIALIZING. 04060000
  4108. * CALLED ONLY FROM 'FILE' (AND 'SAVE'), THUS: BAL 4,UPDLINE. 04061000
  4109. * USES R1. 04062000
  4110. * 04063000
  4111. ************** 04064000
  4112. SPACE 04065000
  4113. UPDLINE DS 0H 04066000
  4114. TM FLAG,SERSW HAVE WE BEEN SERIALIZING? 04067000
  4115. BCR 8,4 RETURN PRONTO IF NOT 04068000
  4116. TM TWITCH,TOPSW ARE WE AT THE TOP OF THE FILE? 04069000
  4117. BCR 1,4 RETURN IF SO 04070000
  4118. L 1,PTR2 A(CURRENT LINE) 04071000
  4119. MVC LINE+72(8),8+72(1) UPDATE COLS 73-80 OF 'LINE' 04072000
  4120. BR 4 RETURN 04073000
  4121. SPACE 04074000
  4122. * 04075000
  4123. ************** 04076000
  4124. * 04077000
  4125. * DATA FOR 'FILE' AND 'SAVE'... 04078000
  4126. * 04079000
  4127. ************** 04080000
  4128. SPACE 04081000
  4129. NULLMES DC C'FILE IS EMPTY' 04082000
  4130. AUTOMSG DC C'_SAVED' @V200706 04083000
  4131. SPACE 04084000
  4132. SERPRESS DC C'RESERIALIZATION SUPRESSED' 04085000
  4133. SERMS DC C'SERIALIZATION IS INCOMPLETE' 04086000
  4134. DISKMS DC C'SET NEW FILEMODE, OR ENTER CMS SUBSET AND CLEAR SOME SPACE' 04087000
  4135. EJECT 04088000
  4136. *********************************************************************** 04089000
  4137. * 04090000
  4138. * TERMINAL ERRORS ... 04091000
  4139. * 04092000
  4140. *********************************************************************** 04093000
  4141. SPACE 04094000
  4142. DS 0H 04095000
  4143. SPACE 04096000
  4144. ERR105S LR R2,R14 PUT WRBUF ERROR RETURN IN R2, @VM03083 04097000
  4145. DMSERR NUM=105,LET=S,SUB=(DEC,(2),CHAR8A,IOID),TEXT='ERROR ''.*04098000
  4146. ..'' WRITING FILE ''....................'' ON DISK', *04099000
  4147. MF=(E,'SYS') @V305614 04100000
  4148. IOERR LA R2,100 RETURN CODE = 100 @VM08823 04101000
  4149. CMS IOLIST,PROG=FINIS,ERROR=IGNORE 04102000
  4150. B EDEXIT2 GO 'FREEMAIN' IF NEEDED, THEN EXIT. JS 04103000
  4151. EJECT 04104000
  4152. *********************************************************************** 04105000
  4153. * 04106000
  4154. * 'CORFULL' AND 'CORBUST' ARE ERROR MESSAGE ROUTINES WHICH 04107000
  4155. * ARE BRANCHED TO FROM 'XWRITE' WHEN THE AVAILABLE CORE 04108000
  4156. * IS FULL. THEY ARE PUT HERE (RATHER THAN WITH 'XWRITE') 04109000
  4157. * SO THAT THEY DO NOT OCCUPY ROOM IN THE FIRST PAGE. THEY 04110000
  4158. * RETURN TO 'XWRITE'. 04111000
  4159. * 04112000
  4160. *********************************************************************** 04113000
  4161. SPACE 04114000
  4162. CORFULL DS 0H THIS WAS THE LAST LINE WE CAN FIT IN CORE 04115000
  4163. WTYPE CORFLMS WARN HIM THAT IT'S FULL 04116000
  4164. LA 15,1 ERROR CODE 1 04117000
  4165. LTR 15,15 AND SET CONDITION CODE 04118000
  4166. B XWRITEX RETURN TO 'XWRITE' 04119000
  4167. SPACE 04120000
  4168. CORBUST EQU * ATTEMPT TO WRITE AFTER CORE FULL WARNING 04121000
  4169. BAL 4,KTCLR CLEAR THE 'KT' FLAG, IF SET 04122000
  4170. BAL 4,STACKCLR CLEAR STACK @VA04190 04123000
  4171. WTYPE NOROOM TELL HIM NO ROOM @VA04190 04124000
  4172. SR 15,15 04125000
  4173. BCTR 15,0 SET ERROR CODE -VE 04126000
  4174. LTR 15,15 SET CONDITION CODE 04127000
  4175. B XWRITEX RETURN TO 'XWRITE' 04128000
  4176. SPACE 2 04129000
  4177. CORFLMS DC C'AVAILABLE STORAGE IS NOW FULL' 04130000
  4178. NOROOM DC C'NO ROOM' 04131000
  4179. EJECT 04132000
  4180. *********************************************************************** 04133000
  4181. * 04134000
  4182. * TIDY UP AND RETURN TO CALLER 04135000
  4183. * 04136000
  4184. *********************************************************************** 04137000
  4185. SPACE 04138000
  4186. EDEXIT1 DS 0H 04139000
  4187. SPACE 04140000
  4188. EDEXIT2 EQU * 04141000
  4189. SPACE 04142000
  4190. LTR 2,2 WHAT IS IT? 04143000
  4191. BZ *+8 SKIP IF ZERO 04144000
  4192. EDEXIT4 BAL 4,STACKCLR CLEAR STACKED READS 04145000
  4193. LTR R15,R2 PUT RETURN CODE IN R15 @VM08823 04146000
  4194. BNZ EXREST GET OUT @V2D3914 04147000
  4195. SPACE 1 04148000
  4196. TM FLAG2,TUBE DISPLAY TERMINAL ? @VM01040 04149000
  4197. BZ EXREST NO...BR @V2D3914 04150000
  4198. MVI SCRFLG2,CANCB CAUSE TUBE CANCEL OP @V200714 04151000
  4199. BAL R14,WRTYPEX @V2D3913 04152000
  4200. EXREST L 14,EDRET RESTORE RETURN ADDRESS @V200714 04153000
  4201. SR R4,R4 R4=0 MEANS DOSFLAGS IS OK @VM03083 04154000
  4202. TM DOSFLAGS,DOSSVC INTERNAL SVC-BIT SET ? @VM03083 04155000
  4203. BZ DOSFOK1 IF 0 WE'RE OK @VM03083 04156000
  4204. IC R4,DOSFLAGS IF NOT 0, REMEMBER DOSFLAGS, @VM03083 04157000
  4205. DMSEXS NI,DOSFLAGS,255-DOSSVC AND RESET FLAGBIT @VM03083 04158000
  4206. DOSFOK1 LM R0,R1,FREELEN GET FREE STORAGE POINTERS @VM03083 04159000
  4207. FREEMAIN R,LV=(0),A=(1) RETURN THE USER STORAGE @VM03083 04160000
  4208. LTR R4,R4 WAS DOSFLAGS OK BEFORE ? @VM03083 04161000
  4209. BZ DOSFOK2 IF YES WE'RE OK @VM03083 04162000
  4210. DMSEXS STC,R4,DOSFLAGS IF NOT, RESTORE IT AS IT WAS @VM03083 04163000
  4211. DOSFOK2 DMSKEY RESET TURN OFF USER KEY, @VM03083 04164000
  4212. DMSEXS OI,MISFLAGS,RELPAGES SET RELPAGE SW ON @VA05711 04165000
  4213. LTR R15,R2 MAKE SURE RETURN-CODE IN R15, @VM03083 04166000
  4214. BR 14 RETURN. 04167000
  4215. EJECT 04168000
  4216. *********************************************************************** 04169000
  4217. * 04170000
  4218. * RENUM SUBCOMMAND ALLOWS USER TO RENUMBER HIS VSBASIC 04171000
  4219. * PROGRAM, CORRELATING ALL LINE NUMBER REFERENCES TO 04172000
  4220. * THE NEW LINE NUMBERS PRODUCED FROM THE STRTNO AND 04173000
  4221. * INCRNO PARAMETERS. 04174000
  4222. * FREEFORT FILES ARE RENUMBERED IN COLS 1 THROUGH 8 04175000
  4223. * USING THE STRTNO AND INCRNO PARAMETERS TO CREATE 04176000
  4224. * THE NEW LINE NUMBERS. 04177000
  4225. * 04178000
  4226. *********************************************************************** 04179000
  4227. SPACE 04180000
  4228. RENUM DS 0H @V242801 04181000
  4229. LA R14,10 GET DEFAULT VALUE @V242801 04182000
  4230. ST R14,STRTNO SAVE AS STARTING NO. @V242801 04183000
  4231. ST R14,INCRNO SAVE AS INCREMENT VALUE @V242801 04184000
  4232. BAL R14,NUM GET FIRST PARAM @V242801 04185000
  4233. B INVREQ INVALID REQUEST EXIT @V242801 04186000
  4234. BM RENUM2 NONE SPECIFIED..USE DEFAULTS @V242801 04187000
  4235. BZ INVREQ ZERO NOT ALLOWED @V2D3914 04188000
  4236. ST R0,STRTNO SAVE AS STARTING NUMBER @V242801 04189000
  4237. ST R0,INCRNO AND AS INCREMENT ALSO @V242801 04190000
  4238. BAL R14,NUM CHECK INCREMENT @V242801 04191000
  4239. B INVREQ INVALID REQUEST EXIT @V242801 04192000
  4240. BM RENUM2 LOOKS LIKE NO INCREMENT @V242801 04193000
  4241. BZ INVREQ ZERO NOT ALLOWED @V2D3914 04194000
  4242. ST R0,INCRNO SAVE AS INCREMENT VALUE @V242801 04195000
  4243. BAL R14,PARMCHK NO MORE ALLOWED @V242801 04196000
  4244. RENUM2 L R14,PTR1 GET TOP OF FILE @V242801 04197000
  4245. ST R14,AINCORE SAVE AS INCORE ADDRESS @V242801 04198000
  4246. L R14,ITEM GET RECORD LENGTH @V242801 04199000
  4247. ST R14,FSIZE SAVE AS ITEM LENGTH @V242801 04200000
  4248. MVC RPLIST(12),FTYPE SET UP RENUM FILEID @V242801 04201000
  4249. LA R1,RPLIST-8 GET RENUM PLIST @V242801 04202000
  4250. SVC 202 CALL RENUM @V242801 04203000
  4251. DC AL4(RENUME) ERROR RETURN @V242801 04204000
  4252. B REFRESH @V2D3913 04205000
  4253. EJECT 04206000
  4254. RENUME CH R15,=H'-3' IS IT NOT FOUND ERROR ? @V242801 04207000
  4255. BNE RENUM4 NO, CHECK FOR I/O ERROR @V242801 04208000
  4256. WTYPE NORNE,,RETURN=NEXT @V242801 04209000
  4257. RENUM4 CH R15,=H'100' IS IT I/O ERROR ? @V242801 04210000
  4258. BE EDEXIT2 YES, FREEMAIN AND GET OUT @V242801 04211000
  4259. CH R15,=H'13' IS IT DISK FULL ? @V242801 04212000
  4260. BE DISKFUL1 YES, GO TYPE MSG @V242801 04213000
  4261. LM R0,R1,0(R15) GET MSG LEN AND ADDR @V242801 04214000
  4262. LA R14,NEXT GET RETURN ADDRESS @V242801 04215000
  4263. B WRTYPE GO TYPE MSG @V242801 04216000
  4264. NORNE DC C'RENUM MODULE NOT FOUND' @V242801 04217000
  4265. EJECT 04218000
  4266. ******************************************************** 04219000
  4267. * 04220000
  4268. * SCROLL SUBCOMMAND ALLOWS USER TO MOVE THE CURRENT 04221000
  4269. * LINE POINTER IN EITHER DIRECTION BY ENOUGH TO FILL A 04222000
  4270. * NEW DISPLAY PAGE. 04223000
  4271. * 04224000
  4272. ****************************************************** 04225000
  4273. SPACE 1 04226000
  4274. SCROLL EQU * @V200714 04227000
  4275. TM FLAG2,TUBE IN DISPLAY MODE ? @V2D3914 04228000
  4276. BNO INVREQ IF NOT, AN INVALID COMMAND @V2D3914 04229000
  4277. MVI SCRFLGS,WRTOPB WRITE FULL SCREEN @V2D3914 04230000
  4278. LA R5,10 GUESS NUMBER OF LINES @V2D3913 04231000
  4279. LA R3,80 DO WE NEED MORE THAN ONE @V200714 04232000
  4280. CH R3,VERLEN DISPLAY LINE PER RECORD @V2D3914 04233000
  4281. BNL SNGL NO..BR @V200714 04234000
  4282. SR R5,R5 REDUCE THE COUNT OF LINES @V2D3913 04235000
  4283. SNGL LA R5,10(,R5) ADD 10 TO THE LINE COUNT @V2D3913 04236000
  4284. BAL R14,NUM DID WE GET A NUMBER ? @V200714 04237000
  4285. BAL R14,STARCHK LOOK FOR ASTERISK @V2D3913 04238000
  4286. LTR R3,R0 SAVE NUMBER SPECIFIED @V200714 04239000
  4287. BZ NEXT IF ZERO..DO NOTHING @V200714 04240000
  4288. BAL R14,PARMCHK NO MORE ARGS ALLOWED @V200714 04241000
  4289. BAL R14,EORCHK CHECK THE RANGE @V2D3913 04242000
  4290. B ENDRANGE OBVIOUSLY DONE, IN THIS CASE. @V2D3913 04243000
  4291. B FWD1 DONT CAUSE MORE STATUS ON 1ST SCR@V200714 04244000
  4292. SCRFWD EQU * LOOP FOR FORWARD SCROLL @V200714 04245000
  4293. MVI SCRFLG2,MOREB CAUSE MORE STATUS @V2D3913 04246000
  4294. FWD1 LR R4,R5 REFRESH THE COUNT @V2D3913 04247000
  4295. FLOOP BAL R14,XNEXT LOCATE THE LINE @V2D3913 04248000
  4296. TM TWITCH,EOF+TOPSW IS IT ENDRANGE? @V2D3913 04249000
  4297. BNZ ENDRG IF SO, WHY BOTHER. @V2D3914 04250000
  4298. BCT R4,FLOOP ENOUGH TO REFILL BUFFER @V200714 04251000
  4299. ENDRG BAL R14,WRTYPEX REWRITE DISPLAY @V2D3913 04252000
  4300. NOWRT TM TWITCH,EOF+TOPSW ENDRANGE? @V2D3913 04253000
  4301. BNZ NEXT ALL DONE. @V2D3913 04254000
  4302. BCT R3,SCRFWD DO IT N TIMES @V200714 04255000
  4303. B NEXT @V200714 04256000
  4304. EJECT 04257000
  4305. *********************************************************************** 04258000
  4306. * 04259000
  4307. * EQUS. 04260000
  4308. * 04261000
  4309. *********************************************************************** 04262000
  4310. SPACE 04263000
  4311. TAB EQU X'05' TAB CHARACTER 04264000
  4312. BACKSPAC EQU X'16' BACKSPACE 04265000
  4313. SPACE 04266000
  4314. * BITS FOR FLAG ... 04267000
  4315. * (DON'T ALTER THESE WITHOUT TELLING EDFILES ABOUT IT) 04268000
  4316. SPACE 04269000
  4317. CAN EQU X'01' CANONICALIZATION IS REQUIRED 04270000
  4318. IMNOT EQU X'02' LINE IMAGE (OR CANONLZTN) SUPPRESSED 04271000
  4319. SERSW EQU X'04' SERIALIZATION IS REQUIRED 04272000
  4320. SERNAME EQU X'08' SERIALIZATION IS TO BE WITH 3-CHAR NAME 04273000
  4321. LINE8 EQU X'10' LINENUMBERS ARE 8 DIGITS LONG @V1D1613 04274000
  4322. ZEROPAD EQU X'20' LINENUMBERS ARE ZERO-FILLED @V1D1613 04275000
  4323. LEFT EQU X'40' LINEMODE LEFT IF ON 04276000
  4324. RIGHT EQU X'80' LINEMODE RIGHT IF ON 04277000
  4325. SPACE 1 04278000
  4326. * BITS FOR FLAG2... 04279000
  4327. VER EQU X'01' VERIFY IS SET @V1D1613 04280000
  4328. LONGSW EQU X'02' LONG IS SET @V1D1613 04281000
  4329. TUBE EQU X'04' CONSOLE IS DISPLAY TYPE @V200714 04282000
  4330. NUFILE EQU X'08' NEW FILE @V200714 04283000
  4331. INMODE EQU X'10' INPUT MODE IN EFFECT @V200714 04284000
  4332. REMOTE EQU X'20' REMOTE DISPLAY TERMINAL @V2D3914 04285000
  4333. SWITCH EQU X'40' INPUT REMINDER TO RESET MODE @V2D3914 04286000
  4334. NODISP EQU X'80' NODISPLAY OPTION IN EFFECT @V2D3914 04287000
  4335. SPACE 1 04288000
  4336. * BITS FOR TWITCH... 04289000
  4337. SPACE 04290000
  4338. TOPSW EQU X'01' WE ARE AT TOP OF FILE 04291000
  4339. EOF EQU X'02' EOF CONDITION IS RAISED 04292000
  4340. NULL EQU X'04' FILE IS EMPTY V0263 04293000
  4341. UPWARD EQU X'08' @V2D3913 04294000
  4342. VEROVER EQU X'10' @V2D3913 04295000
  4343. TRUNC EQU X'20' TRUNCATION HAS OCCURRED 04296000
  4344. SAVOVER EQU X'40' OVERRIDE AUTOSAVE @V2D3914 04297000
  4345. * EQU X'80' 04298000
  4346. SPACE 04299000
  4347. * BITS FOR SCRFLGS ... 04300000
  4348. SPACE 1 04301000
  4349. WRCLUPB EQU X'02' WRITE FROM CL UP @V2D3913 04302000
  4350. WRMSGB EQU X'10' WRITE DISPLAY MESSAGE AREA @V2D3913 04303000
  4351. WRCLDNB EQU X'20' WRITE FROM CL DOWN @V200714 04304000
  4352. WRCLB EQU X'40' WRITE CL ONLY @V200714 04305000
  4353. WRSTATB EQU X'80' WRITE STATUS AREA @V2D3913 04306000
  4354. WRFULLB EQU WRCLDNB+WRCLUPB WRITE ALL TEXT @V2D3913 04307000
  4355. WRTOPB EQU WRSTATB+WRFULLB WRITE COMPLETE DISPLAY @V2D3913 04308000
  4356. SPACE 1 04309000
  4357. * BITS FOR SCRFLG2 ... 04310000
  4358. SPACE 1 04311000
  4359. MOREB EQU X'80' CAUSE MORE STATUS @V200714 04312000
  4360. CANCB EQU X'40' CAUSE CANCEL OP @V200714 04313000
  4361. WRCLINB EQU X'08' WRITE CL INTO INPUT AREA @V2D3913 04314000
  4362. CMDINB EQU X'04' WRITE LAST COMMAND TO INPUT AREA @V2D3913 04315000
  4363. SPACE 1 04316000
  4364. * BITS FOR SIGNAL ... 04317000
  4365. SPACE 04318000
  4366. GETCAT EQU X'01' TELLS GET TO CONCATENATE TOKS UNTIL BLANK 04319000
  4367. HEXSW EQU X'02' TELLS GET TO LOOK FOR HEXADECIMAL TOKEN 04320000
  4368. QUOD EQU X'04' LAST REQUEST WAS ? OR " 04321000
  4369. REPL EQU X'08' TRICKY REPLACE MODE (1ST LINE AFTER 'R') 04322000
  4370. OVER EQU X'10' REQUEST IS 'OVERLAY' 04323000
  4371. SVFL EQU X'20' REQUEST IS 'SAVE' 04324000
  4372. AUTOFLAG EQU X'40' AUTO. SAVE ACTIVE @V200706 04325000
  4373. AUTOSVFL EQU X'80' AUTO. SAVE BEING EXECUTED @V200706 04326000
  4374. SPACE 04327000
  4375. * BITS FOR GETFLAG ... 04328000
  4376. SPACE 04329000
  4377. ALPHA EQU X'01' TOKEN IS ALPHABETIC 04330000
  4378. NONALNUM EQU X'02' TOKEN IS NON-ALPHANUMERIC 04331000
  4379. SPACE 04332000
  4380. * BITS FOR CHNGFLAG ... 04333000
  4381. SPACE 04334000
  4382. NULLSW1 EQU X'01' STRING1 IS NULL 04335000
  4383. NULLSW2 EQU X'02' STRING2 IS NULL 04336000
  4384. DTYPE EQU X'04' DISPLAY TYPE CHANGE BIT @VA03027 04337000
  4385. GLOBSW EQU X'08' GLOBAL OPTION IS GIVEN 04338000
  4386. * EQU X'10' 04339000
  4387. CHNGSW EQU X'20' LINE HAS BEEN CHANGED 04340000
  4388. FLDFND EQU X'40' MATCHING FIELD HAS BEEN FOUND 04341000
  4389. * EQU X'80' 04342000
  4390. SPACE 04343000
  4391. * BITS FOR XYFLAG 04344000
  4392. SPACE 04345000
  4393. XACT EQU X'01' 'X' IS ACTIVE 04346000
  4394. YACT EQU X'02' 'Y' IS ACTIVE 04347000
  4395. SPACE 04347100
  4396. * BITS FOR UTILFLAG ... 04347200
  4397. SPACE 04347300
  4398. CLGT80B EQU X'01' LENGTH > 80 BYTES @VA08152 04347400
  4399. MSG EQU X'02' MESSAGE IN BUFFER @VA08152 04347500
  4400. TWOLINES EQU X'04' LENGTH > 80 BYTES @VA08152 04347600
  4401. LINSEQ EQU X'08' NO SPACE FOR LINEMODE INPUT @VA08152 04347700
  4402. SPACE 2 04348000
  4403. * MASKS FOR CLM INSTRUCTION 04349000
  4404. BIN1000 EQU B'1000' @V305066 04350000
  4405. BIN1100 EQU B'1100' @V305066 04351000
  4406. BIN0001 EQU B'0001' MASK FOR BYTE 3 @VA06347 04352000
  4407. BIN0100 EQU B'0100' @VA09296 04352100
  4408. SPACE 04353000
  4409. EDCB @V305614 04354000
  4410. EJECT 04355000
  4411. NUCON @V200714 04356000
  4412. DEVTAB , @V305014 04357000
  4413. REGEQU @V200714 04358000
  4414. DMSEDI CSECT @V200714 04359000
  4415. EJECT 04360000
  4416. * 04361000
  4417. LTORG 04362000
  4418. SPACE 2 04363000
  4419. END 04364000
ibm/vm370-lib/cms/dmsedi.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator