Table of Contents

DMSEXT Source

References

Source Listing

DMSEXT.ASSEMBLE.txt
  1. EXT TITLE 'DMSEXT (CMS) VM/370 - RELEASE 6' 00001000
  2. * 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMSEXT (EXECTOR) 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * PERFORM PROCESSING ASSOCIATED WITH 'EXEC' COMMAND. 00009000
  10. * 00010000
  11. * ATTRIBUTES - 00011000
  12. * 00012000
  13. * REENTRANT, SEGMENT RESIDENT 00013000
  14. * 00014000
  15. * ENTRY POINTS - 00015000
  16. * 00016000
  17. * DMSEXT 00017000
  18. * 00018000
  19. * ENTRY CONDITIONS - 00019000
  20. * 00020000
  21. * AT ENTRY, R1 POINTS TO THE 'EXEC' PLIST: 00021000
  22. * 00022000
  23. * DC CL8'EXEC' 00023000
  24. * DC CL8'FILE-NAME' 00024000
  25. * DC CL8'OPTION1', ... 00025000
  26. * DC XL8'FF' 00026000
  27. * 00027000
  28. * EXIT CONDITIONS - 00028000
  29. * 00029000
  30. * NORMAL - 00030000
  31. * REG 15 CONTAINS THE RETURN CODE OF 0. 00031000
  32. * 00032000
  33. * ERROR - 00033000
  34. * RC = 28: FILE NOT FOUND 00034000
  35. * RC = 32: ERROR ENCOUNTERED IN PROCESSING EXEC COMMANDS: 00035000
  36. * FILE NOT FIXED FORMAT 00036000
  37. * 801-FILE NOT FOUND 00036500
  38. * 802-&SKIP OR &GOTO ERROR 00037000
  39. * 803-BAD FILE FORMAT-NOT IN EXEC GUIDE 00038000
  40. * 804-TOO MANY ARGUMENTS 00039000
  41. * 805-MAX DEPTH OF LOOP NESTING EXCEEDED 00040000
  42. * 806-RDBUF OR WAITRD ERROR DISK OR TERM ERROR 00041000
  43. * 807-INVALID SYNTAX 00042000
  44. * 808-INVALID FORM OF CONDITION 00043000
  45. * 809-INVALID ASSIGNMENT 00044000
  46. * 810-MISUSE OF SPECIAL VARIABLE 00045000
  47. * 811-ERROR IN &ERROR ACTION 00046000
  48. * 812-CONVERSION ERROR 00047000
  49. * 813-TOO MANY TOKENS IN STATEMENT 00048000
  50. * 814-MISUSE OF BUILT-IN FUNCTION 00049000
  51. * 815-EOF FOUND IN LOOP 00050000
  52. * 816-INVALID CONTROL WORD 00051000
  53. * 817-EXEC ARITHMETIC UNDERFLOW NEW VM02322 00052000
  54. * 818-EXEC ARITHMETIC OVERFLOW NEW VM02322 00053000
  55. * 819-INVALID CHARACTER IN VARIABLE SYMBOL 00053500
  56. * 00054000
  57. * 00055000
  58. * CALLS TO OTHER ROUTINES - 00056000
  59. * 00057000
  60. * DMSINM -- TO DETERMINE THE TIME OF DAY 00058000
  61. * 00059000
  62. * DMSBRD -- TO READ FROM THE EXEC FILE 00060000
  63. * 00061000
  64. * DMSFNS -- TO CLOSE THE EXEC FILE 00062000
  65. * 00063000
  66. * DMSCWR -- TO TYPE A LINE ON THE TERMINAL 00064000
  67. * 00065000
  68. * DMSCRD -- TO READ A LINE FROM THE TERMINAL 00066000
  69. * 00067000
  70. * DMSCAT -- TO HANDLE THE &STACK FUNCTION 00068000
  71. * 00069000
  72. * DMSSTT -- TO DETERMINE THE EXISTENCE OF THE EXEC FILE 00070000
  73. * 00071000
  74. * DMSPNT -- TO OPEN THE EXEC FILE 00072000
  75. * 00073000
  76. * DMSCWT -- TO WAIT FOR TERMINAL OUTPUT TO COMPLETE. 00074000
  77. * 00075000
  78. * DMSCIO -- TO PUNCH A CARD 00076000
  79. * 00077000
  80. * EXTERNAL REFERENCES - 00078000
  81. * 00079000
  82. * NONE 00080000
  83. * 00081000
  84. * TABLES / WORKAREAS - 00082000
  85. * 00083000
  86. * CONTAINS A DSECT, CALLED 'FREEST', WHICH IS DESCRIBED IN 00084000
  87. * NOT BY A MACRO. SPACE FOR THE WORKAREA DESCRIBED BY THI 00085000
  88. * DSECT IS ALLOCATED BY A CALL TO DMSFREE. 00086000
  89. * 00087000
  90. * REGISTER USAGE - 00088000
  91. * 00089000
  92. * R2 = PLIST POINTER 00090000
  93. * R7 = INTERNAL LINK REGISTER 00091000
  94. * R10 = INTERNAL LINK REGISTER 00092000
  95. * R11 AND R12 = BASE REGISTERS 00093000
  96. * R13 -> TO FREEST WORK AREA 00094000
  97. * 00095000
  98. * NOTES - 00096000
  99. * 00097000
  100. * NONE 00098000
  101. * 00099000
  102. * OPERATION - 00100000
  103. * 00101000
  104. * EXECUTABLE STATEMENTS ARE INTERPRETED, ONE AT A TIME, AC 00102000
  105. * ING TO THE FOLLOWING STEPS. 00103000
  106. * 00104000
  107. * EXCEPT FOR THOSE COMMANDS THAT TAKE A 'LINE' (AN 00105000
  108. * ARBITRARY, UNSUBSTITUTED, COLLECTION OF WORDS) AS 00106000
  109. * ARGUMENT, THE WORDS FORMING A STATEMENT ARE 00107000
  110. * 'TOKENIZED'. THAT IS, EACH WORD IS TREATED AS AN 00108000
  111. * EIGHT-BYTE QUANTITY AND IS PADDED WITH BLANKS OR 00109000
  112. * TRUNCATED, AS NECESSARY. 00110000
  113. * 00111000
  114. * THE TOKENS ARE SEARCHED FOR THE NAMES OF ANY EXEC 00112000
  115. * VARIABLE, WHICH ARE REPLACED BY THEIR VALUES. THE 00113000
  116. * IS AN EXCEPTION IF THE TOKEN IS THE TARGET OF AN 00114000
  117. * ASSIGNMENT: IN THIS CASE THE NAME OF THE VARIABLE 00115000
  118. * IS RETAINED. 00116000
  119. * 00117000
  120. * IF AT THIS POINT THE TOKEN IS ENTIRELY BLANK, IT I 00118000
  121. * DISCARDED FROM THE STATEMENT, SO THAT THE NEXT TOK 00119000
  122. * IS DEEMED IMMEDIATELY TO FOLLOW THE PREVIOUS ONE. 00120000
  123. * 00121000
  124. * THE STATEMENT IS ANALYZED SYNTACTICALLY, AND EXECU 00122000
  125. * ACCORDING TO THE FOLLOWING RULES: 00123000
  126. * 00124000
  127. * NULL STATEMENT -- NOTHING TO DO 00125000
  128. * 00126000
  129. * CMS COMMANDS -- IT IS EXECUTED BY PASSING IT AS A PLIST 00127000
  130. * CMS BY EXECUTING SVC 202. 00128000
  131. * The address of the command's parameter list is HRC309DS 00128050
  132. * passed in R1. The high order byte of R1 is HRC309DS 00128100
  133. * set to one of the following values: HRC309DS 00128150
  134. * x'0D' &CONTROL CMS or &CONTROL ALL is in HRC309DS 00128200
  135. * effect. (No change from VM/370 R6.) HRC309DS 00128250
  136. * x'01' &CONTROL OFF is in effect. (This is as HRC309DS 00128300
  137. * a call from EXEC 2 or REXX.) HRC309DS 00128350
  138. * The CMS commands ERASE (DMSERS) LISTFILE HRC309DS 00128400
  139. * (DMSLST), RENAME (DMSRNM) and STATE (DMSSTT) HRC309DS 00128450
  140. * control what messages they emit based on the HRC309DS 00128500
  141. * setting of this flag byte. HRC309DS 00128550
  142. * HRC309DS 00128600
  143. * The address of the command's extended paramter HRC309DS 00128650
  144. * list (the untranslated, untokenized command HRC309DS 00128700
  145. * string) is passed in R0. HRC309DS 00128750
  146. * 00129000
  147. * ASSIGNMENT STATEMENTS -- THE EXPRESSION IS COMPUTED, AND 00130000
  148. * VALUE IS ASSIGNED TO THE SPECIFIED VARIABLE. 00131000
  149. * 00132000
  150. * CONTROL STATEMENTS (&GOTO, &EXIT, &IF) -- THE APPROPRIAT 00133000
  151. * FUNCTION IS EXECUTED. 00134000
  152. * 00135000
  153. * COMMENT STATEMENTS (WHICH BEGIN WITH AN ASTERISK) -- NOT 00136000
  154. * TO DO. 00137000
  155. * 00138000
  156. EJECT 00139000
  157. * DMSEXT IS NOW REENTRANT WITH THE INCLUSION OF AN UPDATED 00140000
  158. * NUCLEUS WHICH INCLUDES A COMMON SVC 202. 00141000
  159. *. 00142000
  160. EJECT 00143000
  161. PUNCH 'SPB' @VM03178 00144000
  162. DMSEXT START 0 P0816 00145000
  163. EXECTOR EQU * 00146000
  164. LR BASE,R15 00147000
  165. USING EXECTOR,BASE,BASE1 00148000
  166. USING FREEST,BFREE 00149000
  167. USING NUCON,R0 00150000
  168. B STRTCODE LET PUT IN AN IDENTIFIER @VA05520 00151000
  169. DC C'DMSEXT30' EYECATCHER IN CORE DUMPS @VA05520 00152000
  170. STRTCODE EQU * @VA05520 00153000
  171. LA BASE1,4095(,BASE) 00154000
  172. LA BASE1,1(,BASE1) 00155000
  173. SPACE 2 00156000
  174. LR PTR,R1 P LIST PTR IN 2 00157000
  175. LR R3,R14 RETURN IN FREE STORAGE 00158000
  176. USING OPSECT,R9 @V305614 00159000
  177. L R9,AOPSECT POINT TO OPSECT IN NUCLEUS @V305614 00160000
  178. L R1,EXADD+4 GLOBAL ADR IF NESTED EXEC @V305614 00161000
  179. LA R6,ONE IF EXEC RECURSION @V305666 00162000
  180. L R4,EXLEVEL LEVEL IS GREATER @V305614 00163000
  181. CR R6,R4 THAN 1 DON'T DISTURB @V305614 00164000
  182. BL SKGLBL GLOBALS @V305614 00165000
  183. SPACE 1 00166000
  184. LA R0,SEVDWS GET 7 DOUBLEWORDS @V305666 00167000
  185. DMSFREE DWORDS=(0),TYPCALL=BALR OF FREE STORAGE @VM03083 00168000
  186. * FOR GLOBALS 00169000
  187. SPACE 1 00170000
  188. USING XGLBL,R1 @V305614 00171000
  189. MVC GLOBAL(55),INITFREE INITIALIZE GLOBALS @V305614 00172000
  190. ST R1,EXADD+4 SAVE GLOBAL STORAGE ADDRESS @V305614 00173000
  191. SPACE 1 00174000
  192. SKGLBL AP GLOBAL(5),DECONE(1) INCREASE RECURSION LEVEL @V305614 00175000
  193. DROP R1,R9 @V304514 00176000
  194. LA R0,NEED NO. OF DOUBLE WORDS FOR FREE 00177000
  195. DMSFREE DWORDS=(0),TYPCALL=BALR ... @VM03083 00178000
  196. SSM ON ENABLE FOR INTERRUPTS @VA04297 00179000
  197. LR BFREE,R1 BASE FOR FREEST AREA 00180000
  198. SR R9,R9 CLEAR FREE STORAGE @V305614 00181000
  199. LR R6,R1 OBTAINED THROUGH @V305614 00182000
  200. LA R7,8*NEED MVCL @V305614 00183000
  201. MVCL R6,R8 ..... @V305614 00184000
  202. SPACE 1 00185000
  203. MVC TIMBUF(FOUR8),FREECON INITIALIZE SOME OF IT @VA06278 00186000
  204. MVC STACKLST(12),ATTNFIFO MIGHT AS WELL @V305614 00187000
  205. MVC CARDPCH(8),CARDPH INITIALIZE THESE NOW @V305614 00188000
  206. MVC POINT(8),POINTC ...... @V305614 00189000
  207. LA R6,ONE INITIALIZE POINT @V305666 00190000
  208. STH R6,PPTR READ POINTER @V305614 00191000
  209. LA R7,4095(,BASE1) NOW SAVE THE ADDRESS OF @VM03209 00192000
  210. LA R7,1(,R7) ..... @VM03209 00193000
  211. ST R7,ASUBSTIT THE SUBSTITUTE RTN IN FREEST @VM03209 00194000
  212. USING SUBSTIT,R7 HRC309DS 00194100
  213. LA R7,EPLBUILD get address of EPLIST code HRC309DS 00194200
  214. DROP R7 HRC309DS 00194300
  215. ST R7,AEPLBLD save its address HRC309DS 00194400
  216. SPACE 1 00195000
  217. STM R3,R5,SAVRET SAVE RETURN,SYSREF & R5 @V305614 00196000
  218. LR R7,PTR PARM LIST POINTER INTO R7 00197000
  219. MVI TFLAG,TYPCMS+TYPPAC SET TYPEOUT TO CMS, PACK 00198000
  220. MVC TYPINPUT(16),ABCD SET UP WAITRD PLIST 00199000
  221. ZAP LINENUM(4),DECZERO(1) INITIALISE LINE NO TO 0 00200000
  222. MVC CMSTIME(8),=CL8'CMSTIME ' SET UP CMSTIME PLIST 00201000
  223. MVC TYPLIN(8),TYPLIST SET UP TYPLIN PLIST 00202000
  224. MVC DSKLIN(40),SETDSK SET UP RDBUF PLIST 00203000
  225. MVC FNAME(8),8(PTR) PUT FILE NAME IN DSK PLIST 00204000
  226. MVC ARGTABLE(8),8(PTR) AND INTO &0 00205000
  227. MVC EXEC(8),8(PTR) 00206000
  228. MVI HEXSW,HEX00 HEX CNVRT OFF INITIALLY @VA04294 00207000
  229. SPACE 2 00208000
  230. MVC PBUFF,=4C'*' TELL 'STATE' NO '*'S... @VM08647 00209000
  231. LA R1,DSKLIN ... 00210000
  232. LR R5,R14 SAVE RETURN ADDRESS @VM03209 00211000
  233. L R15,ASTATE GET DMSSTT ADDRESS @VM03093 00212000
  234. BALR R14,R15 AND SEE IF FILE EXISTS @VM03093 00213000
  235. STATCKLR LR R14,R5 RESTORE RETURN REGISTER @VM03209 00214000
  236. LTR R15,R15 CHECK RC FROM 'STATE' @V305614 00215000
  237. BZ FOUND NO PROBLEM @VM08647 00216000
  238. CH R15,=H'28' @VM08647 00217000
  239. BE NOFILE FILE NOT FOUND @VM08647 00218000
  240. LR R7,R15 OTHERWISE, SOME OTHER PROBLE@VM08647 00219000
  241. B CLOSE2 EXIT WITH 'STATE' RC... @VM08647 00220000
  242. FOUND EQU * SUCH A FILE, ALREADY @VM08647 00221000
  243. L R5,FSTLOC GET PTR TO FILE STATUS TABLE 00222000
  244. MVC PFLAG,FFORM(R5) SAVE FORMAT IN PLIST @V305604 00223000
  245. CLC FSIZE(2,R5),=H'130' IS LENGTH > 130 ? @V305604 00224000
  246. BH BADSIZ YES, DON'T ALLOW IT @V305604 00225000
  247. MVC PREVEXEC(8),LASTEXEC 00226000
  248. MVC LASTEXEC(8),8(PTR) 00227000
  249. MVC PMODE(2),FMODE(R5) ALSO SAVE FILEMODE 00228000
  250. LA R3,UNSCND ADDRESS OF INPUT BUFFER 00229000
  251. ST R3,PBUFF SET BUFF ADDRESS FOR DISK CALL 00230000
  252. SPACE 2 00231000
  253. LR R5,R3 00232000
  254. O R5,TYRD2 SET CONSOLE AND ADDRESS FOR WAITRD 00233000
  255. ST R5,TYRD2 00234000
  256. ZAP RETCODE(5),DECZERO(1) @VA03453 00235000
  257. LA PTR,16(,PTR) POINT TO ARGS 00236000
  258. LA R14,ALLIN 00237000
  259. SPACE 1 00238000
  260. SETARGS EQU * 00239000
  261. MVI ARGTABLE+8,C' ' BLANK OUT ARGS 00240000
  262. MVC ARGTABLE+9(ARGSIZE-9),ARGTABLE+8 00241000
  263. LA R5,ARGTABLE+8 00242000
  264. LA R6,8 00243000
  265. ZAP INDEX(4),DECZERO(1) SET NO. OF ARGS = 0 00244000
  266. LA R7,ARGEND 00245000
  267. TBLSET CLI 0(PTR),X'FF' END OF PLIST? 00246000
  268. BCR 8,R14 00247000
  269. CR R5,R7 00248000
  270. BH ERRARGS BRANCH IF TOO MANY ARGUMENTS 00249000
  271. AP INDEX(4),DECONE(1) 00250000
  272. CLC 0(2,PTR),=CL2'% ' IS IT THE IGNORE ARG? P0816 00251000
  273. BE *+10 00252000
  274. MVC 0(8,R5),0(PTR) MOVE IN ARGUMENT 00253000
  275. AR R5,R6 00254000
  276. AR PTR,R6 00255000
  277. B TBLSET 00256000
  278. SPACE 1 00257000
  279. ALLIN L R8,ASCANO 00258000
  280. ST R8,SCNPTR 00259000
  281. MVC PITEM(2),=H'1' SET TO KEEP COUNT OF ITEM NO. 00260000
  282. SPACE 00261000
  283. BAL RET,TIMSETA DO THE INITIAL RESET OF CPU TIMES 00262000
  284. EJECT 00263000
  285. LOOP EQU * MAIN LOOP FOR NEXT LINE OF FILE 00264000
  286. TM STCKFLAG,HEXF0 WITHIN '&BEG..' SECTION ? @VM03208 00265000
  287. BNZ LINEREAD BRANCH IF SO (DON'T TEST FOR LOOP END) 00266000
  288. TM VSAMFLG1,VIPINIT OS VSAM PROGRAM FINISH? @V305106 00267000
  289. BZ GETITEM IF NOT, CONTINUE TO READ @V305106 00268000
  290. TM SUBFLAG,X'01' TEST FOR SUBSET @VA08831 00268100
  291. BO GETITEM YES THEN DON'T FREE VSAM @VA08831 00268200
  292. LA R1,GETITEM IF SO, FIRST IGNORE ERRS @V305106 00269000
  293. ST R1,ERR$202 FOR THIS SVC CALL... @V305106 00270000
  294. LA R1,VSRLIST GET READY TO CALL DMSVSR @V305106 00271000
  295. LR R8,R14 SAVE R14 CONTENTS @V305106 00272000
  296. BAL R14,SVC$202 CALL TO CLEANUP VSAM @V305106 00273000
  297. LR R14,R8 RESTORE R14 CONTENTS @V305106 00274000
  298. GETITEM EQU * @V305106 00275000
  299. LH R8,PITEM FILE ITEM NO. TO BE READ 00276000
  300. LTR R8,R8 TEST IT 00277000
  301. BNH SKPERR BRANCH IF -VE (ERROR) 00278000
  302. NI ERACT,X'0F' TURN OFF ERROR ACTION FLAG 00279000
  303. L R9,READCNT WILL WE BE READING FROM CONSOLE? 00280000
  304. LTR R9,R9 00281000
  305. BH LINEREAD BRANCH IF SO (DON'T LOOK FOR LOOP END) 00282000
  306. CLC GOSTOP(2),ZERO ARE WE LOOKING FOR A LABEL FOR &GOTO? 00283000
  307. BNE LINEREAD BRANCH IF SO 00284000
  308. TM CONTFLAG,X'F0' ARE WE SCANNING THE RANGE OF A LOOP? 00285000
  309. BNZ LINEREAD BRANCH IF SO 00286000
  310. LH R6,LOPLEVEL GET LOOP LEVEL 00287000
  311. LTR R6,R6 TEST IT 00288000
  312. BZ LINEREAD BRANCH IF ZERO (NOT IN A LOOP) 00289000
  313. BCTR R6,0 FIDDLE IT FOR DUMMY BASE 00290000
  314. SLA R6,1 00291000
  315. CH R8,SCOPEBEG(R6) COMPARE THIS ITEM NO. WITH... 00292000
  316. BL DESTROY TOP OF LOOP RANGE, AND BRANCH IF ABOVE 00293000
  317. CH R8,SCOPEND(R6) SIMILARLY COMPARE IT WITH BOTTOM OF... 00294000
  318. BH DESTROY LOOP RANGE, AND BRANCH IF BELOW 00295000
  319. BL LINEREAD GO READ LINE IF SAFELY INSIDE LOOP 00296000
  320. LR R8,R6 LOOP BASE INTO R8 00297000
  321. SLA R8,1 SHIFT FOR FULLWORD ENTRY 00298000
  322. L R7,LOOPCNT(R8) NO. OF TIMES WE HAVE TO LOOP 00299000
  323. LTR R7,R7 TEST IT 00300000
  324. BL CONDCHK BRANCH IF -VE (SIGNALS END BY CONDITION) 00301000
  325. SH R7,=H'1' SUBTRACT ONE 00302000
  326. BL DESTROY BRANCH IF WE'VE FINISHED 00303000
  327. ST R7,LOOPCNT(R8) SAVE THE NO. STILL LEFT TO DO 00304000
  328. B ITERATE AND TURN, TURN, TURN... 00305000
  329. CONDCHK EQU * TEST CONDITION 00306000
  330. LR R8,R6 00307000
  331. MH R8,=H'14' FIDDLE BASE FOR LOOP CONDITION 00308000
  332. LA R7,LOOPCOND(R8) ITS ADDDRESS 00309000
  333. BAL RET,SETUP SET VALUES OF READFLAG AND TYPEFLAG 00310000
  334. BAL RET,CHKALL TEST THE CONDITION 00311000
  335. BNZ ITERATE BRANCH IF NOT SATISFIED ('LOOP UNTIL...') 00312000
  336. DESTROY EQU * DESTROY THE LOOP 00313000
  337. SRA R6,1 UNFIDDLE R6 00314000
  338. STH R6,LOPLEVEL SAVE AS NEW LOOP LEVEL 00315000
  339. B LOOP AND BACK FOR ANY OTHERS WE OUGHT TO CLOSE 00316000
  340. ITERATE EQU * TURN, TURN, TURN... 00317000
  341. LH R7,SCOPEBEG(R6) ITEM NO. FOR TOP OF LOOP 00318000
  342. STH R7,PITEM SET IT AS NEXT LINE TO READ 00319000
  343. EJECT 00320000
  344. LINEREAD MVI FLAG1,HEX00 RESET MISCELLANEOUS FLAGS @VM03209 00321000
  345. L R7,READCNT TEST READOUT @VM03209 00322000
  346. LTR R7,R7 IS IT ZERO? 00323000
  347. BNP LINREAD Y, READ FROM DISK 00324000
  348. MVI CONRDFLG,X'FF' SET CONSOLE READ FLAG 00325000
  349. BCTR R7,0 N, DECR READCNT BY 1 00326000
  350. ST R7,READCNT 00327000
  351. LA R1,RDERR 00328000
  352. ST R1,ERR$202 FILL ERROR RETURN FOR SVC @V305614 00329000
  353. LA R1,TYPINPUT N, GET PLIST FOR TYPE READ 00330000
  354. LR R5,R14 SAVE RETURN REGISTER @VM03209 00331000
  355. BAL R14,SVC$202 READ @V305614 00332000
  356. LR R14,R5 RESTORE RETURN REGISTER @VM03209 00333000
  357. LH R0,TYPINPUT+14 NO. OF CHARS READ 00334000
  358. B LENLIN 00335000
  359. LINREAD EQU * 00336000
  360. MVI CONRDFLG,X'00' CLEAR CONSOLE READ FLAG 00337000
  361. LA R1,DSKLIN READ ANOTHER CARD 00338000
  362. LR R5,R14 SAVE RETURN REGISTER @VM03209 00339000
  363. SSM OFF DISABLE FOR INTERRUPTS @VA05743 00340000
  364. L R15,ARDBUF GET DMSBRD ADDRESS @VM03093 00341000
  365. BALR R14,R15 AND GO READ @VM03093 00342000
  366. SSM ON ENABLE FOR INTERRUPTS @VA05743 00343000
  367. BNZ CHK12 BRANCH IF ERROR @VM03093 00344000
  368. LR R14,R5 RESTORE RETURN REGISTER @VM03209 00345000
  369. LH R7,PITEM UPDATE ITEM NOS. 00346000
  370. LA R7,1(,R7) 00347000
  371. STH R7,PITEM 00348000
  372. L R0,PNREAD NO. OF CHARS READ 00349000
  373. STH R0,FILWIDTH SAVE FOR LATER @V305604 00350000
  374. CLI PFLAG,FIXED FIXED LENGTH FILE ? @V305666 00351000
  375. BNE LENLIN NO, ALLOW FULL LENGTH @V305604 00352000
  376. CH R0,=H'72' MORE THAN 72? 00353000
  377. BNH LENLIN BRANCH IF NOT (ACCEPT THEM ALL) 00354000
  378. LA R0,72 ACCEPT ONLY THE FIRST 72 00355000
  379. LENLIN EQU * 00356000
  380. TM STCKFLAG,HEXF0 ANY 'BEGIN' FLAGS ON ? @VM03208 00357000
  381. BZ LENLIN2 BRANCH IF NOT 00358000
  382. CLC UNSCND(4),EENDS CHECK FOR '&END...' 00359000
  383. BNE *+10 SKIP IF NOT THERE 00360000
  384. NI STCKFLAG,X'00' CLEAR STCKFLAG 00361000
  385. BR R14 READ NEXT LINE (R14 SET FROM BEFORE) 00362000
  386. LA PTR,UNSCND POINT TO THE UNSCANNED CARD-IMAGE 00363000
  387. TM STCKFLAG,X'10' BEGSTACK? 00364000
  388. BO CWSTAC2 BRANCH IF SO 00365000
  389. TM STCKFLAG,X'20' BEGPRINT? 00366000
  390. BO CWPRIN2 BRANCH IF SO 00367000
  391. TM STCKFLAG,BEMSG &BEGEMSG ? @VM03208 00368000
  392. BNO CWPUNC2 NO, MUST BE &BEGPUNCH @VM03208 00369000
  393. LR R5,PTR SHIFT POINTERS @VM03208 00370000
  394. LR R15,R0 AND SHIFT LENGTH REG. @VM03208 00371000
  395. B CWTYPER1 GO TYPE ERROR MESSAGE @VM03208 00372000
  396. SPACE 00373000
  397. LENLIN2 EQU * HASN'T MUCH TO DO WITH LINE LENGTH 00374000
  398. TM AFLG1,X'FF' IS IT &READ ARGS OR &READ VARS? 00375000
  399. BNZ SCANIT BRANCH IF SO 00376000
  400. LTR R5,R0 LENGTH OF LINE INTO R5 00377000
  401. BZ SCANIT BRANCH IF NOTHING THERE 00378000
  402. LR R6,R0 ALSO LENGTH IN R6 @VA07078 00379000
  403. LA R7,UNSCND SET UP TO SEARCH FOR COMMENT OR LABEL 00380000
  404. LA R4,1 INCREMENT 00381000
  405. AR R5,R7 ADDR. OF CHAR BEYOND LAST TO INSPECT 00382000
  406. BCTR R5,0 ADDR. OF LAST CHAR TO INSPECT 00383000
  407. LENLIN3 EQU * @VA07078 00384000
  408. CLI 0(R7),C' ' BLANK? 00385000
  409. BNE UNSCFND BRANCH IF NOT (FOUND SOMETHING) 00386000
  410. BCTR R6,0 KEEP COUNT OF BLANKS @VA07078 00387000
  411. BXLE R7,R4,LENLIN3 LOOP @VA07078 00388000
  412. B LOOP BACK FOR NEXT LINE (THIS ONE IS BLANK) 00389000
  413. SPACE 00390000
  414. UNSCFND EQU * FOUND A CHARACTER IN UNSCANNED LINE 00391000
  415. CLI 0(R7),C'*' COMMENT? 00392000
  416. BE LOOP BRANCH IF SO (BACK FOR NEXT LINE) 00393000
  417. TM CONRDFLG,X'FF' WAS THIS LINE READ FROM CONSOLE? 00394000
  418. BNZ SCANIT BRANCH IF SO (DON'T LOOK FOR LABEL) 00395000
  419. CLC GOSTOP(2),ZERO ARE WE DOING A '&GOTO'? 00396000
  420. BNE *+12 SKIP IF SO (SEE IF THIS IS IT) 00397000
  421. TM CONTFLAG,X'F0' ARE WE SCANNING THE RANGE OF A LOOP? 00398000
  422. BZ SCANIT BRANCH IF NOT 00399000
  423. CLI 0(R7),C'-' IS THIS A LABEL? 00400000
  424. BNE ITCHK BRANCH IF NOT (CHECK ITEM AGAINST GOSTOP) 00401000
  425. LR R8,R7 GET READY TO LOOK FOR END OF LABEL 00402000
  426. LA R9,7(,R8) SPOT TO STOP 00403000
  427. LABLENLP EQU * 00404000
  428. CLI 1(R8),C' ' END? 00405000
  429. BE LABLEN BRANCH IF SO 00406000
  430. LA R8,1(,R8) LOOK AT NEXT CHAR 00407000
  431. BCT R6,CHECK8 MAY BE VARIABLE LENGTH @VM03247 00408000
  432. BCTR R8,0 FORCE VALID LENGTH @VM03208 00409000
  433. B LABLEN SKIP IF SO @VM03208 00410000
  434. CHECK8 CR R8,R9 REACHED LENGTH EIGHT ? @VM03208 00411000
  435. BL LABLENLP LOOP IF NOT YET 00412000
  436. LABLEN EQU * 00413000
  437. SR R8,R7 LENGTH-1 00414000
  438. MVC TEMPD(8),BLANKS CLEAR TEMPD 00415000
  439. EX R8,MOVLAB MOVE THE LABEL WE'VE FOUND INTO TEMPD 00416000
  440. CLC TEMPD(8),GOLAB DOES IT MATCH? 00417000
  441. BE GOTOHERE BRANCH IF SO 00418000
  442. MVC TEMPD2,TEMPD HERE FOR SUBSTITUTE ROUTINE HRC007DS 00418100
  443. LA R6,TEMPD2 ADDR OF LABEL TO SUBSTITUTE HRC007DS 00418200
  444. L R15,ASUBSTIT ADDR SUBSTITUTION ROUTINE HRC007DS 00418300
  445. BALR RET,R15 GOTO ROUTINE HRC007DS 00418400
  446. MVC TEMPD,TEMPD2 REPLACE FOR OTHER ROUTINES HRC007DS 00418500
  447. CLC TEMPD(8),GOLAB DOES IT MATCH HRC007DS 00418600
  448. BE GOTOHERE YES.... HRC007DS 00418700
  449. ITCHK EQU * CHECK WHETHER DUD GOTO 00419000
  450. CLC PITEM(2),GOSTOP IS THIS THE LIMIT? 00420000
  451. BNE LOOP BRANCH IF NOT (CARRY ON LOOKING) 00421000
  452. SPACE 00422000
  453. SKPERR EQU * &SKIP OR &GOTO ERROR 00423000
  454. LA R10,ERRGOTO SET THINGS UP 00424000
  455. B LEAVE AND LEAVE THIS LEVEL OF EXECUTION 00425000
  456. SPACE 00426000
  457. MOVLAB MVC TEMPD(*-*),0(R7) 00427000
  458. SPACE 00428000
  459. GOTOHERE EQU * FOUND WHAT WE WANTED 00429000
  460. LH R6,LOPLEVEL GET LOOP LEVEL 00430000
  461. CLC GOSTOP(2),ZERO WAS IT A &GOTO WE WERE DOING? 00431000
  462. BNE CLRGOTO BRANCH IF SO (GO CLEAR GOTO FLAG) 00432000
  463. NI CONTFLAG,X'00' CLEAR CONTFLAG 00433000
  464. BCTR R6,0 FIDDLE TO GET THE ADDRESS OF... 00434000
  465. SLA R6,1 SCOPEND ETC. 00435000
  466. LH R8,PITEM FILE ITEM NO. 00436000
  467. STH R8,SCOPEND(R6) AND SAVE AS END OF LOOP RANGE 00437000
  468. B LOOP NOW WE CAN START EXECUTING THE LOOP 00438000
  469. SPACE 00439000
  470. CLRGOTO EQU * 00440000
  471. XC GOSTOP(2),GOSTOP CLEAR LABEL SEARCH STOP SPOT 00441000
  472. LEFTLOOP EQU * CHECK ON ANY LOOPS JUMPED OUT OF 00442000
  473. LTR R6,R6 TEST LOOP LEVEL 00443000
  474. BZ SCANIT BRANCH OUT IF ZERO 00444000
  475. BCTR R6,0 DECREMENT LOOP DEPTH 00445000
  476. SLA R6,1 FIDDLE BASE 00446000
  477. LH R8,PITEM GET NO. OF NEXT LINE TO READ 00447000
  478. CH R8,SCOPEBEG(R6) ARE WE ABOVE CURRENT LOOP? 00448000
  479. BNH DESTROY1 BRANCH IF SO (DESTROY LOOP) 00449000
  480. CH R8,SCOPEND(R6) ARE WE BELOW BOTTOM OF LOOP? 00450000
  481. BNH SCANIT BRANCH IF NOT (CARRY ON) 00451000
  482. DESTROY1 EQU * DESTROY THE LOOP 00452000
  483. SRA R6,1 UNFIDDLE R6 00453000
  484. STH R6,LOPLEVEL STORE AS NEW LOOP LEVEL 00454000
  485. B LEFTLOOP AND CHECK FOR ANY MORE TO CLOSE 00455000
  486. SPACE 00456000
  487. SCANIT EQU * SCAN THE LINE 00457000
  488. MVC RAWBUF,UNSCND save unscanned line for EPLIST HRC309DS 00457100
  489. ST R0,RAWBUFLN and save the length HRC309DS 00457200
  490. SR R1,R1 HRC309DS 00457300
  491. ST R1,CMDLSTRT initialize this variable HRC309DS 00457400
  492. LR R6,R0 SAVE LENGTH IN R6 (SCAN DESTROYS R0) 00458000
  493. ST R0,SCANBUFF PUT LENGTH FOR SCAN TO SEE 00459000
  494. LA R1,SCANBUFF LENGTH OF LINE FOR SCAN 00460000
  495. L R15,SCNPTR GET ADDR OF SCAN 00461000
  496. BALR R14,R15 GO GET A PLIST 00462000
  497. LR R0,R6 RESTORE LENGTH INTO R0 00463000
  498. TM AFLG1,X'FF' IS THIS &READ ARGS OR VARS? 00464000
  499. MVI AFLG1,X'00' (CLEAR THE FLAG) 00465000
  500. BM READVARS BRANCH IF IT'S &READ VARS 00466000
  501. LR PTR,R1 SCAN'S BUFFER 00467000
  502. BZ SCANNED BRANCH IF NOT &READ ARGS 00468000
  503. BAL 14,SETARGS CALL SUBROUTINE TO DO THE WORK 00469000
  504. B LOOP AND RETURN FOR NEXT LINE 00470000
  505. READVARS EQU * DEAL WITH &READ VARS 00471000
  506. LA PTR,8(,PTR) (STILL SET FROM BEFORE, AMAZINGLY) 00472000
  507. READVAR1 EQU * HEAD OF LOOP 00473000
  508. LA PTR,8(,PTR) LOOK AT NEXT VAR 00474000
  509. CLI 0(PTR),X'FF' IS THERE ONE? 00475000
  510. BE LOOP BRANCH IF ALL DONE 00476000
  511. BAL RET,LHS GET ADDRESS OF TARGET IN R7 00477000
  512. BH READVAR2 BRANCH IF IT'S A NUMERIC VARIABLE 00478000
  513. CLI 0(R1),X'FF' END OF VALUE LIST? 00479000
  514. BE READVAR3 BRANCH IF SO 00480000
  515. MVC 0(8,R7),0(R1) MOVE VALUE INTO VARIABLE 00481000
  516. CLC 0(2,R7),=CL2'% ' IS IT THE IGNORE ARG? P0816 00482000
  517. BNE READVIN BRANCH IF NOT (THAT'S OK) 00483000
  518. MVI 0(R7),C' ' CLOBBER IT 00484000
  519. READVIN EQU * 00485000
  520. LA R1,8(,R1) LOOK AT NEXT VALUE 00486000
  521. B READVAR1 LOOP BACK 00487000
  522. READVAR3 EQU * COME HERE IS AT END OF VALUE LIST 00488000
  523. MVC 0(8,R7),BLANKS USE BLANKS 00489000
  524. B READVAR1 LOOP BACK 00490000
  525. READVAR2 EQU * IT'S A NUMERIC TARGET 00491000
  526. CLI 0(R1),X'FF' AT END OF VALUE LIST? 00492000
  527. BE ERRCONV BRANCH IF SO (SIMULATE CONV. ERROR) 00493000
  528. MVC TEMPD(8),0(R1) MOVE VALUE INTO TEMPD 00494000
  529. BAL R14,ASSINDX USE ASSINDX AS A PRETTY QUEER SUBROUTINE 00495000
  530. B READVIN INCREMENT VALUE PTR AND CARRY ON 00496000
  531. SCANNED EQU * 00497000
  532. TM CONRDFLG,X'FF' WAS THIS LINE READ FROM CONSOLE? 00498000
  533. BNZ SCANNED2 BRANCH IF SO 00499000
  534. CLI 0(PTR),C'-' DOES IT START WITH A LABEL? 00500000
  535. BNE SCANNED2 BRANCH IF NOT 00501000
  536. LA PTR,8(,PTR) SKIP OVER THE LABEL 00502000
  537. SCANNED2 EQU * 00503000
  538. LH R7,PITEM SET LINENUM TO... 00504000
  539. BCTR R7,0 ONE LESS THAN PITEM, WHICH... 00505000
  540. CVD R7,CVDSPACE WILL BE THE NUMBER OF... 00506000
  541. MVC LINENUM(4),CVDSPACE+4 THE CURRENT LINE 00507000
  542. BAL RET,SETUP SET UP READFLAG AND TYPEFLAG 00508000
  543. LA R4,BUFFER USE BUFFER WORK AREA @VA06278 00509000
  544. MVC BUFFER(BUFSIZE-EIGHT),0(PTR) COPY THE ORIGINAL @VA08168 00509700
  545. MVC BUFFER+TWO56(EIGHT),TWO56(PTR) STATEMENT @VA08168 00510400
  546. LR R3,R4 00511000
  547. SR R5,R5 CLEAR ASSIGNMENT INDICATOR 00512000
  548. NI FLAG,X'00' CLEAR FLAG 00513000
  549. EJECT 00514000
  550. SPACE 2 00515000
  551. PSCAN EQU * SCAN LINE AND SUBSTITUTE VARIABLES 00516000
  552. MVC 0(8,R4),0(PTR) MOVE TOKEN INTO BUFFER 00517000
  553. CLI 0(R4),X'FF' END OF LINE? 00518000
  554. BE LABELCK BRANCH IF SO 00519000
  555. TM FLAG,X'0F' ARE WE SCANNING '&ERROR'? 00520000
  556. BO UPR4 BRANCH IF SO (NO SUBSTITUTION) 00521000
  557. LR R6,R4 SET R6 FOR SUBSTIT LATER 00522000
  558. LA R9,BUFFER USE BUFFER WORK AREA @VA06278 00523000
  559. SPACE 00524000
  560. IFLOOP EQU * LOOK FOR IF CLAUSES 00525000
  561. CLC 0(4,R9),EIFXX IS THIS '&IF'? 00526000
  562. BNE NOTIF BRANCH IF NOT 00527000
  563. SR R15,R15 get a zero HRC309DS 00527100
  564. C R15,CMDLSTRT been here before HRC309DS 00527200
  565. BNE IFLOOP1 yes, so don't save it again HRC309DS 00527300
  566. ST R9,CMDLSTRT save start of command line HRC309DS 00527400
  567. IFLOOP1 DS 0H HRC309DS 00527500
  568. LA R9,32(,R9) SKIP OVER CONDITION 00528000
  569. CR R9,R4 HAVE WE GONE TOO FAR? 00529000
  570. BL IFLOOP NO-CONTINUE IN LOOP @VA08016 00530100
  571. BH NOTIF YES-NO MORE IFS @VA08016 00530200
  572. NI FLAG1,X'7F' TURN OFF ASSIGNMENT FLAG @VA08016 00530300
  573. B IFLOOP CONTINUE IN LOOP @VA08016 00530400
  574. SPACE 00531000
  575. NOTIF EQU * NOT AN IF CLAUSE 00532000
  576. L R15,ASUBSTIT GET SUBSTIT ADDRESS @VM03209 00533000
  577. BALR RET,R15 AND SUBSTITUTE ON TOKEN @VM03209 00534000
  578. MVI LAST3LIT+3,HEX00 CLEAR LITERAL FLAG @VA04597 00535000
  579. CLC 0(8,R4),ELITERAL IS THIS '&LITERAL'? 00536000
  580. BNE NOTLIT BRANCH IF NOT 00537000
  581. MVI LAST3LIT+THREE,FF SET LITERAL FLAG TO LITERAL @VA06278 00538000
  582. MVC 0(EIGHT,R4),BLANKS MAKE TOKEN BLANK @VA06278 00539000
  583. LA PTR,8(,PTR) BUMP UP PTR 00540000
  584. CLI 0(PTR),X'FF' WELL, ARE WE AT END? 00541000
  585. BNE TOKE NO NOT AT FENCE @VA06278 00542000
  586. MVI EIGHT(PTR),FF YES - MOVE IN FENCE @VA06278 00543000
  587. B NOTASS8 CONTINUE @VA06278 00544000
  588. TOKE EQU * @VA06278 00545000
  589. MVC 0(EIGHT,R4),0(PTR) REPLACE CURRENT TOKEN @VA06278 00546000
  590. B NOTASS8 @V305604 00547000
  591. SPACE 00548000
  592. NOTLIT EQU * NOT '&LITERAL' 00549000
  593. CR R4,R9 THE RIGHT PLACE FOR AN ASSIGNMENT? 00550000
  594. BNE NOTASS BRANCH IF NOT 00551000
  595. CLI PENULT,X'50' IS THERE A POSSIBILITY OF A VARIABLE? 00552000
  596. BNE NOTASS BRANCH IF NOT 00553000
  597. CLC 8(2,PTR),=CL2'= ' IS NEXT TOKEN A LITERAL '='? 00554000
  598. BE SETASS BRANCH IF SO 00555000
  599. CLC 0(6,PTR),EERRO IS THIS '&ERROR'? 00556000
  600. BE ISERROR BRANCH IF SO 00557000
  601. B NOTASS 00558000
  602. SETASS EQU * 00559000
  603. LR R5,R4 SET ASSIGNMENT INDICATOR 00560000
  604. OI FLAG1,ASSNBIT AND FLAG BIT @VM03209 00561000
  605. SETASSX EQU * 00562000
  606. MVC 0(8,R4),PENULT USE THE PENULTIMATE SUBSTITUTION 00563000
  607. B NOTASS8 00564000
  608. SPACE 00565000
  609. ISERROR EQU * 00566000
  610. OI FLAG,X'0F' SET '&ERROR' FLAG 00567000
  611. B UPR4 00568000
  612. SPACE 00569000
  613. NOTASS EQU * 00570000
  614. LA R6,16(,R9) WHERE VARS WOULD START FOR '&READ VARS' 00571000
  615. CR R4,R6 HOW DOES R4 COMPARE? 00572000
  616. BL NOTASS6 BRANCH IF CANNOT BE 00573000
  617. CLC 0(13,R9),=XL13'50D9C5C1C4404040E5C1D9E240' P0444 00574000
  618. BNE NOTASS6 BRANCH IF NOT '&READ VARS' 00575000
  619. CLI PENULT,X'50' DO WE HAVE A VARIABLE? 00576000
  620. BNE ERRSYN BRANCH IF NOT (MISTAKE) 00577000
  621. B SETASSX TREAT AS ASSIGNMENT 00578000
  622. NOTASS6 EQU * 00579000
  623. CLI 0(R4),C' ' BLANK? 00580000
  624. BE UPPTR BRANCH IF SO (IGNORE IT) 00581000
  625. NOTASS8 EQU * TRANSFER FROM NOTIF 00582000
  626. MVC LAST3(TEN6),LAST3+EIGHT MAKE THE NEXT @VA06278 00583000
  627. MVC LAST3+TEN6(EIGHT),BLANKS TOKEN BLANK @VA06278 00584000
  628. CLI 0(PTR),FF AT THE FENCE @VA06278 00585000
  629. BE NOTASGN9 YES- BYPASS @VA06278 00586000
  630. MVC LAST3+TEN6(EIGHT),0(PTR) MOVE IN NEXT TOKEN @VA06278 00587000
  631. NOTASGN9 EQU * @VA06278 00588000
  632. MVC LAST3LIT(THREE),LAST3LIT+ONE AND LITERAL FLAG @VA06278 00589000
  633. UPR4 EQU * 00590000
  634. LA R4,8(,R4) BUMP UP THE BUFFER POINTER 00591000
  635. LA R14,ENDOFBUF ADDRESS OF BUFFER END 00592000
  636. CR R4,R14 ARE WE THERE? 00593000
  637. BNL ERRBUST BRANCH IF SO (FATAL ERROR) 00594000
  638. UPPTR EQU * 00595000
  639. LA PTR,8(,PTR) BUMP UP THE OTHER POINTER TOO 00596000
  640. B PSCAN DEAL WITH NEXT TOKEN 00597000
  641. SPACE 4 00598000
  642. LABELCK EQU * NOTHING TO DO WITH CHECKING LABELS... 00599000
  643. * CHECK FOR &LOOP XXX CONDITION 00600000
  644. CR R4,R3 FIRST CHECK WHETHER ANYTHING HERE AT ALL 00601000
  645. BE LOOP BRANCH IF NOT 00602000
  646. CLC 0(8,R9),ELOOP IS THIS A LOOP STATEMENT? 00603000
  647. BNE NOLAB2 BRANCH IF NOT 00604000
  648. LR PTR,R9 REMEMBER WHERE IT IS @VA04470 00605000
  649. LA R9,32(,R9) POINT WHERE 2ND COMPARAND MAY BE 00606000
  650. CR R4,R9 AND COMPARE WITH ADDRESS OF FENCE 00607000
  651. BL NOLAB2 BRANCH IF DIDN'T GET THAT FAR 00608000
  652. BH SETLOOP AND BRANCH IF WE PASSED IT (IS LOOP COND) 00609000
  653. MVI LAST3LIT+3,X'00' SET LITERAL FLAG TO NOT LITERAL 00610000
  654. MVC LAST3(TEN6),LAST3+EIGHT MAKE THE LAST @VA06278 00611000
  655. MVC LAST3+TEN6(EIGHT),BLANKS TOKEN BLANK @VA06278 00612000
  656. MVC LAST3LIT(3),LAST3LIT+1 SAME WITH LITERAL FLAGS 00613000
  657. SETLOOP EQU * @VA06278 00614000
  658. MVC TEN6(TWENTY4,PTR),LAST3 REPLACE WITH NON @VA09732 00615000
  659. * SUBSTITUTED STATEMENT 00616000
  660. EJECT 00617000
  661. * R3 NOW POINTS TO BEGINNING OF STATEMENT IN BUFFER, R4 TO FENCE 00618000
  662. NOLAB2 SR R4,R3 LENGTH OF EXEC STATEMENT 00619000
  663. NOLAB3 LTR R4,R4 IS LENGTH ZERO? 00620000
  664. BNH LOOP BRANCH IF SO (NEXT STATEMENT) 00621000
  665. LR PTR,R3 POINT TO START OF STATEMENT 00622000
  666. LR R6,R3 (SAME THING) 00623000
  667. STM R3,R4,TYPLIN+8 SET UP FOR TYPEOUT 00624000
  668. CLI 0(R6),X'50' EXEC WORD? 00625000
  669. BNE NOTEXEC BRANCH IF DEFINITELY NOT 00626000
  670. TM TFLAG,TYPALL IS IT '&TYPEOUT ALL'? 00627000
  671. BNO *+8 SKIP IF NOT 00628000
  672. BAL RET,TYPEOUT TYPE THE STATEMENT 00629000
  673. LA R14,LOOP SET FOR 'BR R14' RETURNS 00630000
  674. CR R3,R5 IS THIS AN ASSIGNMENT? 00631000
  675. BE ASSIGN BRANCH IF SO 00632000
  676. BAL RET,CWRET IS IT A CONTROL WORD OR SPECIAL VAR? 00633000
  677. BNZ FULLNAM BRANCH IF SO (GO TO IT) 00634000
  678. B ERRWORD BRANCH IF NOT 00635000
  679. NOTEXEC EQU * IT'S NOT AN EXEC WORD 00636000
  680. CLI 0(R3),C'*' DOES STATEMENT START WITH ASTERISK? 00637000
  681. BE ERRSYN BRANCH IF SO (MISTAKE) 00638000
  682. TM TFLAG,TYPCMS+TYPALL IS &TYPEOUT CMS OR ALL? 00639000
  683. BZ *+8 SKIP IF NOT 00640000
  684. BAL RET,TYPECRON TYPE COMMAND AND CHRON. TIME IF ON 00641000
  685. MVC POINT+8(18),FNAME SET UP 'POINT' PLIST 00642000
  686. * WE NOW USE 'POINT' TO RESET THE READ POINTER TO LINE 1, 00643000
  687. * SO THAT IF ANYONE TRIES TO READ IT WHILE WE'RE GONE, IT WILL 00644000
  688. * BE OK. THIS IS MUCH FASTER THAN ACTUALLY CLOSING THE FILE. 00645000
  689. * IT WILL GET US INTO TROUBLE ONLY IF SOMEONE TRIES TO WRITE 00646000
  690. * THE FILE WITHOUT FIRST CLOSING IT. 00647000
  691. LA R1,POINT 00648000
  692. LR R8,R14 SAVE RETURN REGISTER @VM03209 00649000
  693. L R15,APOINT GET DMSPNT ADDRESS @VM03093 00650000
  694. BALR R14,R15 AND POINT THE FILE @VM03093 00651000
  695. ERRETPT LR R14,R8 RESTORE RETURN REGISTER @VM03209 00652000
  696. BAL RET,TIMSET RESET CPU TIMES IF &TIME IS ON @V305614 00653000
  697. LA R1,SVCERR 00654000
  698. ST R1,ERR$202 FILL ERROR RETURN FOR SVC @V305614 00655000
  699. LR R1,R3 00656000
  700. MVC PREVCMND(8),LASTCMND 00657000
  701. MVC LASTCMND(8),0(R1) 00658000
  702. TM OSSFLAGS,OSRESET 00659000
  703. BNO OSCLEAR 00660000
  704. SVC 203 00661000
  705. DC H'12' 00662000
  706. MVI OSSFLAGS,X'00' 00663000
  707. OSCLEAR EQU * 00664000
  708. ICM R1,B'1000',=X'0D' 00665000
  709. * ASSUMING '&CONTROL NOMSG' IS NOT IN EFFECT 00666000
  710. TM TFLAG,NOMSG IS 'NOMSG' CURRENTLY IN EFFECT ? @VM01017 00667000
  711. BZ *+8 NO - KEEP FLAG OF X'0D' @VM01017 00668000
  712. ICM R1,B'1000',=X'01' yes - use x'01' instead HRC309DS 00669000
  713. LR R8,R14 SAVE RETURN REGISTER @VM03209 00670000
  714. SPACE 1 HRC309DS 00670100
  715. L R15,AEPLBLD get EPLIST build routine address HRC309DS 00670200
  716. BALR R14,R15 build EPLIST (R0 is updated) HRC309DS 00670300
  717. SPACE 1 HRC309DS 00670400
  718. BAL R14,SVC$202 EXECUTE @V305614 00671000
  719. LR R14,R8 RESTORE RETURN REGISTER @VM03209 00672000
  720. MVC PREVCMND(8),LASTCMND 00673000
  721. RSETCMD MVC LASTCMND(8),SETDSK+16 00674000
  722. ZAP RETCODE(5),DECZERO(1) @VA03453 00675000
  723. SR LINK,LINK SHOW NO ERRORS 00688000
  724. BAL RET,TIMSUB PRINT LATEST TIMES (IF &TIME IS ON) 00689000
  725. B LOOP BACK FOR NEXT STATEMENT 00690000
  726. SPACE 1 00691000
  727. ASSIGN EQU * 00692000
  728. BAL RET,LHS GET A(TARGET) 00693000
  729. BH ASSIND BRANCH IF IT'S AN INDEX 00694000
  730. BAL RET,RHS PUT VALUE OF RHS INTO TEMPD 00695000
  731. MVC 0(8,R7),TEMPD MOVE LATTER INTO FORMER 00696000
  732. BR R14 NEXT STATEMENT 00697000
  733. ASSIND BAL RET,RHS GET VALUE OF RHS 00698000
  734. ASSINDX LR R8,R7 (ENTER HERE FROM READVARS) 00699000
  735. LA R7,TEMPD ADDRESS INTO R7 00700000
  736. BAL RET,CVDBCD CONVERT TO NUMERICS 00701000
  737. BNZ ERRCONV BRANCH IF CONVERSION ERROR 00702000
  738. ZAP 0(5,R8),CVDSPACE(8) PUT VALUE INTO TARGET @VA02322 00703000
  739. BO ERRCONV BRANCH IF OVERFLOW 00704000
  740. BR R14 00705000
  741. SPACE 3 00706000
  742. CWLOOP EX R0,ZAPREAD ZERO READCNT 00707000
  743. LH R8,LOPLEVEL INCREMENT LOOP LEVEL 00708000
  744. LA R8,1(,R8) 00709000
  745. STH R8,LOPLEVEL 00710000
  746. LA R9,NOLOOPS DEPTH TOO GREAT? 00711000
  747. CR R8,R9 00712000
  748. BH ERDEPTH BRANCH IF SO 00713000
  749. BCTR R8,0 FIDDLE TO GET OFFSET... 00714000
  750. SLA R8,1 FOR HALFWORD ENTRIES 00715000
  751. LH R7,PITEM CURRENT ITEM NO. 00716000
  752. STH R7,SCOPEBEG(R8) SAVE AS LOOP SCOPE BEGINNING 00717000
  753. CLI 8(PTR),C'-' LABEL END OR NUM OF LINES 00718000
  754. BE LABELSET GO SET LABELEND 00719000
  755. LA R7,8(,PTR) 00720000
  756. BAL RET,CVDBCD GO BUILD NO 00721000
  757. BNZ ERRCONV BRANCH IF CONVERSION ERROR 00722000
  758. CVB R7,CVDSPACE GET BINARY NO OF LINES 00723000
  759. AH R7,PITEM ADD TO NEXT LINE NO &.. 00724000
  760. STH R7,SCOPEND(R8) SAVE AS LOOP SCOPE END 00725000
  761. STH R7,PITEM AND SET AS NEXT ITEM NO. TO READ 00726000
  762. B LABELSTA 00727000
  763. LABELSET EQU * DEAL WITH LABEL ENDING 00728000
  764. MVC GOLAB(8),8(PTR) FAKE IT AS A GOTO 00729000
  765. OI CONTFLAG,X'F0' BUT MAKE A NOTE THAT IT'S REALLY LOOP 00730000
  766. LABELSTA EQU * TEST WHETHER NO. OF TIMES OR CONDITION 00731000
  767. SLA R8,1 ADJUST FOR FULLWORD BASE 00732000
  768. CLI 24(PTR),X'FF' NUMBER OF TIMES? 00733000
  769. BE NOTIMES BRANCH IF SO 00734000
  770. SR R7,R7 ZERO 00735000
  771. BCTR R7,0 -1 00736000
  772. ST R7,LOOPCNT(R8) SIGNAL THAT LOOP END IS BY CONDITION 00737000
  773. MH R8,=H'7' MAKE FAKE BASE FOR CONDITIONS 00738000
  774. LA R8,LOOPCOND(R8) 00739000
  775. MVC 0(24,R8),LAST3 MOVE IN CONDITION 00740000
  776. MVC 24(3,R8),LAST3LIT AND SAME WITH LITERAL FLAGS 00741000
  777. BR R14 GOTO LOOP 00742000
  778. NOTIMES EQU * IT'S NO. OF TIMES 00743000
  779. LA R7,16(,PTR) CONVERT THE NUMBER OF... 00744000
  780. BAL RET,CVDBCD FIRST TO PACKED DECIMAL... 00745000
  781. BNZ ERRCONV (BRANCH IF CONVERSION ERROR) 00746000
  782. CVB R7,CVDSPACE AND THEN TO BINARY 00747000
  783. ST R7,LOOPCNT(R8) SAVE IN LOOP DATA 00748000
  784. BR R14 GOTO LOOP 00749000
  785. SPACE 2 00750000
  786. CWEXIT EQU * 00751000
  787. LA R7,8(,PTR) GET NUM TO RETURN IF ANY 00752000
  788. SR R8,R8 CLEAR RETURN CODE 00753000
  789. CLI 0(R7),X'FF' ANYTHING TO RETURN? 00754000
  790. BE CWEXIT1 BRANCH IF NOT 00755000
  791. BAL RET,CVDBCD 00756000
  792. BNZ ERRCONV BRANCH IF CONVERSION ERROR 00757000
  793. CVB R8,CVDSPACE CONVERT TO BINARY 00758000
  794. CWEXIT1 EQU * 00759000
  795. LR LINK,R8 SET RETURN CODE 00760000
  796. B CLOSE 00761000
  797. SPACE 2 00762000
  798. CWARG EQU * 00763000
  799. LA PTR,8(,PTR) POINT TO TOKEN FOR ARG1 00764000
  800. BAL R14,SETARGS CALL SUBROUTINE TO DO THE WORK 00765000
  801. B LOOP 00766000
  802. SPACE 2 00767000
  803. CWREAD EQU * 00768000
  804. LA R8,1 PROVISIONALLY SAY READ 1 LINE 00769000
  805. CLI 8(PTR),X'FF' RIGHT TO ASSUME 1 LINE? 00770000
  806. BE AREAD BRANCH IF SO 00771000
  807. CLC 8(5,PTR),=CL5'ARGS ' IS IT 'ARGS'? 00772000
  808. BNE CWRVAR SKIP IF NOT @V305604 00773000
  809. OI AFLG1,X'FF' SIGNAL IT'S &READ ARGS 00774000
  810. B AREAD 00775000
  811. CWRVAR EQU * @V305604 00776000
  812. CLC 8(5,PTR),=CL5'VARS ' IS IT 'VARS' 00777000
  813. BNE CWRNUM SKIP IF NOT @V305604 00778000
  814. OI AFLG1,X'0F' SIGNAL IT'S &READ VARS 00779000
  815. B AREAD 00780000
  816. CWRNUM EQU * @V305604 00781000
  817. LA R7,8(,PTR) READY FOR CONVERSION 00782000
  818. BAL RET,CVDBCD GET THE NUMBER 00783000
  819. BNZ ERRCONV BRANCH IF CONVERSION ERROR 00784000
  820. CVB R8,CVDSPACE CONVERT TO BINARY 00785000
  821. AREAD EQU * 00786000
  822. A R8,READCNT ADD THE NUMBER TO THAT ALREADY THERE 00787000
  823. ST R8,READCNT SAVE THE NO. OF LINES 00788000
  824. BCR 11,R14 BRANCH IF >= 0 (BACK FOR NEXT STMT) 00789000
  825. SR R8,R8 SET READCNT TO ZERO 00790000
  826. B *-8 (THIS DOES IT) 00791000
  827. SPACE 2 00792000
  828. CWBEGS EQU * &BEGSTACK 00793000
  829. OI STCKFLAG,X'10' SET BEGSTACK BIT 00794000
  830. MVI STACKLST+8,C'F' SET FOR FIFO 00795000
  831. BEGSLP EQU * LOOP TO LOOK FOR OPTIONS 00796000
  832. LA PTR,8(,PTR) LOOK AT NEXT OPTION 00797000
  833. CLI 0(PTR),X'FF' END OF STATEMENT? 00798000
  834. BCR 8,R14 RETURN IF SO 00799000
  835. CLC 0(5,PTR),=CL5'FIFO ' IS 'FIFO' GIVEN? 00800000
  836. BNE *+12 SKIP IF NOT 00801000
  837. MVI STACKLST+8,C'F' RECORD THE FACT 00802000
  838. B BEGSLP LOOK FOR NEXT OPTION 00803000
  839. CLC 0(5,PTR),=CL5'LIFO ' IS 'LIFO' GIVEN? 00804000
  840. BNE *+12 SKIP IF NOT 00805000
  841. MVI STACKLST+8,C'L' RECORD THE FACT 00806000
  842. B BEGSLP AND LOOP FOR NEXT OPTION 00807000
  843. CLC 0(4,PTR),=CL4'ALL' IS 'ALL' GIVEN? 00808000
  844. BNE ERRSYN BRANCH IF NOT (SYNTAX ERROR) 00809000
  845. OI STCKFLAG,X'0F' RECORD THE FACT 00810000
  846. B BEGSLP AND LOOP FOR NEXT OPTION 00811000
  847. SPACE 2 00812000
  848. CWSTAC MVI STACKLST+8,C'F' F FOR 1ST IN, 1ST OUT 00813000
  849. CLC 8(5,PTR),=CL5'FIFO ' IS 'FIFO' GIVEN? 00814000
  850. BE CWSTAC0 BRANCH IF SO 00815000
  851. CLC 8(5,PTR),=CL5'LIFO ' IS 'LIFO' GIVEN? 00816000
  852. BNE CWSTAC1 BRANCH IF NOT 00817000
  853. MVI STACKLST+8,C'L' SET FOR LIFO 00818000
  854. CWSTAC0 EQU * 00819000
  855. LA PTR,8(,PTR) 00820000
  856. CWSTAC1 EQU * STACK A SCANNED LINE IN FREE FORMAT 00821000
  857. LA PTR,8(,PTR) POINT TO THE RIGHT PLACE 00822000
  858. LA R5,UNSCND POINT TO THE FREE-FORMAT BUFFER 00823000
  859. LA R15,130 TELL FREESUB HOW LONG IT MAY GO 00824000
  860. BAL RET,FREESUB FREESUB DOES THE WORK (LEAVES R15=LEN) 00825000
  861. B CWSTACGO 00826000
  862. SPACE 00827000
  863. CWSTAC2 EQU * STACK AN UNSCANNED LINE 00828000
  864. LR 5,PTR ADDRESS OF LINE 00829000
  865. LR R15,R0 LENGTH FROM READ 00830000
  866. TM CONRDFLG,X'FF' WAS THIS LINE FROM CONSOLE? 00831000
  867. BO CWSTACGO BRANCH IF SO 00832000
  868. TM STCKFLAG,X'0F' IS THE 'ALL' OPTION IN EFFECT? 00833000
  869. BZ CWSTACGO BRANCH IF NOT 00834000
  870. LH R15,FILWIDTH SET IT TO THE FILE WIDTH 00835000
  871. SPACE 00836000
  872. CWSTACGO EQU * DO THE STACKING 00837000
  873. ST R5,STACKLST+12 STORE ADDRESS FOR ATTN 00838000
  874. STC R15,STACKLST+12 AND LENGTH 00839000
  875. LA R1,STACKLST 00840000
  876. SVC 202 00841000
  877. BR R14 BACK TO LOOP FOR NEXT LINE 00842000
  878. SPACE 2 00843000
  879. * '&TIME' HAS BEEN REDEFINED AND REPLACED SO AS TO BE MORE RELIABLE 00844000
  880. * AND TO REMOVE ITS EFFECTS ON THE TIMES PRINTED ON RETURN TO CMS 00845000
  881. * COMMAND MODE, OR IN OTHER EXEC FILES. THIS HAS INVOLVED A REWRITE 00846000
  882. * OF THE NUCLEUS TIMER ROUTINE 'CMSTIME' (Q.V.). '&TIME ON' NOW 00847000
  883. * CAUSES A RESET OF THE CPU TIMES IMMEDIATELY BEFORE EVERY CMS 00848000
  884. * COMMAND, AND THE TYPING OF THE TIMES USED (AND THE TIME-OF-DAY), 00849000
  885. * TOGETHER WITH A FURTHER RESET, ON RETURN. '&TIME RESET' IS AN 00850000
  886. * EXPLICIT RESET; AND '&TIME TYPE' IS AN EXPLICIT TYPING OF TIMES, 00851000
  887. * TOGETHER WITH A RESET. 00852000
  888. SPACE 00853000
  889. CWTIME EQU * CODE FOR '&TIME ...' 00854000
  890. LA PTR,8(,PTR) LOOK AT NEXT ARGUMENT 00855000
  891. CLI 0(PTR),X'FF' END OF ARG LIST? 00856000
  892. BE LOOP BRANCH IF SO (BACK FOR NEXT STATEMENT) 00857000
  893. CLC 0(6,PTR),=CL6'RESET ' RESET? 00858000
  894. BNE *+12 SKIP IF NOT 00859000
  895. BAL RET,TIMSETA RESET TIME, EXPLICITLY 00860000
  896. B CWTIME BACK FOR NEXT ARG 00861000
  897. CLC 0(5,PTR),=CL5'TYPE ' TYPE? 00862000
  898. BNE *+12 SKIP IF NOT 00863000
  899. BAL RET,TIMSUBA PRINT TIME, EXPLICITLY 00864000
  900. B CWTIME BACK FOR NEXT ARG 00865000
  901. CLC 0(3,PTR),=CL3'ON ' ON? 00866000
  902. BNE *+12 SKIP IF NOT 00867000
  903. OI TIMFLG,TIMON SET TIMFLG 00868000
  904. B CWTIME BACK FOR NEXT ARG 00869000
  905. CLC 0(4,PTR),=CL4'OFF ' OFF? 00870000
  906. BNE ERRSYN BRANCH IF NOT (MISTAKE) 00871000
  907. NI TIMFLG,255-TIMON CLEAR TIMFLG 00872000
  908. B CWTIME BACK FOR NEXT ARG 00873000
  909. SPACE 00874000
  910. TIMON EQU X'01' 00875000
  911. SPACE 2 00876000
  912. CWIFXX LA R6,24 USEFUL NUMBER 00877000
  913. CR R4,R6 STATEMENT LONG ENOUGH FOR CONDITION? 00878000
  914. BL ERRCOND BRANCH IF NOT 00879000
  915. BH *+10 SKIP IF LARGE ENOUGH 00880000
  916. MVC 24(8,PTR),BLANKS ADD A TOKEN OF BLANKS 00881000
  917. LA R7,8(,PTR) ADDRESS OF CONDITIONAL PHRASE 00882000
  918. BAL RET,CONDRET TEST IT 00883000
  919. BCR 7,R14 NEXT STATEMENT IF NOT SATISFIED 00884000
  920. LA R6,32 USEFUL NUMBER 00885000
  921. AR R3,R6 BUMP UP STARTING SPOT FOR STATEMENT 00886000
  922. SR R4,R6 ADJUST LENGTH 00887000
  923. B NOLAB3 DEAL WITH IT 00888000
  924. SPACE 2 00889000
  925. CWGOTO EX R0,ZAPREAD ZERO READCNT 00890000
  926. CLC 8(4,PTR),EEXIT+1 &GOTO EXIT? 00891000
  927. BE CLOSE BRANCH IF SO 00892000
  928. CLC 8(4,PTR),=C'TOP ' &GOTO TOP? 00893000
  929. BNE GOTOLAB 00894000
  930. LA R7,1 SET TO FIRST LINE 00895000
  931. STH R7,PITEM STORE IT IN PLIST 00896000
  932. BR R14 00897000
  933. GOTOLAB CLI 8(PTR),C'-' LEGAL LABEL? 00898000
  934. BNE GOTOLINE BRANCH IF NOT 00899000
  935. MVC GOLAB(8),8(PTR) SAVE LABEL 00900000
  936. MVC GOSTOP(2),PITEM SAVE STOP VALUE 00901000
  937. BR R14 00902000
  938. GOTOLINE EQU * MUST BE '&GOTO N' WHERE N=LINE NO. 00903000
  939. LA R7,8(,PTR) POINT TO LINE NO. 00904000
  940. BAL RET,CVDBCD CONVERT IT 00905000
  941. BNZ SKPERR BRANCH IF NOT NUMERIC 00906000
  942. CVB R8,CVDSPACE INTO R8 00907000
  943. B SKIPX BRANCH INTO 'SKIP' ROUTINE 00908000
  944. SPACE 2 00909000
  945. CWSKIP LA R7,8(,PTR) GET ADDR OF SKIP VALUE 00910000
  946. ZAPREAD XC READCNT(4),READCNT ZERO READCNT 00911000
  947. LA R8,1 ASSUME ONE LINE 00912000
  948. CLI 0(R7),X'FF' END OF LINE? 00913000
  949. BE SKIP BRANCH IF SO 00914000
  950. BAL RET,CVDBCD 00915000
  951. BNZ SKPERR BRANCH IF CONVERSION ERROR P0816 00916000
  952. CVB R8,CVDSPACE CONVERT TO BINARY 00917000
  953. LTR R8,R8 TEST IT 00918000
  954. BM SKIPNEG BRANCH IF -VE 00919000
  955. SKIP EQU * 00920000
  956. LH R7,PITEM NEXT ITEM NO. (ACCORDING TO OLD NOTIONS) 00921000
  957. AR R8,R7 WHERE WE WANT TO GO NOW 00922000
  958. SKIPX EQU * (COME HERE FROM 'GOTO', ABOVE) 00923000
  959. C R8,=F'65535' ENSURE NEW ITEM NO. NOT TOO BIG 00924000
  960. BH SKPERR BRANCH IF IT IS 00925000
  961. STH R8,PITEM STORE IT 00926000
  962. LH R6,LOPLEVEL LOOP LEVEL 00927000
  963. SKIPLOOP EQU * (HEAD OF LOOP LOOP) 00928000
  964. LTR R6,R6 ANY LOOPS? 00929000
  965. BCR 8,R14 BRANCH IF NOT (BACK TO 'LOOP') 00930000
  966. BCTR R6,0 FIDDLE FOR BASE 00931000
  967. SLA R6,1 (MORE OF SAME) 00932000
  968. CH R8,SCOPEND(R6) ARE WE SKIPPING BEYOND LOOP? 00933000
  969. BCR 4,R14 BRANCH IF NOT ('BL') 00934000
  970. SRA R6,1 SOME UNFIDDLING 00935000
  971. STH R6,LOPLEVEL STORE NEW LOOP LEVEL 00936000
  972. B SKIPLOOP BACK FOR MORE 00937000
  973. SKIPNEG EQU * 00938000
  974. BCT R8,SKIP 00939000
  975. SPACE 2 00940000
  976. CWERRO EQU * '&ERROR' 00941000
  977. LA PTR,8(,PTR) POINT TO ERROR ACTION 00942000
  978. LA R15,130 TELL FREESUB HOW LONG IT MAY BE 00943000
  979. BAL RET,FREESUB PUT INTO FREE FORMAT 00944000
  980. MVC ERACTION(1),CONRDFLG SAVE CONRDFLG 00945000
  981. STC R15,ERACTION+1 SAVE LENGTH 00946000
  982. MVC ERACTION+2(130),UNSCND SAVE ERROR ACTION LINE 00947000
  983. BR R14 00948000
  984. SPACE 2 00949000
  985. CJS EQU * in memory of Chris Stephenson HRC380DS 00949100
  986. OI TFLAG,NOMSG turn off NOMSG for EXEC 2 compat HRC380DS 00949200
  987. CWTYPE EQU * CODE FOR '&TYPEOUT ...' 00950000
  988. LA R7,TYPOPTZ-4 END OF LOOP 00951000
  989. LA R6,9 INCREMENT 00952000
  990. LA PTR,8(,PTR) INCREMENT THE ARG. POINTER 00953000
  991. CLI 0(PTR),X'FF' ANY PARAMETERS AT ALL? 00954000
  992. BNE TYPLOOP THERE ARE...GO SEE WHICH 00955000
  993. MVI TFLAG,TYPCMS+TYPPAC REESTABLISH THE DEFAULTS 00956000
  994. BR R14 RETURN 00957000
  995. TYPLOOP EQU * HEAD OF LOOP FOR ARGS. TO '&TYPEOUT' 00958000
  996. CLI 0(PTR),X'FF' END OF ARGS? 00959000
  997. BCR 8,R14 RETURN IF SO 00960000
  998. LA R5,TYPOPT START OF OPT TABLE 00961000
  999. CLC 0(7,R5),0(PTR) IS THIS THE ONE? 00962000
  1000. BE OPTGOT BRANCH IF SO 00963000
  1001. BXLE R5,R6,*-10 LOOP THROUGH OPT TABLE 00964000
  1002. B ERRSYN BRANCH IF MATCH NOT FOUND (SYNTAX ERROR) 00965000
  1003. OPTGOT EQU * WE'VE FOUND A MATCH 00966000
  1004. NC TFLAG(1),7(R5) 'AND' THE FIRST FLAG BYTE 00967000
  1005. OC TFLAG(1),8(R5) AND 'OR' THE SECOND 00968000
  1006. LA PTR,8(,PTR) INCREMENT THE ARG. POINTER 00969000
  1007. B TYPLOOP AND LOOK AT NEXT ARG. 00970000
  1008. * 00971000
  1009. * THE BITS OF 'TFLAG' ARE USED AS FOLLOWS: 00972000
  1010. * 00973000
  1011. TYPERR EQU X'01' &TYPEOUT ERROR 00974000
  1012. TYPCMS EQU X'02' &TYPEOUT CMS (DEFAULT) 00975000
  1013. TYPALL EQU X'04' &TYPEOUT ALL 00976000
  1014. * IF NONE OF THESE BITS IS ON, &TYPEOUT IS OFF 00977000
  1015. NOMSG EQU X'08' SUPPRESS 'FILE NOT FOUND' ERR MSG @VM01017 00978000
  1016. * (FOR STATE/STATEW/ERASE/RENAME/LISTFILE) 00979000
  1017. TYPTIM EQU X'10' &TYPEOUT TIME 00980000
  1018. * IF THIS BIT IS NOT ON, IT IS &TYPEOUT NOTIME 00981000
  1019. TYPPAC EQU X'20' &TYPEOUT PACK 00982000
  1020. * IF THIS BIT IS NOT ON, IT IS &TYPEOUT NOPACK 00983000
  1021. * EQU X'40' (NOT USED) 00984000
  1022. * EQU X'80' (NOT USED) 00985000
  1023. * IF THIS BIT IS NOT ON, IT IS &TYPEOUT OFF 00986000
  1024. * 00987000
  1025. * IN THE FOLLOWING TABLE, THE FIRST BYTE OF EACH HEX 00988000
  1026. * FLAG IS 'ANDED' WITH THE CURRENT VALUE OF TFLAG, AFTER 00989000
  1027. * WHICH THE SECOND BYTE IS 'ORED'. 00990000
  1028. * 00991000
  1029. TYPOPT EQU * TYPEOUT OPTIONS 00992000
  1030. DC CL7'OFF',AL1(255-(TYPERR+TYPCMS+TYPALL)),AL1(0) 00993000
  1031. DC CL7'ERROR',AL1(255-(TYPCMS+TYPALL)),AL1(TYPERR) 00994000
  1032. DC CL7'CMS',AL1(255-(TYPERR+TYPALL)),AL1(TYPCMS) 00995000
  1033. DC CL7'ALL',AL1(255-(TYPERR+TYPCMS)),AL1(TYPALL) 00996000
  1034. DC CL7'NOMSG',AL1(255),AL1(NOMSG) @VM01017 00997000
  1035. DC CL7'MSG',AL1(255-NOMSG),AL1(0) @VM01017 00998000
  1036. DC CL7'TIME',AL1(255),AL1(TYPTIM) 00999000
  1037. DC CL7'NOTIME',AL1(255-TYPTIM),AL1(0) 01000000
  1038. DC CL7'PACK',AL1(255),AL1(TYPPAC) 01001000
  1039. DC CL7'NOPACK',AL1(255-TYPPAC),AL1(0) 01002000
  1040. TYPOPTZ EQU * END OF TYPEOUT OPTIONS 01003000
  1041. SPACE 1 01004000
  1042. CWHEX EQU * @VM03234 01005000
  1043. LA PTR,8(,PTR) POINT TO NEXT COMMAND ARG @VM03234 01006000
  1044. CLC 0(8,PTR),CHOFF HEX CONVERSION OFF ? @VM03234 01007000
  1045. BE HEXOFF YES, BRANCH @VM03234 01008000
  1046. CLC 0(8,PTR),CHON HEX CONVERSION ON ? @VM03234 01009000
  1047. BE HEXON YES, BRANCH @VM03234 01010000
  1048. B ERRSYN ERROR IF ANYTHING ELSE @VA04294 01011000
  1049. SPACE 1 01012000
  1050. HEXON MVI HEXSW,FF SET HEX SWITCH ON @VM03234 01013000
  1051. B HEXOUT ..... @VM03234 01014000
  1052. SPACE 1 01015000
  1053. HEXOFF MVI HEXSW,HEX00 SET HEX SWITCH OFF @VM03234 01016000
  1054. SPACE 1 01017000
  1055. HEXOUT CLI 8(PTR),FF CAN'T BE ANYMORE @VA04294 01018000
  1056. BNE ERRSYN ..... @VM03234 01019000
  1057. BR R14 BRANCH TO LOOP @VM03234 01020000
  1058. SPACE 2 01021000
  1059. CWBEGPR DS 0H &BEGPRINT 01022000
  1060. OI STCKFLAG,X'20' SET FLAG FOR BEGPRINT 01023000
  1061. CLI 8(PTR),X'FF' ANY OPTIONS? 01024000
  1062. BCR 8,R14 RETURN IF NOT 01025000
  1063. CLC 8(4,PTR),=CL4'ALL' IS ALL GIVEN? 01026000
  1064. BNE ERRSYN BRANCH IF NOT (SYNTAX ERROR) 01027000
  1065. OI STCKFLAG,X'0F' SET 'ALL' FLAG 01028000
  1066. BR R14 RETURN 01029000
  1067. SPACE 01030000
  1068. CWPRIN EQU * PRINT A SCANNED LINE IN FREE FORMAT 01031000
  1069. LA PTR,8(,PTR) POINT TO THE RIGHT PLACE 01032000
  1070. LA R5,UNSCND POINT TO THE FREE-FORMAT BUFFER 01033000
  1071. LA R15,130 TELL FREESUB HOW LONG IT MAY GO 01034000
  1072. BAL RET,FREESUB FREESUB DOES THE WORK (LEAVES R15=LEN) 01035000
  1073. B CWPRINGO GO AND PRINT 01036000
  1074. SPACE 01037000
  1075. CWPRIN2 EQU * PRINT AN UNSCANNED LINE 01038000
  1076. LR R5,PTR ADDRESS OF LINE TO BE PRINTED 01039000
  1077. LR R15,R0 GET LENGTH FROM READ 01040000
  1078. TM CONRDFLG,X'FF' WAS LINE FROM CONSOLE? 01041000
  1079. BO CWPRINGO BRANCH IF SO 01042000
  1080. TM STCKFLAG,X'0F' WAS 'ALL' GIVEN? 01043000
  1081. BZ CWPRINGO BRANCH IF NOT 01044000
  1082. LH R15,FILWIDTH SET IT TO THE FILE WIDTH 01045000
  1083. SPACE 01046000
  1084. CWPRINGO EQU * DO THE PRINTING 01047000
  1085. MVC TYPLIN+8(8),TYPLIST+8 SET UP THE TYPLIN PLIST 01048000
  1086. O R5,TYPLIN+8 'OR' IN THE CONSOLE NUMBER 01049000
  1087. ST R5,TYPLIN+8 STORE ADDRESS OF LINE TO BE TYPED 01050000
  1088. STH R15,TYPLIN+14 AND ITS LENGTH 01051000
  1089. LA R1,TYPLIN TYPE IT 01052000
  1090. SVC 202 01053000
  1091. BR R14 BRANCH TO LOOP 01054000
  1092. SPACE 1 01055000
  1093. CWBEGERR EQU * &BEGEMSG @VM03208 01056000
  1094. OI STCKFLAG,BEMSG SET FLAG FOR BEGEMSG @VM03208 01057000
  1095. CLI 8(PTR),FF ANY OPTIONS ? @VM03208 01058000
  1096. BER R14 RETURN IF NOT @VM03208 01059000
  1097. CLC 8(4,PTR),=CL4'ALL' ALL OPTION ? @VM03208 01060000
  1098. BNE ERRSYN ERROR IF NOT @VM03208 01061000
  1099. OI STCKFLAG,HEX0F SET ALL FLAG @VM03208 01062000
  1100. BR R14 RETURN @VM03208 01063000
  1101. SPACE 1 01064000
  1102. CWTYPER EQU * EXEC ERROR MESSAGE ROUTINE @VM03208 01065000
  1103. LA PTR,8(,PTR) POINT TO MESSAGE TEXT @VM03208 01066000
  1104. LA R5,UNSCND POINT TO FREE-FORMAT BUFFER @VM03208 01067000
  1105. LA R15,130 POSSIBLE LENGTH FOR FREESUB @VM03208 01068000
  1106. BAL RET,FREESUB PREPARE FOR TYPING (R15=LEN) @VM03208 01069000
  1107. SPACE 1 01070000
  1108. CWTYPER1 MVC MSGBUFF+1(3),DMS PLUG MESSAGE PREFIX @VM03208 01071000
  1109. TM CONRDFLG,FF WAS LINE FROM CONSOLE ? @VM03208 01072000
  1110. BO CWNALL YES, BRANCH @VM03208 01073000
  1111. TM STCKFLAG,HEX0F ALL OPTION ? @VM03208 01074000
  1112. BZ CWNALL NO, BRANCH @VM03208 01075000
  1113. LH R15,FILWIDTH SET LENGTH TO MAXIMUM @VM03208 01076000
  1114. SPACE 1 01077000
  1115. CWNALL DS 0H CHECK FOR A TOO LARGE MESSAGE @VA05715 01078000
  1116. CH R15,=H'129' USER MESSAGE EXCEEDS 129 @VA05715 01079000
  1117. * CHARACTERS 01080000
  1118. BNH CWTYPER2 NO - USE ALL OF IT @VA05715 01081000
  1119. LA R15,129 TRUNCATE TO 129 @VA05715 01082000
  1120. CWTYPER2 BCTR R15,0 DECREMENT BY 1 FOR EX @VA05715 01083000
  1121. EX R15,MVERRMSG MOVE IN THE MESSAGE @VA05715 01084000
  1122. LA R15,4(,R15) ADD 3 FOR DMS AND 1 SUBTRACTED @VA05715 01085000
  1123. * FOR EX 01086000
  1124. STCM R15,LOBYT,MSGBUFF PLUG MESSAGE LENGTH @VM03208 01087000
  1125. LA R15,MSGBUFF GET MESSAGE ADDRESS @VM03208 01088000
  1126. STCM R15,AL3,ATEXT AND PLUG INTO PLIST @VM03208 01089000
  1127. MVC TPLIST(2),ERRFLGS SET DMSERR FLAGS @VM03208 01090000
  1128. LA R1,TPLIST POINT TO DMSERR PLIST @VM03208 01091000
  1129. SVC 203 TYPE MESSAGE @VM03208 01092000
  1130. DC H'-6' @VM03208 01093000
  1131. BR R14 RETURN @VM03208 01094000
  1132. SPACE 1 01095000
  1133. MVERRMSG MVC MSGBUFF+4(*-*),0(R5) @VM03208 01096000
  1134. SPACE 1 01097000
  1135. CWBEGPUN EQU * &BEGPUNCH 01098000
  1136. OI STCKFLAG,X'40' SET BEGPUNCH FLAG 01099000
  1137. CLI 8(PTR),X'FF' ANY OPTIONS GIVEN? 01100000
  1138. BCR 8,R14 RETURN IF NOT 01101000
  1139. CLC 8(4,PTR),=CL4'ALL' IS 'ALL' GIVEN? 01102000
  1140. BNE ERRSYN BRANCH IF NOT (SYNTAX ERROR) 01103000
  1141. OI STCKFLAG,X'0F' SET 'ALL' FLAG 01104000
  1142. BR R14 RETURN 01105000
  1143. SPACE 01106000
  1144. CWPUNC EQU * PUNCH A SCANNED LINE IN FREE FORMAT 01107000
  1145. LA PTR,8(,PTR) POINT TO THE RIGHT PLACE 01108000
  1146. LA R5,UNSCND POINT TO FREE-FORMAT BUFFER 01109000
  1147. LA R15,80 TELL FREESUB HOW LONG IT MAY GO 01110000
  1148. BAL RET,FREESUB FREESUB DOES THE WORK (LEAVES R15=LEN) 01111000
  1149. B CWPUNCGO GO DO THE PUNCHING 01112000
  1150. SPACE 01113000
  1151. CWPUNC2 EQU * PUNCH AN UNSCANNED LINE 01114000
  1152. LR R5,PTR ADDRESS OF LINE TO BE PUNCHED 01115000
  1153. LR R15,R0 LENGTH READ 01116000
  1154. TM CONRDFLG,X'FF' WAS LINE FROM CONSOLE? 01117000
  1155. BO CWPUNCGO BRANCH IF SO 01118000
  1156. TM STCKFLAG,X'0F' WAS 'ALL' GIVEN? 01119000
  1157. BZ CWPUNCGO BRANCH IF NOT 01120000
  1158. LH R15,FILWIDTH SET IT TO THE FILE WIDTH 01121000
  1159. SPACE 01122000
  1160. CWPUNCGO EQU * DO THE PUNCHING 01123000
  1161. LA R1,79(R5) ADDRESS OF 80TH BYTE OF BUFFER 01124000
  1162. AR R15,R5 POINT TO THE BYTE BEYOND THE LAST 01125000
  1163. CR R15,R1 HOW MANY BYTES DO WE HAVE? 01126000
  1164. BH LONGENUF BRANCH IF ALL 80 ARE THERE 01127000
  1165. MVI 0(R15),C' ' MOVE IN A BLANK 01128000
  1166. BE LONGENUF BRANCH IF THAT WAS IN THE 80TH SPOT 01129000
  1167. SR R1,R15 NUMBER OF BYTES WE HAVE TO PAD 01130000
  1168. BCTR R1,0 DECREMENT FOR EXEC 01131000
  1169. EX 1,PUNPAD PAD THEM WITH BLANKS 01132000
  1170. SPACE 01133000
  1171. LONGENUF EQU * 01134000
  1172. ST R5,EXTND STORE THE ADDRESS IN CARDPH PLIST 01135000
  1173. LA R1,CARDPCH PUNCH IT 01136000
  1174. LA R5,ERRETPCH IGNORE ERROR RETURN @V305614 01137000
  1175. ST R5,ERR$202 FILL ERROR RETURN FOR SVC @V305614 01138000
  1176. LR R5,R14 SAVE RETURN REGISTER @VM03209 01139000
  1177. BAL R14,SVC$202 PUNCH @V305614 01140000
  1178. ERRETPCH LR R14,R5 RESTORE RETURN REGISTER @VM03209 01141000
  1179. BR R14 BRANCH TO LOOP @V305614 01142000
  1180. SPACE 01143000
  1181. PUNPAD MVC 1(*-*,R15),0(R15) 01144000
  1182. CWSPAC LA R8,1 &SPACE N 01145000
  1183. LA R7,8(,PTR) GETS R7 FOR CVDBCD 01146000
  1184. CLI 0(R7),X'FF' END OF THE LINE? 01147000
  1185. BE CWSP1 BRANCH IF SO 01148000
  1186. BAL RET,CVDBCD 01149000
  1187. BNZ ERRCONV BRANCH IF CONVERSION ERROR 01150000
  1188. CVB R8,CVDSPACE 01151000
  1189. LTR R8,R8 WHAT IS THE VALUE? 01152000
  1190. BCR 13,R14 RETURN IF <= 0 01153000
  1191. CWSP1 EQU * SET TYPLIN PLIST FOR BLANK LINE 01154000
  1192. MVC TYPLIN+8(8),TYPLIST+8 DONE 01155000
  1193. LA R1,TYPLIN READY TO TYPE 01156000
  1194. CWSP2 EQU * 01157000
  1195. SVC 202 TYPE BLANK LINE 01158000
  1196. BCT R8,CWSP2 01159000
  1197. BR R14 01160000
  1198. SPACE 2 01161000
  1199. * NOTE--ADD NEW EXEC COMMANDS JUST BEFORE THIS LINE 01162000
  1200. SPACE 2 01163000
  1201. NOFILE LA R10,FILENO ADDRESS OF MESSAGE P LIST 01164000
  1202. B LEAVE 01165000
  1203. SPACE 1 01166000
  1204. SVCERR CVD 15,PDOUT CVD AND STORE R15 FOR PRINTING LATER 01167000
  1205. LR R9,R15 01168000
  1206. MVC PREVCMND(8),LASTCMND 01169000
  1207. EX R0,RSETCMD RESET CURRENT COMMAND TO EXEC 01170000
  1208. ZAP RETCODE(5),PDOUT(8) @VA03453 01171000
  1209. TM TFLAG,TYPERR+TYPCMS+TYPALL ANY TYPEOUT ON? 01172000
  1210. BZ DONT BRANCH IF NOT (DON'T TYPE ANYTHING) 01173000
  1211. TM TFLAG,TYPERR IS IT &TYPEOUT ERROR? 01174000
  1212. BZ ERRPRNT BRANCH IF NOT (I.E. IT'S CMS OR ALL) 01175000
  1213. BAL RET,TYPEOUT TYPE THE CMS COMMAND (TYPLIN SET BEFORE) 01176000
  1214. ERRPRNT EQU * TYPE A CMS-TYPE 'E' MESSAGE 01177000
  1215. MVC BUFFER(16),PATTERN SET FOR 'ED' 01178000
  1216. * CONVERT ERROR RETURN CODE TO GRAPHICS... 01179000
  1217. ED BUFFER+5(6),PDOUT+5 ED INTO BUFFER 01180000
  1218. MVI BUFFER+5,C'(' FIX UP LEFT PAREN 01181000
  1219. LTR R9,R9 WAS ERROR +VE OR -VE? 01182000
  1220. BNM *+8 SKIP IF >= 0 01183000
  1221. MVI BUFFER+6,C'-' INSERT MINUS SIGN 01184000
  1222. LA R10,BUFFER ADDRESS OF 'E' MESSAGE 01185000
  1223. O R10,TYPLIST+8 SET CONSOLE NO. 01186000
  1224. ST R10,TYPLIN+8 STORE FOR TYPLIN 01187000
  1225. MVC TYPLIN+12(4),=XL4'D9000010' TYPE IN RED, 16 CHARS 01188000
  1226. LA R1,TYPLIN WITH AN SVC 01189000
  1227. SVC 202 WHICH ALWAYS BEHAVES 01190000
  1228. DONT EQU * 01191000
  1229. BAL RET,TIMSUB PRINT LATEST TIMES (IF &TIME IS ON) 01192000
  1230. TM ERACT,X'F0' ERROR IN &ERROR ACTION? 01193000
  1231. BO ERRERR BRANCH IF SO 01194000
  1232. OI ERACT,X'F0' NO, SET ACTION FLAG 01195000
  1233. MVC CONRDFLG(1),ERACTION SET CONRDFLG FROM ERACTION 01196000
  1234. SR R0,R0 CLEAR R0 01197000
  1235. IC R0,ERACTION+1 PICK UP LENGTH OF ERROR ACTION 01198000
  1236. MVC UNSCND(130),ERACTION+2 RESTORE WHOLE '&ERROR' LINE 01199000
  1237. B SCANIT AND GO RESCAN IT 01200000
  1238. SPACE 1 01201000
  1239. EOF CLC GOSTOP(2),ZERO FIRST CHK FOR &GOTO SEARCH 01202000
  1240. * NOTE--&GOTO LOOPS BACK TO TOP OF FILE DURING SEARCH 01203000
  1241. * --IT FINALLY STOPS WHERE IT STARTED 01204000
  1242. BE EOF1 BRANCH IF NOT &GOTO SEARCH 01205000
  1243. LA R7,1 RESET TO TOP OF FILE 01206000
  1244. STH R7,PITEM STORE IN PLIST 01207000
  1245. B LOOP 01208000
  1246. EOF1 EQU * EOF FOUND WHEN NOT IN &GOTO SEARCH 01209000
  1247. CLC LOPLEVEL(2),ZERO ARE WE IN A LOOP? 01210000
  1248. BNE ERRLOOP BRANCH IF SO (ERROR) 01211000
  1249. CLOSE EQU * CLOSE THE EXEC FILE 01212000
  1250. LM R8,R9,DSKLIN SAVE DSKLIN FUNCTION 01213000
  1251. LA 1,DSKLIN ... 01214000
  1252. LR R3,R14 SAVE RETURN REGISTER @VM03209 01215000
  1253. SSM OFF DISABLE FOR INTERRUPTS @VA05743 01216000
  1254. L R15,AFINIS GET DMSFNS ADDRESS @VM03093 01217000
  1255. BALR R14,R15 AND CLOSE THE FILE @VM03093 01218000
  1256. SSM ON ENABLE FOR INTERRUPTS @VA05743 01219000
  1257. LR R14,R3 RESTORE RETURN REGISTER @VM03209 01220000
  1258. CLOSE2 EQU * EARLY ERROR CLOSING @VM08647 01221000
  1259. USING OPSECT,R3 @V305614 01222000
  1260. L R3,AOPSECT ADDRESSABILITY FOR OPSECT @V305614 01223000
  1261. L R1,EXADD+4 POINT TO GLOBAL AREA @V305614 01224000
  1262. USING XGLBL,R1 @V305614 01225000
  1263. SP GLOBAL(5),DECONE(1) @VA02322 01226000
  1264. DROP R1,R3 @V305614 01227000
  1265. LA R1,KEYWORDS 01228000
  1266. ST R1,ANCHOR 01229000
  1267. MVC LINKLEN(4),=F'16' 01230000
  1268. BAL RET,UNCHALL 01231000
  1269. LR R1,BFREE SET TO RETURN FREE STORAGE 01232000
  1270. LA 0,NEED ... 01233000
  1271. LM R3,R5,SAVRET RESTORE RETURN,SYSREF,AND R5 01234000
  1272. SSM OFF DISABLE FOR INTERRUPTS @VA05743 01235000
  1273. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR @VM03083 01236000
  1274. LR R14,R3 RESTORE RETURN 01237000
  1275. LTR R15,LINK LOAD AND TEST RETURN CODE 01238000
  1276. BR R14 RETURN TO THE CALLER. P0816 01239000
  1277. SPACE 1 01240000
  1278. * * * * * * * * * * * * EXEC RETURNS TO BOOTSTRAP HERE * * * * * * 01241000
  1279. ERRARGS EQU * TOO MANY ARGUMENTS PASSED 01242000
  1280. LA R10,MERRARGS SET UP 01243000
  1281. SPACE 01244000
  1282. LEAVE EQU * TYPE AN ERROR MESSAGE 01245000
  1283. LR R8,R10 SAVE R10 (CLOBBERED BY REF. TO 'RET') 01246000
  1284. MVC UNSCND(L'ERRMSG),ERRMSG MOVE IN STANDARD START OF MSG 01247000
  1285. LA R7,UNSCND+L'ERRMSG AND POINT TO NEXT FREE BYTE 01248000
  1286. MVC 0(8,R7),FNAME MOVE IN FILENAME 01249000
  1287. BAL RET,GIVLEN FIND ITS LENGTH 01250000
  1288. AR R7,R15 POINT TO NEXT FREE BYTE 01251000
  1289. MVC 0(L'ERRLINE,R7),ERRLINE MOVE IN NEXT PIECE OF MSG 01252000
  1290. LA R7,L'ERRLINE(,R7) AND POINT TO NEXT FREE BYTE 01253000
  1291. LA R3,LINENUM GET THE LINE NUMBER 01254000
  1292. BAL RET,UNPACK4 @VA02322 01255000
  1293. MVC 0(8,R7),TEMPD MOVE IT INTO THE MESSAGE 01256000
  1294. BAL RET,GIVLEN GET ITS LENGTH 01257000
  1295. AR R7,R15 POINT TO NEXT FREE BYTE 01258000
  1296. MVC 0(L'ERRDASH,R7),ERRDASH MOVE IN A NICE DASH 01259000
  1297. LA R7,L'ERRDASH(,R7) AND POINT TO NEXT FREE BYTE 01260000
  1298. SR R4,R4 CLEAR R4 01261000
  1299. IC R4,0(,R8) AND GET L'PARTICULAR MESSAGE 01262000
  1300. LR R3,R8 01263000
  1301. SR R3,R4 POINT TO SPOT WHERE MESSAGE STARTS 01264000
  1302. BCTR R4,0 DECREASE LENGTH FOR EXEC 01265000
  1303. EX R4,MOVMSG MOVE THE PARTICULAR MESSAGE 01266000
  1304. LA R15,1(R4,R7) AND POINT TO NEXT FREE BYTE @VM03208 01267000
  1305. LA R5,UNSCND POINT TO ADDRESS OF BUFFER @VM03208 01268000
  1306. SR R15,R5 CALCULATE MESSAGE LENGTH @VM03208 01269000
  1307. BAL R14,CWTYPER1 AND TYPE IT @VM03208 01270000
  1308. SR R7,R7 CLEAR THIS FOR RETURN CODE @VM03208 01271000
  1309. IC R7,1(,R8) GET ERROR CODE (R7 = 'LINK') 01272000
  1310. AH R7,=H'800' ADD 800 TO THE RETURN CODE P0816 01273000
  1311. B CLOSE 01274000
  1312. SPACE 01275000
  1313. MOVMSG MVC 0(*-*,R7),0(R3) 01276000
  1314. SPACE 1 01277000
  1315. ERDEPTH LA R10,MERDEPTH 01278000
  1316. B LEAVE 01279000
  1317. SPACE 1 01280000
  1318. CHK12 SR LINK,LINK SET TO SHOW NO ERRORS 01281000
  1319. CH R15,=H'12' 12 IS END OF FILE ERROR 01282000
  1320. BE EOF 01283000
  1321. SPACE 01284000
  1322. RDERR EQU * ERROR FROM RDBUF 01285000
  1323. LA R10,MRDERR ADDRESS OF MESSAGE DATA 01286000
  1324. LH R7,PITEM UPDATE THE LINE NUMBER 01287000
  1325. CVD R7,CVDSPACE CONVERT TO DECIMAL 01288000
  1326. MVC LINENUM(4),CVDSPACE+4 AND MOVE INTO LINENUM 01289000
  1327. B LEAVE 01290000
  1328. SPACE 1 01291000
  1329. BADSIZ LA R10,SIZBAD 01292000
  1330. B LEAVE 01293000
  1331. SPACE 1 01294000
  1332. ERRCOND LA R10,MERRCOND 01295000
  1333. B LEAVE 01296000
  1334. SPACE 1 01297000
  1335. ERRINDX LA R10,MERRINDX 01298000
  1336. B LEAVE 01299000
  1337. SPACE 1 01300000
  1338. ERRERR LA R10,MERRERR ERROR IN &ERROR ACTION 01301000
  1339. B LEAVE 01302000
  1340. SPACE 01303000
  1341. ERRCONV LA R10,MERRCONV ERROR IN CONVERSION TO ARITHMETIC 01304000
  1342. B LEAVE 01305000
  1343. SPACE 01306000
  1344. ERRSYN LA R10,MERRSYN SYNTAX ERROR 01307000
  1345. B LEAVE 01308000
  1346. SPACE 01309000
  1347. ERRASS LA R10,MERRASS ASSIGNMENT ERROR 01310000
  1348. B LEAVE 01311000
  1349. SPACE 01312000
  1350. ERRBUST LA R10,MERRBUST TOO MANY TOKENS IN 1 STATEMENT 01313000
  1351. B LEAVE 01314000
  1352. SPACE 01315000
  1353. ERRBLTN LA R10,MERRBLTN BUILT-IN FUNCTION ERROR 01316000
  1354. B LEAVE 01317000
  1355. SPACE 01318000
  1356. ERRLOOP LA R10,MERRLOOP LOOP NOT TERMINATED 01319000
  1357. B LEAVE 01320000
  1358. SPACE 01321000
  1359. ERRWORD LA R10,MERRWORD BAD CONTROL WORD 01322000
  1360. B LEAVE 01323000
  1361. EJECT 01324000
  1362. ERRUFLW LA R10,MERRUFLW EXEC UNDERFLOW @VA02322 01325000
  1363. B LEAVE @VA02322 01326000
  1364. SPACE 1 01327000
  1365. ERROFLW LA R10,MERROFLW EXEC OVERFLOW @VA02322 01328000
  1366. B LEAVE @VA02322 01329000
  1367. SPACE , HRC007DS 01329070
  1368. ERRDIVZ LA R10,MERRDIVZ DIVIED BY ZERO ERROR HRC007DS 01329140
  1369. B LEAVE HRC007DS 01329210
  1370. SPACE 1 01329300
  1371. ERRCHAR LA R10,MERRCHAR INVALID CHAR IN VARIABLE SYMBOL @VA07374 01329600
  1372. B LEAVE @VA07374 01329900
  1373. SPACE 1 01330000
  1374. * 'TYPECRON' AND 'TYPEOUT' REWRITTEN. 01331000
  1375. SPACE 01332000
  1376. TYPECRON EQU * TYPE WITH CHRONOLOGICAL 01333000
  1377. TM TFLAG,TYPTIM IS IT &TYPEOUT TIME? 01334000
  1378. BZ TYPEOUT BRANCH IF NOT (SKIP TIME-OF-DAY) 01335000
  1379. LA R1,CONWAIT WAIT FOR CONSOLE TO SUBSIDE 01336000
  1380. SVC 202 01337000
  1381. LA R1,CURRDATE READ CP'S TIMER V0040 01338000
  1382. DC X'83',X'10',X'000C' V0040 01339000
  1383. MVC UNSCND(8),CURRTIME TOD TO UNSCND 01340000
  1384. MVI UNSCND+8,C' ' FOLLOW WITH A BLANK 01341000
  1385. LA R15,UNSCND+9 SET R15 FOR NEXT SPARE BYTE 01342000
  1386. B TYPEOUTA BRANCH INTO 'TYPEOUT' 01343000
  1387. SPACE 01344000
  1388. TYPEOUT EQU * TYPE OUT THE LINE 01345000
  1389. LA R15,UNSCND WHERE TO START IN UNSCND BUFFER 01346000
  1390. TYPEOUTA EQU * (TRANSFER HERE FROM 'TYPECRON') 01347000
  1391. STM R4,R10,TEMSUB2 SAVE NECESSARY REGISTERS 01348000
  1392. L R4,TYPLIN+8 ADDRESS OF LINE TO BE TYPED 01349000
  1393. LH R5,TYPLIN+14 LENGTH 01350000
  1394. AR R5,R4 ADDRESS OF BYTE AFTER LAST 01351000
  1395. LA R6,UNSCND ADDRESS OF NEW LINE IN UNSCND 01352000
  1396. LR R7,R15 WHERE TO PUT THE FIRST TOKEN IN UNSCND 01353000
  1397. LA R8,L'UNSCND LENGTH OF UNSCND IN R8 01354000
  1398. LA R9,UNTAIL ADDRESS OF UNSCND TAIL IN R9 01355000
  1399. TYPOLP EQU * MOVE LINE INTO UNSCND BUFFER, TOK BY TOK 01356000
  1400. CR R4,R5 HAVE WE REACHED END OF LINE? 01357000
  1401. BNL TYPIT BRANCH IF SO 01358000
  1402. CR R7,R9 IS UNSCND BUFFER EXHAUSTED? 01359000
  1403. BNL TYPCONT BRANCH IF SO (INDICATE TRUNCATED) 01360000
  1404. MVC 0(8,R7),0(R4) MOVE WHOLE OF NEXT TOK INTO UNSCND 01361000
  1405. MVI 8(R7),C' ' FOLLOW WITH A BLANK 01362000
  1406. LA R4,8(,R4) POINT R4 TO NEXT TOK 01363000
  1407. TM TFLAG,TYPPAC IS IT &TYPEOUT PACK? 01364000
  1408. BO TYPACK BRANCH IF SO 01365000
  1409. LA R7,9(,R7) SKIP OVER TOKEN AND BLANK 01366000
  1410. B TYPOLP BACK FOR NEXT TOK 01367000
  1411. TYPACK EQU * PACK THE LINE 01368000
  1412. BAL RET,GIVLEN LENGTH OF TOKEN INTO R15 01369000
  1413. LA R7,1(R7,R15) NEXT FREE BYTE IN UNSCND 01370000
  1414. B TYPOLP BACK FOR NEXT TOK 01371000
  1415. SPACE 01372000
  1416. TYPCONT EQU * TYPE WITH INDICATION OF TRUNCATION 01373000
  1417. MVC UNTAIL-3(3),=CL3'...' MOVE ELLIPSIS IN END OF UNSCND 01374000
  1418. LR R7,R8 L'UNSCND INTO R7 01375000
  1419. B TYPIT2 BRANCH INTO 'TYPIT' 01376000
  1420. TYPIT EQU * STRIP OFF ANY TRAILING BLANKS 01377000
  1421. CR R7,R6 IS OUTPUT LINE NULL? 01378000
  1422. BE TYPIT1 BRANCH IF SO 01379000
  1423. BCTR R7,0 LOOK AT LAST CHAR IN UNSCND 01380000
  1424. CLI 0(R7),C' ' IS IT A BLANK? 01381000
  1425. BE TYPIT LOOP BACK IF SO (STRIP IT OFF) 01382000
  1426. LA R7,1(,R7) INCREMENT R7 AGAIN TO COMPUTE LENGTH 01383000
  1427. TYPIT1 EQU * COMPUTE LENGTH OF LINE 01384000
  1428. SR R7,R6 LENGTH OF LINE TO TYPE 01385000
  1429. CR R7,R8 COMPARE WITH MAX. POSSIBLE LENGTH 01386000
  1430. BH TYPCONT BACK TO TYPCONT IF TOO LONG 01387000
  1431. TYPIT2 EQU * (TRANSFER HERE FROM 'TYPCONT') 01388000
  1432. ST R6,TYPLIN+8 ADDRESS OF UNSCND 01389000
  1433. MVI TYPLIN+8,X'01' FIX UP CONSOLE NO. 01390000
  1434. CLI TYPLIN+12,X'00' IS COLOUR SPECIFIED? 01391000
  1435. BNE *+8 SKIP IF SO 01392000
  1436. MVI TYPLIN+12,C'B' USE BLACK RIBBON 01393000
  1437. STH R7,TYPLIN+14 LENGTH OF LINE TO BE TYPED 01394000
  1438. LA R1,TYPLIN TYPE THE LINE (AT LAST) 01395000
  1439. SVC 202 01396000
  1440. LM R4,R10,TEMSUB2 RESTORE REGISTERS 01397000
  1441. BR RET RETURN TO CALLER 01398000
  1442. SPACE 2 01399000
  1443. ERRMSG DC C'EXT072E Error in EXEC file ' HRC309DS 01400000
  1444. ERRLINE DC C', line ' HRC309DS 01401000
  1445. ERRDASH DC C' - ' FINISHING TOUCH 01402000
  1446. SPACE 2 01403000
  1447. ERR1 DC C'File not found' HRC309DS 01404000
  1448. FILENO DC AL1(L'ERR1) 01405000
  1449. DC X'01' ERROR NUMBER 01406000
  1450. ERR2 DC X'50E2D2C9D74096994050C7D6E3D6408599999699' 01407000
  1451. * ABOVE SAYS &SKIP or &GOTO error 01408000
  1452. ERRGOTO DC AL1(L'ERR2) 01409000
  1453. DC X'02' 01410000
  1454. ERR3 DC C'Bad file format' HRC309DS 01411000
  1455. SIZBAD DC AL1(L'ERR3) 01412000
  1456. DC X'03' 01413000
  1457. ERR4 DC C'Too many arguments' HRC309DS 01414000
  1458. MERRARGS DC AL1(L'ERR4) 01415000
  1459. DC X'04' 01416000
  1460. ERR5 DC C'Max depth of loop nesting exceeded' HRC309DS 01417000
  1461. MERDEPTH DC AL1(L'ERR5) 01418000
  1462. DC X'05' 01419000
  1463. ERR6 DC C'Error reading file' HRC309DS 01420000
  1464. MRDERR DC AL1(L'ERR6) 01421000
  1465. DC X'06' 01422000
  1466. ERR7 DC C'Invalid syntax' HRC309DS 01423000
  1467. MERRSYN DC AL1(L'ERR7) 01424000
  1468. DC X'07' 01425000
  1469. ERR8 DC C'Invalid form of condition' HRC309DS 01426000
  1470. MERRCOND DC AL1(L'ERR8) 01427000
  1471. DC X'08' 01428000
  1472. ERR9 DC C'Invalid assignment' HRC309DS 01429000
  1473. MERRASS DC AL1(L'ERR9) 01430000
  1474. DC X'09' 01431000
  1475. ERR10 DC C'Misuse of special variable' HRC309DS 01432000
  1476. MERRINDX DC AL1(L'ERR10) 01433000
  1477. DC X'0A' 01434000
  1478. ERR11 DC X'C5999996994089954050C5D9D9D6D9408183A3899695' 01435000
  1479. * ABOVE SAYS 'Error in &ERROR action' 01436000
  1480. MERRERR DC AL1(L'ERR11) 01437000
  1481. DC X'0B' 01438000
  1482. ERR12 DC C'Conversion error' HRC309DS 01439000
  1483. MERRCONV DC AL1(L'ERR12) 01440000
  1484. DC X'0C' 01441000
  1485. ERR13 DC C'Too many tokens in statement' HRC309DS 01442000
  1486. MERRBUST DC AL1(L'ERR13) 01443000
  1487. DC X'0D' 01444000
  1488. ERR14 DC C'Misuse of built-in function' HRC309DS 01445000
  1489. MERRBLTN DC AL1(L'ERR14) 01446000
  1490. DC X'0E' 01447000
  1491. ERR15 DC C'EOF found in loop' HRC309DS 01448000
  1492. MERRLOOP DC AL1(L'ERR15) 01449000
  1493. DC X'0F' 01450000
  1494. ERR16 DC C'Invalid control word' HRC309DS 01451000
  1495. MERRWORD DC AL1(L'ERR16) 01452000
  1496. DC X'10' 01453000
  1497. ERR17 DC C'EXEC arithmetic underflow' HRC309DS 01454000
  1498. MERRUFLW DC AL1(L'ERR17) @VA02322 01455000
  1499. DC X'11' @VA02322 01456000
  1500. ERR18 DC C'EXEC arithmetic overflow' HRC309DS 01457000
  1501. MERROFLW DC AL1(L'ERR18) @VA02322 01458000
  1502. DC X'12' @VA02322 01459000
  1503. ERR19 DC C'Invalid char in variable symbol' HRC309DS 01459300
  1504. MERRCHAR DC AL1(L'ERR19) @VA07374 01459600
  1505. DC X'13' @VA07374 01459900
  1506. ERR30 DC C'EXEC divide by zero' HRC309DS 01459920
  1507. MERRDIVZ DC AL1(L'ERR30) HRC007DS 01459940
  1508. DC X'1E' HRC007DS 01459960
  1509. PATTERN DC C'+++ R' 01460000
  1510. DC X'F02020202020' FILL + DIGIT SELECTORS 01461000
  1511. DC C') +++' 01462000
  1512. SPACE 1 01463000
  1513. * SUBROUTINES HERE FOR EXEC 01464000
  1514. SPACE 01465000
  1515. * 'SETUP' IS A SUBROUTINE WHICH SETS UP READFLAG AND TYPEFLAG 01466000
  1516. * FROM THE CURRENT SETTINGS OF THE SYSTEM FLAGS. 01467000
  1517. SPACE 01468000
  1518. SETUP DS 0H 01469000
  1519. MVC READFLAG(8),=CL8'CONSOLE' SET READFLAG PROVISIONALLY 01470000
  1520. CLC FSTFINRD(4),ZERO ANY READS STACKED? 01471000
  1521. BE *+10 SKIP IF NOT 01472000
  1522. MVC READFLAG(8),=CL8'STACK' SET READFLAG FOR STACK 01473000
  1523. MVC TYPEFLAG(8),RTINIT SET TYPEFLAG TO 'RT' @VM03181 01474000
  1524. TM MSGFLAGS,NOTYPING IS "HT" FLAG SET? 01475000
  1525. BE DOSCHK SKIP IF NOT @V305101 01476000
  1526. MVI TYPEFLAG,C'H' SET TYPEFLAG TO 'HT' 01477000
  1527. * TM CONFLAG,X'01' IS THE CJS BIT SET FOR DT? 01478000
  1528. * BCR 8,RET RETURN IF NOT (ALL SET UP) 01479000
  1529. * MVI TYPEFLAG,C'D' SET TYPEFLAG TO 'DT' 01480000
  1530. DOSCHK MVC DOS(8),=CL8'OFF' SET DOS FLAG TO 'OFF' @V305101 01481000
  1531. TM DOSFLAGS,DOSSVC+DOSMODE ANYBODY ON ? @V305101 01482000
  1532. BZR RET RETURN IF NOT ON @V305101 01483000
  1533. MVC DOS(8),=CL8'ON' SET DOS FLAG TO 'ON' @V305101 01484000
  1534. BR RET RETURN 01485000
  1535. SPACE 2 01486000
  1536. * 'TIMSET' AND 'TIMSUB' RESET AND TYPE THE CMS TIMES 01487000
  1537. * (VIRCPU, TOTCPU AND TIME-OF-DAY). THE ENTRY POINTS 'TIMSET' 01488000
  1538. * AND 'TIMSUB' ARE EFFECTIVE ONLY IF THE TIMFLG IS ON; 'TIMSETA' 01489000
  1539. * AND 'TIMSUBA' ARE EXPLICIT. USES THE NEW NUCLEUS ROUTINE 01490000
  1540. * 'CMSTIME'. 01491000
  1541. SPACE 01492000
  1542. TIMSET EQU * RESET THE TIMES IF TIMFLG IS ON 01493000
  1543. TM TIMFLG,TIMON IS TIMFLG ON? 01494000
  1544. BCR 8,RET RETURN IF NOT 01495000
  1545. TIMSETA EQU * RESET THE TIMES EXPLICITLY 01496000
  1546. SR R0,R0 SIGNAL NOT ENTERED AT TIMSUB 01497000
  1547. SR R1,R1 READY TO TELL CMSTIME TO RESET ONLY 01498000
  1548. B TIMSUB2 BRANCH INTO 'TIMSUB' 01499000
  1549. SPACE 01500000
  1550. TIMSUB EQU * TYPE TIMES (AND RESET) IF TIMFLG IS ON 01501000
  1551. TM TIMFLG,TIMON IS TIMFLG ON? 01502000
  1552. BCR 8,RET RETURN IF NOT 01503000
  1553. LA R0,1 SIGNAL ENTERED AT TIMSUB 01504000
  1554. B *+6 SKIP NEXT INSTRUCTION 01505000
  1555. TIMSUBA EQU * TYPE AND RESET TIMES EXPLICITLY 01506000
  1556. SR R0,R0 SIGNAL NOT ENTERED AT TIMSUB 01507000
  1557. LA R1,CONWAIT WAIT FOR CONSOLE TO SUBSIDE 01508000
  1558. SVC 202 01509000
  1559. LA R1,TIMBUF+2 READY TO TELL CMSTIME TO USE OUR TIMBUF 01510000
  1560. TIMSUB2 EQU * (TRANSFER HERE FROM TIMSET) 01511000
  1561. ST R1,CMSTIME+16 TELL CMSTIME WHAT TO DO 01512000
  1562. LA R1,CMSTIME READY TO CALL CMSTIME 01513000
  1563. L R15,AGETCLK ACCESS CMS-TIME 01514000
  1564. BALR R14,R15 CALL CMSTIME 01515000
  1565. L R1,CMSTIME+16 WHAT WE ASKED CMSTIME TO DO 01516000
  1566. LTR R1,R1 WHAT WAS IT? 01517000
  1567. BCR 8,RET RETURN IF RESET 01518000
  1568. MVC TYPLIN+8(8),TYPLIST+8 SET UP TYPLIN PLIST 01519000
  1569. LA R1,TIMBUF ADDRESS OF WHAT TO TYPE 01520000
  1570. ST R1,TYPLIN+8 TELL TYPLIN 01521000
  1571. MVI TYPLIN+8,X'01' FIX UP CONSOLE NO. 01522000
  1572. L R1,CMSTIME+20 LENGTH OF TIMBUF WHICH IS OCCUPIED 01523000
  1573. LA R1,2(,R1) PLUS 2 FOR 'T=' 01524000
  1574. STH R1,TYPLIN+14 TELL TYPLIN 01525000
  1575. LA R1,TYPLIN TYPE THE LINE 01526000
  1576. SVC 202 01527000
  1577. LTR R0,R0 DID WE ENTER AT TIMSUB? 01528000
  1578. BCR 8,RET RETURN IF NOT 01529000
  1579. TM TFLAG,TYPCMS+TYPALL DID WE TYPE THE CMS COMMAND? 01530000
  1580. BCR 8,RET RETURN IF NOT 01531000
  1581. MVI TYPLIN+15,X'00' TELL TYPLIN TO TYPE BLANK LINE 01532000
  1582. SVC 202 01533000
  1583. BR RET RETURN 01534000
  1584. SPACE 2 01535000
  1585. * 'CONDRET' EXAMINES CONDITION POINTED TO BY R7 AND RETURNS 01536000
  1586. * CONDITION CODE = 0 IF AND ONLY IF THE CONDITION IS SATISFIED. 01537000
  1587. CONDRET STM R2,R10,TEMSUB 01538000
  1588. MVC COND(24),0(R7) 01539000
  1589. LA R8,COND USE R8 AS LOC OF COND 01540000
  1590. SR R5,R5 ZERO ALL COUNT 01541000
  1591. LR R6,R5 ZERO ANY COUNT 01542000
  1592. NI CONDFLG,X'0F' CLEAR 4 BITS OF FLAG 01543000
  1593. CLC 0(3,R8),ESTAR '&*'? 01544000
  1594. BNE *+12 01545000
  1595. LA R5,1 01546000
  1596. OI CONDFLG,X'20' PUT IN FLAGS.. 01547000
  1597. CLC 16(3,R8),ESTAR '&*'? 01548000
  1598. BNE *+12 01549000
  1599. LA R5,1 01550000
  1600. OI CONDFLG,X'10' 01551000
  1601. CLC 0(3,R8),EDOLL '&$'? 01552000
  1602. BNE *+12 01553000
  1603. LA R6,1 01554000
  1604. OI CONDFLG,X'80' 01555000
  1605. CLC 16(3,R8),EDOLL '&$'? 01556000
  1606. BNE *+12 01557000
  1607. LA R6,1 01558000
  1608. OI CONDFLG,X'40' 01559000
  1609. TM CONDFLG,X'A0' INIT ARGS? 01560000
  1610. BZ CONDZ 01561000
  1611. CONDCP CP INDEX(4),DECZERO(1) EXIT IF NONE SUPPLIED 01562000
  1612. BE WRAPRET 01563000
  1613. MVC 0(8,R8),8+ARGTABLE PUT IN FIRST DUMMY ARG 01564000
  1614. CONDZ TM CONDFLG,X'50' 01565000
  1615. BZ CDLOOP 01566000
  1616. EX R0,CONDCP 01567000
  1617. BE WRAPRET 01568000
  1618. MVC 16(8,R8),ARGTABLE+8 +8 BECAUSE FILNAM IS IN ARGTBLE 01569000
  1619. CDLOOP LR R7,R8 01570000
  1620. SR R2,R2 ZERO FOR LOGICAL COMPARE,6 FOR ARITH 01571000
  1621. BAL RET,CVDBCD RET SAVED-GO GET DECIMAL 01572000
  1622. BNZ LOGCF BRANCH IF CONVERSION ERROR 01573000
  1623. CVB R9,CVDSPACE NOT NECESSARILY,GET BIN VAL 01574000
  1624. LA R7,16(,R8) GET ADDR OF 3RD OPERAND 01575000
  1625. BAL RET,CVDBCD GO GET DEC 01576000
  1626. BNZ LOGCF BRANCH IF CONVERSION ERROR 01577000
  1627. CVB R7,CVDSPACE NO, SET FLAG TO... 01578000
  1628. LA R2,6 ..COMPARE ARITHMETICALLY 01579000
  1629. LOGCF LA R4,COMBEG LOOK FOR CONDITION 01580000
  1630. LA R3,COMEND 01581000
  1631. COMLOOP CLC 0(3,R4),8(R8) COMPARE TABLE ENTRY P0193 01582000
  1632. BE COMFND ... 01583000
  1633. LA R4,4(,R4) ... 01584000
  1634. CLR R4,R3 ... 01585000
  1635. BL COMLOOP ... 01586000
  1636. B ERRCOND NOT >,<,=,ETC. 01587000
  1637. COMFND IC R4,3(,R4) GET MASK FROM TABLE P0193 01588000
  1638. EX 0,COMPARE(R2) 01589000
  1639. LA R2,1(,R6) 01590000
  1640. LA RET,1(,R5) RET=R10 01591000
  1641. SLL R10,3 MPY BOTH BY 8 01592000
  1642. SLL R2,3 ... 01593000
  1643. LA R2,ARGTABLE(R2) 01594000
  1644. LA R10,ARGTABLE(R10) 01595000
  1645. EX R4,COMPAR 01596000
  1646. B CFALSE 01597000
  1647. COMPARE CLC 0(8,R8),16(R8) LOGICAL COMPARE 01598000
  1648. CR R9,R7 ARITHMETIC COMPARE 01599000
  1649. COMPAR BC 0,CTRUE COMPARE A TO B 01600000
  1650. CFALSE LTR R6,R6 TEST 'ANY' COUNT 01601000
  1651. BZ WRAPRET ZERO --RETURN 01602000
  1652. LA R6,1(,R6) ITERATE COMPARISON 01603000
  1653. CVD R6,CVDSPACE FOR EACH PARAM SUPPL'D 01604000
  1654. CP CVDSPACE(8),INDEX(4) ANY MORE? 01605000
  1655. BH WRAPRET NO-- RETURN 01606000
  1656. TM CONDFLG,X'80' TEST 1ST OPERAND 01607000
  1657. BZ *+10 NOPE--GO TEST 2ND 01608000
  1658. MVC 0(8,R8),0(R2) YEP--MOVE IN NEXT ARG 01609000
  1659. TM CONDFLG,X'40' TEST 2ND 01610000
  1660. BZ *+10 01611000
  1661. MVC 16(8,R8),0(R2) MOVE IN NXT ARG. 01612000
  1662. B CDLOOP BACK FOR NXT COMPARISON 01613000
  1663. SATOUT EQU * THIS USED TO RETURN R7 = 0 AND THEN 01614000
  1664. SR R7,R7 CHKALL WOULD CLOBBER THE 1ST 24 BYTES 01615000
  1665. B *+8 IN THE VIRTUAL MACHINE... 01616000
  1666. WRAPRET EQU * SO NOW IT JUST RETURNS WITH THE 01617000
  1667. LA R7,1 CONDITION CODE SET, BUT WITH R7 01618000
  1668. LTR R7,R7 SAFE AND SOUND 01619000
  1669. LM R2,R10,TEMSUB RESTORE REGISTERS 01620000
  1670. BR RET 01621000
  1671. CTRUE LTR R5,R5 'ALL' FLAG SET? 01622000
  1672. BZ SATOUT NO--RETURN 01623000
  1673. LA R5,1(,R5) ITERATE COMPARISON 01624000
  1674. CVD R5,CVDSPACE 01625000
  1675. CP CVDSPACE(8),INDEX(4) 01626000
  1676. BH SATOUT 01627000
  1677. TM CONDFLG,X'20' 01628000
  1678. BZ *+10 01629000
  1679. MVC 0(8,R8),0(R10) 01630000
  1680. TM CONDFLG,X'10' 01631000
  1681. BZ *+10 01632000
  1682. MVC 16(8,R8),0(R10) 01633000
  1683. B CDLOOP 01634000
  1684. SPACE 3 01635000
  1685. * CVDBCD CONVERTS TO PACKED DECIMAL IN CVDSPACE FROM EBCDIC IN 01636000
  1686. * LOCATION POINTED TO BY R7--WILL CONVERT 0-8 DIGITS,SIGN--IF 01637000
  1687. * LETTER IS ENCOUNTERED OTHER THAN BLANK, CVDFLAG IS SET TO 'F' 01638000
  1688. * OTHERWISE IT IS '0'AND NUM IS VALID UP TO LETTER--HOWEVER, 01639000
  1689. * IT WILL NOT LOOK ACROSS A DBL-WORD BOUNDARY. 01640000
  1690. * SETS CONDITION CODE BY MEANS OF: TM CVDFLAG,X'F0' 01641000
  1691. CVDBCD DS 0H 01642000
  1692. STM R3,R8,TEMSUB2 SAVE REGISTERS 01643000
  1693. ZAP CVDSPACE(8),DECZERO(1) ZERO CVDSPACE 01644000
  1694. CLI 0(R7),X'FF' ANYTHING THERE? 01645000
  1695. BE CVDBAD BRANCH IF NOT (CONVERSION ERROR) 01646000
  1696. LR R3,R7 1ST MOVE POINTERS TO CVD 01647000
  1697. LA R4,1 01648000
  1698. N R7,=X'FFFFFFF8' GET R7 ON DOUB WRD BOUNDARY 01649000
  1699. MVC CVD(8),0(R7) MOVE INTO WORK AREA 01650000
  1700. SR R3,R7 01651000
  1701. LA R7,CVD 01652000
  1702. AR R3,R7 01653000
  1703. LA R5,7(,R7) MAX VAL FOR BXLE 01654000
  1704. MVI CVDFLAG,X'00' ZERO CVDFLAG 01655000
  1705. XC CVDSPACE(8),CVDSPACE ZERO CVDSPACE 01656000
  1706. MVI CVDSPACE+7,X'F0' PUT IN ZERO 01657000
  1707. MVI SIGN,POS SET TO PLUS (COMPL) @V305666 01658000
  1708. CVD1 BAL R8,CHKLN IF LENGTH<1, SET DEFAULT & RETURN 01659000
  1709. CLI 0(R3),C' ' REMOVES LEADING BLANKS 01660000
  1710. BNE CVD2 ... 01661000
  1711. BXLE R3,R4,CVD1 01662000
  1712. CVD2 LCR R6,R4 SET R6=-1 01663000
  1713. LR R7,R3 01664000
  1714. CVD3 BAL R8,CHKLN REMOVE TRAILING BLANKS 01665000
  1715. CLI 0(R5),C' ' ... 01666000
  1716. BNE CVD4 ... 01667000
  1717. BXH R5,R6,CVD3 01668000
  1718. CVD4 CLI 0(R3),C'+' 01669000
  1719. BNE CVD6 01670000
  1720. CVD5 LA R3,1(,R3) 01671000
  1721. B CVD7 01672000
  1722. CVD6 CLI 0(R3),C'-' 01673000
  1723. BNE CVD7 01674000
  1724. MVI SIGN,NEG PUT IN - (COMPL) @V305666 01675000
  1725. B CVD5 01676000
  1726. CVD7 BAL R8,CHKLN 01677000
  1727. CVD8 TM 0(R3),X'F0' DIGIT? 01678000
  1728. BNO CVD9 01679000
  1729. TM 0(R3),X'0F' 01680000
  1730. BO CVD9 01681000
  1731. CLI 0(R3),X'FA' GREATER THAN 9? @VA02750 01682000
  1732. BNL CVD9 YES, TRANS @VA02750 01683000
  1733. MVC CVDSPACE(7),CVDSPACE+1 SHIFT LEFT 01684000
  1734. MVC CVDSPACE+7(1),0(R3) PUT IN NUMBER 01685000
  1735. BXLE R3,R4,CVD8 01686000
  1736. B SIGNIT NO MORE @V305614 01687000
  1737. CVD9 OI CVDFLAG,X'F0' SET FLAG TO INDICATE CHAR IN NO 01688000
  1738. SIGNIT XC CVDSPACE+7(1),SIGN PLUG SIGN @V305614 01689000
  1739. PACK CVDSPACE(8),CVDSPACE(8) 01690000
  1740. CVD11 LM R3,R8,TEMSUB2 01691000
  1741. TM CVDFLAG,X'F0' SET CONDITION CODE 01692000
  1742. BR RET RETURN TO CALLER 01693000
  1743. CHKLN CR R3,R5 01694000
  1744. BCR 13,R8 BR ON NOT HIGH THRU R8 01695000
  1745. CVDBAD EQU * CONVERSION ERROR 01696000
  1746. OI CVDFLAG,X'F0' SET ERROR FLAG 01697000
  1747. B CVD11 RETURN 01698000
  1748. SPACE 3 01699000
  1749. * CWRET RETURNS R7=ADDRESS OF NAME OF CONTROL WORD IF ADDR 01700000
  1750. * IN R6 CONTAINS A CONTROL WORD, R7=0 OTHERWISE 01701000
  1751. CWRET STM R1,R6,TEMSUB 01702000
  1752. LA R1,EXECWRDS BEG VALUS FOR LOOP 01703000
  1753. LA R3,ELITERAL SPOT TO STOP 01704000
  1754. LA R2,8 INCREMENT 01705000
  1755. CWLP2 EQU * 01706000
  1756. CLC 0(8,R6),0(R1) COMPARE FOR EXEC WORD 01707000
  1757. BE CWOUT ..CONTROL WORDS.. 01708000
  1758. BXLE R1,R2,CWLP2 01709000
  1759. SR R7,R7 SET R7, COND CODE TO 0 01710000
  1760. LMOUT LM R1,R6,TEMSUB 01711000
  1761. BR RET 01712000
  1762. CWOUT EQU * 01713000
  1763. LTR R7,R1 GET ADDR OF CONTRL WORD,& SET COND CODE 01714000
  1764. B LMOUT 01715000
  1765. SPACE 3 01716000
  1766. * KEYWCK SEARCHES KEYWORD CHAIN FOR KEYWORD VALUE 01717000
  1767. * CORRESPONDING TO KEYWORD IN TEMPD. R9 POINTS TO VALUE IF 01718000
  1768. * FOUND, R9=0 FOR NO MATCH. 01719000
  1769. KEYWCK EQU * @VA07244 01720000
  1770. ST RET,TEMSUB2 SAVE RETURN ADDRESS @VA07244 01721000
  1771. LA R9,KEYWORDS LOAD ANCHOR ADDRESS @VA07244 01722000
  1772. XC CHAD,CHAD KEEP DATA AREAS CORRECT @VA07244 01723000
  1773. KELOOP EQU * @VA07244 01724000
  1774. L R9,0(,R9) POINT TO NEXT CHAIN LINK @VA07244 01725000
  1775. LTR R9,R9 IS IT END OF CHAIN @VA07244 01726000
  1776. BZ KEOUT YES - BRANCH @VA07244 01727000
  1777. * 01728000
  1778. CLC TEMPD(8),4(R9) IS THIS THE KEYWORD @VA07244 01729000
  1779. BNE KELOOP NO - BRANCH @VA07244 01730000
  1780. * 01731000
  1781. ST R9,CHAD SAVE ADDRESS OF CHAIN LINK @VA07244 01732000
  1782. LA R9,12(,R9) POINT TO KEYWORD VALUE @VA07244 01733000
  1783. KEOUT EQU * @VA07244 01734000
  1784. L RET,TEMSUB2 RESTORE RETURN ADDRESS @VA07244 01735000
  1785. LTR R9,R9 SET CONDITION CODE @VA07244 01736000
  1786. BR RET RETURN TO CALLER @VA07244 01737000
  1787. SPACE 3 01738000
  1788. * FULLNAM WILL TRANSFER TO 01739000
  1789. * ADDR IN ADLIST AFTER CONTROL WORD MATCH. 01740000
  1790. FULLNAM STM R7,R8,TEMSUB2 01741000
  1791. LA R8,BLTINS CHECK THAT IT'S NOT A BUILT-IN FUNCTION 01742000
  1792. CR R7,R8 01743000
  1793. BNL ERRWORD BRANCH IF IT IS (ERROR) 01744000
  1794. LA RET,EXECWRDS READY TO FORM ADDRESS 01745000
  1795. SR R7,RET 01746000
  1796. SRA R7,2 DVD BY 4 TO GET DISPL 01747000
  1797. LA RET,ADLIST(R7) 01748000
  1798. LH RET,0(,RET) GET BRANCH ADDR 01749000
  1799. AR RET,BASE 01750000
  1800. LM R7,R8,TEMSUB2 01751000
  1801. BR RET 01752000
  1802. SPACE 3 01753000
  1803. CHKALL EQU * CHECK CONDITION FOR LOOP 01754000
  1804. STM R5,R10,TEMSUB3 SAVE REGISTERS 01755000
  1805. MVC COND1(24),0(R7) MOVE CONDITION INTO OUR TEMP 01756000
  1806. LA R5,24(,R7) POINT TO LITERAL FLAGS 01757000
  1807. LA R6,COND1 01758000
  1808. LA R9,16(,R6) SET UP FOR BXLE. THIS IS WHERE TO STOP 01759000
  1809. LA R8,8 THIS IS THE INCREMENT 01760000
  1810. CHKALL1 EQU * LOOP 01761000
  1811. TM 0(R5),X'FF' LITERAL FLAG SET? 01762000
  1812. BNZ CHKALL2 SKIP IF SO @VA04597 01763000
  1813. L R15,ASUBSTIT GET SUBSTIT ADDRESS @VM03209 01764000
  1814. BALR RET,R15 AND DO A SUBSTITUTION JOB @VM03209 01765000
  1815. CHKALL2 LA R5,1(,R5) INCREMENT POINTER @VA04597 01766000
  1816. BXLE R6,R8,CHKALL1 LOOP FOR ALL 3 TOKS 01767000
  1817. TM TFLAG,TYPALL IS IT &TYPEOUT ALL? 01768000
  1818. BNO CONDCALL BRANCH IF NOT 01769000
  1819. LA R5,CONDMSG POINT TO START OF MESSAGE 01770000
  1820. LA R6,40 LENGTH 01771000
  1821. STM R5,R6,TYPLIN+8 STORE IN TYPLIN PLIST 01772000
  1822. BAL RET,TYPEOUT TYPE THE CONDITION 01773000
  1823. CONDCALL EQU * 01774000
  1824. LA R7,COND1 POINT TO THE CONDITION 01775000
  1825. BAL RET,CONDRET CHECK THE CONDITION 01776000
  1826. LM R5,R10,TEMSUB3 RESTORE REGISTERS 01777000
  1827. BR RET RETURN 01778000
  1828. SPACE 2 01779000
  1829. * 'LHS' IS A SUBROUTINE WHICH RETURNS THE ADDRESS OF THE TARGET 01780000
  1830. * FOR AN ASSIGNMENT IN R7. SETS THE CONDITION CODE TO ZERO IF 01781000
  1831. * THE TARGET IS NOT A NUMERIC VARIABLE, TO 'HIGH' IF IT IS. 01782000
  1832. SPACE 01783000
  1833. LHS DS 0H 01784000
  1834. STM R8,R10,TEMSUB SAVE NECESSARY REGS 01785000
  1835. CLC 1(2,PTR),=CL2'0 ' IS IT '&0'? 01786000
  1836. BE ANDZRO SKIP IF SO @VA02750 01787000
  1837. CLI 1(PTR),X'F0' FIRST CHAR AFTER '&' NUMBER 1-9? 01788000
  1838. BNH TRYGLOB BRANCH IF NOT (TRY A GLOBAL) 01789000
  1839. CLI 1(PTR),X'FA' GREATER THAN 9? @VA02750 01790000
  1840. BNL TRYGLOB YES, TRANS @VA02750 01791000
  1841. ANDZRO LA R7,1(PTR) POINT R7 TO DIGIT @VA02750 01792000
  1842. BAL RET,CVDBCD TRY TO CONVERT TO NUMERICS 01793000
  1843. BNZ UVAR MUST BE A USER VARIABLE 01794000
  1844. CVB R7,CVDSPACE ARG. NO. INTO R7 01795000
  1845. CH R7,=H'30' TOO HIGH? 01796000
  1846. BH ERRINDX BRANCH IF SO (IMPLEMENTATION LIMIT) 01797000
  1847. SLL R7,3 MULTIPLY BY 8 01798000
  1848. LA R7,ARGTABLE(R7) ADDRESS OF TARGET 01799000
  1849. B LHSBOT RETURN 01800000
  1850. TRYGLOB LA R10,EBEGLOB SEE IF IT'S A GLOBAL 01801000
  1851. LA R8,8 SET INCREMENT FOR BXLE 01802000
  1852. LA R9,ETYPEFLG LIMIT 01803000
  1853. CLC 0(8,PTR),0(R10) SEARCH FOR NAME 01804000
  1854. BE FNDGLOB BRANCH IF FOUND 01805000
  1855. BXLE R10,R8,*-10 LOOP 01806000
  1856. B UVAR TREAT AS USER VARIABLE 01807000
  1857. FNDGLOB LA R9,EBEGLOB FOUND A SPECIAL VARIABLE 01808000
  1858. CR R10,R9 IS IT &GLOBAL? 01809000
  1859. BE ERRINDX BRANCH IF SO (ILLEGAL) 01810000
  1860. LA R9,EXECEND IS IT AMONG THE READ-ONLY VARS? 01811000
  1861. CR R10,R9 01812000
  1862. BNL ERRINDX BRANCH IF SO 01813000
  1863. LA R9,ERETCOD MAYBE ITS &RETCODE ? @VA03453 01814000
  1864. CR R10,R9 @VA03453 01815000
  1865. BNE NOTRTCD MUST BE A GLOBAL .... @VA03453 01816000
  1866. LA R7,RETCODE POINT TO ASSIGNMENT LOCATION @VA03453 01817000
  1867. B LHSIND AND EXIT GRACEFULLY ... @VA03453 01818000
  1868. NOTRTCD EQU * @VA03453 01819000
  1869. LA R9,EGLOB+8 ADDRESS OF &GLOBAL0 01820000
  1870. SR R10,R9 DIFFERENCE 01821000
  1871. SRL R10,3 DIVIDE BY 8 @VA02322 01822000
  1872. MH R10,=H'5' GET INDEX VALUE INTO GLOBALS .. @VA02322 01823000
  1873. USING OPSECT,R9 @V305614 01824000
  1874. L R9,AOPSECT POINT TO OPSECT IN NUCLEUS @V305614 01825000
  1875. USING XGLBL,R8 @V305614 01826000
  1876. L R8,EXADD+4 POINT TO GLOBAL AREA @V305614 01827000
  1877. LA R7,GLOBAL0(R10) ADDRESS OF TARGET 01828000
  1878. DROP R8,R9 @V305614 01829000
  1879. B LHSIND FIX COND. CODE AND RETURN 01830000
  1880. UVAR MVC TEMPD(8),0(PTR) MOVE NAME INTO TEMPD FOR KEYWCK 01831000
  1881. BAL RET,KEYWCK MUST BE A USER VARIABLE 01832000
  1882. LTR R7,R9 ALREADY DEFINED? 01833000
  1883. BNZ LHSBOT BRANCH IF SO 01834000
  1884. LA R7,KEYWORDS PUT IT IN THE CHAIN 01835000
  1885. ST R7,ANCHOR 01836000
  1886. LA R7,16 01837000
  1887. ST R7,LINKLEN 01838000
  1888. BAL RET,APPEND 01839000
  1889. L R7,ADDR 01840000
  1890. MVC 0(8,R7),0(PTR) 01841000
  1891. LA R7,8(,R7) 01842000
  1892. L R9,KPTR 01843000
  1893. LA R9,1(,R9) 01844000
  1894. ST R9,KPTR 01845000
  1895. LHSBOT SR R10,R10 SET COND. CODE 0 01846000
  1896. LHSRET LM R8,R10,TEMSUB RESTORE REGS 01847000
  1897. BR RET RETURN 01848000
  1898. LHSIND LA R10,1 SET COND. CODE 'HIGH' 01849000
  1899. LTR R10,R10 01850000
  1900. B LHSRET 01851000
  1901. SPACE 2 01852000
  1902. * 'RHS' IS A SUBROUTINE WHICH ANALYZES THE RIGHT-HAND SIDE 01853000
  1903. * OF AN ASSIGNMENT STATEMENT, LOOKING FOR BUILT-IN 01854000
  1904. * FUNCTIONS. 01855000
  1905. SPACE 01856000
  1906. RHS DS 0H 01857000
  1907. MVC TEMPD(8),BLANKS BLANK OUT THE ANSWER 01858000
  1908. CLC 16(8,PTR),=8X'FF' END OF THE PLIST @VA05428 01859000
  1909. BCR 8,RET RETURN IF SO 01860000
  1910. STM R3,R10,TEMSUB SAVE REGISTERS 01861000
  1911. LA R3,BLTINS ADDRESS OF BUILT-IN FUNCTION NAMES 01862000
  1912. LA R4,EBLTINS END OF SAME 01863000
  1913. LA R5,ABLTINS ADDRESS OF TRANSFER VECTOR 01864000
  1914. BLTLP EQU * BUILT-IN SEARCH LOOP 01865000
  1915. CLC 16(8,PTR),0(R3) MATCH? 01866000
  1916. BE BLDFND BRANCH IF SO 01867000
  1917. LA R3,8(,R3) LOOK AT NEXT BUILT-IN NAME 01868000
  1918. LA R5,2(,R5) AND BUMP UP R5 IN CASE WE FIND IT 01869000
  1919. CR R3,R4 END OF BUILT-INS? 01870000
  1920. BL BLTLP LOOP IF NOT 01871000
  1921. SPACE 1 01872000
  1922. NOTHEX MVC TEMPD(8),16(PTR) MOVE IN NON-HEX TOKEN @V305614 01873000
  1923. HEXASSN CLI 24(PTR),FF IS IT THE ONLY ONE ? @V305666 01874000
  1924. BE RHSRET RETURN IF SO 01875000
  1925. CLC 24(2,PTR),=CL2'+ ' PLUS? 01876000
  1926. BE PLUS BRANCH IF SO 01877000
  1927. CLC 24(2,PTR),=CL2'- ' MINUS? 01878000
  1928. BE MINUS BRANCH IF SO 01879000
  1929. CLC 24(2,PTR),=CL2'* ' MULTIPLY? HRC007DS 01879200
  1930. BE TIMES BRANCH IF SO HRC007DS 01879400
  1931. CLC 24(2,PTR),=CL2'/ ' DIVIDE? HRC007DS 01879600
  1932. BE DIVIDE BRANCH IF SO HRC007DS 01879800
  1933. B ERRASS ASSIGNMENT ERROR 01880000
  1934. BLDFND EQU * FOUND A BUILT-IN FUNCTION 01881000
  1935. LH R3,0(,R5) FORM TRANSFER ADDRESS 01882000
  1936. AR R3,BASE 01883000
  1937. LA R5,TEMPD POINT TO TEMPD WITH R5 01884000
  1938. LA R6,TEMPD+7 AND TO END OF IT WITH R6 01885000
  1939. LA R7,24(,PTR) POINT TO THE NEXT TOKEN WITH R7 01886000
  1940. BR R3 AND BRANCH TO THE RIGHT ROUTINE 01887000
  1941. SPACE 01888000
  1942. CONCAT EQU * 'CONCAT' BUILT-IN FUNCTION 01889000
  1943. CLI 0(R7),X'FF' NO MORE? 01890000
  1944. BE RHSRET BRANCH IF SO (RETURN) 01891000
  1945. BAL RET,GIVLEN GET LNEGTH OF TOKEN POINTED AT BY R7 01892000
  1946. LTR R9,R15 MOVE THE ANSWER INTO R9 01893000
  1947. BNH CONCAT1 BRANCH IF <= 0 01894000
  1948. BCTR R15,0 DECREASE FOR EXEC 01895000
  1949. EX R15,MOVCON MOVE IT IN (MAY OVERFLOW INTO CVD) 01896000
  1950. AR R5,R9 MOVE ALONG FOR NEXT ONE 01897000
  1951. CR R5,R6 PAST THE END? 01898000
  1952. BH RHSRET BRANCH IF SO (RETURN) 01899000
  1953. CONCAT1 EQU * 01900000
  1954. LA R7,8(,R7) LOOK AT NEXT TOKEN 01901000
  1955. B CONCAT REPEAT FOR THIS TOKEN 01902000
  1956. SPACE 01903000
  1957. MOVCON MVC 0(*-*,R5),0(R7) 01904000
  1958. SPACE 01905000
  1959. LENGTH EQU * 'LENGTH' BUILT-IN FUNCTION 01906000
  1960. SR R15,R15 SET FOR ZERO 01907000
  1961. CLI 24(PTR),X'FF' RIGHT? 01908000
  1962. BE *+8 SKIP IF SO 01909000
  1963. BAL RET,GIVLEN GET LENGTH 01910000
  1964. CVD R15,CVDSPACE CONVERT TO PACKED DECIMAL 01911000
  1965. LA R3,CVDSPACE+4 POINT TO THE LAST 4 BYTES OF IT 01912000
  1966. BAL RET,UNPACK4 UNPACK IT INTO TEMPD @VA02322 01913000
  1967. B RHSRET RETURN 01914000
  1968. SPACE 01915000
  1969. SUBSTR EQU * 'SUBSTR' BUILT-IN FUNCTION 01916000
  1970. CLI 0(R7),X'FF' ANY ARGS? 01917000
  1971. BE ERRBLTN BRANCH IF NOT (ERROR) 01918000
  1972. CLI 8(R7),X'FF' SECOND ARG PRESENT? 01919000
  1973. BE ERRBLTN BRANCH IF NOT (ERROR) 01920000
  1974. LA R9,7 SET R9 TO 7 FOR LATER 01921000
  1975. LA R7,8(,R7) POINT TO FIRST NUMERIC ARGUMENT 01922000
  1976. BAL RET,CVDBCD CONVERT TO DECIMAL 01923000
  1977. BNZ ERRCONV BRANCH IF CONVERSION ERROR 01924000
  1978. CVB R3,CVDSPACE CONVERT TO BINARY 01925000
  1979. BCTR R3,0 DECREASE FOR ADDRESS CALCULATION 01926000
  1980. LTR R3,R3 CHECK THAT IT'S >= 0 01927000
  1981. BL ERRBLTN BRANCH IF IT'S NOT (ERROR) 01928000
  1982. LR R4,R9 ASSUME 3RD ARGUMENT IS ABSENT (SET LEN=8) 01929000
  1983. LA R7,8(,R7) POINT TO LAST ARGUMENT 01930000
  1984. CLI 0(R7),X'FF' TRUE? 01931000
  1985. BE MOVSUBS BRANCH IF SO 01932000
  1986. BAL RET,CVDBCD CONVERT TO PACKED DECIMAL 01933000
  1987. BNZ ERRCONV BRANCH IF CONVERSION ERROR 01934000
  1988. CVB R4,CVDSPACE CONVERT TO BINARY 01935000
  1989. LTR R4,R4 TEST IT 01936000
  1990. BL ERRBLTN BRANCH IF < 0 (ERROR) 01937000
  1991. BZ RHSRET BRANCH IF ZERO (ALL DONE) 01938000
  1992. BCTR R4,0 DECREASE FOR EXEC 01939000
  1993. MOVSUBS EQU * 01940000
  1994. SR R9,R3 NUMBER OF BYTES AVAILABLE - 1 01941000
  1995. BL RHSRET BRANCH IF NONE (RETURN) 01942000
  1996. CR R4,R9 TOO MANY ASKED FOR? 01943000
  1997. BNH *+6 SKIP IF NOT 01944000
  1998. LR R4,R9 SET TO THE MAXIMUM 01945000
  1999. SH R7,=H'16' POINT TO TOKEN TO BE SUBSTRED 01946000
  2000. LA R7,0(R3,R7) POINT TO BYTE WHERE WE START 01947000
  2001. EX R4,MOVSUBST MOVE IN THE RIGHT SUBSTRING 01948000
  2002. B RHSRET RETURN 01949000
  2003. SPACE 01950000
  2004. MOVSUBST MVC TEMPD(*-*),0(R7) 01951000
  2005. SPACE 01952000
  2006. DATATYP EQU * RETURNS 'NUM' OR 'CHAR' 01953000
  2007. MVC TEMPD(3),=CL3'NUM' ASSUME IT'S A NUMBER 01954000
  2008. BAL RET,CVDBCD CONVERT TO NUMERICS 01955000
  2009. BZ RHSRET BRANCH IF SUCCESSFUL 01956000
  2010. MVC TEMPD(4),=CL4'CHAR' SAY 'CHAR' 01957000
  2011. B RHSRET 01958000
  2012. SPACE 01959000
  2013. PLUS EQU * 01960000
  2014. MINUS EQU * 01961000
  2015. TIMES EQU * HRC007DS 01961300
  2016. DIVIDE EQU * HRC007DS 01961600
  2017. LA R7,16(,PTR) ADDRESS OF FIRST TOKEN ON RHS 01962000
  2018. BAL RET,CVDBCD CONVERT TO PACKED 01963000
  2019. BNZ ERRCONV BRANCH IF CONVERSION ERROR 01964000
  2020. ZAP TEMPD(5),CVDSPACE(8) MOVE ANS INTO TOP TEMPD @VA02322 01965000
  2021. BC B'1110',NUMOK BRANCH IF NO OVERFLOW @VA02322 01966000
  2022. OVERFLOW EQU * @VA02322 01967000
  2023. TM TEMPD+4,X'0D' UNDERFLOW?? @VA02322 01968000
  2024. BO ERRUFLW YES... @VA02322 01969000
  2025. B ERROFLW NO, MUST BE OVERFLOW @VA02322 01970000
  2026. NUMOK EQU * @VA02322 01971000
  2027. BO ERRCONV BRANCH IF OVERFLOW 01972000
  2028. ASSLOOP EQU * LOOP THROUGH PLUSES AND MINUSES 01973000
  2029. LA R6,8(,R7) POINT TO + OR - 01974000
  2030. LA R7,16(,R7) POINT TO TOKEN TO BE ADDED OR SUBTRACTED 01975000
  2031. CLI 0(R7),X'FF' TOKEN ABSENT? 01976000
  2032. BE ERRASS BRANCH IF SO 01977000
  2033. SPACE 1 01978000
  2034. NOTHEX2 BAL RET,CVDBCD CONVERT TO PACKED @V305614 01979000
  2035. BNZ ERRCONV BRANCH IF CONVERSION ERROR 01980000
  2036. CLC 0(2,R6),=CL2'+ ' PLUS? 01981000
  2037. BNE ASGNSUB CHECK IF SUBTRACTION @VA02322 01982000
  2038. AP TEMPD(5),CVDSPACE(8) SUBTRACT THE NUMBER @VA02322 01983000
  2039. B ASGNEND CONTINUE WITH CHECK FOR OVERFLOW @VA02322 01984000
  2040. ASGNSUB EQU * @VA02322 01985000
  2041. CLC 0(2,R6),=CL2'- ' MINUS? 01986000
  2042. BNE ASGNUML NO, KEEP CHECKING HRC007DS 01987490
  2043. SP TEMPD(5),CVDSPACE(8) SUBTRACT THE NUMBER @VA02322 01988000
  2044. B ASGNEND CONTINUE WITH CHECK FOR OVERFLOW HRC007DS 01988040
  2045. ASGNUML CLC 0(2,R6),=CL2'* ' TIMES HRC007DS 01988080
  2046. BNE ASGNDIV NO.... HRC007DS 01988120
  2047. CVB R1,CVDSPACE GET MULTIPLIER HRC007DS 01988160
  2048. ZAP CVDSPACE(8),TEMPD(5) HRC007DS 01988200
  2049. CVB R15,CVDSPACE MULTIPLICAND HRC007DS 01988240
  2050. MR R0,R15 MULTIPLY HRC007DS 01988280
  2051. SLDA R0,32 CHECK FOR OVERFLOW HRC007DS 01988320
  2052. CVD R0,CVDSPACE CONVERT HRC007DS 01988360
  2053. MVC TEMPD+4(1),CVDSPACE+7 GET SIGN IN CASE OVERFLOW HRC007DS 01988400
  2054. BO OVERFLOW HRC007DS 01988440
  2055. ZAP TEMPD(5),CVDSPACE(8) HRC007DS 01988480
  2056. B ASGNEND CONT CHECK FOR OVERFLOW HRC007DS 01988520
  2057. ASGNDIV CLC 0(2,R6),=CL2'/ ' DIVIDE? HRC007DS 01988560
  2058. BNE ERRASS ERROR IF NOT HRC007DS 01988600
  2059. CVB R15,CVDSPACE GET DIVISOR HRC007DS 01988640
  2060. ZAP CVDSPACE(8),TEMPD(5) HRC007DS 01988680
  2061. CVB R1,CVDSPACE DIVIDEND HRC007DS 01988720
  2062. LTR R15,R15 HRC007DS 01988760
  2063. BZ ERRDIVZ CAN'T DIVIDE BY ZERO HRC007DS 01988800
  2064. SLR R0,R0 CLEAR FOR DIVIDE HRC007DS 01988840
  2065. DR R0,R15 DIVIDE HRC007DS 01988880
  2066. CVD R1,CVDSPACE QUOTIENT HRC007DS 01988920
  2067. ZAP TEMPD(5),CVDSPACE(8) HRC007DS 01988960
  2068. ASGNEND BO OVERFLOW REAL OVERFLOW? @VA02322 01989000
  2069. TM TEMPD,X'F0' TOO LARGE A NUMBER FOR EXEC? @VA02322 01990000
  2070. BNE OVERFLOW CHECK TYPE OF VIOLATION @VA02322 01991000
  2071. CLI 8(R7),X'FF' END? 01992000
  2072. BNE ASSLOOP LOOP IF NOT 01993000
  2073. LA R3,TEMPD POINT TO ANSWER 01994000
  2074. BAL RET,UNPACK5 AND UNPACK IT INTO TEMPD @VA02322 01995000
  2075. SPACE 01996000
  2076. RHSRET EQU * RETURN FROM RHS 01997000
  2077. LM R3,R10,TEMSUB RESTORE REGISTERS 01998000
  2078. BR RET RETURN 01999000
  2079. SPACE 2 02000000
  2080. * GIVLEN RETURNS THE LENGTH IN R15 OF THE TOKEN POINTED AT BY R7 02001000
  2081. SPACE 02002000
  2082. GIVLEN DS 0H 02003000
  2083. LA R15,7(,R7) LOOK AT LAST BYTE OF TOKEN 02004000
  2084. CLI 0(R15),C' ' BLANK? 02005000
  2085. BNE *+12 SKIP IF NOT 02006000
  2086. BCTR R15,0 LOOK AT PREVIOUS BYTE 02007000
  2087. CR R15,R7 HAVE WE GONE TOO FAR? 02008000
  2088. BNL GIVLEN+4 LOOP IF NOT 02009000
  2089. LA R15,1(,R15) INCREMENT R15 02010000
  2090. SR R15,R7 GET LENGTH 02011000
  2091. BR RET RETURN 02012000
  2092. SPACE 2 02013000
  2093. * 'UNPACK' IS A SUBROUTINE WHICH UNPACKS A PACKED 02014000
  2094. * DEC. NUM. OF LENGTH 4 OR 5, WHICH IS POINTED TO BY R3, 02015000
  2095. * AND MOVES THE ANSWER TO TEMPD. USES R9 AS A TEMP. 02016000
  2096. SPACE 02017000
  2097. UNPACK4 LA R9,3 LENGTH OF FIELD FOR COMPARE @VA02322 02018000
  2098. B UNPACK @VA02322 02019000
  2099. UNPACK5 LA R9,4 @VA02322 02020000
  2100. UNPACK EQU * @VA02322 02021000
  2101. SLL R9,4 SET UP L1, L2 FIELD FOR COMPARE @VA02322 02022000
  2102. EX R9,INS1 IS IT ZERO? @VA02322 02023000
  2103. BNE UNPNOTZ NO, UNPACK IT THEN @VA02322 02024000
  2104. MVC TEMPD(8),BLANKS SET RESULTING VALUE TO ZERO @VA02322 02025000
  2105. MVI TEMPD,X'F0' SINGLE 0 FOLLOWED BY BLANKS @VA02322 02026000
  2106. BR RET RETURN 02027000
  2107. UNPNOTZ EQU * IT'S NOT ZERO 02028000
  2108. SRL R9,4 SET UP L1, L2 FOR UNPACK @VA02322 02029000
  2109. O R9,=X'00000070' SET L1 LENGTH TO 8 @VA02322 02030000
  2110. EX R9,INS2 @VA02322 02031000
  2111. TM TEMPD+7,X'D0' MINUS SIGN? 02032000
  2112. BNO UNPIPLUS @VA02322 02033000
  2113. CLI TEMPD,X'F0' IF NEG, MUST BE < 8 DIGITS @VA02322 02034000
  2114. BNE ERRUFLW IF NOT, EXEC ARITHMETIC UNDERFLOW@VA02322 02035000
  2115. OI TEMPD+7,X'F0' SET ZONE 02036000
  2116. B *+8 02037000
  2117. UNPIAGN EQU * 02038000
  2118. MVI TEMPD+7,C' ' CLEAR THE LAST SPOT 02039000
  2119. CLI TEMPD+1,X'F0' LOOK AT 2ND SPOT 02040000
  2120. BNE UNPIOUT BRANCH IF NOT A ZERO 02041000
  2121. MVC TEMPD(7),TEMPD+1 SHIFT ONE CHARACTER TO LEFT 02042000
  2122. B UNPIAGN LOOP 02043000
  2123. UNPIOUT EQU * 02044000
  2124. MVI TEMPD,C'-' INSERT A MINUS SIGN 02045000
  2125. BR RET RETURN 02046000
  2126. UNPIPLUS EQU * IT'S PLUS 02047000
  2127. OI TEMPD+7,X'F0' SET ZONE @VA02322 02048000
  2128. CLI TEMPD,X'F0' LEADING ZERO? @VA02322 02049000
  2129. BNER RET NO, OK AS IS @VA02322 02050000
  2130. MVC TEMPD(7),TEMPD+1 SHIFT ONE CHARACTER TO LEFT 02051000
  2131. MVI TEMPD+7,C' ' AND CLEAR LAST SPOT 02052000
  2132. B UNPIPLUS+4 CONTINUE @VA02322 02053000
  2133. INS1 CP 0(*-*,R3),DECZERO(1) @VA02322 02054000
  2134. INS2 UNPK TEMPD(8),0(*-*,R3) @VA02322 02055000
  2135. SPACE 2 02056000
  2136. * 02057000
  2137. * THIS SUBROUTINE PUTS A LINE INTO FREE-FORMAT 02058000
  2138. * (TOKENS SEPARATED BY ONE BLANK) IN THE BUFFER UNSCND. 02059000
  2139. * ON ENTRY, R15 GIVES THE MAXIMUM ALLOWABLE LENGTH. 02060000
  2140. * RETURNS THE ACTUAL LENGTH IN R15. 02061000
  2141. SPACE 02062000
  2142. FREESUB DS 0H 02063000
  2143. STM R1,R4,TEMSUB2 SAVE REGISTERS 02064000
  2144. LR R4,R15 SAVE MAXIMUM ALLOWABLE LENGTH 02065000
  2145. LA R15,UNSCND GET ADDRESS OF UNSCND BUFFER 02066000
  2146. AR R4,R15 ADDRESS OF BYTE BEYOND LAST ALLOWABLE 02067000
  2147. LR R1,PTR LOOK AT FIRST TOKEN 02068000
  2148. CLI 0(R1),X'FF' END OF LINE? 02069000
  2149. BE FREEEND1 BRANCH IF SO 02070000
  2150. FREELP1 LA R3,7(R1) LOOK AT 8TH BYTE OF TOKEN 02071000
  2151. FREELP2 CLI 0(R3),C' ' IS THIS BYTE A BLANK? 02072000
  2152. BNE FREEMOV BRANCH IF NOT (MOVE TOKEN) 02073000
  2153. BCTR R3,0 LOOK AT PREVIOUS BYTE 02074000
  2154. CR R3,R1 HAVE WE GONE PAST 1ST BYTE OF TOKEN? 02075000
  2155. BNL FREELP2 BRANCH IF NOT (LOOP) 02076000
  2156. B FREENEXT GO DEAL WITH NEXT TOKEN 02077000
  2157. FREEMOV SR R3,R1 BYTES TO MOVE MINUS 1 02078000
  2158. LA R2,1(R15) POINT TO 2ND FREE BYTE OF FRELINE 02079000
  2159. AR R2,R3 AND ADD R3 02080000
  2160. CR R2,R4 IS TOKEN TOO LONG FOR REMAINING SPACE? 02081000
  2161. BH FREEEND BRNCH IF SO (ABNDN THIS AND RMNNG TOKS) 02082000
  2162. EX R3,FREEMVC MOVE THE TOKEN, LESS UNNECESSARY BLANKS 02083000
  2163. MVI 0(R2),C' ' AND FOLLOW WITH A BLANK 02084000
  2164. LA R15,1(R2) POINT TO NEXT FREE BYTE OF UNSCND 02085000
  2165. FREENEXT LA R1,8(R1) LOOK AT NEXT TOKEN 02086000
  2166. CLI 0(R1),X'FF' END OF SOURCE? 02087000
  2167. BNE FREELP1 LOOP IF NOT 02088000
  2168. FREEEND BCTR R15,0 POINT TO LAST BYTE USED (WILL BE BLANK) 02089000
  2169. FREEEND1 LA R2,UNSCND ADDRESS OF NEW BUFFER 02090000
  2170. SR R15,R2 NO. OF BYTES IN IT 02091000
  2171. LM R1,R4,TEMSUB2 RESTORE REGISTERS 02092000
  2172. BR RET RETURN 02093000
  2173. SPACE 02094000
  2174. FREEMVC MVC 0(0,R15),0(R1) MOVE A TOKEN 02095000
  2175. SPACE 1 02096000
  2176. FRET ST R14,SAV14 SAVE R14, @VM03083 02097000
  2177. SSM OFF DISABLE FOR INTERRUPTS @VA05743 02098000
  2178. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR @VM03083 02099000
  2179. SSM ON ENABLE FOR INTERRUPTS @VA05743 02100000
  2180. L R14,SAV14 RESTORE R14, @VM03093 02101000
  2181. BR RET AND RETURN. @VM03093 02102000
  2182. FREE ST R14,SAV14 SAVE R14, @VM03083 02103000
  2183. SSM OFF DISABLE FOR INTERRUPTS @VA05743 02104000
  2184. DMSFREE DWORDS=(0),TYPCALL=BALR @VM03083 02105000
  2185. SSM ON ENABLE FOR INTERRUPTS @VA05743 02106000
  2186. L R14,SAV14 RESTORE R14 02107000
  2187. BR RET 02108000
  2188. SPACE 1 02109000
  2189. APPEND ST RET,UNCHSAV+8 02110000
  2190. STM R0,R1,UNCHSAV 02111000
  2191. L R8,ANCHOR GET ADDRESS OF BASE BLOCK @VA07244 02112000
  2192. B CHCK1 START CHECKING @VA07244 02113000
  2193. CHCK0 EQU * @VA07244 02114000
  2194. L R8,0(,R8) GET ANOTHER BLOCK @VA07244 02115000
  2195. CHCK1 EQU * @VA07244 02116000
  2196. CLC 0(4,R8),ZERO IS THIS THE END OF CHAIN ? @VA07244 02117000
  2197. BNE CHCK0 NO,...CHECK AGAIN @VA07244 02118000
  2198. ST R8,CHAD SAVE ADDRESS OF CHAIN LINK @VA07244 02119000
  2199. L R0,LINKLEN 02120000
  2200. AH R0,=H'11' 4 FOR PTR + 7 FOR TRUNCATION 02121000
  2201. SRL R0,3 NO OF DOUBLE WORDS 02122000
  2202. BAL RET,FREE 02123000
  2203. XC 0(4,R1),0(R1) ZERO IT 02124000
  2204. L R10,CHAD 02125000
  2205. ST R1,0(,R10) 02126000
  2206. LA R10,4(,R1) GET ADDR OF DATA 02127000
  2207. ST R10,ADDR 02128000
  2208. LM R0,R1,UNCHSAV 02129000
  2209. L RET,UNCHSAV+8 02130000
  2210. BR RET 02131000
  2211. SPACE 2 02132000
  2212. * UNCHALL RELEASES ENTIRE CHAIN TO FREE STORAGE 02133000
  2213. * REQUIRES LINKLEN SET 02134000
  2214. UNCHALL STM R0,R3,UNCHSAV 02135000
  2215. LR R3,RET 02136000
  2216. L R0,LINKLEN 02137000
  2217. AH R0,=H'11' LA WONT WORK 02138000
  2218. SRL R0,3 NO DOUB WORDS 02139000
  2219. L R1,ANCHOR GET ADDR OF BASE BLOCK 02140000
  2220. L R2,0(,R1) 02141000
  2221. XC 0(4,R1),0(R1) 02142000
  2222. CHALG C R2,=F'0' 02143000
  2223. BZ CHAPF 02144000
  2224. LR R1,R2 02145000
  2225. L R2,0(,R2) 02146000
  2226. BAL RET,FRET 02147000
  2227. B CHALG 02148000
  2228. CHAPF LR RET,R3 02149000
  2229. LM R0,R3,UNCHSAV 02150000
  2230. BR RET 02151000
  2231. * AN ASSIGNMENT TOKEN PREFIXED BY 'X'' INDICATES A 02152000
  2232. * HEX VALUE. THE HEXDEC ROUTINE CONVERTS THE HEX VALUE 02153000
  2233. * TO THE USUAL PACKED DECIMAL FORM. 02154000
  2234. * AT INPUT REG 9 POINTS TO THE FIRST HEX DIGIT, AND 02155000
  2235. * REG 3 IS THE RETURN ADDRESS. 02156000
  2236. SPACE 1 02157000
  2237. HEXDEC EQU * @V305614 02158000
  2238. LR R10,R8 PICK UP MAX FIELD LENGTH @VA06198 02159000
  2239. SR R5,R5 CLEAR WORK REGISTER @V305614 02160000
  2240. SR R4,R4 CLEAR RESULT REGISTER @V305614 02161000
  2241. SPACE 1 02162000
  2242. HDLOOP CLI 0(R9),END IS THIS THE END ? @V305666 02163000
  2243. BE HDDONE YES, BR @V305614 02164000
  2244. IC R5,0(,R9) TAKE THE BYTE @V305614 02165000
  2245. CLI 0(R9),CHAR0 COULD IT BE 'A - 'F' ? @V305666 02166000
  2246. BL AFCHK YES, BR @V305614 02167000
  2247. SPACE 1 02168000
  2248. CLI 0(R9),CHAR9 ERROR IF GREATER @V305666 02169000
  2249. BH ERRCONV THAN 9 @VM03209 02170000
  2250. SH R5,CLR1 STRIP THE 'F' @V305614 02171000
  2251. HDLOOP1 SLL R4,4 MAKE ROOM FOR THE DIGIT @V305614 02172000
  2252. AR R4,R5 AND INSERT IT @V305614 02173000
  2253. SPACE 1 02174000
  2254. LA R9,1(,R9) POINT TO THE NEXT ONE @V305614 02175000
  2255. BCT R10,HDLOOP AND REPEAT @V305614 02176000
  2256. B HDDONE UNTIL DONE @V305614 02177000
  2257. SPACE 1 02178000
  2258. AFCHK CLI 0(R9),A HAS TO BE @V305666 02179000
  2259. BL ERRCONV AN 'A' TO 'F' RANGE @VM03209 02180000
  2260. CLI 0(R9),F RANGE @V305666 02181000
  2261. BH ERRCONV ELSE, ERROR @VM03209 02182000
  2262. SH R5,CLR2 TRANSLATE TO HEX @V305614 02183000
  2263. B HDLOOP1 AND CONTINUE @V305614 02184000
  2264. SPACE 1 02185000
  2265. HDDONE EQU * @V305614 02186000
  2266. TM FLAG1,SUBSTD IS NUMBER FROM TEMPD? @VA06198 02187000
  2267. BZ HDDONE3 NO - IT SHOULD BE OK - GO USE IT @VA06198 02188000
  2268. CLI 0(R6),DASH IS IT NEGATIVE? @VA06198 02189000
  2269. BNE HDDONE1 NO - USE PLUS LIMIT @VA06198 02190000
  2270. L R5,HMAXNEG LOAD NEG MAX NUMBER @VA06198 02191000
  2271. B HDDONE2 GO CHECK THE NUMBER @VA06198 02192000
  2272. HDDONE1 EQU * @VA06198 02193000
  2273. L R5,HMAXPLUS LOAD MAX POSITIVE NUMBER @VA06198 02194000
  2274. HDDONE2 EQU * @VA06198 02195000
  2275. CR R4,R5 IS NUMBER VALID? @VA06198 02196000
  2276. BH ERRCONV NO - GO TELL THE WORLD @VA06198 02197000
  2277. HDDONE3 EQU * @VA06198 02198000
  2278. CVD R4,CVD CONVERT TO DECIMAL @V305614 02199000
  2279. BR R3 RETURN TO CALLER @V305614 02200000
  2280. EJECT 02201000
  2281. DS 0F P0816 02202000
  2282. TYPLIST DC CL8'TYPLIN' 02203000
  2283. DC AL1(1) 02204000
  2284. DC AL3(0) 02205000
  2285. DC C'B' 02206000
  2286. DC AL3(0) 02207000
  2287. SPACE 2 02208000
  2288. ABCD DS 0D 02209000
  2289. DC CL8'WAITRD ' FOR READING FROM TYPEWRITER 02210000
  2290. DC AL1(1) 02211000
  2291. DC AL3(0) * WILL BE BUFFER FROM FREE STOR 02212000
  2292. DC CL1'U' FOR CLEANUP (AT SIGN AND CENT SIGN) 02213000
  2293. DC AL3(0) 02214000
  2294. SPACE 1 02215000
  2295. SPACE , HRC007DS 02215470
  2296. SETDSK DC CL8'STATE' 02216000
  2297. DC CL8'FNAME' 02217000
  2298. DC CL8'EXEC' 02218000
  2299. DC CL2' ' 02219000
  2300. DC H'1' WE KEEP TRACK OF ITEM NO. 02220000
  2301. DC AL4(0) 02221000
  2302. DC AL4(130) ALLOW FILE WIDTH UP TO 130 02222000
  2303. DC CL2'F' 02223000
  2304. DC H'1' 02224000
  2305. DC F'0' 02225000
  2306. * 02226000
  2307. CONWAIT DS 0F 02227000
  2308. DC CL8'CONWAIT' 02228000
  2309. DC CL4'CON1' 02229000
  2310. * 02230000
  2311. SPACE 1 02231000
  2312. SPACE 02232000
  2313. DS 0H 02233000
  2314. COMBEG EQU * 02234000
  2315. DC C'EQ ' P0193 02235000
  2316. DC X'80' P0193 02236000
  2317. DC C'NE ' P0193 02237000
  2318. DC X'70' P0193 02238000
  2319. DC C'GT ' P0193 02239000
  2320. DC X'20' P0193 02240000
  2321. DC C'LT ' P0193 02241000
  2322. DC X'40' P0193 02242000
  2323. DC C'LE ' P0193 02243000
  2324. DC X'D0' P0193 02244000
  2325. DC C'GE ' P0193 02245000
  2326. DC X'B0' P0193 02246000
  2327. SPACE 1 02247000
  2328. DC C'= ' @V305604 02248000
  2329. DC X'80' @V305604 02249000
  2330. DC C'¬= ' @V305604 02250000
  2331. DC X'70' @V305604 02251000
  2332. DC C'> ' @V305604 02252000
  2333. DC X'20' @V305604 02253000
  2334. DC C'< ' @V305604 02254000
  2335. DC X'40' @V305604 02255000
  2336. DC C'<= ' @V305604 02256000
  2337. DC X'D0' @V305604 02257000
  2338. DC C'>= ' @V305604 02258000
  2339. DC X'B0' @V305604 02259000
  2340. COMEND EQU * 02260000
  2341. EJECT 02261000
  2342. SPACE 1 02262000
  2343. ADLIST DS 0F 02263000
  2344. DC AL2(LOOP-EXECTOR) THIS IS FOR &CONTINUE 02264000
  2345. DC AL2(LOOP-EXECTOR) THIS IS FOR &COMMENT 02265000
  2346. DC AL2(CWIFXX-EXECTOR) 02266000
  2347. DC AL2(CWSKIP-EXECTOR) 02267000
  2348. DC AL2(CWSTAC-EXECTOR) 02268000
  2349. DC AL2(CWSPAC-EXECTOR) 02269000
  2350. DC AL2(CWTYPE-EXECTOR) 02270000
  2351. DC AL2(CJS-EXECTOR) HRC380DS 02270100
  2352. DC AL2(CWHEX-EXECTOR) @VM03234 02271000
  2353. DC AL2(CWTIME-EXECTOR) 02272000
  2354. DC AL2(CWERRO-EXECTOR) 02273000
  2355. DC AL2(CWEXIT-EXECTOR) 02274000
  2356. DC AL2(CWBEGS-EXECTOR) 02275000
  2357. DC AL2(CWPRIN-EXECTOR) 02276000
  2358. DC AL2(CWTYPER-EXECTOR) @VM03208 02277000
  2359. DC AL2(CWBEGERR-EXECTOR) @VM03208 02278000
  2360. DC AL2(CWPUNC-EXECTOR) 02279000
  2361. DC AL2(CWBEGPR-EXECTOR) 02280000
  2362. DC AL2(CWBEGPUN-EXECTOR) 02281000
  2363. DC AL2(CWGOTO-EXECTOR) 02282000
  2364. DC AL2(CWLOOP-EXECTOR) 02283000
  2365. DC AL2(CWREAD-EXECTOR) 02284000
  2366. DC AL2(CWARG-EXECTOR) 02285000
  2367. DS 0D 02286000
  2368. ABLTINS DS 0H 02287000
  2369. DC AL2(CONCAT-EXECTOR) 02288000
  2370. DC AL2(LENGTH-EXECTOR) 02289000
  2371. DC AL2(SUBSTR-EXECTOR) 02290000
  2372. DC AL2(DATATYP-EXECTOR) 02291000
  2373. EXECWRDS EQU * 02292000
  2374. ECONT DC X'50',CL7'CONTINU' 02293000
  2375. DC X'50',CL7'COMMENT' 02294000
  2376. EIFXX DC X'50',CL7'IF ' 02295000
  2377. DC X'50',CL7'SKIP ' 02296000
  2378. DC X'50',CL7'STACK ' 02297000
  2379. DC X'50',CL7'SPACE ' 02298000
  2380. DC X'50',CL7'CONTROL' 02299000
  2381. DC X'50',CL7'TRACE ' HRC380DS 02299100
  2382. DC X'50',CL7'HEX ' @VM03234 02300000
  2383. DC X'50',CL7'TIME ' 02301000
  2384. EERRO DC X'50',CL7'ERROR ' 02302000
  2385. EEXIT DC X'50',CL7'EXIT ' 02303000
  2386. DC X'50',CL7'BEGSTAC' 02304000
  2387. DC X'50',CL7'TYPE ' 02305000
  2388. DC X'50',CL7'EMSG ' @VM03208 02306000
  2389. DC X'50',CL7'BEGEMSG' @VM03208 02307000
  2390. DC X'50',CL7'PUNCH ' 02308000
  2391. DC X'50',CL7'BEGTYPE' 02309000
  2392. DC X'50',CL7'BEGPUNC' 02310000
  2393. DC X'50',CL7'GOTO ' 02311000
  2394. ELOOP DC X'50',CL7'LOOP ' 02312000
  2395. DC X'50',CL7'READ ' 02313000
  2396. DC X'50',CL7'ARGS ' 02314000
  2397. BLTINS EQU * 02315000
  2398. DC X'50',CL7'CONCAT' 02316000
  2399. DC X'50',CL7'LENGTH' 02317000
  2400. DC X'50',CL7'SUBSTR' 02318000
  2401. DC X'50',CL7'DATATYP' 02319000
  2402. EBLTINS EQU * 02320000
  2403. EBEGLOB EQU * 02321000
  2404. EGLOB DC X'50',CL7'GLOBAL ' 02322000
  2405. DC X'50',CL7'GLOBAL0' 02323000
  2406. DC X'50',CL7'GLOBAL1' 02324000
  2407. DC X'50',CL7'GLOBAL2' 02325000
  2408. DC X'50',CL7'GLOBAL3' 02326000
  2409. DC X'50',CL7'GLOBAL4' 02327000
  2410. DC X'50',CL7'GLOBAL5' 02328000
  2411. DC X'50',CL7'GLOBAL6' 02329000
  2412. DC X'50',CL7'GLOBAL7' 02330000
  2413. DC X'50',CL7'GLOBAL8' 02331000
  2414. DC X'50',CL7'GLOBAL9' 02332000
  2415. ERETCOD DC X'50',CL7'RETCODE' 02333000
  2416. EXECEND EQU * @VA03453 02334000
  2417. EINDE DC X'50',CL7'INDEX ' 02335000
  2418. ELINE DC X'50',CL7'LINENUM' 02336000
  2419. EEXEC DC X'50',CL7'EXEC ' 02337000
  2420. EREADFLG DC X'50',CL7'READFLA' 02338000
  2421. ETYPEFLG DC X'50',CL7'TYPEFLA' 02339000
  2422. ESTAR DC X'50',CL7'* ' 02340000
  2423. EDOLL DC X'50',CL7'$ ' 02341000
  2424. ELITERAL DC X'50',CL7'LITERAL' 02342000
  2425. EDISK DC X'50',CL7'DISK' @V305101 02343000
  2426. EDOS DC X'50',CL7'DOS ' @V305101 02344000
  2427. EENDS DC X'50',CL7'END ' 02345000
  2428. SPACE 1 02346000
  2429. VSRLIST DC CL8'DMSVSR',8X'FF' DMSVSR(VSAM CLEANUP) LIST @V305106 02347000
  2430. SPACE 1 02348000
  2431. ATTNFIFO DC CL8'ATTN' KEEP THESE TWO DC'S @V305614 02349000
  2432. DC CL4'FIFO' TOGETHER @V305614 02350000
  2433. SPACE 1 02351000
  2434. CARDPH DC CL8'CARDPH' @V305614 02352000
  2435. POINTC DC CL8'POINT' @V305614 02353000
  2436. CHON DC CL8'ON' @VM03234 02354000
  2437. CHOFF DC CL8'OFF' @VM03234 02355000
  2438. ON DC X'FF' ENABLE FOR ALL INTERRUPTS @VA06392 02356000
  2439. OFF DC X'00' DON'T SEPARATE OFF + DECZERO @V305614 02357000
  2440. XPREFIX DC CL2'X''' PREFIX FOR HEX ASSIGNMENT @V305614 02358000
  2441. CLR1 DC H'240' =X'00F0' @V305614 02359000
  2442. CLR2 DC H'183' =H'00B7' @V305614 02360000
  2443. DECZERO DC PL1'+0' @V305614 02361000
  2444. DECONE DC PL1'+1' @V305614 02362000
  2445. BLANKS DC CL8' ' @V305614 02363000
  2446. SPACE 1 02364000
  2447. CMSDSK DC CL8'CMS' @V305101 02365000
  2448. DOSDSK DC CL8'DOS' @V305101 02366000
  2449. OSDSK DC CL8'OS' @V305101 02367000
  2450. NODSK DC CL8'NA' @V305101 02368000
  2451. NONE DC CL8'NONE' @V305101 02369000
  2452. DMS DC C'DMS' FOR EMSG HEADER @VM03208 02370000
  2453. SPACE 1 02371000
  2454. * THE FOLLOWING GROUP OF CONSTANTS ARE USED TO INITIALIZE 02372000
  2455. * THE FREE STORAGE AREA. 02373000
  2456. INITFREE DC PL5'+000' @V305614 02374000
  2457. DC 10PL5'+001' @V305614 02375000
  2458. FREECON DC CL28'T= ' @V305614 02376000
  2459. DC CL20' LOOP UNTIL:' @VA06278 02377000
  2460. RTINIT DC CL8'RT' @VM03181 02378000
  2461. ERRFLGS DC X'8000' FLAGS FOR &EMSG @VM03208 02379000
  2462. AMPZERO DC CL2'0 ' @VM03209 02380000
  2463. H30 DC H'30' @VM03209 02381000
  2464. H5 DC H'5' @VM03209 02382000
  2465. HMAXNEG DC A(9999999) MAX NEG NUMBER FOR CONVERSION @VA06198 02383000
  2466. HMAXPLUS DC A(99999999) MAX POS NUMBER FOR CONVERT @VA06198 02384000
  2467. AMPASTER DC X'505C40' '&* ' @VA07374 02384200
  2468. F1 DC F'1' @VA07374 02384400
  2469. DISKASTR DC X'50C4C9E2D25C40' '&DISK* ' @VA07374 02384600
  2470. DISKQUES DC X'50C4C9E2D26F40' '&DISK? ' @VA07374 02384800
  2471. EJECT 02385000
  2472. LTORG @VM03209 02386000
  2473. EJECT 02387000
  2474. * 02388000
  2475. * 'SUBSTIT' SUBSTITUTES FOR ALL REPLACEABLE EXEC VARIABLES 02389000
  2476. * IN THE TOKEN POINTED TO BY R6. 02390000
  2477. * SCANNING STARTS FROM THE RIGHT, AND PROCEEDS UNTIL AN '&' 02391000
  2478. * IS FOUND. THEN AN ATTEMPT IS MADE TO FIND A MATCH WITH THE 02392000
  2479. * NAME OF A VARIABLE, AND THE VALUE IS USED. 02393000
  2480. * IF THE NAME IS OF A VARIABLE WHICH HAS NOT BEEN DEFINED, THEN 02394000
  2481. * IT IS REPLACED BY BLANKS. 02395000
  2482. * CONTROL WORDS AND FUNCTIONS ARE NOT AFFECTED. 02396000
  2483. * SCANNING THEN CONTINUES TO THE LEFT. 02397000
  2484. * IF THE FIRST 2 CHARACTERS OF THE TOKEN ARE X' AND THIS IS NOT 02398000
  2485. * AN ASSIGNMENT STATEMENT, THE VALUE, WHETHER IT IS SUBSTITUTED 02399000
  2486. * OR SPECIFIED EXPLICITLY, IS CONVERTED FROM DECIMAL TO HEX. 02400000
  2487. * IF THIS IS AN ASSIGNMENT STATEMENT, HEX TO DECIMAL CONVERSION IS 02401000
  2488. * DONE HERE. 02402000
  2489. SPACE 1 02403000
  2490. ORG DMSEXT+X'2000' @VM03209 02404000
  2491. SUBSTIT DS 0H @VM03209 02405000
  2492. USING *,R15 @VM03209 02406000
  2493. STM R3,R10,TEMSUB SAVE REGISTERS @VM03209 02407000
  2494. NI FLAG1,255-SUBSTD RESET SUBSTITUTE FLAG @VM03209 02408000
  2495. MVC PENULT(8),0(R6) SAVE TOKEN @VM03209 02409000
  2496. LA R7,7(,R6) POINT AT LAST CHAR OF TOKEN @VM03209 02410000
  2497. SUBLOOP EQU * SCAN THE TOKEN BACKWARDS @VM03209 02411000
  2498. CLI 0(R7),X'50' '&'? @VM03209 02412000
  2499. BE SUBGO BRANCH IF SO @VM03209 02413000
  2500. SUBLOOPA EQU * POINT FOR RETURN TO @VM03209 02414000
  2501. CR R7,R6 HAVE WE REACHED THE BEGINNING? @VM03209 02415000
  2502. BE SUBXCHK SEE IF CONVERSION REQUESTED @VM03209 02416000
  2503. BCT R7,SUBLOOP LOOP @VM03209 02417000
  2504. SPACE 1 02418000
  2505. SUBGO EQU * @VM03209 02419000
  2506. MVC PENULT(8),0(R6) SAVE TOKEN AS IT IS NOW@VM03209 02420000
  2507. LA R8,7(,R6) GET NUMBER OF CHARACTERS INVOLVED@VM03209 02421000
  2508. SR R8,R7 (MINUS 1) @VM03209 02422000
  2509. MVC TEMPD(8),BLANKS CLEAR OUR TEMP AREA @VM03209 02423000
  2510. EX R8,SUBMOVIN AND MOVE IN OUR VARIABLE @VM03209 02424000
  2511. CLC TEMPD+1(2),AMPZERO IS IT '&0'? @VM03209 02425000
  2512. BE *+12 SKIP IF SO @VM03209 02426000
  2513. CLI TEMPD+1,X'F0' IS NEXT CHARACTER A DIGIT 1-9? @VM03209 02427000
  2514. BNH SUBVAR BRANCH IF NOT (TRY FOR USER VARIABLE) @VM03209 02428000
  2515. LA R7,1(,R7) BUMP UP R7 TO POINT TO THE NUMBER@VM03209 02429000
  2516. BAL RET,CVDBCD CONVERT TO PACKED @VM03209 02430000
  2517. BCTR R7,0 RESTORE R7 @VM03209 02431000
  2518. BNZ SUBVAR BRANCH IF CONVERSION ERROR (TRY FOR VAR)@VM03209 02432000
  2519. CVB R9,CVDSPACE CONVERT TO BINARY @VM03209 02433000
  2520. CH R9,H30 TOO BIG? @VM03209 02434000
  2521. BH SUBNOT BRANCH IF SO (USE BLANKS) @VM03209 02435000
  2522. LTR R9,R9 IS THIS '&0'? @VM03209 02436000
  2523. SLL R9,3 MULTIPLY BY 8 @VM03209 02437000
  2524. LA R9,ARGTABLE(R9) POINT TO THE VALUE @VM03209 02438000
  2525. SUBARG1 EQU * SUBSTITUTE AN ARGUMENT (OR A VARIABLE)@VM03209 02439000
  2526. MVC TEMPD(8),0(R9) MOVE THE VALUE INTO OUR TEMP @VM03209 02440000
  2527. B SUBSET AND GO MAKE THE SUBSTITUTION @VM03209 02441000
  2528. SPACE 1 02442000
  2529. SUBXCHK EQU * @VM03234 02443000
  2530. CLI HEXSW,FF HEX CONVERSION ON ? @VM03234 02444000
  2531. BNE SUBRET NO, BRANCH @VM03234 02445000
  2532. CLC 0(2,R7),XPREFIX HEX PREFIX PROVIDED ? @VM03209 02446000
  2533. BNE SUBRET NO, NORMAL RETURN @VM03209 02447000
  2534. SPACE 1 02448000
  2535. TM FLAG1,SUBSTD EXPLICIT NUMBER SPECIFIED ? @VM03209 02449000
  2536. BNO SUBXPL YES, BRANCH @VM03209 02450000
  2537. LA R9,TEMPD GET 8 BYTE SUBSTITUTION VALUE @VM03209 02451000
  2538. LA R8,FULL MAX SIZE IS EIGHT @VM03209 02452000
  2539. B SUBXPL1 DETERMINE ACTUAL LENGTH @VM03209 02453000
  2540. SPACE 1 02454000
  2541. SUBXPL LA R9,2(,R7) POINT TO HEX VALUE @VM03209 02455000
  2542. LA R8,PART MAXIMUM SIZE OF NUMBER @VM03209 02456000
  2543. SUBXPL1 EQU * @VA06198 02457000
  2544. CLI 2(R7),DASH NEGATIVE NUMBER? @VA06198 02458000
  2545. BNE SUBXPL3 NO - DONT BUMP POINTERS @VA06198 02459000
  2546. LA R9,1(R9) POINT TO NUMBER @VA06198 02460000
  2547. BCTR R8,0 ADJUST LENGTH COUNTER @VA06198 02461000
  2548. MVI 0(R7),DASH SET MINUS SIGN @VA06198 02462000
  2549. LA R7,1(R7) POINT PAST MINUS SIGN @VA06198 02463000
  2550. SUBXPL3 EQU * @VA06198 02464000
  2551. TM FLAG1,ASSNBIT ASSIGNMENT STATEMENT? @VA06198 02465000
  2552. BZ SUBXPL2 NO - GO DO DEC TO HEX CONV @VA06198 02466000
  2553. BAL R3,HEXDEC GO DO HEX TO DEC CONVERSION @VA06198 02467000
  2554. LA R3,CVD+3 POINT TO CONVERTED NUMBER @VA06198 02468000
  2555. BAL RET,UNPACK5 GO UNPACK THE NUMBER @VA06198 02469000
  2556. CR R7,R6 NEGATIVE NUMBER? @VA06198 02470000
  2557. BNE SUBXMOV7 YES - GO DO SHORT MOVE @VA06198 02471000
  2558. MVC 0(8,R7),TEMPD SUBSTITUTE THE TOKEN @VA06198 02472000
  2559. B SUBRET RETURN TO CALLER @VA06198 02473000
  2560. SUBXMOV7 EQU * @VA06198 02474000
  2561. MVC 0(7,R7),TEMPD SUBSTITUTE THE TOKEN @VA06198 02475000
  2562. B SUBRET RETURN TO CALLER @VA06198 02476000
  2563. SUBXPL2 EQU * @VA06198 02477000
  2564. SR R3,R3 ZERO THE COUNT REGISTER @VA06198 02478000
  2565. LR R5,R9 SAVE FOR EXECUTE LATER @VA06198 02479000
  2566. SPACE 1 02480000
  2567. SUBXCNT CLI 0(R9),BLANK THIS LOOP DETERMINES THE SIZE OF @VM03209 02481000
  2568. BE SUBXPK THE NUMBER @VM03209 02482000
  2569. CLI 0(R9),HEXF0 MUST BE >= 0 @VM03209 02483000
  2570. BL SUBXERR ELSE, ERROR @VM03209 02484000
  2571. CLI 0(R9),NINE MUST BE <= 9 @VM03209 02485000
  2572. BH SUBXERR ELSE, ERROR @VM03209 02486000
  2573. SPACE 1 02487000
  2574. SUBXOK LA R9,1(,R9) REGISTER 3 WILL CONTAIN @VM03209 02488000
  2575. LA R3,1(,R3) THE LENGTH MINUS ONE @VM03209 02489000
  2576. BCT R8,SUBXCNT ..... @VM03209 02490000
  2577. SPACE 1 02491000
  2578. SUBXPK BCTR R3,R0 DECREMENT FOR EXECUTE @VM03209 02492000
  2579. LTR R3,R3 IT CAN'T BE AN @VM03209 02493000
  2580. BM SUBDH4 UNASSIGNED VARIABLE @VM03209 02494000
  2581. EX R3,SUBPACK PACK THE NUMBER FOR CONVERSION @VM03209 02495000
  2582. SPACE 1 02496000
  2583. CP CVD(8),DECZERO(1) IF IT'S ZERO @VM03209 02497000
  2584. BNE SUBNOT0 WE CAN SKIP MOST OF THIS @VM03209 02498000
  2585. MVC TEMPD(8),BLANKS BY JUST MOVING IN @VM03209 02499000
  2586. MVI TEMPD,HEXF0 A HEX 'F0' @VM03209 02500000
  2587. B SUBDH4 .... @VM03209 02501000
  2588. SPACE 1 02502000
  2589. SUBNOT0 CVB R3,CVD NOW CONVERT IT @VM03209 02503000
  2590. LA R5,FULL SET UP DH LOOP COUNT @VM03209 02504000
  2591. LA R4,TEMPD+7 FIRST PLACE TO MOVE INTO @VM03209 02505000
  2592. SPACE 1 02506000
  2593. SUBDH1 STCM R3,LOBYT,ORBYTE GET BINARY NUMBER @VM03209 02507000
  2594. NI ORBYTE,HEX0F STRIP TOP HALF @VM03209 02508000
  2595. SRL R3,SHFNUM SHIFT IT OUT @VM03209 02509000
  2596. CLI ORBYTE,HEX0A ALPHA OR NUMERIC ? @VM03209 02510000
  2597. BL SUBDH2 SKIP, IF NUMERIC @VM03209 02511000
  2598. SPACE 1 02512000
  2599. ICM R9,LOBYT,ORBYTE NOW AND HEX B7 @VM03209 02513000
  2600. AH R9,CLR2 TO CONVERT TO PRINTABLE @VM03209 02514000
  2601. STCM R9,LOBYT,ORBYTE FORM @VM03209 02515000
  2602. B SUBDH3 THEN MOVE IT @VM03209 02516000
  2603. SUBDH2 OI ORBYTE,HEXF0 SET NUMERIC ZONE @VM03209 02517000
  2604. SUBDH3 MVC 0(1,R4),ORBYTE MOVE IT INTO TEMPD @VM03209 02518000
  2605. BCTR R4,R0 BUMP THE TEMPD POINTER @VM03209 02519000
  2606. BCT R5,SUBDH1 LOOP 8 TIMES @VM03209 02520000
  2607. SPACE 1 02521000
  2608. SUBDHLP CLI TEMPD,HEXF0 NOW PAD NONZERO RESULT @VM03209 02522000
  2609. BNE SUBDH4 WITH BLANKS TO THE RIGHT @VM03209 02523000
  2610. MVC TEMPD(7),TEMPD+1 ..... @VM03209 02524000
  2611. MVI TEMPD+7,BLANK ..... @VM03209 02525000
  2612. B SUBDHLP ..... @VM03209 02526000
  2613. SPACE 1 02527000
  2614. SUBDH4 EQU * @VA06198 02528000
  2615. CR R6,R7 NEGATIVE NUMBER? @VA06198 02529000
  2616. BE SUBDH5 NO - SET UP 8 BYTE MOVE @VA06198 02530000
  2617. LA R8,PART SET UP SHORT MOVE @VA06198 02531000
  2618. B SUBSET GO MOVE THE NUMBER @VA06198 02532000
  2619. SUBDH5 EQU * @VA06198 02533000
  2620. LA R8,SEVEN FORCE FULL SUBSTITUTION @VA06198 02534000
  2621. B SUBSET AND RETURN TO CALLER @VM03209 02535000
  2622. SPACE 1 02536000
  2623. SUBPACK PACK CVD(8),0(*-*,R5) @VM03209 02537000
  2624. SPACE 1 02538000
  2625. SUBVAR EQU * DEAL WITH A POSSIBLE USER VARIABLE @VM03209 02539000
  2626. BAL RET,KEYWCK (ORIGINATOR CALLED THEM KEYWORDS)@VM03209 02540000
  2627. BNZ SUBARG1 GO USE THE VALUE IF WE FOUND IT @VM03209 02541000
  2628. CLC 0(THREE,R7),AMPASTER IS TOKEN '&* ' ? @VA07374 02541080
  2629. BE SUBTYPE YES,...BRANCH @VA07374 02541160
  2630. CLC 0(SEVEN,R7),DISKASTR IS TOKEN '&DISK* ' ? @VA07374 02541240
  2631. BE SUBTYPE YES,...BRANCH @VA07374 02541320
  2632. CLC 0(SEVEN,R7),DISKQUES IS TOKEN '&DISK? ' ? @VA07374 02541400
  2633. BE SUBTYPE YES,...BRANCH @VA07374 02541480
  2634. S R8,F1 GET LENGTH FOR TRANSLATE @VA07374 02541560
  2635. EX R8,CHKTOKN GO CHECK TOKEN FOR INVALID CHAR @VA07374 02541640
  2636. BNZ ERRCHAR BRANCH IF INVALID CHAR FOUND @VA07374 02541720
  2637. A R8,F1 RESTORE R8 @VA07374 02541800
  2638. SPACE 1 02542000
  2639. SUBTYPE EQU * @VM03209 02543000
  2640. CLC TEMPD(8),EEXEC IS THIS &EXEC? @VM03209 02544000
  2641. BNE *+14 SKIP IF NOT @VM03209 02545000
  2642. MVC TEMPD(8),EXEC SET TO VALUE OF &EXEC @VM03209 02546000
  2643. B SUBSET @VM03209 02547000
  2644. CLC TEMPD(8),EREADFLG IS THIS &READFLAG? @VM03209 02548000
  2645. BNE *+14 SKIP IF NOT @VM03209 02549000
  2646. MVC TEMPD(8),READFLAG SET TO VALUE OF &READFLAG @VM03209 02550000
  2647. B SUBSET @VM03209 02551000
  2648. CLC TEMPD(8),EDOS IS THIS &DOS? @VM03209 02552000
  2649. BNE DISKCHK SKIP IF NOT @VM03209 02553000
  2650. MVC TEMPD(8),DOS SET TO VALUE OF &DOS @VM03209 02554000
  2651. B SUBSET REPLACE @VM03209 02555000
  2652. DISKCHK CLC TEMPD(5),EDISK &DISKX? @VM03209 02556000
  2653. BNE CHKTYPF NO, TRY NEXT GUY @VM03209 02557000
  2654. CLI TEMPD+6,BLANK ONE CHAR ALLOWED FOR MODE @VM03209 02558000
  2655. BNE SUBINGL IF MORE, MUST BE USER VAR. @VM03209 02559000
  2656. MVC DSKADT(2),TEMPD+5 SET UP REQUEST IN PLIST @VM03209 02560000
  2657. LA R1,DSKADT-24 @VM03209 02561000
  2658. CLI TEMPD+5,CHARAST ANY READ/WRITE DISK? @VM03209 02562000
  2659. BE WRITSRCH IF SO, CALL DMSLADW @VM03209 02563000
  2660. CLI TEMPD+5,CHARQUES IF NOT, R/W WITH MOST SPACE @VM03209 02564000
  2661. BNE MODESRCH IF NEITHER, CALL DMSLADP @VM03209 02565000
  2662. MVI DSKADT+1,CHARQUES ADD ONE MORE '?' TO PLIST @VM03209 02566000
  2663. WRITSRCH SR R0,R0 START AT FIRST ADT @VM03209 02567000
  2664. LR R5,R15 SAVE OUR BASE @VM03209 02568000
  2665. L R15,VCADTLKW USE DMSLADW FOR SPECIALS @VM03209 02569000
  2666. BALR R14,R15 @VM03209 02570000
  2667. LR R15,R5 RESTORE OUR BASE @VM03209 02571000
  2668. BNZ NONESUCH BAD NEWS... @VM03209 02572000
  2669. USING ADTSECT,R1 @VM03209 02573000
  2670. MVC TEMPD(1),ADTM PLUG THE MODE IN EXEC LINE @VM03209 02574000
  2671. MVC TEMPD+1(7),BLANKS BLANK FILL THE REST @VM03209 02575000
  2672. B SUBSET CONTINUE... @VM03209 02576000
  2673. NONESUCH MVC TEMPD(8),NONE SUBSTITUTE 'NONE' @VM03209 02577000
  2674. B SUBSET AND KEEP GOING @VM03209 02578000
  2675. MODESRCH LR R5,R15 SAVE OUR BASE @VM03209 02579000
  2676. L R15,VCADTLKP USE DMSLADP FOR MODES @VM03209 02580000
  2677. BALR R14,R15 @VM03209 02581000
  2678. LR R15,R5 RESTORE OUR BASE @VM03209 02582000
  2679. BNZ SUBINGL IF NO ADT, ASSUME USER VAR. @VM03209 02583000
  2680. TM ADTFLG2,ADTFMFD IS CMS DISK ACCESSED? @VM03209 02584000
  2681. BZ CHEKDSK IF NOT CMS DISK, SEE WHAT.. @VM03209 02585000
  2682. MVC TEMPD(8),CMSDSK SUBSTITUTE 'CMS' @VM03209 02586000
  2683. B SUBSET AND KEEP GOING... @VM03209 02587000
  2684. CHEKDSK TM ADTFLG2,ADTFROS+ADTFDOS DOS OR OS DISK? @VM03209 02588000
  2685. BZ NODISK IF NEITHER, NOT ACCESSED @VM03209 02589000
  2686. BO DOSDISK IF BOTH, IT'S DOS DISK @VM03209 02590000
  2687. MVC TEMPD(8),OSDSK IF OS, SUBSTITUTE 'OS' @VM03209 02591000
  2688. B SUBSET AND KEEP GOING @VM03209 02592000
  2689. DOSDISK MVC TEMPD(8),DOSDSK YES, SUBSTITUTE 'DOS' @VM03209 02593000
  2690. B SUBSET AND KEEP GOING @VM03209 02594000
  2691. DROP R1 @VM03209 02595000
  2692. NODISK MVC TEMPD(8),NODSK IF NOT ACCESSED, MARK 'NA' @VM03209 02596000
  2693. B SUBSET AND GO... @VM03209 02597000
  2694. CHKTYPF EQU * @VM03209 02598000
  2695. * 02599000
  2696. CLC TEMPD(8),ETYPEFLG &TYPEFLAG? @VM03209 02600000
  2697. BNE SUBINGL BRANCH IF NOT (GO CHECK INDEXES ETC.) @VM03209 02601000
  2698. MVC TEMPD(8),TYPEFLAG MOVE IN THE CURRENT VALUE @VM03209 02602000
  2699. B SUBSET @VM03209 02603000
  2700. SPACE 1 02604000
  2701. SUBINGL EQU * CHECK FOR KEYWORDS, AND GLOBALS @VM03209 02605000
  2702. LA R3,EXECWRDS START OF EXEC WORDS @VM03209 02606000
  2703. LA R4,8 INCREMENT @VM03209 02607000
  2704. LA R5,ELITERAL END OF EXEC WORDS @VM03209 02608000
  2705. CLC TEMPD(8),0(R3) MATCH? @VM03209 02609000
  2706. BE SUBINGL1 BRANCH IF SO @VM03209 02610000
  2707. BXLE R3,R4,*-10 LOOP @VM03209 02611000
  2708. SPACE 1 02612000
  2709. SUBNOT EQU * UNDEFINED VARIABLE @VM03209 02613000
  2710. MVC TEMPD(8),BLANKS READY TO SET TO BLANKS @VM03209 02614000
  2711. B SUBSET (SINCE WE COULDN'T FIND THE NAME)@VM03209 02615000
  2712. SPACE 1 02616000
  2713. SUBINGL1 EQU * FOUND SOMETHING INTERESTING @VM03209 02617000
  2714. LA R5,EGLOB IS IT AN EXEC CONTROL WORD? @VM03209 02618000
  2715. CR R3,R5 BRANCH IF SO (NO MORE SUBSTITUTION) @VM03209 02619000
  2716. BL SUBLOOPA @VM03209 02620000
  2717. LA R5,ELINE IS IT A SPECIAL EXEC SYMBOL? @VM03209 02621000
  2718. CR R3,R5 @VM03209 02622000
  2719. BH SUBLOOPA BRANCH IF SO (NO MORE SUBSTITUTION) @VM03209 02623000
  2720. LA R9,RETCODE SAY IT'S &RETCODE. @VM03209 02624000
  2721. LA R5,ERETCOD @VM03209 02625000
  2722. CR R3,R5 IS IT? @VM03209 02626000
  2723. BE CNVRTCD YES @VM03209 02627000
  2724. LA R9,INDEX MAYBE IT'S &INDEX @VM03209 02628000
  2725. LA R5,EINDE OR EVEN &LINENUM @VM03209 02629000
  2726. CR R3,R5 WELL? @VM03209 02630000
  2727. BNL SUBINGL2 BRANCH IF SO. @VM03209 02631000
  2728. USING OPSECT,R5 @VM03209 02632000
  2729. L R5,AOPSECT POINT TO OPSECT IN NUCLEUS @VM03209 02633000
  2730. L R9,EXADD+4 GET GLOBAL ADDRESSABILITY @VM03209 02634000
  2731. LA R5,EGLOB @VM03209 02635000
  2732. CNVRTCD SR R3,R5 CALC DISPLACEMENT INTO GLOBAL @VM03209 02636000
  2733. SRA R3,3 STORAGE AREA ....... @VM03209 02637000
  2734. MH R3,H5 # 8BYTE FIELDS X L'PACKED FIELD @VM03209 02638000
  2735. AR R3,R9 @VM03209 02639000
  2736. BAL RET,UNPACK5 @VM03209 02640000
  2737. B SUBSET @VM03209 02641000
  2738. SPACE 1 02642000
  2739. SUBINGL2 EQU * @VM03209 02643000
  2740. SR R3,R5 UNPACK A GLOBAL @VM03209 02644000
  2741. SRA R3,1 (OR LINENUM) @VM03209 02645000
  2742. AR R3,R9 (OR EVEN AN INDEX) @VM03209 02646000
  2743. BAL RET,UNPACK4 UNPACK INTO TEMPD @VM03209 02647000
  2744. SUBSET EQU * @VM03260 02648000
  2745. EX R8,SUBREPL THEN REPLACE THE RIGHT PART @VM03260 02649000
  2746. CR R6,R7 START OF TOKEN? @VA06198 02650000
  2747. BNE SUBFLG WRONG PLACE FOR ASSIGNMENT @VA06198 02651000
  2748. CLI PENULT,X'50' POSSIBLE VARIABLE OF SORTS? @VA06198 02652000
  2749. BNE SUBFLG WRONG PLACE FOR ASSIGNMENT @VA06198 02653000
  2750. CLC 8(2,R7),=CL2'=' ELIMINATE HEX CONVERSION @VM03260 02654000
  2751. BNE SUBFLG FOR LH ASSIGNMENT TOKEN @VM03260 02655000
  2752. OI FLAG1,ASSNBIT ..... @VM03260 02656000
  2753. B SUBLOOPA ..... @VM03260 02657000
  2754. SPACE 1 02658000
  2755. SUBFLG EQU * @VA06198 02659000
  2756. CLC 0(L'XPREFIX,R6),XPREFIX HEX PREFIX HERE? @VA06198 02660000
  2757. BNE SUBLOOPA NO - FLAG NOT NEEDED @VA06198 02661000
  2758. LA R3,2(R6) POINT TO START OF NUMBER @VA06198 02662000
  2759. CR R7,R3 IS THIS START OF CONV FIELD @VA06198 02663000
  2760. BNE SUBLOOPA NO - TEMPD NG FOR CONVERSION @VA06198 02664000
  2761. OI FLAG1,SUBSTD SET TEMPD OK FOR CONVERSION @VA06198 02665000
  2762. B SUBLOOPA CARRY ON WITH SCAN @VM03260 02666000
  2763. SPACE 1 02667000
  2764. SUBXERR OI FLAG1,HEXERR SET CONVERSION ERROR INDICATOR @VM03209 02668000
  2765. SPACE 1 02669000
  2766. SUBRET EQU * @VM03209 02670000
  2767. LM R3,R10,TEMSUB RESTORE REGISTERS @VM03209 02671000
  2768. TM FLAG1,HEXERR HEX CONVERSION ERROR ? @VM03209 02672000
  2769. BO ERRCONV YES, TELL ABOUT IT @VM03209 02673000
  2770. BR RET RETURN @VM03209 02674000
  2771. SPACE 1 02675000
  2772. SUBMOVIN MVC TEMPD(*-*),0(R7) @VM03209 02676000
  2773. SUBREPL MVC 0(*-*,R7),TEMPD @VM03209 02677000
  2774. CHKTOKN TRT 1(0,R7),TOKCHK CHECK TOKEN FOR INVALID CHAR. @VA07374 02677500
  2775. SPACE 2 HRC007DS 02678090
  2776. TOKCHK DS 0H HRC007DS 02678180
  2777. DC 64X'FF' HRC007DS 02678270
  2778. DC X'00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' BLANK HRC007DS 02678360
  2779. DC X'FFFFFFFFFFFFFFFFFFFFFF00FFFFFFFF' $ HRC007DS 02678450
  2780. DC 16X'FF' HRC007DS 02678540
  2781. DC X'FFFFFFFFFFFFFFFFFFFFFF0000FFFFFF' # @ HRC007DS 02678630
  2782. DC 64X'FF' HRC007DS 02678720
  2783. DC X'FF000000000000000000FFFFFFFFFFFF' A-I HRC007DS 02678810
  2784. DC X'FF000000000000000000FFFFFFFFFFFF' J-R HRC007DS 02678900
  2785. DC X'FFFF0000000000000000FFFFFFFFFFFF' S-Z HRC007DS 02678990
  2786. DC X'00000000000000000000FFFFFFFFFFFF' 0-9 HRC007DS 02679080
  2787. EJECT , HRC007DS 02679170
  2788. EPLBUILD DS 0H HRC309DS 02680000
  2789. * EPLBUILD builds an extended PLIST setting R0 to point to it. HRC309DS 02680005
  2790. * The untranslated argument string is in RAWBUF, and it scans HRC309DS 02680010
  2791. * that string for words that begin with &. SUBSTIT is called HRC309DS 02680015
  2792. * to retrieve the value for the variable, and that value is HRC309DS 02680020
  2793. * substuted for the variable in RAWBUF. Thus the EPLIST HRC309DS 02680025
  2794. * correctly contains any variable values from the EXEC HRC309DS 02680030
  2795. * procedure. Note that truncation of the argument string will HRC309DS 02680035
  2796. * occur if substitution causes the string to grow longer than HRC309DS 02680040
  2797. * 130 bytes. HRC309DS 02680045
  2798. USING *,R15 HRC309DS 02680050
  2799. STM R2,R14,EPLSAVE save the registers we use HRC309DS 02680055
  2800. LA R3,RAWBUF point to start of command line HRC309DS 02680060
  2801. * If the command was called as the clause in an &IF or &ERROR HRC309DS 02680065
  2802. * instruction, then RAWBUF points to the start of the EXEC HRC309DS 02680070
  2803. * line, not the start of the command line. We fix this. HRC309DS 02680075
  2804. SLR R5,R5 HRC309DS 02680080
  2805. C R5,CMDLSTRT HRC309DS 02680085
  2806. BZ EPBLD4 HRC309DS 02680090
  2807. S R2,CMDLSTRT has EXEC discarded tokens? HRC309DS 02680095
  2808. BZ EPBLD4 no, so proceed normally HRC309DS 02680100
  2809. LR R5,R2 R5 is num of bytes skipped HRC309DS 02680105
  2810. SRL R5,3 calc number of words to skip HRC309DS 02680110
  2811. A R3,RAWBUFLN get end of command line HRC309DS 02680115
  2812. BCTR R3,0 decrement for BXLE HRC309DS 02680120
  2813. LA R2,1 loop increment HRC309DS 02680125
  2814. LA R4,RAWBUF get start of command line again HRC309DS 02680130
  2815. EPBLD1 DS 0H HRC309DS 02680135
  2816. * Loop to skip R5 words in the command line. HRC309DS 02680140
  2817. CLI 0(R4),C' ' look for space after this word HRC309DS 02680145
  2818. BE EPBLD2 found it HRC309DS 02680150
  2819. BXLE R4,R2,EPBLD1 keep looping if not HRC309DS 02680155
  2820. B EPBLD4 should never get here! HRC309DS 02680160
  2821. EPBLD2 DS 0H HRC309DS 02680165
  2822. CLI 0(R4),C' ' eat up spaces between words HRC309DS 02680170
  2823. BNE EPBLD3 found next word HRC309DS 02680175
  2824. BXLE R4,R2,EPBLD2 keep looping if not HRC309DS 02680180
  2825. EPBLD3 DS 0H HRC309DS 02680185
  2826. SR R5,R2 decrement count of words to skip HRC309DS 02680190
  2827. BH EPBLD1 keep looping: more words to skip HRC309DS 02680195
  2828. LA R3,1(R3) point to end of command line HRC309DS 02680200
  2829. ST R3,EPLARGND store in EPLIST HRC309DS 02680205
  2830. BCTR R3,0 decrement for BXLE HRC309DS 02680210
  2831. B EPBLD6 continue scanning normally HRC309DS 02680215
  2832. EPBLD4 DS 0H HRC309DS 02680220
  2833. A R3,RAWBUFLN get end of command line HRC309DS 02680225
  2834. ST R3,EPLARGND store in EPLIST HRC309DS 02680230
  2835. BCTR R3,0 decrement for BXLE HRC309DS 02680235
  2836. LA R2,1 loop increment HRC309DS 02680240
  2837. LA R4,RAWBUF get start of command line again HRC309DS 02680245
  2838. EPBLD5 DS 0H HRC309DS 02680250
  2839. CLI 0(R4),C' ' eat up spaces between words HRC309DS 02680255
  2840. BNE EPBLD6 found next word HRC309DS 02680260
  2841. BXLE R4,R2,EPBLD5 keep looping if not HRC309DS 02680265
  2842. EPBLD6 DS 0H HRC309DS 02680270
  2843. * At this point R4 points to "start" of command line. HRC309DS 02680275
  2844. ST R4,EPLCMD store command name in EPLIST HRC309DS 02680280
  2845. EPLOOP1 DS 0H HRC309DS 02680285
  2846. * Loop to find the end of the command name. We scan for blanks HRC309DS 02680290
  2847. * as well as open and close parentheses. HRC309DS 02680295
  2848. CLI 0(R4),C' ' is it a space? HRC309DS 02680300
  2849. BE EPCMD1 found it HRC309DS 02680305
  2850. CLI 0(R4),C'(' is it an open parenthesis? HRC309DS 02680310
  2851. BE EPCMD2 this is the start of arguments HRC309DS 02680315
  2852. CLI 0(R4),C')' is it a close parenthesis? HRC309DS 02680320
  2853. BE EPCMD2 this is the start of arguments HRC309DS 02680325
  2854. BXLE R4,R2,EPLOOP1 keep looping if not HRC309DS 02680330
  2855. B EPCMD2 no arguments HRC309DS 02680335
  2856. EPCMD1 DS 0H HRC309DS 02680340
  2857. LA R4,1(R4) next byte is start of arguments HRC309DS 02680345
  2858. ST R4,EPLARGBG store start of arguments HRC309DS 02680350
  2859. B ENEXTARG look for start of next argument HRC309DS 02680355
  2860. EPCMD2 DS 0H HRC309DS 02680360
  2861. ST R4,EPLARGBG store start of arguments HRC309DS 02680365
  2862. LA R4,1(R4) next byte is blank or next arg HRC309DS 02680370
  2863. B ENEXTARG look for start of next argument HRC309DS 02680375
  2864. SPACE 1 HRC309DS 02680380
  2865. EARGSCAN DS 0H HRC309DS 02680385
  2866. * Scan the argument string, substituting EXEC variable values HRC309DS 02680390
  2867. * for any variables we find. During the scan: HRC309DS 02680395
  2868. * R3 points to last byte of the argument string. HRC309DS 02680400
  2869. * R4 advances through the string as we scan. HRC309DS 02680405
  2870. * R5 saves the start of the current argument. HRC309DS 02680410
  2871. LR R5,R4 save start of argument HRC309DS 02680415
  2872. EARGSCN1 DS 0H HRC309DS 02680420
  2873. * Scan for the argument end. R4 will advance as we scan. HRC309DS 02680425
  2874. CLI 0(R4),C' ' are we pointing to a space? HRC309DS 02680430
  2875. BE EGOTARG yes, we're at the end of the arg HRC309DS 02680435
  2876. CLI 0(R4),C'(' is this arg an open paren? HRC309DS 02680440
  2877. BE EARGSCN2 HRC309DS 02680445
  2878. CLI 0(R4),C')' is this arg a close paren? HRC309DS 02680450
  2879. BE EARGSCN2 HRC309DS 02680455
  2880. BXLE R4,R2,EARGSCN1 keep looping if not HRC309DS 02680460
  2881. B EGOTARG go process the last argument HRC309DS 02680465
  2882. EARGSCN2 DS 0H HRC309DS 02680470
  2883. LA R4,1(R4) start of next argument HRC309DS 02680475
  2884. B ENEXTARG HRC309DS 02680480
  2885. EGOTARG DS 0H HRC309DS 02680485
  2886. * R5 points to the argument start, R4 to the byte after. HRC309DS 02680490
  2887. CLI 0(R5),X'50' is argument a possible variable? HRC309DS 02680495
  2888. BNE ENEXTARG no, so no substitution required HRC309DS 02680500
  2889. SPACE 1 HRC309DS 02680505
  2890. * The argument is most likely an EXEC variable Lucky for us HRC309DS 02680510
  2891. * there is a subroutine that will substitute its value. HRC309DS 02680515
  2892. MVC EXECVAR,=C' ' clear the field HRC309DS 02680520
  2893. LR R7,R4 HRC309DS 02680525
  2894. SR R7,R5 calculate length of argument HRC309DS 02680530
  2895. LA R6,8 HRC309DS 02680535
  2896. CR R7,R6 greater than 8? HRC309DS 02680540
  2897. BNH EARGSCN3 no, it is OK HRC309DS 02680545
  2898. LR R7,R6 truncate at 8 HRC309DS 02680550
  2899. EARGSCN3 DS 0H HRC309DS 02680555
  2900. LR R0,R7 save length of argument HRC309DS 02680560
  2901. BCTR R7,0 less 1 for EX HRC309DS 02680565
  2902. LA R6,EXECVAR variable for SUBSTIT to scan HRC309DS 02680570
  2903. EX R7,MVVALARG MVC from R5 to R6 for R7 bytes HRC309DS 02680575
  2904. LR R7,R15 save our base register HRC309DS 02680580
  2905. L R15,ASUBSTIT address of SUBSTIT HRC309DS 02680585
  2906. BALR RET,R15 substitute the variable HRC309DS 02680590
  2907. LR R15,R7 recover our base register HRC309DS 02680595
  2908. SPACE 1 HRC309DS 02680600
  2909. * We must copy the EXEC variable value to replace the variable HRC309DS 02680605
  2910. * name in the argument string. HRC309DS 02680610
  2911. LA R8,1 loop increment HRC309DS 02680615
  2912. LA R9,7(R6) end of value (less 1 for BXLE) HRC309DS 02680620
  2913. LR R7,R6 start of value HRC309DS 02680625
  2914. EARGSCN4 DS 0H HRC309DS 02680630
  2915. CLI 0(R7),C' ' end of value yet? HRC309DS 02680635
  2916. BE EARGSCN5 yes, reached end of the value HRC309DS 02680640
  2917. BXLE R7,R8,EARGSCN4 keep looping if not HRC309DS 02680645
  2918. EARGSCN5 DS 0H HRC309DS 02680650
  2919. SR R7,R6 get length of value HRC309DS 02680655
  2920. LR R10,R7 save it HRC309DS 02680660
  2921. SR R7,R0 room needed (could be negative) HRC309DS 02680665
  2922. LR R14,R7 save it HRC309DS 02680670
  2923. BZ ECOPYVAL no need to make room for value HRC309DS 02680675
  2924. CR R4,R3 and are we at the last argument? HRC309DS 02680680
  2925. BH ECOPYVAL no need to make room for value HRC309DS 02680685
  2926. SPACE 1 HRC309DS 02680690
  2927. * Now we move the string after the current arg to make room HRC309DS 02680695
  2928. * for the token we are going to substitute. We first move it HRC309DS 02680700
  2929. * to a temporary buffer to avoid overwriting it with the MVC. HRC309DS 02680705
  2930. LA R9,1(R3) 1st byte after argstring HRC309DS 02680710
  2931. SR R9,R4 this way we copy the null byte HRC309DS 02680715
  2932. LA R8,TEMPBUF HRC309DS 02680720
  2933. EX R9,MVARGTMP MVC from R4 to R8 for R9 bytes HRC309DS 02680725
  2934. LR R7,R4 target for second move HRC309DS 02680730
  2935. AR R7,R14 make room for variable value HRC309DS 02680735
  2936. EX R9,MVTMPARG MVC from R8 to R7 for R9 bytes HRC309DS 02680740
  2937. ECOPYVAL DS 0H HRC309DS 02680745
  2938. * At last we copy the variable value into the argument string. HRC309DS 02680750
  2939. * Then we adjust the argument string scan and end pointers, HRC309DS 02680755
  2940. * truncating the string if necessary. HRC309DS 02680760
  2941. LTR R10,R10 check the length of the value HRC309DS 02680765
  2942. BH EARGSCN6 go copy it HRC309DS 02680770
  2943. SR R4,R2 prevent double blanks in eplist HRC309DS 02680775
  2944. B EARGSCN7 HRC309DS 02680780
  2945. EARGSCN6 DS 0H HRC309DS 02680785
  2946. BCTR R10,0 decrement value len by 1 for EX HRC309DS 02680790
  2947. EX R10,MVARGVAL MVC from R6 to R5 for R10 bytes HRC309DS 02680795
  2948. EARGSCN7 DS 0H HRC309DS 02680800
  2949. AR R3,R14 adjust argument end pointer HRC309DS 02680805
  2950. LA R8,RAWBUF+BUFL end of buffer -1 HRC309DS 02680810
  2951. CR R3,R8 have we overrun the buffer? HRC309DS 02680815
  2952. BNH EARGSCN8 branch if not HRC309DS 02680820
  2953. LR R3,R8 truncate it HRC309DS 02680825
  2954. EARGSCN8 DS 0H HRC309DS 02680830
  2955. AR R4,R14 adjust scan pointer HRC309DS 02680835
  2956. ENEXTARG DS 0H HRC309DS 02680840
  2957. * R4 points to the first char after the end of an argument. HRC309DS 02680845
  2958. * Loop to find the start of the next argument. But first HRC309DS 02680850
  2959. * check to see if we are at the end. HRC309DS 02680855
  2960. CR R4,R3 are we at the end? HRC309DS 02680860
  2961. BH EARGEND yes, go finish up HRC309DS 02680865
  2962. EARGSCN9 DS 0H HRC309DS 02680870
  2963. CLI 0(R4),C' ' is it still a space? HRC309DS 02680875
  2964. BNE EARGSCAN no, so found start of next arg HRC309DS 02680880
  2965. BXLE R4,R2,EARGSCN9 keep looping if not HRC309DS 02680885
  2966. EARGEND DS 0H HRC309DS 02680890
  2967. * We have reached the end of the argument list. HRC309DS 02680895
  2968. ST R4,EPLARGND store end of args in EPLIST HRC309DS 02680900
  2969. SLR R2,R2 get a zero HRC309DS 02680905
  2970. ST R2,EPLUWORD and store it in the EPLIST HRC309DS 02680910
  2971. SPACE 1 HRC309DS 02680915
  2972. * Our work here is done. Point R0 to the EPLIST and return. HRC309DS 02680920
  2973. LA R0,EPLIST pass the extended PLIST HRC309DS 02680925
  2974. LM R2,R14,EPLSAVE restore the registers HRC309DS 02680930
  2975. DROP R15 HRC309DS 02680935
  2976. BR R14 return to our caller HRC309DS 02680940
  2977. SPACE 1 HRC309DS 02680945
  2978. MVARGTMP MVC 0(0,R8),0(R4) make room for variable value HRC309DS 02680950
  2979. MVARGVAL MVC 0(0,R5),0(R6) copy to arg string from sub area HRC309DS 02680955
  2980. MVTMPARG MVC 0(0,R7),0(R8) make room for variable value HRC309DS 02680960
  2981. MVVALARG MVC 0(0,R6),0(R5) copy arg to val sub area HRC309DS 02680965
  2982. EJECT HRC309DS 02680970
  2983. FREEST DSECT @V305614 02680975
  2984. LINKLEN DS F LINK LENGTH @V305614 02681000
  2985. ADDR DS F DATA ADDRESS @V305614 02682000
  2986. ANCHOR DS F BASE BLOCK ADDRESS @V305614 02683000
  2987. CHAD DS F ADDRESS OF LINK TO BE CHAINED @V305614 02684000
  2988. SPACE 1 02685000
  2989. SAV14 DS F RETURN REG SAVE AREA @V305614 02686000
  2990. SPACE 1 02687000
  2991. UNCHSAV DS 4F UNCHAIN RTN SAVE AREA @V305614 02688000
  2992. ASUBSTIT DS F SUBSTITUTION ROUTINE ADDRESS @VM03209 02689000
  2993. SPACE 1 02690000
  2994. STACKLST DS 0F @V305614 02691000
  2995. DS CL8 @V305614 02692000
  2996. DS CL4 DEFAULT TO FIRST IN,FIRST OUT @V305614 02693000
  2997. DS X LENG OF MESSAGE @V305614 02694000
  2998. DS 3X ADDR OF MESSAGE @V305614 02695000
  2999. SPACE 1 02696000
  3000. POINT DS 0F PLIST FOR 'POINT' @V305614 02697000
  3001. DS CL8 @V305614 02698000
  3002. DS CL8 @V305614 02699000
  3003. DS CL8 @V305614 02700000
  3004. DS CL2 @V305614 02701000
  3005. DS H DON'T TOUCH THE WRITE POINTER @V305614 02702000
  3006. PPTR DS H RESET READ POINTER TO LINE 1 @V305614 02703000
  3007. * 02704000
  3008. DS 0F USED BY &PUNCH AND &BEGPUNCH @V305614 02705000
  3009. CARDPCH DS CL8 @V305614 02706000
  3010. EXTND DS X FOR 80 BYTES @V305614 02707000
  3011. PCHBUF DS 3X ADDRESS OF BUFFER TO BE PUNCH@V305614 02708000
  3012. PCHLGTH DS H NUMBER OF BYTES TO BE READ @V305614 02709000
  3013. DS H NUMBER OF BYTES READ @V305614 02710000
  3014. DSKADT DS CL2 @V305101 02711000
  3015. * 02712000
  3016. TPLIST DS 2X DMSERR FLAGS @VM03208 02713000
  3017. ATEXT DS 3X TEXT ADDRESS - KEEP WITH TPLIST @VM03208 02714000
  3018. * 02715000
  3019. SPACE 1 02716000
  3020. ZERO DS F @V305614 02717000
  3021. READFLAG DS CL8 WILL WAITRD FIND CONS STACK @V305614 02718000
  3022. DOS DS CL8 DOS ENVIRONMENT STATUS @V305101 02719000
  3023. TYPEFLAG DS CL8 @V305614 02720000
  3024. FLAG DS X @V305614 02721000
  3025. SIGN DS X @V305614 02722000
  3026. HEXSW DS X @VM03234 02723000
  3027. COND DS 3D FOR CONRET TO PUT THE CONDITION @V305614 02724000
  3028. TIMBUF DS CL28 BUFFER FOR CMS TIMES @V305614 02725000
  3029. CONDMSG DS 2D KEEP B4 COND1 AND ON DBL WRD @VA06278 02726000
  3030. COND1 DS 3D FOR CKALL TO SAVE THE CONDITION @V305614 02727000
  3031. PENULT DS D SPOT FOR PENULTIMATE SUBS. @V305614 02728000
  3032. TEMPD DS D TEMP AREA FOR SUBSTIT @V305614 02729000
  3033. CVD DS D TEMP FOR CVDBCD (FOLLOWS TEMPD) @V305614 02730000
  3034. TEMPD2 DS D LOCAL TEMP AREA HRC007DS 02730500
  3035. CVDSPACE DS PL8 SUBROUTINE CVDBCD PUTS ANSWER @V305614 02731000
  3036. LAST3 DS CL24 LAST 3 TOKENS (LITERAL VERSION) @V305614 02732000
  3037. GOLAB DS D TARGET OF &GOTO STATEMENT @V305614 02733000
  3038. LAST3LIT DS 4X &LITERAL FLAGS FOR LAST3 @V305614 02734000
  3039. TEMSUB DS 9F REG SAVE AREA 1 @V305614 02735000
  3040. TEMSUB2 DS 7F REG SAVE AREA 2 @V305614 02736000
  3041. TEMSUB3 DS 6F REG SAVE AREA 3 @V305614 02737000
  3042. SCANBUFF DS F SPOT FOR LENGTH FOR SCAN @V305614 02738000
  3043. UNSCND DS CL130 INPUT BUFFER, & FOR OTHER THINGS @V305614 02739000
  3044. UNTAIL DS CL8 OVERFLOW AREA FOR UNSCND @V305614 02740000
  3045. FLAG1 DS X MISCELLANEOUS FLAGS @VM03209 02741000
  3046. ORBYTE DS X WORK BYTE FOR DECHEX @VM03209 02742000
  3047. DS 0F @V305614 02743000
  3048. CMSTIME DS CL8 AREA FOR CMSTIME PLIST 02744000
  3049. DS F,F (VIRCPU AND TOTCPU) 02745000
  3050. DS A,F (ADDRESS AND LENGTH OF TIMBUF) 02746000
  3051. * Next two buffers are 6 bytes longer than needed to HRC309DS 02746050
  3052. * allow for overrun during variable substitution. HRC309DS 02746100
  3053. DS 0F HRC309DS 02746150
  3054. BUFL EQU 129 max length of RAWBUF/TEMPBUF -1 HRC309DS 02746200
  3055. CMDLSTRT DS F saved start of command line HRC309DS 02746250
  3056. RAWBUF DS CL136 unscanned untranslated input buf HRC309DS 02746300
  3057. TEMPBUF DS CL136 to avoid MVC overwrite HRC309DS 02746350
  3058. RAWBUFLN DS F length of line in RAWBUF HRC309DS 02746400
  3059. AEPLBLD DS A address of EPLIST subroutine HRC309DS 02746450
  3060. EPLSAVE DS 13F EPLBUILD register save area HRC309DS 02746500
  3061. EXECVAR DS CL8 for EXEC variable substitution HRC309DS 02746550
  3062. EPLIST CSECT HRC309DS 02746600
  3063. FILWIDTH DS H SPOT TO KEEP THE FILE ITEM LENGTH 02747000
  3064. READCNT DS F =NO. LINES TO READ FRM TYPEWRITER 02748000
  3065. ERACT DS X 02749000
  3066. STCKFLAG DS X IF ON--STACKS LINES UNTIL &ENDSTACK 02750000
  3067. CONDFLG DS X BITS, 1 IMPLIES &$ IN 1ST LOC 02751000
  3068. * BIT 2--&$ IN 2ND LOC, BIT3 FOR &* IN 1ST ETC 02752000
  3069. CONTFLAG DS X SAYS WE'RE SEEKING RANGE OF LOOP 02753000
  3070. GOSTOP DS H LINE NUM FOR &GOTO TO STOP AT.. 02754000
  3071. MSGBUFF DS CL133 &BEGEMSG AND &EMSG MESSAGE BUFFER@VA05715 02755000
  3072. * FIRST BYTE CONTAINS THE LENGTH 02756000
  3073. * NEXT THREE BYTES CONTAIN 'DMS' 02757000
  3074. * REMAINDER CONTAINS THE MESSAGE UP 02758000
  3075. * TO A MAXIMUM OF 129 CHARACTERS 02759000
  3076. ERACTION DS CL132 PLACE FOR UNSCANNED ERROR ACTION 02760000
  3077. * (1ST BYTE=CONRDFLG; 2ND=LENGTH; REST=ERROR ACTION) 02761000
  3078. SCNPTR DS F WORD FOR LOC OF SCAN ROUTINE 02762000
  3079. RETCODE DS PL5 @VA03453 02763000
  3080. DS 3X RESERVED FOR FUTURE USE???? @VA03453 02764000
  3081. INDEX DS PL4 02765000
  3082. LINENUM DS PL4 02766000
  3083. KEYWORDS DS F BASE BLOCK FOR KEYWORD CHAIN 02767000
  3084. ARGTABLE DS 30D SPACE FOR FILENAME+30... 02768000
  3085. ARGEND DS D ...SUBSTITUTABLE ARGUMENTS 02769000
  3086. ARGSIZE EQU *-ARGTABLE 02770000
  3087. EXEC DS D 02771000
  3088. KPTR DS F HAS ADDR OF 1ST EMPTY KEYWORD 02772000
  3089. NOLOOPS EQU 4 SET MAX DESIRED DEPTH OF NESTING 02773000
  3090. CONRDFLG DS X CONSOLE READ FLAG 02774000
  3091. CVDFLAG DS X 02775000
  3092. LOPLEVEL DS H HAS CURRENT DEPTH OF NESTING=0,1,2,.. 02776000
  3093. SCOPEBEG DS (NOLOOPS)H HAS LINE NO OF BEG OF SCOPE 02777000
  3094. SCOPEND DS (NOLOOPS)H HAS END OF LOOP LINE NO-1 (FOR NOTIMES) 02778000
  3095. LOOPCNT DS (NOLOOPS)F LOOPCOUNTS ARE COUNTED DOWN 02779000
  3096. LOOPCOND DS (NOLOOPS)CL28 SPACE FOR CONDITIONS & &LITERAL FLAGS 02780000
  3097. DSKLIN DS D MUST BE CONTIGUOUS THROUGH PNREAD 02781000
  3098. FNAME DS D 02782000
  3099. FTYPE DS D 02783000
  3100. PMODE DS H 02784000
  3101. PITEM DS H 02785000
  3102. FSTLOC EQU * 02786000
  3103. PBUFF DS F 02787000
  3104. PLENGTH DS F 02788000
  3105. PFLAG DS H 02789000
  3106. PNITEM DS H 02790000
  3107. PNREAD DS F 02791000
  3108. SPEXEC DS F FOR EXEC RECURSION 02792000
  3109. BUFFER DS 33D @VA08168 02793000
  3110. ENDOFBUF EQU * 02794000
  3111. BUFSIZE EQU *-BUFFER 02795000
  3112. PDOUT EQU *-8 02796000
  3113. TYPLIN DS 2D 02797000
  3114. TYPINPUT DS D 02798000
  3115. TYRD2 DS D 02799000
  3116. TFLAG DS X 02800000
  3117. TIMFLG DS X INDICATES WHETHER &TIME IS ON OR OFF 02801000
  3118. AFLG1 DS X 02802000
  3119. SAVRET DS F 02803000
  3120. DS 2F 02804000
  3121. ENDFREE DS 0D 02805000
  3122. SPACE 2 02806000
  3123. PTR EQU 2 02807000
  3124. LINK EQU 7 02808000
  3125. RET EQU 10 02809000
  3126. BASE1 EQU 11 02810000
  3127. BASE EQU 12 02811000
  3128. BFREE EQU 13 02812000
  3129. ONE EQU 1 @V305066 02813000
  3130. SEVDWS EQU 7 @V305066 02814000
  3131. FIXED EQU C'F' @V305066 02815000
  3132. LITFLAG EQU X'FF' @V305066 02816000
  3133. POS EQU X'30' @V305066 02817000
  3134. NEG EQU X'20' @V305066 02818000
  3135. HEXF0 EQU X'F0' @V305066 02819000
  3136. HEX00 EQU X'00' @VM03209 02820000
  3137. HEX0A EQU X'0A' @VM03209 02821000
  3138. HEX0F EQU X'0F' @VM03209 02822000
  3139. NINE EQU X'F9' @VM03209 02823000
  3140. THREE EQU 3 @VA06278 02824000
  3141. SEVEN EQU 7 @VM03209 02825000
  3142. EIGHT EQU 8 @VA06278 02826000
  3143. TEN6 EQU 16 @VA06278 02827000
  3144. TWENTY4 EQU 24 @VA06278 02828000
  3145. FOUR8 EQU 48 @VA06278 02829000
  3146. TWO56 EQU 256 @VA08168 02829500
  3147. PART EQU 6 @VM03209 02830000
  3148. FULL EQU 8 @VM03209 02831000
  3149. SHFNUM EQU 4 @VM03209 02832000
  3150. FF EQU X'FF' @V305066 02833000
  3151. ASSNBIT EQU X'80' ASSIGNMENT STATEMENT IN PROCESS @VM03209 02834000
  3152. SUBSTD EQU X'40' TOKEN SUBSTITUTION DONE @VM03209 02835000
  3153. HEXERR EQU X'20' HEX CONVERSION ERROR @VM03209 02836000
  3154. DIGIT6 EQU 6 @V305066 02837000
  3155. END EQU X'40' @V305066 02838000
  3156. CHAR0 EQU C'0' @V305066 02839000
  3157. CHAR9 EQU C'9' @V305066 02840000
  3158. A EQU C'A' @V305066 02841000
  3159. F EQU C'F' @V305066 02842000
  3160. BLANK EQU C' ' @V305066 02843000
  3161. CHARAST EQU C'*' @V305066 02844000
  3162. CHARQUES EQU C'?' @V305066 02845000
  3163. DASH EQU C'-' MINUS SIGN FOR IMMEDIATE OPERAND @VA06198 02846000
  3164. LOBYT EQU B'0001' @VM03208 02847000
  3165. AL3 EQU B'0111' @VM03208 02848000
  3166. BEMSG EQU X'80' BEGEMSG FLAG IN STCKFLAG @VM03208 02849000
  3167. SPACE 2 02850000
  3168. NEED EQU (ENDFREE-FREEST)/8 02851000
  3169. SPACE 1 02852000
  3170. XGLBL DSECT @V305614 02853000
  3171. GLOBAL DS CL5 RECURSION LEVEL FOR &GLOBAL @V305614 02854000
  3172. GLOBAL0 DS 10PL5 GLOBAL VARIABLES @VA07950 02855000
  3173. SPACE 2 02856000
  3174. FMODE EQU 24 02857000
  3175. FSIZE EQU 34 @VM03131 02858000
  3176. FFORM EQU 30 02859000
  3177. EJECT 02860000
  3178. NUCON 02861000
  3179. IO , @V305614 02862000
  3180. SPACE 2 02863000
  3181. SPACE 2 02864000
  3182. ADT @V305101 02865000
  3183. REGEQU 02866000
  3184. END 02867000