Table of Contents

XEDIT

Table Of Contents

  • [00008] XEDIT - EXTENDED INTERACTIVE TEXT EDITOR.
  • [00198] MACROS AND COMMON DECKS.
  • [00207] CHAR - SET UP CALL TO *CHAR=* MACRO TO PRESET CHARACTERS.
  • [00234] CHAR= - FORM ENTRY INTO CHARACTER REPLACEMENT TABLE.
  • [00259] COMMAND - DEFINE AN XEDIT COMMAND TABLE ENTRY.
  • [00318] DEVICE - DEFINE INPUT DEVICE.
  • [00350] ERRMSG - DEFINE XEDIT ERROR MESSAGES.
  • [00439] ERROR - ISSUE ERROR MESSAGE.
  • [00464] FERROR - ISSUE FILE ERROR MESSAGE.
  • [00494] HEREL - ASSEMBLE AND LIST REMOTE TEXT.
  • [00509] MHELP - ASSEMBLE HELP COMMAND DIRECTORY.
  • [00590] OVLDEF - DEFINE XEDIT OVERLAY
  • [00631] PARAM - DEFINE PARAMETER SYMBOL FOR COMMAND MACRO.
  • [00648] PREFIX - DEFINE PREFIX CHARACTERS.
  • [00693] SPECIAL - DEFINE SPECIAL COMMANDS (1 CHARACTER).
  • [00741] FETS AND BUFFERS (CODED AND STRING).
  • [00828] STORAGE ALLOCATION.
  • [00897] SPCP - SPECIFIED PARAMETERS.
  • [00946] TABLES AND MESSAGES.
  • [01009] COMMAND PARSER - MAIN LOOP.
  • [01011] NCM - GET NEXT COMMAND.
  • [01276] PRM - COMMAND PARAMETER CRACKER.
  • [01727] PST - POST COMMAND PROCESSOR.
  • [01800] NER - COMMAND PARSER ERROR PROCESSOR.
  • [01826] PREFIX CHARACTER ROUTINES.
  • [01832] X - TOGGLE VERIFICATION.
  • [01849] + - GET DATA INPUT FROM NEW INPUT LINES.
  • [01866] / - SKIP TO A NEW LINE.
  • [01891] UP ARROW - GO TO TOP OF FILE BEFORE PROCESSING.
  • [01919] SPECIAL COMMAND FORMS.
  • [01924] - - EXECUTE LAST Y OR Z COMMAND.
  • [01971] . - EXECUTE LAST COMMAND.
  • [01989] NCL - OBTAIN NEXT COMMAND LINE AND PUT INTO *C.STR*.
  • [02111] COMMAND TABLE.
  • [02202] COMMAND PROCESSORS.
  • [02208] ABO - PROCESS ABORT COMMAND.
  • [02233] ADD - ADD TEXT TO END OF LINE(S).
  • [02292] BTR - ADVANCE TO BOTTOM OF CURRENT RECORD.
  • [02328] CNG/CNS - PROCESS CHANGE AND CHANGES COMMANDS.
  • [02402] DEL - SET DELIMITER CHARACTER.
  • [02436] DLT - DELETE LINE(S).
  • [02468] DRF - DELETE RECORD/FILE MARKS.
  • [02494] PEC - PROCESS EDIT COMMAND.
  • [02512] EFQ - END, FILE, AND QUIT PROCESSOR.
  • [02708] FLL - FIND LONG LINE PROCESSOR.
  • [02737] FLN - ADVANCE TO SPECIFIED LINE NUMBER.
  • [02757] IIB - *INSERT* AND *INSERT BEFORE* PROCESSOR.
  • [02813] INP - ENTRY INPUT MODE REQUEST.
  • [02875] LCT - LOCATE SPECIFIED STRING.
  • [02940] MOD - MODIFY LINE(S).
  • [02995] NXT - PROCESS NEXT COMMAND.
  • [03017] PNT - PRINT COMMAND PROCESSOR.
  • [03052] RLP - *REPLACE* PROCESSOR.
  • [03087] RMA - PROCESS RIGHT MARGIN COMMAND.
  • [03112] SWN - SET WINDOWS.
  • [03147] RST - RESTORE FILE TO PREVIOUS CONDITION.
  • [03168] SCH - SET CHARACTER IN WORD.
  • [03188] SFG - SET FLAG.
  • [03215] STB - SET TABS.
  • [03254] TGL - PROCESS TOGGLES.
  • [03277] TRN - TRUNCATE COMMAND.
  • [03313] TTN - TOP AND TOPNULL PROCESSOR.
  • [03337] WHR - PROCESS WHERE COMMAND.
  • [03363] WRM - WRITE RECORD MARK.
  • [03385] YZP - Y/Z COMMAND PROCESSOR.
  • [03431] SUBROUTINES.
  • [03433] ABT - ABORT XEDIT.
  • [03453] ASF - ANALYZE STRING FIELDS.
  • [03592] BTL - ISSUE *BAD TEXT LINE ENCOUNTERED* MESSAGE.
  • [03607] CER - COMMAND ERROR PROCESSOR.
  • [03650] CFF - COPY FAST FILE.
  • [03756] CHS - CHANGE STRING(S).
  • [03887] ETL - ECHO TEXT LINE.
  • [03942] EXT - EXIT XEDIT.
  • [04005] GFN - GET FILE NAME.
  • [04106] GLN - GET LINE NUMBER (ADVANCE TO IT).
  • [04239] ICH - INITIALIZE CHARACTERS.
  • [04270] IEM - ISSUE EXPLAIN ERROR MESSAGE.
  • [04300] IFM - ISSUE FILE MESSAGE.
  • [04361] ITM - ISSUE TRUNCATION MESSAGE.
  • [04386] PCN - PRINT COLUMN NUMBERS.
  • [04406] ERD - PROCESS END OF FILE READ.
  • [04508] LOC - LOCATE STRING SPECIFIED.
  • [04639] LOCA - LOCC - LOCATE DEFINITION CELLS.
  • [04662] LST - LOCATE STRING IN EDIT LINE.
  • [04744] MDY - PROCESS MODIFY DIRECTIVES.
  • [04876] MPR - MOVE POINTER.
  • [04914] RDF - READ EDIT FILE LINE.
  • [05205] RTA - CONVERT 160K1 TO C FORMAT (MAX 33 WORDS).
  • [05271] RTB - REMOVE TRAILING BLANKS FROM A CODED LINE.
  • [05392] SAC - SET ASCII MODE LINE AND READS.
  • [05424] SCD - SET CODED LINE.
  • [05451] STL - PROCESS TLX INTERRUPTS.
  • [05479] STK - STACK INPUT DEVICES.
  • [05543] TAB - TAB INPUT LINE ACCORDING TO TAB SETTINGS.
  • [05602] TCD - TABULATE CODED DATA LINE.
  • [05629] TLB - TRANSFER DATA LINE TO *E.LINE* BUFFER.
  • [05653] TOP - MOVE POINTER TO TOP OF FILE.
  • [05740] TSL - TRIM SPACES OFF LINE (STRING BUFFER).
  • [05767] UPL - UNPACK LINE TO ASCII BUFFER.
  • [05875] VAL - EVALUATE NUMERIC STRING.
  • [05931] VIS - VOID INSTRUCTION STACK.
  • [05940] VRT - VERIFY LINE AND RETURN TO *NCM*.
  • [05954] VRY - VERIFY XEDIT OPERATIONS.
  • [05985] WTF - WRITE EDIT LINE.
  • [06049] SPECIAL PURPOSE SUBROUTINES.
  • [06051] LCB - LOAD CIRCULAR BUFFER.
  • [06129] RDX - READ EXIT.
  • [06199] PRESET AND BUFFER ALLOCATION.
  • [06210] PRF - PRESET EDIT FILE.
  • [06471] PRS - PRESET XEDIT AND BEGIN EXECUTION.
  • [06785] MACROS LOCAL TO OVERLAY.
  • [06787] ENDHELP - CLOSE EXPLAIN ENTRY.
  • [06805] EXPP - DEFINE PRIMARY EXPLAIN ENTRY.
  • [06832] EXPS - DEFINE SECONDARY EXPLAIN ENTRY TEXT.
  • [06856] EXP - PROCESS EXPLAIN COMMAND.
  • [07108] EMI - FILE FUNCTION INCORRECT SECONDARY EXPLANATIONS.
  • [07218] HELP - PROCESS XEDIT HELP COMMAND.
  • [07513] HTI - *HELP* COMMAND TELEX INTERRUPT PROCESSOR.
  • [07560] LOCAL FETS AND STORAGE.
  • [07564] COMMAND PROCESSORS.
  • [07566] CPY - COPY/COPYD PROCESSORS.
  • [07664] DLB - DELETE LEADING BLANKS.
  • [07730] LTB - LIST TAB SETTINGS.
  • [07800] NBL - CHANGE ERROR MESSAGES TO CONTAIN NO BELLS.
  • [07825] OCT - PROCESS OCTCHANGE COMMAND.
  • [07981] PBL - PROCESS BAD LINE COMMANDS.
  • [08022] PLN - PROCESS LINE NUMBER COMMANDS.
  • [08164] RDP - READ/READP PROCESSOR.
  • [08287] SUBROUTINE LOCAL TO OVERLAY.
  • [08289] GAF - GET/ATTACH FILE.
  • [08321] RCP - RESET COMMAND PARAMETERS.
  • [08345] SCP - SET COMMAND PARAMETERS.
  • [08372] LOCAL COMMON DECKS AND BUFFERS.

Source Code

XEDIT.txt
  1. IDENT XEDIT,111B,XEDIT,0,0
  2. ABS
  3. ENTRY XEDIT
  4. ENTRY RFL=
  5. SST IR
  6. SYSCOM B1
  7. LIST F
  8. TITLE XEDIT - EXTENDED INTERACTIVE TEXT EDITOR.
  9. *COMMENT XEDIT - EXTENDED INTERACTIVE TEXT EDITOR.
  10. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  11. XEDIT SPACE 4,10
  12. ***** XEDIT - EXTENDED INTERACTIVE TEXT EDITOR.
  13. * D. W. MEARS 72/08/01.
  14. * W. C. WELLS 76/04/29.
  15. * REVISED 77/04/01.
  16. * B.C. ANTIN 79/03/09.
  17. *
  18. * XEDIT IS AN INTERACTIVE TEXT EDITOR CAPABLE OF CREATING
  19. * AND MODIFYING A TEXT FILE QUICKLY, EASILY, AND ACCURATELY.
  20. SPACE 4,10
  21. *** XEDIT IS AN INTERACTIVE TEXT EDITOR CAPABLE OF CREATING
  22. * AND MODIFYING A TEXT FILE QUICKLY EASILY AND ACCURATELY.
  23. SPACE 4,10
  24. *** XEDIT COMMAND CALL.
  25. *
  26. * XEDIT,EDITFIL,OPTIONS.
  27. *
  28. * WHERE EDITFIL IS THE FILE TO BE EDITED. IF THE EDITFIL IS
  29. * NOT SPECIFIED, THE PRIMARY FILE IS USED. IF NO PRIMARY IS
  30. * FOUND, XEDIT WILL USE *TAPE1*.
  31. *
  32. * THE OPTIONS ARE -
  33. *
  34. * OPTION DESCRIPTION/ACTION
  35. * ------ ------------------
  36. *
  37. * AS TURNS ON ASCII PROCESSING. ASCII IS DEFAULT IF THE
  38. * TERMINAL IS IN ASCII MODE. IF IT IS NOT IN ASCII,
  39. * THIS PARAMETER WILL TURN ON ASCII FOR XEDIT ONLY.
  40. *
  41. * B DENOTES BATCH PROCESSING. THIS PARAMETER IS ASSUMED
  42. * FOR NON-TELEX ORIGIN JOBS.
  43. *
  44. * C DENOTES CREATION MODE. THE USER, IN THIS MODE, CAN
  45. * CREATE A TEXT FILE FROM AN EMPTY FILE.
  46. *
  47. * DB DEBUG. INHIBITS INTERRUPT CONTROL.
  48. *
  49. * FR INSTRUCTS XEDIT TO SCAN THE FIRST LINE OF THE XEDIT
  50. * EDIT FILE FOR THE INITIAL COMMAND. XEDIT ASSUMES
  51. * THAT THE COMMAND BEGINS WITH THE FIRST NON-BLANK
  52. * CHARACTER WHICH OCCURS AFTER 2 CONSECUTIVE BLANKS.
  53. * THIS FEATURE ALLOWS THE COMMAND TO BE PLACED INTO A
  54. * COMMENT STRING IN MOST LANGUAGES.
  55. * NOTE- ONLY ONE COMMAND IS ALLOWED. MULTIPLE COMMANDS
  56. * ARE ALLOWED VIA THE Y/Z COMMANDS. ALSO, THIS COMMAND
  57. * IS EXECUTED BEFORE ANY COMMANDS FOLLOWING THE
  58. * TERMINATOR ON THE *XEDIT* COMMAND.
  59. *
  60. * LK DENOTES LOOK MODE. IN LOOK MODE, THE EDIT
  61. * FILE CAN BE EXAMINED, BUT NOT MODIFIED.
  62. *
  63. * NH NO HEADER, CANCELS THE ISSUEING OF THE XEDIT VERSION
  64. * MESSAGE.
  65. *
  66. * P CAUSES EDITFIL TO BE RETRIEVED FROM THE PERMANENT
  67. * FILE CATALOG.
  68. *
  69. * I=IFN CAUSES XEDIT TO READ INPUT DIRECTIVES FROM FILE IFN.
  70. *
  71. * L=LFN CAUSES NORMAL XEDIT PRINTOUT TO BE PLACED ON FILE
  72. * LFN INSTEAD OF BEING PRINTED AT THE TERMINAL.
  73. *
  74. * DEFAULTS FOR THE PARAMETERS DEPEND ON ORIGIN TYPE.
  75. * FOR TELEX ORIGIN, XEDIT ASSUMES THE FOLLOWING:
  76. * *AS* PARAMETER IS SET (DEPENDING ON CHARACTER SET).
  77. * FOR BATCH ORIGIN
  78. * *B* PARAMETER IS SET. TO PROCESS ASCII FILES, USE THE
  79. * *AS* PARAMETER.
  80. *
  81. * THE SPECIAL INPUT PROMPT OF A DOUBLE QUESTION MARK WILL BE
  82. * ISSUED ONLY IF BOTH THE INPUT AND OUTPUT FILES ARE ASSIGNED
  83. * AS TYPE *TT*.
  84. *
  85. * THE FIRST LINES OF INPUT TO XEDIT MAY BE SPECIFIED ON
  86. * THE XEDIT COMMAND. TO DO THIS, FOLLOW THE TERMINATOR OF THE
  87. * COMMAND WITH A DELIMITER AND THE LINES OF INPUT SEPARATED BY
  88. * THE SAME DELIMITER CHARACTER.
  89. SPACE 4
  90. ** CONDITIONAL ASSEMBLY OPTIONS.
  91. *
  92. * SYMBOL FUNCTION
  93. * ------ --------
  94. *
  95. * CYBRNET ASSEMBLES A MODIFIED XEDIT FOR USE BY CYBERNET.
  96. *
  97. * DEBUG IF = 1, ASSEMBLE VARIOUS PIECES OF DEBUGGING CODE.
  98. * IF = 0, DO NOT ASSEMBLE DEBUG CODE.
  99. *
  100. * FILEOV DETERMINES WHERE THE OVERLAYS WILL BE LOADED FROM.
  101. * IF = 0, THEN LOAD OVERLAYS FROM LOCAL FILE. FILE
  102. * NAME IS CONTAINED IN *ACTR*.
  103. * IF = 1, THEN LOAD OVERLAYS FROM THE SYSTEM.
  104. *
  105. * TIMES ASSEMBLES TIMING CODE. THIS CODE ISSUES THE
  106. * ELSAPED TIME BETWEEN ENTRIES INTO THE COMMAND
  107. * PARSER. THE IS GIVEN IN THOUSANDTHS OF SECONDS
  108. * AND SHOULD BE ASSEMBLED ONLY WITH KRONOS LEVEL 10+
  109. * OR NOS.
  110.  
  111.  
  112. DEBUG SET 0 NO DEBUG
  113. FILEOV SET 1 LOAD OVERLAYS FROM SYSTEM
  114. CYBRNET SET 0 CYBERNET VERSION
  115. * END OF CONDITIONAL ASSEMBLY OPTIONS.
  116. SPACE 4,10
  117. ** REGISTER CONVENTIONS.
  118. *
  119. * IN GENERAL, THE FOLLOWING REGISTERS CAN BE ASSUMED TO
  120. * CONTAIN SPECIFIC INFORMATION, OR ARE AVAILABLE UNDER THE
  121. * DESCRIBED CIRCUMSTANCES.
  122. *
  123. * A5, X5 = DURING THE PARSING OF THE CURRENT COMMAND, THESE
  124. * REGISTERS POINT/CONTAIN THE CURRENT CHARACTER UNDER
  125. * INVESTIGATION. A NEGATIVE WORD INDICATES AN END
  126. * OF COMMAND. THIS CONVENTION FORCES ALL ROUTINES
  127. * CALLED BY THE PARSER TO AVOID USING THESE
  128. * REGISTERS. A PARTIAL LIST OF THE SUBROUTINES
  129. * AFFECTED ARE -
  130. * *TOP*, *RDF*, *WTF*, *UPL*, *RTOA*.
  131. * ANY ROUTINE WHOSE PARAMETERS ARE COMPLETELY PARSED
  132. * WITHIN THE COMMAND ROUTINE CAN USE THESE REGISTERS.
  133. * THEY SHOULD NOT BE USED BY ANY SUBROUTINES.
  134. *
  135. * A0 = SCRATCH REGISTER. ANY COMMAND PROCESSOR CAN USE THIS
  136. * FOR SCRATCH PURPOSES. SUBROUTINES ARE NOT
  137. * TO USE A0.
  138. *
  139. * B1 = 1.
  140. SPACE 4,10
  141. ** FLAG CONVENTIONS.
  142. *
  143. * -A FLAG OR TOGGLE IS *ON* IF THE FLAG/TOGGLE IS NEGATIVE.
  144. *
  145. * -A FLAG OR TOGGLE IS *TRUE* IF THE FLAG/TOGGLE IS NEGATIVE.
  146. *
  147. * -THE FOLLOWING MATRIX HOLDS FOR THE VARIOUS COMBINATIONS OF
  148. * E.CMODE AND E.LMOD WITH REGARD TO E.LINE AND E.STR.
  149. *
  150. * . E.CMODE = 0 . E.CMODE = 1
  151. * *----------------------------*----------------------------*
  152. * E.LMOD=0 . E.LINE = CORRECT LINE IMAGE. E.LINE = CORRECT LINE IMAGE.
  153. * . E.STR = GARBAGE . E.STR = CORRECT LINE IMAGE.
  154. * . . (EITHER CAN BE USED SAFELY).
  155. * *----------------------------*----------------------------*
  156. * E.LMOD=1 . THIS CONDITION IS UNDEFINED. E.LINE = GARBAGE .
  157. * . --NEVER-- DEFINE IT . E.STR = CORRECT LINE IMAGE.
  158. * . . .
  159. * *----------------------------*----------------------------*
  160. *
  161. * THUS, IF E.LMOD = 0, THE CODED LINE CAN BE WRITTEN.
  162. * IF E.CMODE = 1, THE LINE IS UNPACKED TO THE STRING BUFFER.
  163. * IF E.CMODE = 1 AND E.LMOD = 1 THEN THE LINE *MUST* BE
  164. * REPACKED BEFORE USING (E.LMOD IS THEN SET TO 0).
  165. SPACE 4,10
  166. ** END OF LINE/STRING CONVENTIONS.
  167. *
  168. * WITHIN XEDIT, THERE ARE SEVERAL NOTATIONS USED TO DENOTE THE
  169. * END OF A LINE, STRING, ETC.. TO AVOID CONFUSION, THE
  170. * FOLLOWING IS THE DIFFERENCES BETWEEN THE REPRESENTATIONS.
  171. *
  172. * A TRUE END OF LINE CONSISTS OF A MASK OF 2 BITS (ALWAYS)
  173. *
  174. * AN END OF STRING IS DENOTED BY THE CHARACTER ORED WITH A
  175. * MASK OF 1 BIT.
  176. *
  177. * THIS METHOD ALLOWS THE USER TO ALWAYS SET BIT 59 IF HE WANTS
  178. * AN END OF LINE, AND YET TELL THE TWO FORMS APART WHEN ONE
  179. * HAS TO RESET THE PSEUDO END OF LINE.
  180. SPACE 4,10
  181. *** ASSEMBLY CONSTANTS.
  182.  
  183.  
  184. BUFAL EQU 1401B SCRATCH FILE BUFFER LENGTH
  185. BUFBL EQU 1401B SECOND SCRATCH BUFFER LENGTH
  186. BUFCL EQU 201B ALTERNATE INPUT BUFFER LENGTH
  187. BUFDL EQU 201B COPY BUFFER LENGTH
  188. BUFIL EQU 101B INPUT BUFFER LENGTH
  189. BUFOL EQU 301B OUTPUT BUFFER LENGTH
  190. BUFRL EQU 501B READ BUFFER LENGTH (LOCAL TO OVL2)
  191. MINWD EQU 10D MINIMUM LINE WIDTH
  192. MAXWD EQU 160D MAXIMUM LINE WIDTH
  193. M.ASCII EQU 1 ASCII MODE SETTING
  194. M.CODED EQU 0 CODED MODE SETTING
  195. NTABS EQU 8 NUMBER OF AVAILABLE TAB STOPS
  196. VERSION MICRO 1,,$XEDIT 3.1.00$
  197. ORG 111B
  198. TITLE MACROS AND COMMON DECKS.
  199.  
  200. * COMMON DECKS.
  201.  
  202. *CALL COMCMAC
  203. *CALL COMSPFM
  204. *CALL COMSLFD
  205.  
  206. CHAR SPACE 4,15
  207. ** CHAR - SET UP CALL TO *CHAR=* MACRO TO PRESET CHARACTERS.
  208. *
  209. * CHAR A,B
  210. *
  211. * ENTRY *A* = INSTRUCTION IN WHICH SUBSTITUTION WILL OCCUR.
  212. * *B* = CHARACTER MNEMONIC TO SUBSTITUTE.
  213. * THE REPLACEMENT IS DONE WITH BOOLEAN OR, THUS THE
  214. * INVERSE CHARACTER VALUE CAN BE OBTAINED BY SETTING UP
  215. * A NEGATIVE FIELD.
  216. *
  217. * EXIT INSTRUCTION *A* IS ENTERED.
  218. * AN ENTRY IS MADE IN THE CHARACTER REPLACEMENT TABLE.
  219.  
  220. NOREF .CH1,.CH2
  221. PURGMAC CHAR
  222.  
  223. CHAR MACRO A,B
  224. A
  225. .CH1 SET *P
  226. IFGT .CH1,59,3
  227. .CH1 SET 0
  228. .CH2 SET *-1
  229. SKIP 1
  230. .CH2 SET *
  231. CHAR= .CH1,.CH2,B
  232. ENDM CHAR
  233. CHAR= SPACE 4,10
  234. ** CHAR= - FORM ENTRY INTO CHARACTER REPLACEMENT TABLE.
  235. *
  236. *
  237. * CHAR= A,B,C
  238. * ENTRY *A* = LEFT SHIFT COUNT TO POSITION CHARACTER.
  239. * *B* = WORD TO REPLACE INTO.
  240. * *C* = ADDRESS OF DESIRED CHARACTER REPLACEMENT WORD.
  241. *
  242. * EXIT AN ENTRY IS MADE IN CHARACTER REPLACEMENT TABLE.
  243.  
  244.  
  245. PURGMAC CHAR=
  246.  
  247. CHAR= MACRO A,B,C
  248. USE SETCHAR
  249. VFD 12/A+2000B,30/B,18/C
  250. USE *
  251. ENDM CHAR=
  252.  
  253. * INITIALIZE SETCHAR USE BLOCK.
  254.  
  255. USE SETCHAR
  256. CHARSET BSS 0
  257. USE *
  258. COMMAND SPACE 4,20
  259. ** COMMAND - DEFINE AN XEDIT COMMAND TABLE ENTRY.
  260. *
  261. * ID COMMAND LONG,SHORT,PARMS,MOD,ADDR,SPECIAL,OVRL
  262. *
  263. * ENTRY *ID* = XEDIT COMMAND IDENTIFIER.
  264. * *LONG* = LONG FORM OF COMMAND.
  265. * *SHORT* = SHORT FORM OF COMMAND.
  266. * *PARMS* = SPECIFIED PARAMETER CRACKING.
  267. * *ADDR* = JUMP ADDRESS FOR ROUTINE.
  268. * *MOD* = OPTIONAL MODIFIER FIELD.
  269. * *OVL* = OVERLAY NEEDED TO EXECUTE COMMAND, IF NEEDED.
  270. * *SPECIAL* = REPEATING PARAMETER WHOSE ARGUMENTS ARE -
  271. * *CR* = COMMAND VALID IN CREATION MODE.
  272. * *F0* = NUMBER PARAMETER MUST BE FORCED
  273. * ZERO, IF COMMAND IS EXECUTED IN *INPUT
  274. * MODE.
  275. * *LK* = COMMAND VALID ON LOOK MODE.
  276. * *IN* = COMMAND VALID IN INPUT MODE.
  277. *
  278. * EXIT COMMAND TABLE ENTRY IS DEFINED.
  279.  
  280. MXOVL SET 0 SET NUMBER OF OVERLAYS
  281.  
  282. PURGMAC COMMAND
  283.  
  284. MACRO COMMAND,NM,LONG,SHORT,PARMS,MOD,ADDR,SPL,OVRL
  285. IFC NE,$SHORT$$,1
  286. IRP SHORT
  287. DATA 0L_SHORT
  288. IRP
  289. IFC NE,$LONG$$,2
  290. DATA 0L_LONG
  291. MHELP LONG,SHORT
  292. C.A SET PARMS 0
  293. IRP SPL
  294. POS /OPTS/SPL+1
  295. VFD 1/1
  296. IRP
  297. POS 60
  298. .. IFC NE,$OVRL$$
  299. C.D MICRO 4,4,$_OVRL_$
  300. VFD 2/2,10/-OVL
  301. POS 36
  302. VFD 18/NM-1,18/"C.D"
  303. CMD_"C.D" RMT
  304. QUAL
  305. NM BSS 0
  306. QUAL *
  307. COMMAND (),(),PARMS,MOD,ADDR,(_SPL_)
  308. RMT
  309. . IFGT "C.D",MXOVL,1
  310. MXOVL SET "C.D"
  311. .. ELSE
  312. NM VFD 2/2,10/-C.A
  313. POS 36
  314. VFD 18/MOD,18/ADDR
  315. .. ENDIF
  316. ENDM COMMAND
  317. DEVICE SPACE 4,20
  318. ** DEVICE - DEFINE INPUT DEVICE.
  319. *
  320. *
  321. *N DEVICE FET,ACTIVE,CMDPOP
  322. *
  323. * ENTRY *N* = 1 CHARACTER SYMBOL FOR NAME OF DEVICE.
  324. * *FET* = ADDRESS OF FET ASSOCIATED WITH DEVICE,
  325. * IF ONE EXISTS.
  326. * *ACTIVE* = DEVICE IS ACTIVE (SET ONLY ON *I* DEVICE).
  327. * *CMDPOP* = POP STACK IF READ REQUIRED FOR NEXT
  328. * COMMAND, ELSE READ LINE IF FOR DATA.
  329. *
  330. * EXIT N.LINE = FWA OF CODED LINE BUFFER FOR DEVICE.
  331. * N.DEV = ADDRESS OF DEVICE DEFINITION FOR
  332. * ROUTINE, *STK*.
  333. * A DEVICE DEFINITION BLOCK IS GENERATED.
  334.  
  335. PURGMAC DEVICE
  336.  
  337. MACRO DEVICE,N,FET,ACTIVE,CMDPOP
  338. N_.LINE BSSZ 33D
  339. IFC NE,$CMDPOP$$,1
  340. VFD 1/1
  341. VFD *P/FET
  342. N_.DEV BSS 0
  343. IFC EQ,$ACTIVE$$,2
  344. CON -1
  345. SKIP 1
  346. CON 0
  347. VFD 1/0,11/0,30/,18/-1
  348. ENDM DEVICE
  349. ERRMSG SPACE 4,25
  350. ** ERRMSG - DEFINE XEDIT ERROR MESSAGES.
  351. *
  352. *
  353. *NAME ERRMSG BELLS,TEXT
  354. *
  355. * ENTRY *NAME* = THE NAME OF THE ERROR MESSAGE.
  356. * *BELLS* = THE NUMBER OF BELLS TO ISSUE BEFORE
  357. * THE MESSAGE.
  358. * *TEXT* = THE TEXT OF THE MESSAGE.
  359. *
  360. * THIS MACRO GENERATES A TABLE OF POINTERS TO THE ERROR
  361. * MESSAGES (FOR USE BY *EXPLAIN*). THE TEXT OF THE MESSAGES
  362. * IS PUT INTO REMOTE BLOCK *ERRMSG*. THIS BLOCK IS ASSUMED TO
  363. * BE ASSEMBLED IMMEDIATELY AFTER THE MACRO CALLS. A SIMILIAR
  364. * BLOCK IS MADE FOR USE BY THE *NOBELLS* COMMAND. THIS BLOCK
  365. * CONTAINS THE ERROR MESSAGES BUT WITHOUT THE BELLS IN THEM.
  366. * (THIS TABLE IS IN REMOTE BLOCK *ERROVL*)
  367. * IN ADDITION, THE *NO BELLS* TABLE IS ALSO DUPLICATED IN
  368. * ANOTHER REMOTE BLOCK CALLED *ERRPRS*. THIS BLOCK IS
  369. * DESIGNED TO BE ASSEMBLED IN THE PRESET CODE. THIS ALLOWS
  370. * BATCH ORIGIN OUTPUT TO LOOK NICE BY REMOVING ALL THE
  371. * BELL SYMBOLS AND CONTROL BYTES. A LEADING BLANK IS ADDED.
  372.  
  373. PURGMAC ERRMSG
  374.  
  375. MACRO ERRMSG,NAME,BELLS,TEXT
  376. LOCAL Y
  377. ... IFC NE,^_TEXT_^^
  378. .. IFC NE,$NAME$$,1
  379. NAME BSS 0
  380. CON Y
  381. ERRMSG RMT
  382. .C MICRO 1,,^_TEXT_^
  383. .F MICCNT .C
  384. .B SET BELLS*2
  385. .B SET .A-.B
  386. .C MICRO 1,.B,^_TEXT_^
  387. .D MICRO .B+1,,^_TEXT_^
  388. Y BSS 0
  389. . IFC NE,$NAME$$,1
  390. VFD 12/0011B
  391. DUP BELLS,1
  392. CHAR (VFD 12/0),BL.
  393. .. IFLE .F+2,.B,4
  394. .E DECMIC .F
  395. .F SET .F*6
  396. VFD .F/_".E"_H_".C"_,*P/
  397. .. SKIP 3
  398. .E DECMIC .B
  399. VFD *P/_".E"_H_".C"
  400. DATA C^_".D"_^
  401. RMT
  402. .. IFC NE,$NAME$$,6
  403. ERROVL RMT
  404. ERRMSG 0,(_TEXT_)
  405. RMT
  406. ERRPRS RMT
  407. ERRMSG 0,( TEXT_)
  408. RMT
  409. ... ELSE
  410. .. IFC NE,^NAME^^,10
  411. ERROVL RMT
  412. LOC ERRBASE
  413. ERRMSG
  414. LOC *O
  415. RMT
  416. ERRPRS RMT
  417. LOC ERRBASE
  418. ERRMSG
  419. LOC *O
  420. RMT
  421. ERRMSG HERE
  422. ... ENDIF
  423. ENDM ERRMSG
  424.  
  425. * PRESET REMOTE BLOCKS.
  426.  
  427. ERRMSG RMT
  428. .A SET 8
  429. RMT
  430. ERROVL RMT
  431. .A SET 10
  432. CON ERR KLUDGE FOR PFM
  433. RMT
  434. ERRPRS RMT
  435. .A SET 10
  436. CON ERR KLUDGE FOR PFM
  437. RMT
  438. ERROR SPACE 4,15
  439. ** ERROR - ISSUE ERROR MESSAGE.
  440. *
  441. *
  442. * ERROR PRIMARY,SECONDARY
  443. *
  444. * ENTRY *PRIMARY* = PRIMARY MESSAGE ORDINAL.
  445. * *SECONDARY* = SECONDARY MESSAGE ORDINAL.
  446. *
  447. * EXIT THE SPECIFIED ERROR MESSAGE IS ISSUED.
  448. * (EXPLAIN) = NEW EXPLAIN ENTRY.
  449. *
  450. * USES B - 2.
  451. *
  452. * CALLS IEM.
  453.  
  454. PURGMAC ERROR
  455.  
  456. ERROR MACRO PRI,SEC
  457. IFC EQ,$SEC$$,2
  458. R= B2,PRI
  459. SKIP 1
  460. R= B2,PRI*100B+SEC
  461. RJ IEM
  462. ENDM ERROR
  463. FERROR SPACE 4,20
  464. ** FERROR - ISSUE FILE ERROR MESSAGE.
  465. *
  466. *
  467. * FERROR NAME,PRIMARY,SECONDARY
  468. *
  469. * ENTRY *NAME* = FILE NAME.
  470. * *PRIMARY* = PRIMARY MESSAGE ORDINAL.
  471. * *SECONDARY* = SECONDARY MESSAGE ORDINAL.
  472. * FILE MESSAGES CANNOT CONTAIN BELLS.
  473. *
  474. * EXIT SPECIFIED ERROR MESSAGE IS ISSUED.
  475. * (EXPLAIN) = NEW EXPLAIN ENTRY.
  476. *
  477. * USES A - 1.
  478. * X - 1.
  479. * B - 2.
  480. *
  481. * CALLS IFM.
  482.  
  483. PURGMAC FERROR
  484.  
  485. FERROR MACRO NAME,PRI,SEC
  486. IFC EQ,$SEC$$,2
  487. R= B2,PRI
  488. SKIP 1
  489. R= B2,PRI*100B+SEC
  490. R= A1,NAME
  491. RJ IFM
  492. ENDM FERROR
  493. HEREL SPACE 4,10
  494. ** HEREL - ASSEMBLE AND LIST REMOTE TEXT.
  495. *
  496. *
  497. * HEREL
  498. *
  499. * EXIT REMOTE TEXT IS ASSEMBLED AND LISTED.
  500.  
  501. PURGMAC HEREL
  502.  
  503. MACRO HEREL,NAME
  504. LIST G
  505. ;A HERE
  506. LIST *
  507. ENDM HEREL
  508. MHELP SPACE 4,15
  509. ** MHELP - ASSEMBLE HELP COMMAND DIRECTORY.
  510. *
  511. *
  512. * MHELP A,B.
  513. *
  514. * ENTRY *A* = LONG FORM OF THE COMMAND.
  515. * *B* = SHORT FORM OF THE COMMAND. IF NULL, NO
  516. * ENTRY IS MADE.
  517. *
  518. * NOTES MHELP ASSEMBLES THE HELP COMMAND DIRECTORY USED BY
  519. * THE HELP COMMAND. THIS MACRO PLACES THE INFORMATION
  520. * IN THE REMOTE BLOCK, *HELP*, FOR ASSEMBLY IN THE HELP
  521. * OVERLAY.
  522.  
  523. PURGMAC MHELP
  524.  
  525. MHELP MACRO A,B
  526. LOCAL MH5
  527. IFEQ MH2,3,6
  528. MH5 MICRO 1,,$"MH1"$
  529. HELP RMT
  530. DATA C$"MH5"$
  531. RMT
  532. MH1 MICRO 1,2,$ $
  533. MH2 SET 0
  534.  
  535. . IFNE MH2,2
  536. MH3 MICRO 1,12,$_A_ $
  537. MH4 MICRO 1,9,$ $
  538. IFC NE,$B$$,1
  539. MH4 MICRO 1,9,$[_B_] $
  540. . ELSE
  541. IFC NE,$B$$,3
  542. MH3 MICRO 1,12,$_A_ $
  543. MH4 MICRO 1,,$[_B_]$
  544. SKIP 2
  545. MH3 MICRO 1,,$_A_$
  546. MH4 MICRO 1,1,$ $
  547. . ENDIF
  548. MH1 MICRO 1,,$"MH1"_"MH3"_"MH4"_$
  549. MH2 SET MH2+1
  550. ENDM MHELP
  551.  
  552. NOREF MH2
  553. MH1 MICRO 1,1,$ $
  554. MH2 SET 0
  555. OVERLAY SPACE 4,15
  556. *** OVERLAY - LOAD OVERLAY.
  557. *
  558. *
  559. * OVERLAY NAME,LEVEL,SYSTEM,FWA
  560. * ENTRY *NAME* = ADDRESS OF FILE NAME IN *L* FORMAT.
  561. * *LEVEL* = OVERLAY LEVEL.
  562. * *SYSTEM* IF SPECIFIED, OVERLAY WILL BE LOADED FROM
  563. * SYSTEM LIBRARY, AND (NAME) = NAME OF
  564. * OVERLAY.
  565. * *FWA* IF SPECIFIED = ADDRESS AT WHICH OVERLAY WILL
  566. * BE LOADED.
  567. * EXIT (X1) = OVERLAY ENTRY ADDRESS.
  568. * CALLS OVL=.
  569.  
  570.  
  571. PURGMAC OVERLAY
  572.  
  573. OVERLAY MACRO N,L,S,F
  574. LOCAL A
  575. A SET 0
  576. IFC NE,$S$$,1
  577. A SET 1
  578. IFC NE,$L$$
  579. SX6 L
  580. LX6 6
  581. SX6 X6+A
  582. ELSE 1
  583. SX6 A
  584. R= X2,F
  585. IFC NE,$N$X1$,1
  586. SA1 N
  587. RJ =XOVL=
  588. ENDM OVERLAY
  589. OVLDEF SPACE 4
  590. ** OVLDEF - DEFINE XEDIT OVERLAY
  591. *
  592. *ADDR OVLDEF LEVEL,ADDR
  593. *
  594. * ADDR = LOAD ADDRESS IF NOT FWAOVL
  595. * LEVEL = LEVEL OF OVERLAY
  596. * TITLE = TITLE OF OVERLAY
  597. * PRESET= SET IF THIS OVERLAY HAS SPECIAL PRESET CODE.
  598. * IF SO, PRESET CODE SHOULD BE A SUBROUTINE ENTITLED
  599. * *PRS* (WILL BE RETURNED JUMPED TO).
  600.  
  601.  
  602. PURGMAC OVLDEF
  603. MACRO OVLDEF,ADDR,LVL,TEXT,PRESET
  604. QUAL XEDIT_LVL
  605. TTL XEDIT_LVL - TEXT
  606. TITLE
  607. IFC EQ,$ADDR$$,2
  608. IDENT XEDIT_LVL,FWAOVL,XEDIT_LVL,LVL,0
  609. SKIP 1
  610. IDENT XEDIT_LVL,ADDR,XEDIT_LVL,LVL,0
  611. *COMMENT XEDIT - TEXT
  612. IFC EQ,$ADDR$$,2
  613. ORG FWAOVL
  614. SKIP 1
  615. ORG ADDR
  616. NOREF .A,.B,.F,C.A,C.B,C.C,MH2
  617. CMD_LVL HERE
  618. QUAL
  619. XEDIT_LVL BSS 0 DEFINE PRESET ENTRY POINT
  620. QUAL *
  621. SA1 CHARSET
  622. RJ ICH
  623. IFC NE,$PRESET$$,1
  624. RJ PRS
  625. EQ PRM39
  626. USE SETCHAR
  627. CHARSET BSS 0
  628. USE *
  629. ENDM OVLDEF
  630. PARAM SPACE 4,10
  631. ** PARAM - DEFINE PARAMETER SYMBOL FOR COMMAND MACRO.
  632. *
  633. *
  634. *LABEL PARAM NAME
  635. *
  636. * ENTRY *LABEL* = REGULAR LABEL FIELD.
  637. * *NAME* = NAME FOR COMMAND MACRO. THIS BECOMES
  638. * *LABEL-PRM*.
  639.  
  640. PURGMAC PARAM
  641.  
  642. MACRO PARAM,LABEL,NAME
  643.  
  644. ;A BSS 0
  645. ;B EQU ;A-PRM.
  646. ENDM PARAM
  647. PREFIX SPACE 4,15
  648. ** PREFIX - DEFINE PREFIX CHARACTERS.
  649. *
  650. *
  651. * PREFIX CHARS
  652. *
  653. * ENTRY *CHARS* = PREFIX CHARACTER TO BE DEFINED.
  654. * IF ALPHABETIC, MACRO WILL GENERATE BOTH AN
  655. * UPPER AND LOWER CASE ENTRY.
  656. * IF THE PARAMETER CONTAINS MORE THAT 1 CHARACTERS, THE
  657. * MACRO WILL ASSUME THAT THE CHARACTER NEEDS TO BE
  658. * PRESET AND WILL GENERATE THE PROPER CODE.
  659. *
  660. * EXIT PREFIX TABLE IS PUT IN REMOTE BLOCK *PREFIX*.
  661.  
  662. PURGMAC PREFIX
  663.  
  664. PREFIX MACRO CHARS
  665. LOCAL A,B
  666. A BSS 0
  667. B MICRO 1,,Z_CHARS_Z
  668. C MICCNT B
  669. . IFPL C-2
  670. PREFIX RMT
  671. VFD 42/A
  672. CHAR (VFD 18/0),CHARS
  673. RMT
  674. HELPSP RMT
  675. CHAR (VFD 6/0),CHARS
  676. VFD 30/5H*****
  677. CHAR (VFD 18/0),(//_CHARS)
  678. VFD 6/0
  679. RMT
  680. . ELSE
  681. PREFIX RMT
  682. VFD 42/A,18/1R_CHARS
  683. IFLE 1R_CHARS,26D,1
  684. VFD 42/A,12/76B,6/1R_CHARS
  685. RMT
  686. HELPSP RMT
  687. VFD 6/1R_CHARS,30/5H*****,18/1R_CHARS,6/0
  688. VFD 6/1R_CHARS,30/5H*****,12/76B,6/1R_CHARS,6/0
  689. RMT
  690. . ENDIF
  691. ENDM PREFIX
  692. SPECIAL SPACE 4,10
  693. ** SPECIAL - DEFINE SPECIAL COMMANDS (1 CHARACTER).
  694. *
  695. *
  696. * SPECIAL CHARS
  697. *
  698. * ENTRY *CHARS* = SPECIAL COMMAND CHARACTER.
  699. * IF THE PARAMETER CONTAINS MORE THAN 1 CHARACTER, THE
  700. * MACRO WILL ASSUME THAT THE CHARACTER NEEDS TO BE
  701. * PRESET AND WILL GENERATE THE PROPER PRESET CODE.
  702. * A SPECIAL COMMAND CANNOT BE ALPHABETIC.
  703.  
  704. PURGMAC SPECIAL
  705.  
  706. SPECIAL MACRO CHARS
  707. LOCAL A,B
  708. A BSS 0
  709. B MICRO 1,,Z_CHARS_Z
  710. C MICCNT B
  711. . IFPL C-2
  712. SPECIAL RMT
  713. VFD 42/A
  714. CHAR (VFD 18/0),CHARS
  715. RMT
  716. HELPSP RMT
  717. CHAR (VFD 6/0),CHARS
  718. CHAR (VFD 48/0),(//_CHARS)
  719. VFD 6/0
  720. RMT
  721. . ELSE
  722. SPECIAL RMT
  723. VFD 42/A,18/1R_CHARS
  724. IFLE 1R_CHARS,26D,1
  725. 1 ERR INCORRECT TO HAVE SPECIAL COMMAND BE ALPHABETIC.
  726. RMT
  727. HELPSP RMT
  728. VFD 6/1R_CHARS,48/1R_CHARS,6/0
  729. RMT
  730. . ENDIF
  731. ENDM SPECIAL
  732. SPACE 4
  733. ** INITIALIZE -HELPSP- REMOTE BLOCK.
  734. *
  735.  
  736.  
  737. HELPSP RMT
  738. VFD 36/6H*****A,18/1RA,6/0 A POSTFIX
  739. VFD 36/6H*****W,18/1RW,6/0 W POSTFIX
  740. RMT
  741. TITLE FETS AND BUFFERS (CODED AND STRING).
  742. * FETS
  743.  
  744. CFET BSS 0 COPY FET FOR *CFF*
  745. SFET BSS 0 SCRATCH FET FOR STATUS MACRO
  746. PFET BSS 0 SCRATCH FET FOR PFM ROUTINES
  747. FT BSS 0 SCRATCH FET FOR PFM ROUTINES
  748. CON 1
  749. VFD 12/,6/4,18/50,6/7,18/BUFB
  750. CON BUFB FET USED BY *CFF* FOR FAST COPIES
  751. CON BUFB OUT
  752. CON BUFB+BUFBL MUST AGREE WITH INCOMING EDIT FILE
  753. VFD 60/
  754. VFD 60/
  755. VFD 60/
  756. VFD 60/ PFN
  757. VFD 60/ USER NAME
  758. VFD 42/ PASSWORD
  759. VFD 18/ERR ERROR ADDRESS
  760. VFD 60/ CONTROL WORD
  761.  
  762. FFET BSS 0 ADDRESS OF FIRST ACTUAL FET
  763. * ALL FETS UNTIL LFET MUST BE 7 WORDS LONG
  764.  
  765. FTI BSS 0
  766. INPUT FILEC BUFI,BUFIL,FET=7 INPUT FET
  767.  
  768. FTO BSS 0
  769. OUTPUT FILEC BUFO,BUFOL,FET=7 OUTPUT FET
  770.  
  771. FTD BSS 0
  772. SCRD FILEC BUFD,BUFDL,FET=7 COPY FET
  773.  
  774. * RFET FILEC RBUF,BUFRL,ERP,FET=7 FET IN OVERLAY (OVL2)
  775.  
  776. E.IN BSS 0
  777. FTB BSS 0
  778. SCRB FILEC BUFB,BUFBL,FET=7,EPR INCOMING EDIT FILE
  779.  
  780. E.OUT BSS 0
  781. FTA BSS 0
  782. SCRA FILEC BUFA,BUFAL,FET=7,EPR OUTGOING EDIT FILE
  783.  
  784. LFET BSS 0 ADDRESS OF LAST FET + 7
  785.  
  786. * INPUT DEVICE DEFINITIONS.
  787.  
  788. I DEVICE INPUT,ON MAIN INPUT DEVICE
  789.  
  790. P DEVICE PREVIOUS COMMAND BUFFER
  791.  
  792. S DEVICE INPUT,,POP SPECIAL INPUT MODE ESCAPE
  793.  
  794. Y DEVICE Y/Z COMMAND BUFFER
  795.  
  796. PURGMAC DEVICE VOID USAGE OF MACRO
  797.  
  798. * OTHER CODED BUFFERS.
  799.  
  800. D.LINE BSSZ 33D DATA LINE BUFFER
  801.  
  802. E.LINE BSSZ 33D EDIT LINE BUFFER
  803.  
  804. * BUFFERS (STRING)
  805.  
  806. VFD 12/2000B,30/0,18/-1 CHAR POINTER AND DELIMITER
  807. C.STR VFD 2/3,*P/ END OF LINE MARKER
  808. BSSZ MAXWD-1 COMMAND STRING BUFFER
  809. VFD 2/3,*P/ END OF LINE MARKER
  810.  
  811. DATA 0 LINE WIDTH
  812. D.STR BSSZ MAXWD DATA STRING BUFFER
  813. D.STRL EQU *-D.STR DATA STRING BUFFER LENGTH
  814. VFD 2/3,*P/ END OF LINE MARKER
  815.  
  816. DATA 0 LINE WIDTH
  817. E.STR BSSZ MAXWD EDIT LINE BUFFER
  818. VFD 2/3,*P/ END OF LINE MARKER
  819. BSSZ 1 SCRATCH CELL FOR LOCATES
  820.  
  821. * NOTE- THIS ARRAY CONTAINS PART OF XEDIT PRESET CODE.
  822. * CURRENT LINE WIDTH ENDS AT THE LAST NON-BLANK CHARACTER.
  823.  
  824. DATA 0 CURRENT LINE WIDTH
  825. E.SCR BSSZ MAXWD SCRATCH BUFFER (MUST BE AFTER E.STR)
  826. VFD 2/3,*P/ END OF LINE MARKER
  827. BSSZ 1 SCRATCH CELL FOR LOCATE
  828. TITLE STORAGE ALLOCATION.
  829.  
  830. * STRING FIELD POINTERS - MAINTAIN ORDER.
  831.  
  832. P1LP DATA 0 STRING FIELD PARAMETERS
  833. P1RP DATA 0 PLEASE MAINTAIN ORDER
  834. P2LP DATA 0
  835. P2RP DATA 0
  836. P3LP DATA 0
  837. P3RP DATA 0
  838.  
  839. * EDIT LINE MODE CONTROL - PLEASE MAINTAIN ORDER.
  840.  
  841. E.NMODE DATA 0 EDIT - NEEDED MODE FOR LINE
  842. E.CMODE DATA 0 EDIT - CURRENT MODE
  843. E.LMOD DATA 0 EDIT - LINE MODIFICATION FLAG
  844.  
  845. * FILE NAME CELLS.
  846.  
  847. COPY DATA 0 NAME OF LAST COPY FILE
  848. IFN DATA 0 CURRENT FILE NAME PARAMETER
  849. IRFN DATA 0 FILE TO READ FROM IF FS = .FALSE.
  850. ISFN DATA 0 STARTING FILE NAME (EDITFIL)
  851. LFN DATA 0 LOGICAL FILE NAME
  852.  
  853. * MARGIN CONTROLS.
  854.  
  855. IW BSS 0
  856. RMARG CON 160 DEFAULT RIGHT MARGIN
  857. LMW CON E.STR-1 * MAINTAIN ORDER OF NEXT 2
  858. RMW CON E.STR+160 * WINDOW MARGINS
  859. RTWD DATA 0 VALUE OF RIGHT WINDOW MARGIN
  860.  
  861. * MISCELLANEOUS CELLS.
  862.  
  863. AS CON 0 0 = NO ASCII, IF *ASC* THEN RESTORE AT END
  864. BATCH DATA 0 .LT. 0 IF USER IS *BCOT*
  865. .EQ. 0 IF USER IS *TXOT*
  866. .GT. 0 IF USER SELECTED *B* OPTION
  867. CHARSFT BSSZ 1 SHIFT FOR ICH. SET IN PRESET
  868. COMMAND DATA 0 COMMAND DESCRIPTOR WORD
  869. C.ON CON I.DEV POINTER TO CURRENT INPUT DEVICE
  870. DF CON 0 * MAINTAIN ORDER OF *DF* AND *DR*
  871. DR CON 0 * (DELETE EOF/EOR COUNTERS)
  872. ERR BSSZ 5 PFM ERROR MESSAGES
  873. EXPLAIN VFD 12/2000B,*P/EXPLAIN ERROR MESSAGE POINTERS
  874. EXTA DATA 0 EXIT MODE FLAG
  875. FS CON 0 .TRUE. (NEG.) IF READING OFF SCRATCH FILES
  876. GLOBAL DATA -1 GLOBAL CHARACTER FOR STRING SEARCHES
  877. LNFLAG DATA -1 NEG. - LINE NUMBER MODE, POS - WHERE MODE
  878. INDEX DATA 0 ADDRESS OF COMMAND DESCRIPTOR WORD
  879. INITZ DATA 0 NON-ZERO WHEN PRESET IS COMPLETE
  880. INPCHAR CON -1 INPUT MODE ESCAPE CHARACTER
  881. INPMODE CON 1 -1 IF IN INPUT MODE
  882. ITOGGLF DATA -1 * MAINTAIN ORDER OF *ITOGGLF/ITOGGLR*
  883. ITOGGLR DATA -1 * (PRINT EOR/EOR MESSAGE FLAGS)
  884. IWHERE CON 1 LINE COUNTER
  885. MCOUNT DATA 0 COUNT OF SUCCESSFUL LOCATES (PER CMD)
  886. NOMOD DATA -1 .TRUE. (NEG) IF NO FILE MODS THIS PASS
  887. NUMS BSSZ NTABS+1 STORAGE FOR PARAMETERS
  888. NXTLINE CON 0 OPTIONAL LINE NUMBER VALUE (IN CMDS)
  889. PREFIX CON 1BS1 COMMAND MODIFIER BITS (SEE BELOW)
  890. PROMPT CHAR (VFD 6/0),QM. TTY SPECIAL INPUT PROMPT
  891. CHAR (VFD 6/0),QM.
  892. VFD 6/55B,18/0001B,24/0 SET NO <CR> CONTROL BYTE
  893. RC DATA -1 .TRUE. (NEG) IF NO DATA READ (RDF/WTF)
  894. SCOUNT DATA 0 SLASH PREFIX COUNT
  895. SKPCNT DATA 0 SKIP COUNT FOR *-* COMMAND
  896.  
  897. ** SPCP - SPECIFIED PARAMETERS.
  898. *T 1/ W, 1/ P, 1/ A, 57/ UNUSED
  899. *
  900. * W = 1 - WINDOW WAS SPECIFIED (ON A COMMAND).
  901. * P = 1 - *P* OPTION SPECIFIED (ON *XEDIT* COMMAND).
  902. * A = 1 - FILE IS DIRECT ACCESS (ONLY VALID IF *P*
  903. * OPTION SPECIFIED).
  904. SPCP DATA 0
  905.  
  906. TABCHAR DATA -1 * MAINTAIN ORDER OF TABCHAR/TABS
  907. TABS CON 11D,18,30D * (TABCHAR AND INITIAL TAB SETTINGS)
  908. BSSZ NTABS-2 * ZERO REST OF TABS + 1 END MARKER
  909. TLX CON 0 TELEX INTERRUPT FLAG
  910. TRIM DATA 0 .LT. 0 IF TRIM OPTION SET
  911. TTYIN CON 0 .NZ. IF NOT *TTY* INPUT FILE
  912. TSTATUS BSSZ 2 DATA RETURN FROM *TSTATUS*
  913. UPDATE DATA -1 NEG. IF UPDATING EDIT FILE
  914. VERIFY DATA -1 * MAINTAIN ORDER OF VERIFY FLAGS
  915. XVERIFY DATA -1 * .TRUE. (NEGATIVE) IF VERIFYING
  916. IF DEF,TIMES,1
  917. TIMING BSSZ 3
  918. SPACE 4
  919. * MISCELLANEOUS MICROS.
  920.  
  921. PTFT DECMIC PTFT PRIMARY FILE TYPE
  922. SPACE 4
  923. ** DEFINITION OF COMMAND MODIFIER BITS (PREFIX WORD).
  924. *
  925. * NOTE- THIS WORD IS ZEROED BEFORE CRACKING ANY COMMAND.
  926.  
  927. QUAL PREFIX
  928. PLUS EQU 1 + PREFIX CHARACTER
  929. PLUS DECMIC PLUS
  930. A EQU 2 A POSTFIX CHARACTER
  931. A DECMIC A
  932. W EQU 3 W POSTFIX CHARACTER
  933. W DECMIC W
  934. QUAL *
  935. SPACE 4
  936. ** DEFINITION OF SPECIAL BITS USED IN COMMAND DESCRIPTOR.
  937. *
  938.  
  939.  
  940. QUAL OPTS
  941. CR EQU 47D COMMAND LEGAL IN CREATION MODE
  942. F0 EQU 44D NUMBER FIELD FORCE 0 IN INPUT MODE
  943. LK EQU 46D COMMAND LEGAL IN LOOK MODE
  944. IN EQU 45D COMMAND LEGAL IN INPUT MODE
  945. QUAL *
  946. TITLE TABLES AND MESSAGES.
  947. ** CHARACTER SET REPLACEMENT TABLE.
  948. *T 24/AS, 18/64 C, 18/63 C
  949. *
  950. * AS = ASCII 6/12 CHARACTER SET.
  951. * 64 C = 64 CHARACTER SET.
  952. * 63 C = 63 CHARACTER SET.
  953. *
  954.  
  955. AM. VFD 24/67B,18/67B,18/67B AMPERSAND
  956. BL. VFD 24/7647B,18/7647B,18/7647B BELL (EXTENDED MODE)
  957. QM. VFD 24/71B,18/71B,18/71B QUESTION MARK
  958. SH. VFD 24/60B,18/60B,18/60B SHARP
  959. UA. VFD 24/7402B,18/76B,18/76B UP ARROW
  960.  
  961. * XEDIT MESSAGE TABLE.
  962. *
  963. * NOTE- ANY SECONDARY MESSAGES DEFINED WITHIN XEDIT
  964. * ARE ASSUMED TO BE IN OCTAL.
  965. * TOTAL NUMBER OF PRIMARY ERROR MESSAGES MUST BE LESS
  966. * THAN 40B.
  967.  
  968. MESSAGE EQU *-1 BASE ADDR OF MESSAGE TABLE
  969. LOC 1
  970. PFM. CON ERR KLUDGE FOR PFM ERRORS
  971. ARG. ERRMSG 1,(ARGUMENT ERROR)
  972. 1 = INPUT MODE - COMMAND HAS COUNT (F0)
  973. BFN. ERRMSG 1,(BAD FILE NAME)
  974. 1 = BAD FILE NAME
  975. 2 = NO FILE NAME
  976. 3 = SPECIAL/RESERVED NAME
  977. BTL. ERRMSG 1,(BAD TEXT LINE ENCOUNTERED)
  978. CNV. ERRMSG 1,(COMMAND NOT VALID)
  979. 1 = IN CREATION MODE
  980. 2 = IN LOOK MODE
  981. 3 = IN INPUT MODE
  982. DEL. ERRMSG 1,(DELIMITER)
  983. EMI. ERRMSG 1,(FILE FUNCTION INCORRECT)
  984. 1 = NOT ALLOWED TO CHANGE FILE
  985. 2 = *L* INCORRECT ON DA/MT FILES
  986. * PLEASE MAINTAIN ORDER OF NEXT TWO
  987. EOF. ERRMSG 0,(--EOF--)
  988. EOR. ERRMSG 0,(--EOR--)
  989. EOI. ERRMSG 2,(END OF FILE)
  990. FCP. ERRMSG 0,(FILENAM REWRITTEN)
  991. FCR. ERRMSG 0,(FILENAM CANNOT BE ACCESSED)
  992. 1 = FILE IS EXECUTE OR APPEND ONLY FILE
  993. 2 = FILE IS NOT LOCAL TO JOB
  994. 3 = FILE NOT IN PERM. FILE AREA
  995. FLC. ERRMSG 0,(FILENAM IS A LOCAL FILE)
  996. FRP. ERRMSG 0,(FILENAM REPLACED)
  997. FSV. ERRMSG 0,(FILENAM SAVED)
  998. ILL. ERRMSG 1,(INCORRECT PARAMETER)
  999. LFM. ERRMSG 0,(LOCAL FILE ERROR)
  1000. LNNF. ERRMSG 1,(LINE NUMBER NOT FOUND, COMMAND NOT EXECUTED)
  1001. LNTL. ERRMSG 1,(LINE NUMBER TOO LARGE)
  1002. NSC. ERRMSG 1,(NO SUCH COMMAND)
  1003. SNF. ERRMSG 1,(STRING NOT FOUND)
  1004. STK. ERRMSG 1,(COMMAND STACKING ERROR)
  1005. TRUNC. ERRMSG 1,(TRUNCATION AT LINE)
  1006. LOC *O
  1007. ERRBASE BSS 0 SET MESSAGE BASE ADDRESS
  1008. ERRMSG NOTE END OF TABLE
  1009. TITLE COMMAND PARSER - MAIN LOOP.
  1010. NCM SPACE 4,20
  1011. ** NCM - GET NEXT COMMAND.
  1012. *
  1013. * ENTRY NONE.
  1014. *
  1015. * EXIT TO COMMAND PROCESSING ROUTINE AFTER PARSING
  1016. * PARAMETERS AND HANDLING ERRORS.
  1017. * (X1) = COMMAND DESCRIPTOR WORD.
  1018. *
  1019. * USES A - 1, 2, 3, 4, 5, 6, 7.
  1020. * X - ALL.
  1021. * B - 2, 3, 4, 5, 6, 7.
  1022. *
  1023. * CALLS CDD, SCD, VIS.
  1024. *
  1025. * MACROS GETJA, WRITEO.
  1026.  
  1027. NCM BSS 0 ENTRY
  1028. RJ SCD ASSURE CODED MODE AT START OF COMMAND
  1029. IF DEF,TIMES
  1030. SA4 TIMING+1
  1031. GETJA TIMING GET ELAPSED TIME
  1032. SA1 A4
  1033. IX1 X1-X4 ELAPSED TIME
  1034. RJ CDD CONVERT
  1035. WRITEO OUTPUT
  1036. MX6 0 LINE FEED
  1037. WRITEO X2
  1038. ENDIF
  1039.  
  1040. SA1 C.STR-1 COMMAND LINE CONTROL WORD
  1041. SA4 EXPLAIN UPDATE EXPLAIN WORD
  1042. R= X6,M.CODED
  1043. UX1 B7,X1 B7 = CHARACTER POINTER
  1044. SA6 E.NMODE SET MODE NEEDED TO CODED
  1045. LE B7,NCL IF READ REQUIRED
  1046. SA5 A1+B7
  1047. BX6 X6-X6
  1048. SA6 PREFIX RESET PREFIX WORD
  1049. SA2 XVERIFY
  1050. AX4 12
  1051. SB6 X1 B6 = DELIMITER CHARACTER
  1052. BX7 X2
  1053. PX6 B0,X4
  1054. NG X5,NCM22 IF AT END OF LINE (NO SUCH CMD)
  1055. SA6 A4 REPLACE EXPLAIN WORD
  1056. SA2 A5 GET FIRST CHARACTER OF NEW CMD
  1057. SA7 VERIFY SET VERIFY FLAG
  1058. BX7 X7-X7
  1059. SA7 SCOUNT INITIALIZE SLASH COUNT
  1060. NG B6,NCM2 IF NO DELIMETER CHARACTER
  1061. NCM1 NG X2,NCM2 IF END OF LINE REACHED
  1062. SB5 X2
  1063. SA2 A2+B1
  1064. NE B5,B6,NCM1 IF NOT DELIMITER CHARACTER
  1065. SX6 B5+
  1066. MX7 1 SET PSEUDO END OF LINE
  1067. BX6 X6+X7
  1068. SA6 A2-1
  1069.  
  1070. * PARSE PREFIX CHARACTERS.
  1071.  
  1072. NCM2 SA3 PREFIXT-1
  1073. BX6 X5
  1074. SB6 X5 B6 = DELIMITER CHARACTER
  1075. SA6 PREFIXU
  1076. SA7 INDEX CLEAR INDEX (TOPNULL 'P4 BUG)
  1077. NCM3 SA3 A3+B1
  1078. SB3 X3
  1079. NE B3,B6,NCM3 IF NOT THIS PREFIX CHARACTER
  1080. AX3 18
  1081. SB6 X3
  1082. ZR B6,NCM4 IF NOT REALLY PREFIX CHARACTER
  1083. SA5 A5+B1 PREPARE FOR NEXT CHARACTER
  1084. JP B6 PROCESS PREFIX CHARACTER
  1085.  
  1086. * CLOSE PREFIX PARSING.
  1087.  
  1088. NCM4 SB3 2
  1089. SX7 0 CLEAR ASSEMBLY
  1090.  
  1091. * BEGIN PARSING FOR LINE NUMBER.
  1092.  
  1093. NCM5 SX0 X5-1R9-1
  1094. SX2 X5-1R0
  1095. BX0 -X2*X0
  1096. PL X0,NCM6 IF NOT A NUMBER
  1097. LX0 B3,X7 *2
  1098. IX7 X0+X7 *5
  1099. SA5 A5+B1
  1100. LX7 1 *10
  1101. IX7 X7+X2
  1102. EQ NCM5 CHECK NEXT CHARACTER
  1103.  
  1104. * SAVE LINE NUMBER AND PARSE COMMAND.
  1105.  
  1106. NCM6 MX6 1
  1107. SA7 NXTLINE SAVE NEXT LINE
  1108. MX4 26
  1109. MX3 -6
  1110. NG X5,NCM9 IF AT END OF LINE
  1111. LX4 -5 POSITION MASK
  1112. NCM7 BX0 -X3*X5
  1113. SB3 X0+4
  1114. LX1 B3,X4
  1115. PL X1,NCM9 IF NO A-Z
  1116. BX1 X3*X5 CHECK TO SEE IF ASCII
  1117. ZR X1,NCM8 IF UPPER CASE LETTER
  1118. SX1 X1-7600B
  1119. NZ X1,NCM9 IF NOT LOWER CASE LETTER
  1120. NCM8 LX6 6
  1121. BX6 X6+X0
  1122. SA5 A5+1
  1123. PL X5,NCM7 IF NOT AT END OF LINE
  1124.  
  1125. * DETERMINE IF *W* POSTFIX, LEFT JUSTIFY COMMAND.
  1126.  
  1127. NCM9 BX1 -X3*X6 GET LAST CHARACTER
  1128. MX0 1
  1129. SX7 1BS"W"
  1130. SX4 X1-1RW
  1131. ZR X4,NCM10 IF W POSTFIX (W HAS JUSTIFICATION BIT)
  1132. SB3 X1+
  1133. SX7 1BS"A"
  1134. NE B3,B1,NCM11 IF NOT *A* POSTFIX
  1135. NCM10 SA4 PREFIX
  1136. BX6 X3*X6 REMOVE POSTFIX
  1137. BX7 X7+X4
  1138. SA7 A4 REPLACE PREFIX WORD
  1139. NCM11 LX6 6 LEFT JUSTIFY
  1140. PL X6,NCM11 IF NOT LEFT JUSTIFIED
  1141. BX6 -X0*X6 REMOVE JUSTIFICATION BIT
  1142.  
  1143. * SKIP BLANKS AND FIRST COMMA. STOPS ON FIRST NON-BLANK
  1144. * CHARACTER OR ON SECOND COMMA.
  1145. * ASSUMES X0 IS NEGATIVE AT ENTRY.
  1146.  
  1147. NCM12 NG X5,NCM14 IF END OF LINE
  1148. SB3 X5-1R 0 = BLANK, 1 = COMMA
  1149. ZR B3,NCM13 IF BLANK
  1150. NE B3,B1,NCM14 IF NOT COMMA
  1151. PL X0,NCM14 IF SECOND COMMA
  1152. SX0 0 SET COMMA ENCOUNTERED
  1153. NCM13 SA5 A5+B1
  1154. EQ NCM12 CHECK NEXT CHARACTER
  1155.  
  1156. * LOOK UP COMMAND IN COMMAND TABLE.
  1157.  
  1158. NCM14 ZR X6,NCM24 IF NO COMMAND
  1159. SA4 JUMP-1
  1160. SA6 JUMPX PRESET COMMAND TABLE
  1161. NCM14.1 SA4 A4+B1 GET NEXT COMMAND
  1162. IX3 X4-X6
  1163. NG X4,NCM14.1 IF DATA WORD
  1164. NZ X3,NCM14.1 IF NOT THIS ENTRY
  1165. NCM15 SA4 A4+B1
  1166. PL X4,NCM15 IF NOT DATA CELL ASSOCIATED WITH COMMA
  1167. SX0 X4
  1168.  
  1169. * CODE IS REPLACE AFTER CREATION MODE IS EXITED
  1170.  
  1171. NCMA SA3 IWHERE
  1172. EQ NCM16 JUMP TO PRESET TEST
  1173.  
  1174. NCM RMT
  1175. ZR X0,NCM23 IF NO JUMP ADDRESS (NO SUCH COMMAND)
  1176. SA3 UPDATE
  1177. RMT
  1178.  
  1179. SX6 A4 SAVE INSTRUCTION INDEX
  1180. BX3 X3+X4 CHECK LOOK COMMAND PERMISSION NECESSARY
  1181. SA1 INPMODE
  1182. BX7 X4 SAVE COPY OF COMMAND DATA WORD
  1183. LX3 59-/OPTS/LK
  1184. SA6 INDEX
  1185. BX1 -X4*X1 NEG. IF IN INPUT AND COMMAND NOT OK
  1186. LX1 59-/OPTS/IN
  1187. SA7 COMMAND
  1188. NG X1,NCM20 IF NOT LEGAL IN INPUT MODE
  1189. PL X3,NCM21 IF NOT VALID IN LOOK MODE
  1190. UX4 B6,X4 GET ARGUMENT DESCRIPTOR ADDRESS
  1191. ZR B6,PST IF NO ARGUMENTS
  1192. JP B6+PRM. PARSE PARAMETERS
  1193.  
  1194. * CREATION MODE CODE.
  1195. * ENTRY (X3) = IWHERE.
  1196.  
  1197. NCM16 NG X3,NCM18 IF IN CREATION MODE
  1198. SA3 NCM17 GET INSTRUCTION REPLACEMENT WORD
  1199. NO
  1200. BX6 X3
  1201. SA6 NCMA
  1202. RJ VIS VOID INSTRUCTION STACK
  1203. NCM17 BSS 0
  1204. NCM HEREL
  1205. EQ NCMA+1 JUMP INTO REQULAR CODE
  1206.  
  1207. NCM18 ZR X0,NCM23 IF NO SUCH COMMAND
  1208. BX3 -X4*X3
  1209. LX3 59-/OPTS/CR POSITION CREATION LEGAL STATUS
  1210. NG X3,NCM19 IF COMMAND NOT ALLOWED IN CREATION MODE
  1211. SA3 UPDATE
  1212. EQ NCMA+1 PROCESS COMMAND
  1213.  
  1214. * ERROR PROCESSING ROUTINES.
  1215.  
  1216. NCM19 SB2 CNV.*100B+1 SET *NOT VALID* IN CREATION MODE
  1217. EQ NER PROCESS ERROR
  1218.  
  1219. NCM20 SB2 CNV.*100B+3 SET *NOT VALID* IN INPUT MODE
  1220. EQ NER PROCESS ERROR
  1221.  
  1222. NCM21 SB2 CNV.*100B+2 SET *NOT VALID* IN LOOK MODE
  1223. EQ NER PROCESS ERROR
  1224.  
  1225. NCM22 SA1 C.STR-1 SET READ REQUIRED
  1226. PX6 B0,X1
  1227. SA6 A1
  1228.  
  1229. NCM23 SB2 NSC. NO SUCH COMMAND
  1230. EQ NER PROCESS ERROR
  1231.  
  1232. * IF NO COMMAND IS FOUND, CHECK FOR SPECIAL COMMANDS.
  1233.  
  1234. NCM24 NG X5,NCM28 IF END OF LINE (POSSIBLY FINDLN)
  1235. SA4 SPCMDT-1
  1236. BX6 X5
  1237. SA6 SPCMDU
  1238. SB3 X5
  1239. NCM25 SA4 A4+B1
  1240. SB4 X4
  1241. NE B4,B3,NCM25 IF NO MATCH
  1242. AX4 18
  1243. SB4 X4
  1244. ZR X4,NCM23 IF NO SUCH COMMAND (NULL)
  1245.  
  1246. * SKIP BLANKS AND ONE COMMA.
  1247.  
  1248. NCM26 SA5 A5+1 STEP OVER SPECIAL CHARACTER
  1249. NG X5,NCM27 IF END OF LINE
  1250. SB2 X5-1R
  1251. ZR B2,NCM26 IF BLANK
  1252. NE B2,B1,NCM27 IF NOT COMMA
  1253. ZR X4,NCM27 IF SECOND COMMA
  1254. MX4 0
  1255. EQ NCM26 CHECK NEXT CHARACTER
  1256.  
  1257. NCM27 JP B4 PROCESS SPECIAL COMMAND
  1258.  
  1259. * CHECK FOR FINDLN COMMAND, ELSE NO SUCH COMMAND.
  1260.  
  1261. NCM28 SA1 NXTLINE
  1262. SA2 IWHERE
  1263. ZR X1,NCM23 IF NOT TO FIND LINE NUMBER
  1264. SA3 INPMODE
  1265. NG X2,NCM19 IF IN CREATION MODE
  1266. BX6 X1
  1267. MX7 0
  1268. NG X3,NCM20 IF IN INPUT MODE (CANNOT MOVE PTR)
  1269. SA6 NUMS MOVE PARAMETER
  1270. SX6 FLN
  1271. SA7 NXTLINE CLEAR NXTLINE OPTION
  1272. SA6 COMMAND
  1273. EQ PRM.+NONE PROCESS COMMAND
  1274.  
  1275. PRM SPACE 4,20
  1276. ** PRM - COMMAND PARAMETER CRACKER.
  1277. *
  1278. * ENTRY (A5) = ADDRESS OF CURRENT CHARACTER.
  1279. * (X5) = CURRENT CHARACTER.
  1280. * (X7) = COMMAND DESCRIPTOR WORD.
  1281. *
  1282. * EXIT IF NO ERROR, TO *PST* OR *PST7*.
  1283. * IF ERROR, TO *NER* TO PROCESS ERROR.
  1284. *
  1285. * USES A - ALL.
  1286. * X - ALL.
  1287. * B - 2, 3, 4, 5, 6, 7.
  1288. *
  1289. * CALLS GFN, VAL.
  1290. *
  1291. * MACROS ERROR, GET, MEMORY, PARAM, RETURN, WRITEC.
  1292. *
  1293. * NOTES THIS ROUTINE INITIALIZES PARAMETERS FOR THE VARIOUS
  1294. * ROUTINES AND IS ENTERED AT SEVERAL PLACES LABELED
  1295. * AS SUCH.
  1296.  
  1297.  
  1298. PRMA VFD 27/0,10/-0,2/0,1/1,*P/ NUMBER * MASK
  1299. PRMB BSSZ 1 SCRATCH CELL AVAILABLE FOR USE BY PARSER
  1300. PRMC BSS 0
  1301. LOC 0
  1302. DATA 1RL LOCAL FILE
  1303. DATA 1RR REPLACE FILE
  1304. DATA 1RS SAVE FILE
  1305. DATA 1RC COPYBACK FILE
  1306. LOC *O
  1307. PRMCL EQU *-PRMC
  1308.  
  1309. PRM. EQU *-1 BASE ADDRESS
  1310.  
  1311. ** STRING PARAMETERS.
  1312. *
  1313. * CAN BE ONE OF SEVERAL FORMS WHICH ARE-
  1314. * 1. /STRING...STRING/COUNT (COUNT OPTIONAL)
  1315. * 2. /STRING/COUNT (COUNT OPTIONAL)
  1316. * 3. /STRING/STRING/COUNT (COUNT OPTIONAL)
  1317. * 4. COUNT (COUNT OPTIONAL)
  1318. *
  1319. * THE OPTIONS ARE SELECTED BY USING THE MODIFIER FIELD IN THE
  1320. * COMMAND DESCRIPTOR WORD. FOR MOST COMMANDS, THE 18 BIT
  1321. * FIELD CONTAINS ANY DATA NEEDED BY EITHER THE COMMAND
  1322. * PARSER OR THE COMMAND ROUTINE. HOWEVER- IN THE CASE
  1323. * OF ANY COMMAND USING THE STRING AND/OR FILE PARAMETER
  1324. * SPECIFICATION, THE MODIFIER FIELD INFORMATION IS FIXED
  1325. * AND CONTAINS THE FOLLOWING INFORMATION.
  1326. *
  1327. * BIT 16 = FIRST STRING NECESSARY (CAN BE NULL)
  1328. * BIT 15 = SECOND STRING NEEDED (CAN BE NULL)
  1329. * BIT 14 = CHECK FOR SPECIAL ... OR --- IN FIRST STRING
  1330. * BIT 13 = --- OPTION LEGAL
  1331. * BIT 12 = UNUSED (BUT ONCE WAS- CLEAR COMMANDS IF USED)
  1332. * BITS 11-5 = UNUSED.
  1333. * BIT 4 = NO FILE NAME LEGAL.
  1334. * BIT 3 = SPECIAL FILE NAMES LEGAL.
  1335. * BITS 2-0 = POST FILE NAME PARAMETER OPTION.
  1336. *
  1337. * NOTE- ALL STRING PARSES CALL SUBROUTINE *ASF* TO PRESET
  1338. * THE CELLS NEEDED BY *LOC*.
  1339.  
  1340.  
  1341. PRM1 PARAM STRING
  1342. SA1 COMMAND OBTAIN DESCRIPTOR
  1343. BX6 X6-X6 CLEAR CELLS
  1344. SA6 P3RP CLEAR STRING POINTERS
  1345. SA6 A6-B1
  1346. SA6 A6-B1 P2RP
  1347. SA6 A6-B1
  1348. BX7 X1
  1349. SA6 A6-B1 P1RP
  1350. SA6 A6-B1
  1351. SA6 NUMS CLEAR COUNT FIELD
  1352. SA6 PRMB SET POSITIVE LOGIC
  1353. LX7 59-34 MODIFIER BIT 16 AT SIGN BIT
  1354. SA0 B0 SET NO DELIMITER MESSAGE NEEDED
  1355. SB6 X5-1R,
  1356. NG X5,PRM9 IF END OF LINE (NO STRING)
  1357. SA4 PRMA
  1358. ZR B6,PRM9 IF NULL PARAMETER (IE. *,,*)
  1359. SB3 X5 DELIMITER CHARACTER
  1360. SX6 A5+B1 SAVE POINTER TO FIRST CHARACTER
  1361. LX4 B3
  1362. SB5 X6 ADDRESS OF FIRST CHARACTER
  1363. NG X4,PRM9 IF CHARACTER IS 0-9 OR *
  1364. SA6 P1LP
  1365.  
  1366. * PARSE FIRST STRING FIELD.
  1367.  
  1368. PRM2 SA5 A5+B1 SEARCH FOR CLOSING DELIMITER
  1369. NG X5,PRM3 IF END OF LINE FOUND
  1370. SB4 X5
  1371. NE B3,B4,PRM2 IF NOT DELIMITER
  1372. SX6 A5 SET LWA+1 FOR FIELD
  1373. SA5 A5+B1 STEP PAST DELIMITER
  1374. SA6 A6+B1 CLOSING PARAMETER
  1375. SB6 X6
  1376. SA1 COMMAND
  1377. LX4 B1,X7 BIT 15
  1378. SX6 A5 POINTER FOR POSSIBLE SECOND FIELD
  1379. PL X4,PRM6 IF NOT SUPPOSED TO HAVE 2 STRING
  1380. SA6 P3LP SAVE POINTER TO SECOND FIELD
  1381. EQ PRM4 PARSE SECOND STRING
  1382.  
  1383. PRM3 SX6 A5 SAVE POINTER
  1384. SA0 B1 SET DELIMITER MESSAGE NECESSARY
  1385. SA6 A6+B1
  1386. LX4 B1,X7 SHIFT MODIFIER BIT 15 (2 STRINGS)
  1387. NG X4,PRM13 IF 2 STRINGS NEEDED (ARG ERROR)
  1388. EQ PRM6 ONE STRING FIELD PRESENT
  1389.  
  1390. PRM4 SX6 A5
  1391. SA0 B1 SET DELIMITER (JUST IN CASE)
  1392. NG X5,PRM5 IF END OF LINE
  1393. SB4 X5
  1394. SA5 A5+B1
  1395. NE B4,B3,PRM4 IF NOT AT DELIMITER
  1396. SA0 B0 CLEAR DELIMITER MESSAGE REQUIRED
  1397. PRM5 SA6 P3RP
  1398. PRM6 SA1 COMMAND CHECK FOR SPECIAL FIELDS
  1399. SA2 P1LP
  1400. LX1 59-32 MODIFIER BIT 14
  1401. PL X1,PRM9 IF SPECIAL FIELDS NOT USED
  1402. SA3 A2+B1 P1RP
  1403. SX4 1R.
  1404. SB2 X2 LEFT MOST CHARACTER
  1405. LX1 1
  1406. SB3 X3 RIGHT MOST CHARACTER
  1407. PL X1,PRM7 IF *---* FORM NOT ALLOWED
  1408. SX4 1R-
  1409. PRM7 GE B2,B3,PRM8 IF ALL POSITIONS TRIED
  1410. SA1 B2
  1411. SB2 B2+B1
  1412. BX1 X1-X4
  1413. NZ X1,PRM7 IF NOT CHARACTER
  1414. SA1 B2
  1415. SB2 B2+B1
  1416. BX1 X1-X4
  1417. NZ X1,PRM7 IF NOT CHARACTER
  1418. SA1 B2
  1419. SB2 B2+B1
  1420. BX1 X1-X4
  1421. NZ X1,PRM7 IF NOT CHARACTER
  1422. GT B2,B3,PRM8 IF PAST LAST CHARACTER IN STRING
  1423. SA1 P1RP SET UP POINTERS
  1424. SX7 B2-3
  1425. SX6 B2
  1426. SA7 A1 PUT NEW P1RP
  1427. SA6 A1+B1 PUT P2LP
  1428. BX7 X1
  1429. SX6 X4-1R.
  1430. SA7 A6+B1 PUT P2RP
  1431. SA6 PRMB SET ... OR --- FLAG
  1432. EQ PRM9 PARSE NUMBER
  1433.  
  1434. PRM8 SX3 X4-1R-
  1435. NZ X3,PRM9 IF TRIED ... FORM
  1436. SB2 X2 RESET FIRST CHARACTER
  1437. SX4 1R.
  1438. EQ PRM7 TRY ... FORM
  1439.  
  1440. * SKIP BLANKS AND FIRST COMMA AND EXIT TO OBTAIN ONE NUMBER
  1441.  
  1442. PRM9 SX1 A0
  1443. ZR X1,PRM10 IF DELIMITER MESSAGE NOT NEEDED
  1444. ERROR DEL.
  1445.  
  1446. PRM10 RJ ASF ANALYZE STRING FIELDS
  1447. NZ B2,NER IF ERROR ENCOUNTERED
  1448. PRM11 NG X5,PRM.+NUMBER1 IF END OF LINE REACHED
  1449. SB3 X5-1R
  1450. ZR B3,PRM12 IF BLANK
  1451. NE B3,B1,PRM.+NUMBER1 IF NOT COMMA
  1452. NZ B2,PRM.+NUMBER1 IF SECOND COMMA
  1453. SB2 1 SET COMMA ENCOUNTERED
  1454. PRM12 SA5 A5+B1 NEXT CHARACTER
  1455. EQ PRM11 CHECK NEXT CHARACTER
  1456.  
  1457. PRM13 SB2 ARG. SET ARGUMENT ERROR
  1458. EQ NER PROCESS ERROR
  1459.  
  1460. ** NEXT PARAMETER.
  1461. *
  1462. * THIS ROUTINE CHECKS FOR A MINUS SIGN. IF MINUS, IT SETS
  1463. * *NUMS*+1 EQUAL TO -0, ELSE IT SETS *NUMS*+1 = +0, AND THEN
  1464. * EXITS TO OBTAIN ONE NUMBER.
  1465.  
  1466.  
  1467. PRM14 PARAM NEXT
  1468. MX6 0
  1469. SX4 X5-1R-
  1470. SB5 B1 SET ONE NUMBER PARAMETER
  1471. NZ X4,PRM15 IF NOT - SIGN
  1472. SA5 A5+B1 STEP OVER - SIGN
  1473. MX6 60 SET -0
  1474. PRM15 SA6 NUMS+1
  1475. EQ PRM17 OBTAIN NUMBER
  1476.  
  1477. ** NUMERIC PARAMETERS.
  1478. *
  1479. * BITS 17-35 CONTAIN NUMBER OF FIELDS TO PARSE.
  1480.  
  1481.  
  1482. PRM16 PARAM NUMBER
  1483. SA1 COMMAND GET DESCRIPTOR WORD
  1484. AX1 18
  1485. SB5 X1 PARAMETER COUNT
  1486.  
  1487. * ENTRY POINT (B5) = NUMBER OF FIELDS.
  1488.  
  1489. PRM17 SB6 1 SET COUNTER
  1490. PRM18 RJ VAL
  1491. SA6 NUMS-1+B6
  1492. SB6 B6+1
  1493. LE B6,B5,PRM18 IF MORE TO GO
  1494. EQ PST7 END OF PARSE
  1495.  
  1496. ** NUMBER1.
  1497. *
  1498. * CRACKS OFF 1 NUMBER. ALLOWS MODIFIER FIELD TO BE USED FOR
  1499. * OTHER FUNCTIONS.
  1500.  
  1501.  
  1502. PRM19 PARAM NUMBER1
  1503. RJ VAL PARSE NUMBER
  1504. SA6 NUMS
  1505. SA1 INPMODE
  1506. PL X1,PST7 IF NOT IN INPUT MODE
  1507. SA2 COMMAND
  1508. MX7 60 PREPARE -0
  1509. LX2 59-/OPTS/F0
  1510. PL X2,PST7 IF NOT TO FORCE 0
  1511. SB2 ARG.*100B+1 SET PARAMETER NOT ALLOWED IN INPUT MODE
  1512. NZ X6,NER IF USER SPECIFIED A PARAMETER
  1513. SA7 A6 FORCE -0 PARAMETER
  1514. EQ PST7 EXIT TO POST COMMAND PROCESSOR
  1515.  
  1516. EQ PRM17 NOTHING
  1517.  
  1518. ** NUMBER2.
  1519. *
  1520. * CRACKS OFF 2 NUMBERS. ALLOWS MODIFIER FIELD TO BE USED FOR
  1521. * OTHER FUNCTIONS.
  1522.  
  1523.  
  1524. PRM20 PARAM NUMBER2
  1525. SB5 B1+B1 PARAMETER COUNT
  1526. EQ PRM17 PARSE NUMBERS
  1527.  
  1528. ** FILE PARAMETER.
  1529. *
  1530. * PARSES ONE FILE NAME (WITH OPTIONS).
  1531. * EXITS TO SPECIFIED OPTIONAL PARAMETERS.
  1532.  
  1533.  
  1534. PRM21 PARAM ONEFILE
  1535. BX0 X7 COMMAND DESCRIPTOR
  1536. LX0 59-21 SPECIAL NAMES OK BIT
  1537. RJ GFN PARSE FILE NAME
  1538. SA6 IFN
  1539. ZR X1,PRM23 IF NAME LEGAL
  1540. SB2 B6 KLUDGE FOR NOW
  1541. NZ X6,PRM22 IF NAME IS SPECIAL
  1542. SX7 B6-BFN.*100B-2 SEE IF NO FILE NAME
  1543. LX0 -1 *NFN* BIT
  1544. NZ X7,NER IF NOT *NO FILE NAME*
  1545. PRM22 PL X0,NER IF NOT VALID
  1546. PRM23 SA1 COMMAND
  1547. MX2 -3 OBTAIN POST-FILE OPTIONS
  1548. AX1 18
  1549. BX2 -X2*X1
  1550. LX2 -1
  1551. SB3 X2+
  1552. JP PRM24+B3 JUMP TO POST PROCESSING OPTION
  1553.  
  1554. PRM24 PL X2,PST7 IF NOTHING TO FOLLOW
  1555. EQ STRING+PRM. PROCESS STRING FIELD
  1556.  
  1557. EQ PFMTYPE+PRM. PROCESS PFM SPECIFICATIONS
  1558.  
  1559. ** PFMTYPE.
  1560. *
  1561. * PFMTYPE CRACKS OFF THE LEGAL PFM CODES FOR
  1562. * USE IN THE *END*, *FILE*, AND *QUIT* COMMANDS.
  1563. *
  1564. * THE DATA IS PLACED IN NUMS, WITH THE FOLLOWING
  1565. * CONVENTION-
  1566. *
  1567. * BIT 0 = LOCAL OR L USED.
  1568. * BIT 1 = REPLACE OR R USED.
  1569. * BIT 2 = DIRECT OR D USED.
  1570. * BIT 3 = COPY OR C USED.
  1571. *
  1572. * ANY COMBINATION OF ABOVE ARE LEGAL PROVIDING THAT
  1573. * ONLY ONE LETTER MNENOMICS ARE USED. (HOWEVER, NOT
  1574. * ALL COMBINATIONS MADE SENSE).
  1575.  
  1576.  
  1577. PRM25 PARAM PFMTYPE
  1578. BX6 X6-X6 CLEAR ASSEMBLY
  1579. SB3 PRMC GET BASE OF MNEMONICS
  1580. SX4 B1
  1581. PRM26 SB2 PRMCL
  1582. SX0 X5-7600B
  1583. NG X0,PRM27 IF NOT ASCII CHARACTER
  1584. SX5 X5-7600B
  1585. PRM27 SB2 B2-B1
  1586. LT B2,PRM28 IF END OF LIST (END OF PARSE)
  1587. SA1 B3+B2
  1588. BX1 X1-X5
  1589. NZ X1,PRM27 IF NOT THIS ENTRY
  1590. LX0 B2,X4 SHIFT CODE
  1591. SA5 A5+B1 NEXT CHARACTER
  1592. BX6 X6+X0
  1593. PL X5,PRM26 IF MORE TO GO
  1594. PRM28 SA6 NUMS SET CODES
  1595. NG X5,PST IF END OF LINE
  1596. PRM28.1 SA5 A5+1
  1597. PL X5,PRM28.1 IF NOT END OF COMMAND
  1598. EQ PST EXIT
  1599.  
  1600. ** TOGGLE/SET PARAMETERS.
  1601. *
  1602. * VALID CHARACTERS ARE +,- OR NULL.
  1603. * + = NUMS IS EQUAL TO +1.
  1604. * - = NUMS IS EQUAL TO -1.
  1605. * NULL = EQUAL TO +0.
  1606.  
  1607. PRM29 PARAM TOGGLE
  1608. NG X5,PRM30 IF END OF LINE
  1609. SB3 X5-1R+
  1610. ZR B3,PRM32 IF + SIGN
  1611. EQ B3,B1,PRM33 IF - SIGN
  1612.  
  1613. PRM30 SX6 0
  1614. PRM31 SA6 NUMS
  1615. EQ PST7 EXIT
  1616.  
  1617. PRM32 SA5 A5+B1 + SIGN PROCESSING
  1618. SX6 B1
  1619. EQ PRM31 SET UP EXIT
  1620.  
  1621. PRM33 SA5 A5+B1 - SIGN PROCESSING
  1622. SX6 -B1
  1623. EQ PRM31 SET UP EXIT
  1624.  
  1625. ** CHARACTER PARAMETERS.
  1626. *
  1627. * ROUTINE ALLOWS ONE CHARACTER PARAMETER.
  1628. * IF BIT 18 IS SET IN DESCRIPTOR WORD, THE CHARACTER CANNOT
  1629. * BE AN ALPHABETIC.
  1630. *
  1631. * THE CHARACTER IS PLACED IN *NUMS*.
  1632. *
  1633. * NOTE- LOWER CASE LETTERS (IF LEGAL) ARE NOT CONVERTED TO
  1634. * UPPER CASE. XEDIT VIEWS UPPER/LOWER AS DIFFERENT.
  1635. *
  1636. * IF THERE IS NO PARAMETER, *NUMS* IS SET TO -1.
  1637.  
  1638.  
  1639. PRM34 PARAM CHAR
  1640. MX6 -1 SET NO CHARACTER
  1641. NG X5,PRM35 IF NO CHARACTER
  1642. BX6 X5
  1643. LX7 59-18
  1644. SA5 A5+B1 SET TO NEXT CHARACTER
  1645. SB2 ILL. INCORRECT PARAMETER (PRESET)
  1646. PL X7,PRM35 IF ANY CHARACTER IS LEGAL
  1647. ZR X6,PRM35 IF COLON
  1648. SX4 X6-1RZ-1
  1649. NG X4,NER IF A-Z (UPPER CASE)
  1650. SX4 X6-7601B
  1651. NG X4,PRM35 IF NOT LOWER CASE (.LT. 7601B)
  1652. SX4 X4-1RZ
  1653. NG X4,NER IF LOWER CASE
  1654. PRM35 SA6 NUMS SET CHARACTER
  1655. EQ PRM40 CHECK FOR NO TRAILING CHARACTERS
  1656.  
  1657. ** NULL PARAMETER.
  1658. *
  1659. * ROUTINE WILL HANDLE OWN PARAMETER CRACKING, HOWEVER, THIS
  1660. * ROUTINE WILL GIVE THE FIRST CHARACTER ADDRESS AND LAST
  1661. * CHARACTER ADDRESS (+1) IN *NUMS* AND *NUMS+1*.
  1662. * IF *NUMS* IS ZERO, THEN THERE IS NO PARAMETER.
  1663.  
  1664.  
  1665. PRM36 PARAM NULL
  1666. SX6 A5 GET FWA OF PARAMETER
  1667. SA6 NUMS
  1668. NG X5,PRM37 IF NO PARAMETER
  1669. PRM36.1 SA5 A5+B1
  1670. PL X5,PRM36.1 IF NOT AT END OF PARAMETER
  1671. SX6 A5
  1672. SA6 A6+B1 SAVE LWA+1
  1673. EQ PRM.+NONE PROCESS NO PARAMETERS
  1674.  
  1675. PRM37 MX6 0
  1676. SA6 A6 REPLACE POINTER
  1677. EQ PRM.+NONE PROCESS NO PARAMETERS
  1678.  
  1679. ** LOAD OVERLAY AND RE-GET PARAMETER CRACKING SPECIFICATIONS.
  1680. * OVERLAY TO LOAD IS IN THE ROUTINE ADDRESS FIELD.
  1681. * ENTRY (X4) = LOWER 18 BITS CONTAINS OVERLAY NUMBER TO LOAD.
  1682.  
  1683.  
  1684. PRM38 PARAM OVL
  1685. SA2 LOVE LAST OVERLAY LOADED
  1686. SX7 X4+1R0
  1687. BX3 X7-X2
  1688. ZR X3,PRM39 IF OVERLAY ALREADY LOADED
  1689. SX0 X4
  1690. SA7 A2
  1691. .D IFNE DEBUG+FILEOV,0 IF DEBUG MODE OR OVERLAYS FROM SYSTEM
  1692. SA3 LOVA FORM OVERLAY NAME
  1693. BX6 X3+X7
  1694. LX6 24 LEFT JUSTIFY
  1695. SA6 LOVC
  1696. .D ENDIF
  1697. .E IFEQ DEBUG,1 IF DEBUG ON
  1698. WRITEC OUTPUT,LOVC-1
  1699. .E ENDIF
  1700. MEMORY CM,LOVB+X0,R OBTAIN NECESSARY FIELD LENGTH
  1701. .G IFEQ FILEOV,0 IF LOAD FROM LOCAL FILE
  1702. SA1 ACTR FILE NAME CONTAINING OVERLAY
  1703. MX2 42
  1704. BX1 X1*X2
  1705. LX0 6
  1706. OVERLAY X1,X0
  1707. .G ELSE LOAD FROM SYSTEM
  1708. OVERLAY LOVC,X0,S
  1709. .G ENDIF
  1710. SB7 X1 GET ENTRY POINT (PRESET OVERLAY)
  1711. JP B7 ENTER OVERLAY
  1712.  
  1713. PRM39 SA1 COMMAND GET DESCRIPTOR WORD
  1714. AX1 18
  1715. SA4 X1 OBTAIN COMMAND DESCRIPTOR WORD ADDR-1
  1716. EQ NCM15 PROCESS COMMAND
  1717.  
  1718. ** NO PARAMETERS (NONE).
  1719. *
  1720. * THIS ROUTINE ASSURES THAT THE CHARACTER POINTER IS POSITIONED
  1721. * AT AN END OF LINE (PSEUDO OR REAL).
  1722.  
  1723.  
  1724. PRM40 PARAM NONE
  1725. * GO TO *PST7*.
  1726. PST SPACE 4,20
  1727. ** PST - POST COMMAND PROCESSOR.
  1728. *
  1729. * ENTRY (A1) = C.STR-1.
  1730. * (A5) = ADDRESS OF CURRENT CHARACTER.
  1731. * (X5) = CURRENT CHARACTER.
  1732. * (PREFIX) = PREFIX OPTIONS.
  1733. * (COMMAND) = COMMAND DESCRIPTOR.
  1734. *
  1735. * EXIT TO PROCESS COMMAND, OR TO ERROR ROUTINE.
  1736. *
  1737. * USES A - 1, 2, 3, 5, 6.
  1738. * X - 1, 2, 3, 4, 5, 6.
  1739. * B - 2, 4, 6, 7.
  1740. *
  1741. * CALLS ETL, GLN, MPR, RTDA, VRY.
  1742. *
  1743. * MACROS ERROR.
  1744.  
  1745.  
  1746. PST7 NG X5,PST IF END OF LINE
  1747. SB4 X5-1R
  1748. SA5 A5+1
  1749. ZR B4,PST7 IF BLANK
  1750. SB2 ILL. INCORRECT PARAMETER
  1751. EQ NER PROCESS ERROR, EXIT.
  1752.  
  1753. PST SA3 C.STR-1 PACK UP LAST COMMAND (PUT INTO LASTCMD)
  1754. UX3 B6,X3
  1755. SB6 A3+B6 FWA OF COMMAND
  1756. SB7 P.LINE SET LAST PARAMETER
  1757. RJ RTOA PACK LAST COMMAND
  1758.  
  1759. * ENTRY FROM SOME SPECIAL COMMAND PROCESSORS.
  1760.  
  1761. PST1 SB6 B0 PRESET TO *READ REQUIRED*
  1762. LX4 B1,X5 NEG. IF TRUE END OF LINE
  1763. NG X4,PST2 IF ABOVE
  1764. SB6 A5+2-C.STR SET CHARACTER POINTER
  1765. SX6 X5 REMOVE SPECIAL END OF LINE
  1766. SA6 A5
  1767. PST2 SA3 C.STR-1 RESET FOR ENTRY FROM *PST1*
  1768. SA1 COMMAND
  1769. PX6 B6,X3
  1770. SB7 X1 ROUTINE ADDRESS
  1771. SA6 C.STR-1 SAVE POINTER/DELIMITER
  1772. PL X3,PST3 IF NOT TO ECHO LINE
  1773. SA1 P.LINE
  1774. SA3 ETLB SET COMMAND LINE HEADER
  1775. RJ ETL
  1776. PST3 SA1 SCOUNT
  1777. ZR X1,PST4 IF SLASH COUNT ZERO
  1778. RJ MPR ADVANCE POINTER
  1779. PST4 SA1 NXTLINE
  1780. SA2 COMMAND
  1781. ZR X1,PST5 IF NO ADVANCE TO LINE NUMBER
  1782. SA3 INPMODE
  1783. NG X3,NCM20 IF POINTER MOVEMENT NOT ALLOWED, EXIT
  1784. SA3 IWHERE
  1785. NG X3,NCM19 IF IN CREATION MODE, EXIT
  1786. RJ GLN
  1787. NZ X6,PST6 IF LINE NUMBER NOT FOUND
  1788. SA2 COMMAND
  1789. PST5 SB7 X2 (X2) = COMMAND DESCRIPTOR WORD
  1790. BX1 X2
  1791. JP B7 PROCESS COMMAND, EXIT
  1792.  
  1793. * PROCESS LINE NUMBER NOT FOUND.
  1794.  
  1795. PST6 ERROR LNNF. ISSUE MESSAGE
  1796. RJ VRY
  1797. EQ CER1 RETURN TO ERROR CLEANUP
  1798.  
  1799. NER SPACE 4,15
  1800. ** NER - COMMAND PARSER ERROR PROCESSOR.
  1801. *
  1802. * ENTRY (B2) = ORDINAL OF MESSAGE TO PRINT.
  1803. *
  1804. * EXIT (B2) = ORDINAL OF MESSAGE PRINTED.
  1805. *
  1806. * USES A - 0, 5, 6, 7.
  1807. * X - 5, 6, 7.
  1808. * B - NONE.
  1809. *
  1810. * CALLS PST.
  1811.  
  1812.  
  1813. NER SX6 NER2 RE-ENTRY ADDRESS
  1814. NG X5,NER1 IF AT END OF LINE
  1815. NER0 SA5 A5+1
  1816. PL X5,NER0 IF NOT END OF LINE
  1817. NER1 MX7 0 CLEAR NXTLINE FLAG
  1818. SA6 COMMAND SAVE RE-ENTRY
  1819. SA0 B2 SAVE ERROR MESSAGE
  1820. SA7 NXTLINE
  1821. EQ PST FOR PARTIAL PROCESSING, RETURN TO *NER1*
  1822.  
  1823. NER2 SB2 A0 RE-SET ERROR MESSAGE
  1824. EQ CER EXIT
  1825.  
  1826. TITLE PREFIX CHARACTER ROUTINES.
  1827. ** PREFIX CHARACTERS.
  1828. *
  1829. * THE FOLLOWING ROUTINES ARE CALLED TO PROCESS
  1830. * COMMAND PREFIX CHARACTERS.
  1831. X SPACE 4,10
  1832. ** X - TOGGLE VERIFICATION.
  1833. * ^X - ALTERNATE FORM.
  1834. *
  1835. * ENTRY NONE.
  1836. *
  1837. * EXIT TO *NCM*.
  1838. *
  1839. * USES A - 4, 6.
  1840. * B - 4, 6.
  1841.  
  1842.  
  1843. PREFIX X
  1844. SA4 XVERIFY TOGGLE MODE
  1845. BX6 -X4
  1846. SA6 A4-B1
  1847. EQ NCM2 EXIT
  1848. PLUS SPACE 4,10
  1849. ** + - GET DATA INPUT FROM NEW INPUT LINES.
  1850. *
  1851. * ENTRY NONE.
  1852. *
  1853. * EXIT TO *NCM*.
  1854. *
  1855. * USES A - 1, 7.
  1856. * X - 1, 7.
  1857.  
  1858.  
  1859. PREFIX +
  1860. SA1 PREFIX
  1861. SX7 1BS"PLUS"
  1862. BX1 X1+X7
  1863. SA7 A1
  1864. EQ NCM2 EXIT
  1865. SLASH SPACE 4,15
  1866. ** / - SKIP TO A NEW LINE.
  1867. * ENTRY NONE.
  1868. *
  1869. * EXIT (SCOUNT) = (SCOUNT) + 1.
  1870. * TO *NCM2* IF NO ERRORS.
  1871. * TO *NCM19* OR *NER* IF ERRORS.
  1872. *
  1873. * USES A - 1, 7.
  1874. * X - 1, 7.
  1875. * B - 2.
  1876. * NOTES SLASH PREFIX PROCESSED IN *PST*.
  1877. *
  1878.  
  1879.  
  1880. PREFIX /
  1881. SB2 ARG.*100B+1
  1882. SA1 INPMODE
  1883. NG X1,NER IF IN INPUT MODE (POINTER MOTION ILLEGAL)
  1884. SA1 IWHERE
  1885. NG X1,NCM19 IF IN CREATION MODE
  1886. SA1 SCOUNT
  1887. SX7 X1+B1 INCREMENT SLASH COUNT
  1888. SA7 A1
  1889. EQ NCM2 EXIT
  1890. UPARROW SPACE 4,15
  1891. ** UP ARROW - GO TO TOP OF FILE BEFORE PROCESSING.
  1892. *
  1893. * ENTRY NONE.
  1894. *
  1895. * EXIT (SCOUNT) = 0.
  1896. * TO *NCM2* IF NO ERRORS.
  1897. * TO *NCM19* OR *NER* IF ERRORS.
  1898. *
  1899. * USES A - 1, 7.
  1900. * X - 1, 7.
  1901. * B - 2.
  1902.  
  1903.  
  1904. PREFIX UA.
  1905. SB2 ARG.*100B+1
  1906. SA1 INPMODE
  1907. NG X1,NER IF IN INPUT MODE (POINTER MOTION ILLEGAL)
  1908. SA1 IWHERE
  1909. NG X1,NCM19 IF IN CREATION MODE
  1910. BX7 X7-X7
  1911. SA7 SCOUNT ZERO SLASH PREFIX COUNT
  1912. RJ TOP
  1913. EQ NCM2 EXIT
  1914. PREFIXT SPACE 4,10
  1915. PREFIXT BSS 0
  1916. PREFIX HERE ASSEMBLE PREFIX TABLE
  1917. PREFIXU DATA 0 END MARKER
  1918. PURGMAC PREFIX VOID USE OF THIS MACRO
  1919. TITLE SPECIAL COMMAND FORMS.
  1920. ** SPECIAL COMMANDS-
  1921. *
  1922. * THE FOLLOWING COMMANDS PROCESS SPECIAL COMMANDS.
  1923. - SPACE 4,15
  1924. ** - - EXECUTE LAST Y OR Z COMMAND.
  1925. *
  1926. * ENTRY AT *DSH1* TO PROCESS *.* COMMAND.
  1927. *
  1928. * EXIT TO *PST1* IF NO ERRORS.
  1929. * TO *CER* OR *NER* IF ERROR.
  1930. *
  1931. * USES X - 0, 1, 3, 6, 7.
  1932. * A - 0, 1, 3, 6, 7.
  1933. * B - 2.
  1934. *
  1935. * CALLS MPR, STK, STL, VAL.
  1936.  
  1937.  
  1938. SPECIAL (-)
  1939. SA0 Y.DEV SET ADDRESS OF DEVICE TO STACK
  1940.  
  1941. * ENTRY (A0) = ADDRESS OF DEVICE TO STACK.
  1942.  
  1943. DSH1 RJ VAL
  1944. SB2 ILL.
  1945. PL X5,NER IF ARGUMENT AFTER LINE COUNT
  1946. SX7 DSH3
  1947. NG X6,DSH2 IF USED PARAMETER 0
  1948. NZ X6,DSH2 IF SPECIFIED A NUMBER
  1949. SX6 1 SET DEFAULT
  1950.  
  1951. DSH2 SA6 SKPCNT
  1952. SA7 COMMAND SET COMMAND ADDRESS (RE-ENTER)
  1953. EQ PST1 CLOSE COMMAND PROCESSING
  1954.  
  1955. DSH3 SA1 SKPCNT
  1956. RJ STL PROCESS INTERRUPT
  1957. ZR X1,DSH4 IF NOT TO ADVANCE POINTER
  1958. SA3 INPMODE
  1959. SB2 ARG.*100B+1
  1960. NG X3,CER IF NOT VALID IN INPUT MODE
  1961. SA3 IWHERE
  1962. SB2 CNV.*100B+1
  1963. NG X3,CER IF NOT VALID IN CREATION MODE
  1964. RJ MPR
  1965.  
  1966. DSH4 SA1 A0 SET ADDRESS OF DEVICE TO STACK
  1967. RJ STK STACK DEVICES
  1968. SB2 STK.
  1969. EQ CER IF DEVICE IS NOT STACKABLE
  1970. . SPACE 4,10
  1971. ** . - EXECUTE LAST COMMAND.
  1972. *
  1973. * ENTRY NONE.
  1974. *
  1975. * EXIT TO *DSH1*.
  1976. *
  1977. * USES A - 0.
  1978.  
  1979.  
  1980. SPECIAL (.)
  1981. SA0 P.DEV SET ADDRESS OF DEVICE TO STACK
  1982. EQ DSH1 EXIT, EXECUTE LAST COMMAND
  1983. SPCMDT SPACE 4,10
  1984. SPCMDT BSS 0
  1985. SPECIAL HERE ASSEMBLE SPECIAL COMMAND TABLE
  1986. SPCMDU DATA 0 END MARKER
  1987. PURGMAC SPECIAL VOID USAGE OF MACRO
  1988. NCL SPACE 4,40
  1989. ** NCL - OBTAIN NEXT COMMAND LINE AND PUT INTO *C.STR*.
  1990. *
  1991. * NCL READS THE NEXT LINE FROM THE CURRENT INPUT FILE
  1992. * AND PLACES IT INTO C.STR (C.STR-1 IS UPDATED ALSO).
  1993. * IF THERE IS NO FET (IE. THE *.* AND *-* COMMANDS), THE
  1994. * INPUT STACK IS POP-ED AND THE LAST INPUT LINE IS
  1995. * RE-INSTATED AT ITS PREVIOUS POSITION. IF THERE IS A
  1996. * FET, *READC* IS CALLED TO READ IN THE NEXT LINE. IF
  1997. * POSITIONED AT AN EOR,EOF,EOI, THE STACK IS POP-ED IF
  1998. * NOT THE PRIMARY INPUT SOURCE.
  1999. *
  2000. * NDL - OBTAIN NEXT DATA LINE FROM COMMAND LINE AND PUT INTO
  2001. * C.STR.
  2002. *
  2003. * THIS IS A SECOND ENTRY POINT TO *NCL*. SINCE XEDIT ALLOWS
  2004. * THE USER TO INTERMIX COMMANDS AND DATA, EVERY SO OFTEN
  2005. * XEDIT NEEDS MORE DATA (WHICH EXISTS ON THE NEXT COMMAND
  2006. * LINE. THIS ENTRY POINT HANDLES THIS CASE. (DESIGNED TO BE
  2007. * USED WITH *RDL*.)
  2008. *
  2009. * ENTRY NONE.
  2010. *
  2011. * EXIT (X1) = 0 IF DATA HAS BEEN READ.
  2012. * .NE. 0 IF AN EMPTY CR WAS ENCOUNTERED.
  2013. * RETURNS TO CALLER IF ENTERED VIA *NDL*,
  2014. * ELSE RETURNS TO *NCM*, UNLESS IN *INPUT* MODE, THEN
  2015. * RETURNS TO *INP2*.
  2016. * IF END OF INPUT AND NOT TTY INPUT FILE, TO *ABT*.
  2017. *
  2018. * USES A - 1, 2, 3, 4, 5, 6, 7.
  2019. * X - 1, 2, 3, 4, 5, 6, 7.
  2020. * B - 6, 7.
  2021. *
  2022. * CALLS STL, UPL.
  2023. *
  2024. * MACROS PROMPT, READ, READC, WRITEO.
  2025.  
  2026.  
  2027. NDL DATA 0 NEW DATA LINE ENTRY. THIS WORD IS A FLAG.
  2028.  
  2029. * IF (NDL) = 0, THEN ENTERED VIA *NCL*, ELSE VIA *NDL*.
  2030.  
  2031. NCL SA5 C.ON OBTAIN CURRENT INPUT DEVICE
  2032. SA3 X5-1 GET FET ADDRESS
  2033. ZR X3,NCL5 IF NO FET (POP STACK)
  2034. SA1 PROMPT
  2035. SX2 X3 SET FET ADDRESS
  2036. BX6 X1
  2037. SA4 NDL
  2038. SX7 X2-INPUT
  2039. NZ X4,NCL1 IF REQUESTING DATA
  2040. NG X3,NCL5 IF POP IF ASKING FOR COMMAND
  2041. NZ X7,NCL1 IF NOT PRIMARY INPUT
  2042. ZR X6,NCL1 IF NOT TO ISSUE PROMPT
  2043. WRITEO OUTPUT
  2044. NCL1 SA1 TTYIN
  2045. SA3 NCLA
  2046. SA2 BATCH
  2047. BX6 X1+X3
  2048. SA6 A3
  2049. NZ X3,NCL2 IF READ NOT NEEDED
  2050. SA4 NDL
  2051. NG X2,NCL1.1 IF IN BATCH MODE
  2052. NZ X4,NCL1.1 IF ENTERED VIA *NDL*
  2053. PROMPT OFF TURN OFF PROMPT
  2054. NCL1.1 READ INPUT,RECALL
  2055. SA2 BATCH
  2056. NG X2,NCL2 IF IN BATCH MODE
  2057. PROMPT ON TURN ON PROMPT
  2058. NCL2 READC INPUT,X5-34D,33D READ NEW LINE
  2059. SA3 C.STR-1 RESET CHARACTER INDEX
  2060. NZ X1,NCL6 IF HIT END OF SOMETHING
  2061. PX6 B1,X3 RESET CHARACTER INDEX
  2062. SA6 A3
  2063. NCL3 SA1 X5-34D FWA OF STRING
  2064. SB6 C.STR FWA OF STRING
  2065. RJ UPL
  2066. SX1 0 SET SUCCESSFUL READ
  2067. NCL4 SA2 NDL
  2068. ZR X2,NCL8 IF ENTERED VIA NCL
  2069. AX2 30
  2070. BX7 X7-X7
  2071. SA7 TLX IGNORE INTERRUPT IF DATA LINE
  2072. SB7 X2 OBTAIN RETURN ADDRESS
  2073. SA7 A2 CLEAR *NDL* FLAG
  2074. JP B7 RETURN TO CALLER
  2075.  
  2076. * POP INPUT STACK
  2077.  
  2078. NCL5 MX6 1 SET DEVICE IN-ACTIVE
  2079. SA5 X5 GET NEW DEVICE
  2080. SA6 A5 IDLE OLD DEVICE
  2081. SA2 X5+B1 GET OLD C.STR-1 WORD
  2082. BX7 X5
  2083. LX6 X2
  2084. SA7 C.ON CHANGE CURRENT DEVICE POINTER
  2085. SA6 C.STR-1
  2086. EQ NCL3 UNPACK AND EXIT
  2087.  
  2088. * END OF SOMETHING ENCOUNTERED ON INPUT FILE.
  2089.  
  2090. NCL6 SA2 X5-1 GET FET ADDRESS
  2091. SX2 X2-INPUT PRIMARY INPUT FOR CMD OR DATA
  2092. NZ X2,NCL5 IF NOT PRIMARY INPUT FILE
  2093. SA4 TTYIN
  2094. NZ X4,NCL7 IF NOT *TTY* INPUT FILE (ABORT)
  2095. RJ STL EVENTUALLY RETURNS TO *NCL* IF INTERRUPT
  2096. MX6 0 SET READ REQUIRED
  2097. SA6 NCLA (X1) .NE. 0
  2098. EQ NCL4 READ INPUT FILE
  2099.  
  2100. NCL7 SB6 =C* END OF INPUT ENCOUNTERED - ABORTED.*
  2101. EQ ABT ABORT XEDIT
  2102.  
  2103. NCL8 SA2 INPMODE
  2104. NG X2,INP2 IF IN INPUT MODE
  2105. ZR X1,NCM IF NOT EMPTY CARRIAGE RETURN
  2106. SA1 UPDATE
  2107. PL X1,NCM21 IF IN LOOK MODE
  2108. EQ INP1 BEGIN INPUT MODE
  2109.  
  2110. NCLA DATA 0 READ REQ,D FROM INPUT IF ZERO
  2111. TITLE COMMAND TABLE.
  2112. JUMP BSS 0 START OF COMMAND TABLE
  2113. .ADD COMMAND ADD,A,NUMBER1,,ADD,(IN,F0)
  2114. .ALN COMMAND ADDLN,ALN,NUMBER2,-1,PLN,,OVL2
  2115. .ALNS COMMAND ADDLNS,ALNS,NUMBER2,-2,PLN,,OVL2
  2116. .BOTTOM COMMAND BOTTOM,B,NONE,,BTR,(LK)
  2117. .BRIEF COMMAND BRIEF,BR,TOGGLE,(XVERIFY*2+0),SFG,(CR,LK,IN)
  2118. .CHANGE COMMAND CHANGE,C,STRING,340000B,CNG,(IN,F0)
  2119. .CS COMMAND CHANGES,CS,STRING,340000B,CGS,(IN,F0)
  2120. .COPY COMMAND COPY,,ONEFILE,070011B,CPY,(LK,IN,F0),OVL2
  2121. .COPYD COMMAND COPYD,,ONEFILE,070011B,CPY11,,OVL2
  2122. .DBADL COMMAND DBADL,DBL,NUMBER1,-1,PBL,,OVL2
  2123. .DEFTAB COMMAND DEFTAB,DT,CHAR,(TABCHAR*2+0),SCH,(CR,IN,LK)
  2124. .DELETE COMMAND DELETE,D,STRING,070000B,DLT
  2125. .DEL COMMAND DELIMIT,DEL,CHAR,1,DEL,(CR,LK,IN)
  2126. .DEOF COMMAND DEOF,DF,NUMBER1,DF,DRF
  2127. .DEOR COMMAND DEOR,DR,NUMBER1,DR,DRF
  2128. .DLN COMMAND DELETELN,DLN,NONE,0,PLN,,OVL2
  2129. .DLB COMMAND DLBLANKS,DLB,NUMBER1,,DLB,,OVL2
  2130. .EDIT COMMAND EDIT,,NONE,,PEC,(IN)
  2131. .END COMMAND END,E,ONEFILE,000022B,EFQ
  2132. .EXPLAI COMMAND EXPLAIN,,NONE,,EXP,(CR,IN,LK),OVL1
  2133. .FBADL COMMAND FBADL,FBL,NUMBER1,1,PBL,(LK),OVL2
  2134. .FILE COMMAND FILE,F,ONEFILE,000022B,EFQ
  2135. .FINDLL COMMAND FINDLL,FLL,NUMBER1,,FLL,(LK)
  2136. .HELP COMMAND HELP,H,NULL,,HELP,(CR,LK,IN),OVL1
  2137. .INPUT COMMAND INPUT,,CHAR,0,INP,(CR)
  2138. .INSERT COMMAND INSERT,I,NUMBER1,IIB4,IIB,(CR)
  2139. .IB COMMAND INSERTB,IB,NUMBER1,IIB3,IIB,(IN)
  2140. .LISTAB COMMAND LISTAB,LT,NONE,,LTB,(CR,LK,IN),OVL2
  2141. .LOCATE COMMAND LOCATE,L,STRING,260000B,LCT,(LK)
  2142. IF DEF,TIMES,1
  2143. .LOC COMMAND LOC,,STRING,260000B,LCTA,(LK)
  2144. .MODIFY COMMAND MODIFY,M,NONE,0,MOD,(IN)
  2145. .NEXT COMMAND NEXT,N,NEXT,,NXT,(LK)
  2146. .NOBELL COMMAND NOBELLS,NB,NONE,,NBL,(CR,IN,LK),OVL2
  2147. .OCTCHA COMMAND OCTCHANGE,OC,NULL,300000B,OCT,(IN,F0),OVL2
  2148. .PRINT COMMAND PRINT,P,NUMBER1,,PNT,(CR,IN,LK,F0)
  2149. .QMOD COMMAND QMOD,QM,NUMBER1,0,MOD1,(IN,F0)
  2150. .QUIT COMMAND QUIT,Q,ONEFILE,000022B,EFQ
  2151. .READ COMMAND READ,,NULL,,RDP,,OVL2
  2152. .READP COMMAND READP,,NULL,,RDP,,OVL2
  2153. .REPLACE COMMAND REPLACE,R,NUMBER1,,RLP,(IN,F0)
  2154. .RLN COMMAND REPLACELN,RLN,NUMBER2,1,PLN,,OVL2
  2155. .RESTOR COMMAND RESTORE,REST,NONE,,RST
  2156. .RM COMMAND RMARGIN,RM,NUMBER1,,RMA,(CR,IN,LK)
  2157. .STOP COMMAND STOP,,NONE,,ABO,(CR,LK)
  2158. .TABS COMMAND TABS,TAB,NUMBER,NTABS,STB,(CR,LK,IN)
  2159. .TEOF COMMAND TEOF,,TOGGLE,ITOGGLF,TGL,(CR,LK,IN)
  2160. .TEOR COMMAND TEOR,,TOGGLE,ITOGGLR,TGL,(CR,LK,IN)
  2161. .TRIM COMMAND TRIM,,TOGGLE,TRIM,TGL,(CR,LK,IN)
  2162. .TRUNC COMMAND TRUNCATE,TRUNC,NUMBER1,,TRN,(IN,F0)
  2163. .TOP COMMAND TOP,T,NONE,,TTN,(LK)
  2164. .TOPNUL COMMAND TOPNULL,TN,NONE,,TTN
  2165. .VERIFY COMMAND VERIFY,V,TOGGLE,(XVERIFY*2+1),SFG,(CR,LK,IN)
  2166. .WEOF COMMAND WEOF,WF,NONE,34B,WRM,(IN)
  2167. .WEOR COMMAND WEOR,WR,NONE,24B,WRM,(IN)
  2168. .WHERE COMMAND WHERE,W,NONE,,WHR,(CR,IN,LK)
  2169. .WM COMMAND WMARGIN,WM,NUMBER2,,SWN,(CR,IN,LK)
  2170. .Y COMMAND Y,,NULL,,YZP,(CR,LK,IN)
  2171. .YQMOD COMMAND YQMOD,YQM,NUMBER1,0,MOD2,(IN,F0)
  2172. .Z COMMAND Z,,NULL,,YZP,(CR,IN,LK)
  2173. JUMPX DATA 0
  2174. VFD 2/3,58/0 INCORRECT COMMAND MARKER
  2175. SPACE 4
  2176. ** ASSEMBLE DATA NEEDED FOR OVERLAYS.
  2177. * THIS CODE NEEDS TO BE AFTER THE COMMAND DEFINITIONS.
  2178.  
  2179.  
  2180. LOVA VFD 24/0,30/0LXEDIT,6/0 OVERLAY BASE NAME
  2181. LOVB VFD 30/MINFL,30/0 MINIMUM BASE FIELD LENGTH
  2182. C.A SET 1 PREPARE TABLE OF FIELD LENGTHS
  2183. DUP MXOVL,3
  2184. C.D DECMIC C.A
  2185. VFD 30//XEDIT_"C.D"_/LWA,30/0
  2186. C.A SET C.A+1
  2187. .H IFEQ DEBUG,1 IF DEBUG ON
  2188. DATA 10H LOADING
  2189. .H ENDIF
  2190. LOVC BSSZ 1 OVERLAY NAME
  2191. LOVD VFD 6/1,6/,5/,1/1,24/,*P/
  2192. LOVE CON 0 LAST OVERLAY LOADED
  2193. IFEQ FILEOV,3,6
  2194. LOVF CON 0 .NE.0 IF OVERLAY LOADED FROM LIBRARY
  2195. LOVG BSS 0
  2196. .I IFEQ DEBUG,1 IF DEBUG ON
  2197. SCRG FILEC E.SCR,150D,(FET=13D),EPR
  2198. .I ELSE
  2199. SCRG FILEC E.SCR,150D,(FET=13D),(USN=LIBRARY),EPR
  2200. .I ENDIF
  2201.  
  2202. TITLE COMMAND PROCESSORS.
  2203. ** ENTRY CONDITIONS TO ALL COMMAND PROCESSORS -
  2204. *
  2205. * (X1) = (DECA) - INSTRUCTION DESCRIPTER WORD.
  2206. * (INDEX) = ADDRESS OF INSTRUCTION DESCRIPTER WORD.
  2207. ABO SPACE 4,10
  2208. ** ABO - PROCESS ABORT COMMAND.
  2209. *
  2210. * ENTRY NONE.
  2211. *
  2212. * EXIT TO *ABT*.
  2213. *
  2214. * USES A - 2.
  2215. * X - 2.
  2216. * B - 6.
  2217. *
  2218. * MACROS RETURN.
  2219.  
  2220.  
  2221. ABO SA2 SPCP
  2222. LX2 59-58
  2223. PL X2,ABO1 IF *P* NOT SPECIFIED
  2224. RECALL SFET
  2225. SA1 ISFN GET EDIT FILE NAME
  2226. SX6 B1 SET COMPLETE BIT
  2227. BX6 X6+X1
  2228. SA6 X2
  2229. RETURN X2,R RETURN EDIT FILE
  2230. ABO1 SB6 =C* ABORTED*
  2231. EQ ABT ABORT XEDIT
  2232. ADD SPACE 4,15
  2233. ** ADD - ADD TEXT TO END OF LINE(S).
  2234. *
  2235. * ENTRY (NUMS) = NUMBER OF LINES TO ADD.
  2236. *
  2237. * EXIT TO NCM.
  2238. *
  2239. * USES A - 1, 2, 6, 7.
  2240. * X - 1, 2, 3, 4, 6, 7.
  2241. * B - 4, 6, 7.
  2242. *
  2243. * CALLS ITM, RDF, RDL, SAC, SAL, VFY, VRY, WTF.
  2244. *
  2245. * ROUTINE REQUESTS ONE LINE OF DATA, AND ADDS IT TO
  2246. * THE END OF N LINES. THE TRUNCATION MESSAGE IS ISSUED
  2247. * IF THE RESULTANT LENGTH IS GREATER THAN 160 CHARACTERS.
  2248.  
  2249.  
  2250. ADD SA1 NUMS
  2251. SX6 B1
  2252. IX6 X1-X6 DECREMENT TO MAKE TESTING EASIER
  2253. SA6 A1
  2254. RJ SAC SET ASCII PROCESSING
  2255. RJ RDL
  2256. NZ X1,NCM IF NOTHING ON LINE (RETURN)
  2257. EQ ADD2 PROCESS ADD
  2258.  
  2259. ADD1 SA6 A1 REPLACE COUNT
  2260. RJ WTF
  2261. RJ RDF
  2262. ADD2 SA1 E.STR-1
  2263. SA2 D.STR-1
  2264. SX3 X1-160D
  2265. BX3 -X3 NUMBER OF AVAILABLE CHARACTERS
  2266. IX4 X3-X2
  2267. SB7 A1
  2268. PL X4,ADD3 IF NO TRUNCATION
  2269. BX2 X3 TRUNCATE DATA LINE
  2270. ADD3 IX7 X1+X2 GET NEW LENGTH
  2271. SB6 B7+X1 ADDR OF LAST CHAR IN EDIT LINE
  2272. MX6 2 SET END OF LINE
  2273. SB4 X2+B1 INCLUDE END OF LINE
  2274. ADD4 SA6 B6+B4
  2275. SB4 B4-B1
  2276. SA1 A2+B4
  2277. BX6 X1
  2278. NZ B4,ADD4 IF NOT ALL MOVED
  2279. SA7 E.STR-1
  2280. PL X4,ADD5 IF NO TRUNCATION
  2281. RJ ITM ISSUE TRUNCATION MESSAGE
  2282. ADD5 SX7 B1
  2283. SA7 E.LMOD SET MODIFICATIONS MADE
  2284. SA7 NOMOD SET FILE MODIFICATIONS MADE
  2285. RJ VRY VERIFY LINE
  2286. SA1 NUMS
  2287. SX6 B1
  2288. IX6 X1-X6
  2289. NG X6,NCM IF FINISHED
  2290. EQ ADD1 PROCESS NEXT LINE
  2291. BTR SPACE 4,25
  2292. ** BTR - ADVANCE TO BOTTOM OF CURRENT RECORD.
  2293. *
  2294. * ENTRY NONE.
  2295. *
  2296. * EXIT TO VRT.
  2297. *
  2298. * USES A - 1, 2, 3.
  2299. * X - 1, 2, 3.
  2300. *
  2301. * CALLS RDF, WTF.
  2302. *
  2303. * MACROS RECALL.
  2304. *
  2305. * THIS ROUTINE TAKES ASSUMES THAT THE END OF RECORD HAS BEEN
  2306. * ENCOUNTERED WHEN THE FOLLOWING CONDITIONS ARE TRUE.
  2307. * 1. THE FET IS NOT BUSY
  2308. * 2. *IN* IS EQUAL TO *OUT*
  2309. * DUE TO XEDIT,S HABIT OF PASSING OVER NULL RECORD/FILES THESE
  2310. * CONDITIONS WILL LOCATE THE BOTTOM.
  2311. * NOTE- XEDIT WILL TREAT AN EOF AS AN EOR IF THERE IS TEXT
  2312. * IMMEDIATELY BEFORE THE EOF. THIS WAS ASSUMED WITHIN THE
  2313. * OF THE DESIRED FUNCTION OF BOTTOM.
  2314.  
  2315.  
  2316. BTR1 RJ WTF ADVANCE TO NEXT LINE
  2317. RJ RDF
  2318. BTR SA1 E.IN+2 *IN*
  2319. SA2 A1+B1 *OUT*
  2320. IX2 X2-X1
  2321. NZ X2,BTR1 IF *IN* NOT EQUAL TO *OUT* (NOT AT END)
  2322. SA3 E.IN
  2323. LX3 59-0
  2324. NG X3,VRT IF FET IS COMPLETE
  2325. RECALL A3 WAIT FET COMPLETION
  2326. EQ BTR FIND BOTTOM
  2327. CNG/CNS SPACE 4,15
  2328. ** CNG/CNS - PROCESS CHANGE AND CHANGES COMMANDS.
  2329. *
  2330. * ENTRY (NUMS) = IF VIA *CNG*, NUMBER OF LINES.
  2331. * IF VIA *CNS*, NUMBER OF STRINGS.
  2332. *
  2333. * EXIT TO *NCM*.
  2334. * IF STRING NOT FOUND, TO *LCT4*
  2335. *
  2336. * USES A - 0, 1, 4, 6, 7.
  2337. * X - 0, 1, 4, 5, 6, 7.
  2338. * B - 6.
  2339. *
  2340. * CALLS CHS, ITM, RDF, TSL, VRY, WTF.
  2341.  
  2342.  
  2343. CNG SX0 E.SCR+160D SET LWA+1 OF SCRATCH, ENTRY
  2344. EQ CNG1 PROCESS CHANGE
  2345.  
  2346. CGS SX0 E.SCR+160D SET LWA+1 OF SCRATCH, ENTRY
  2347. MX7 1
  2348. BX0 X0+X7 SET STRING MODE
  2349. CNG1 SA0 E.SCR SET FWA OF BUFFER
  2350. RJ CHS CHANGE STRING(S)
  2351. ZR B5,CNG5 IF STRING NOT FOUND
  2352. NZ X5,CNG2 IF NO TRUNCATION
  2353. SA1 P1RP CHECK IF STRING LENGTHS ARE EQUAL
  2354. SA4 P1LP
  2355. IX6 X1-X4
  2356. SA1 P3RP
  2357. SA4 P3LP
  2358. IX1 X1-X4
  2359. IX6 X6-X1
  2360. ZR X6,CNG2 IF STRING LENGTHS ARE EQUAL
  2361. RJ ITM ISSUE TRUNCATION MESSAGE
  2362. CNG2 SA1 E.SCR
  2363. SB6 E.STR-1
  2364. SX7 B1
  2365.  
  2366. * COPY LINE BACK FROM SCRATCH AREA.
  2367.  
  2368. CNG3 BX6 X1
  2369. SB6 B6+B1
  2370. SA1 A1+B1
  2371. SA6 B6
  2372. PL X6,CNG3 IF NOT END OF LINE
  2373. SB6 E.STR-1
  2374. RJ TSL TRIM SPACES OFF LINE
  2375. SA7 NOMOD
  2376. SA7 E.LMOD
  2377. RJ VRY VERIFY THE CHANGE
  2378. BX6 X0
  2379. AX6 59-1 =0 IF REGULAR, =-1 IF STRING MODE
  2380. SA1 NUMS
  2381. IX6 X1-X6 IF STRING, INCREMENT
  2382. SX1 B1
  2383. IX7 X6-X1
  2384. IX6 X7-X1
  2385. NG X6,NCM IF FINISHED
  2386. SA7 A1+
  2387.  
  2388. * ADVANCE POINTER AND CONTINUE.
  2389.  
  2390. CNG4 BX5 X0 SAVE (X0)
  2391. RJ WTF
  2392. RJ RDF
  2393. BX0 X5 RESTORE (X0)
  2394. EQ CNG1 CONTINUE CHANGE
  2395.  
  2396. * PROCESS STRING NOT FOUND.
  2397.  
  2398. CNG5 SA1 NUMS
  2399. PL X1,CNG4 IF NOT 0 OPTION
  2400. EQ LCT4 ISSUE * STRING NOT FOUND.*
  2401. DEL SPACE 4,10
  2402. ** DEL - SET DELIMITER CHARACTER.
  2403. *
  2404. * ENTRY (NUMS) = NEW DELIMITER CHARACTER.
  2405. *
  2406. * EXIT TO *NCM*.
  2407. *
  2408. * USES A - 1, 2, 4, 6.
  2409. * X - 1, 2, 3, 4, 6.
  2410.  
  2411.  
  2412. DEL SA2 NUMS
  2413. MX3 -18
  2414. BX2 -X3*X2 REMOVE EXCESS CHARACTERS (IF -1)
  2415. SA4 C.ON
  2416. SX4 X4-Y.DEV
  2417. ZR X4,DEL1 IF NOT CURRENTLY *Y/Z* LINE
  2418.  
  2419. * NOTE- Y/Z DELIMIT COMMAND TAKES EFFECT
  2420. * OUTSIDE OF *Y/Z* COMMAND STRING.
  2421.  
  2422. SA1 C.STR-1
  2423. BX1 X3*X1
  2424. IX6 X1+X2
  2425. SA6 A1
  2426. DEL1 SA1 I.DEV+1
  2427. BX1 X3*X1
  2428. IX6 X1+X2
  2429. SA6 A1
  2430. SA1 S.DEV+1
  2431. BX1 X3*X1
  2432. IX6 X1+X2
  2433. SA6 A1
  2434. EQ NCM EXIT
  2435. DLT SPACE 4,15
  2436. ** DLT - DELETE LINE(S).
  2437. *
  2438. * ENTRY (NUMS) = COUNT (-0 = NO ADVANCE).
  2439. * STRING FIELDS PARSED AND INITIALIZED.
  2440. *
  2441. * EXIT TO *NCM*.
  2442. *
  2443. * USES A - 1, 6, 7.
  2444. * X - 1, 5, 6, 7.
  2445. * B - 4.
  2446. *
  2447. * CALLS LOC, RDF, VRY, WTF.
  2448.  
  2449.  
  2450. DLT1 SA1 NUMS
  2451. NG X1,LCT4 IF -0 OPTION. (STRING NOT FOUND)
  2452. RJ WTF
  2453. DLT2 RJ RDF
  2454. DLT SB4 E.STR-1 SET FWA SEARCH -1
  2455. RJ LOC
  2456. ZR B5,DLT1 IF STRING NOT IN LINE
  2457. SA1 NUMS
  2458. SX7 B1
  2459. IX6 X1-X7 DECREMENT COUNT
  2460. AX5 X1,B1
  2461. SA6 A1
  2462. SA7 NOMOD SET MODIFICATIONS MADE TO FILE
  2463. RJ VRY VERIFY DELETED LINE
  2464. NZ X5,DLT2 IF MORE TO DELETE
  2465. RJ RDF CREAM EXISTING LINE
  2466. EQ NCM EXIT
  2467. DRF SPACE 4,10
  2468. ** DRF - DELETE RECORD/FILE MARKS.
  2469. *
  2470. * ENTRY (NUMS) = NUMBER TO DELETE.
  2471. * (X1) = ADDRESS OF DELETION COUNT CELL.
  2472. *
  2473. * USES A - 0, 1, 2, 6.
  2474. * X - 1, 2, 6.
  2475. *
  2476. * CALLS RDF, WTF.
  2477.  
  2478.  
  2479. DRF SA2 NUMS
  2480. AX1 18 GET CELL ADDRESS
  2481. SA0 X1 SAVE CELL
  2482. NZ X2,DRF0 IF NOT ZERO
  2483. SX2 1
  2484. DRF0 BX6 X2
  2485. SA6 A0 SET DELETION COUNT
  2486. DRF1 RJ WTF WRITE CURRENT LINE
  2487. RJ RDF READ NEXT
  2488. SA1 A0
  2489. NZ X1,DRF1 IF NOT DELETED
  2490. MX6 0
  2491. SA6 NOMOD SET MODIFICATIONS MADE
  2492. EQ NCM EXIT
  2493. PEC SPACE 4,15
  2494. ** PEC - PROCESS EDIT COMMAND.
  2495. *
  2496. * ENTRY NONE.
  2497. *
  2498. * EXIT (INPMODE) = 1.
  2499. * TO *NCM*.
  2500. *
  2501. * USES A - 6.
  2502. * X - 6.
  2503. *
  2504. * MACROS WRITEC.
  2505.  
  2506.  
  2507. PEC SX6 B1
  2508. SA6 INPMODE CLEAR INPUT MODE FLAG
  2509. WRITEC OUTPUT,(=C* EDIT*)
  2510. EQ NCM EXIT
  2511. EFQ SPACE 4,20
  2512. ** EFQ - END, FILE, AND QUIT PROCESSOR.
  2513. *
  2514. * ENTRY (IFN) = FILE NAME PARAMETER.
  2515. * (NUMS) = OPTIONS.
  2516. *
  2517. * EXIT IF TO TERMINATE XEDIT, TO *EXT*.
  2518. * IF ERRORS, TO *CER* OR *NCM*.
  2519. *
  2520. * USES A - ALL.
  2521. * X - ALL.
  2522. * B - 2, 6, 7.
  2523. *
  2524. * CALLS CFF, PFM=, RDF, TOP.
  2525. *
  2526. * MACROS ERROR, FERROR, READ, RECALL, RENAME,
  2527. * REWIND, STATUS.
  2528.  
  2529.  
  2530. EFQ SA5 IFN GET SPECIFIED NAME
  2531. SX6 B1
  2532. MX7 0
  2533. NZ X5,EFQ0 IF FILE NAME SPECIFIED
  2534. SA5 ISFN USE *EDITFIL*
  2535. EFQ0 SA7 SFET+5 CLEAR FNT/FST INFORMATION
  2536. BX6 X6+X5
  2537. SA7 A7+B1
  2538. SA6 SFET
  2539. RECALL E.IN WAIT ALL QUIET
  2540. STATUS SFET,P OBTAIN INFORMATION
  2541. SA4 SFET+5 GET FNT ENTRY
  2542. SA1 SFET+1
  2543. MX7 -6 SAVE FILE STATUS
  2544. BX7 -X7*X4
  2545. SA7 EFQB
  2546. MX6 -8 ISOLATE PFM ERROR CODE
  2547. MX7 1
  2548. SA3 NUMS GET OPTIONS
  2549. BX1 -X7*X1 CLEAR BIT 59
  2550. LX4 -6 POSITION TO FILE TYPE
  2551. BX6 -X6*X4 OBTAIN FILE TYPE
  2552. AX1 -12 SHIFT DEVICE TYPE
  2553. SX0 X6-PMFT =0 IF D.A. FILE
  2554. ZR X0,EFQ1 IF DIRECT ACCESS FILE
  2555. SX0 X6-QFFT
  2556. ZR X0,EFQ1 IF QUEUE FILE
  2557. SX0 X1-2RMT
  2558. ZR X0,EFQ1 IF *MT* TYPE FILE
  2559. SX0 X1-2RNT
  2560.  
  2561. * (X0) = 0, IF FILE IS D.A., QUEUE, MT OR NT (NEED COPYBACK).
  2562. * (X5) = FILE NAME.
  2563. * (X3) = OPTIONS.
  2564. * (X4) = FNT ENTRY SHIFTED LEFT -6.
  2565.  
  2566. EFQ1 NZ X3,EFQ2 IF HAVE EXIT TYPE
  2567. SX3 1BS0 SET DEFAULT OF LOCAL
  2568. NZ X0,EFQ2 IF NOT DEFAULT OF COPYBACK
  2569. SX3 1BS3 SET DEFAULT OF COPYBACK
  2570.  
  2571. * CLEAR *L* FLAG IF *C* FLAG USED.
  2572.  
  2573. EFQ2 BX6 X3
  2574. SX7 B1
  2575. LX6 0-3
  2576. BX6 X7*X6 GET *C* FLAG
  2577. BX3 -X6*X3 CONDITIONALLY CLEAR *L*
  2578. LX1 X3
  2579.  
  2580. * CHECK MODIFICATIONS ALLOWED TO FILE.
  2581.  
  2582. SX7 50000B/100B
  2583. SB2 EMI.*100B+1
  2584. BX7 X7*X4
  2585. NZ X7,CER IF NOT ALLOWED TO MODIFY FILE, EXIT
  2586. EFQ3 NZ X0,EFQ4 IF NOT DA/MT/NT
  2587.  
  2588. * IF DA/MT/NT MAKE SURE *L* NOT USED.
  2589.  
  2590. SB2 EMI.*100B+2
  2591. LX1 59-0
  2592. NG X1,CER IF *L* USED, EXIT
  2593.  
  2594. * (X3) = EXIT BITS (LOCAL,REPLACE,SAVE,COPYBACK).
  2595. * (X5) = FINAL FILE NAME.
  2596.  
  2597. EFQ4 SA2 NOMOD SET NOMOD TO NOMOD .OR. FS
  2598. SA1 FS IF NOT ON SCRATCH FILE, COPY TO ONE
  2599. SA0 X3 MOVE EXIT BITS TO A0
  2600. BX6 X1*X2 UPDATE NOMOD
  2601. MX7 0
  2602. SA6 A2
  2603. SA7 IWHERE SET =0 TO FORCE COPY IF AT LINE 1
  2604. RJ TOP COPY FILE TO SCRATCH FILE
  2605. SX0 A0 SET STATUS BITS TO X0
  2606. SA4 EFQA-1
  2607. EFQ5 SA4 A4+B1 GET NEXT OPTION
  2608. ZR X4,EFQ10 IF END OF OPTIONS
  2609. UX3,B7 X4
  2610. SB6 X4
  2611. LX1 B7,X0
  2612. PL X1,EFQ5 IF OPTION NOT SPECIFIED
  2613. JP B6 PROCESS OPTION
  2614.  
  2615. * PROCESS PFM OPTIONS.
  2616.  
  2617. EFQ6 SA1 E.IN GET LOCAL NAME
  2618. LX3 18 GET PFM CODE
  2619. SX7 B1
  2620. ERRNZ PTRD-1
  2621. BX6 X5+X7
  2622. BX7 X7+X1 SET COMPLETE
  2623. SA7 PFET SET LOCAL NAME
  2624. SX7 X3
  2625. SA6 PFET+8 SET PERMANENT NAME
  2626. SA0 A6 SAVE FILE NAME ADDRESS
  2627. SX2 A7 SET FET ADDRESS
  2628. RJ PFM= MAKE REQUEST
  2629. SA1 X2
  2630. MX6 -8
  2631. AX1 10
  2632. BX6 -X6*X1 GET PFM ERROR
  2633. ZR X6,EFQ9 IF VERIFY ACTION
  2634. ERROR PFM.,X6 ISSUE PFM ERROR MESSAGE
  2635. EQ EFQ11 END OF COMMAND
  2636.  
  2637. * PROCESS LFM RENAME OPTION.
  2638.  
  2639. EFQ7 SA1 EFQB
  2640. ZR X1,EFQ7.1 IF *AUTO DROP* STATUS
  2641. SX1 X1-NDST
  2642. NZ X1,EFQ8 IF STATUS OTHER THAN *NO AUTO DROP*
  2643. EFQ7.1 SA0 E.IN+6
  2644. BX6 X5
  2645. SA6 A0 SET NEW NAME INTO FET
  2646. RENAME E.IN RENAME SCRATCH FILE
  2647. SA1 X2
  2648. SX7 17BS10
  2649. BX7 X7*X1
  2650. SA7 FS INDICATE NOT READING SCRATCH FILE
  2651. NZ X7,EFQ7.2 IF ERROR IN *RENAME*
  2652. SA1 EFQB GET FILE STATUS
  2653. ZR X1,EFQ9 IF *AUTO DROP* STATUS
  2654. SETFS E.IN,NAD RESTORE *NO AUTO DROP* STATUS
  2655. SA1 X2 CHECK FOR ERRORS
  2656. SX4 17BS10
  2657. BX7 X4*X1
  2658. ZR X7,EFQ9 IF NO ERRORS IN *SETFS*
  2659. EFQ7.2 ERROR LFM.
  2660. EQ EFQ11 END OF COMMAND
  2661.  
  2662. EFQ8 READ E.IN START READ (ASSUMES NAME IN FET)
  2663. SX6 B1
  2664. BX6 X5+X6 SET COMPLETE
  2665. SA6 CFET
  2666. REWIND A6,RECALL RESET COPY FILE
  2667. MX6 0
  2668. SA6 CFET+5 CLEAR JUNK LEFT VIA STATUS
  2669. SA6 A6+B1
  2670. RJ CFF COPY FILE
  2671. REWIND E.IN RESET EDIT FILE
  2672. REWIND CFET,RECALL REWIND COPY FILE
  2673. RECALL E.IN
  2674. SA0 CFET SET FILE NAME POINTER
  2675.  
  2676. * VERIFY ACTION.
  2677.  
  2678. EFQ9 SA1 VERIFY
  2679. SA4 A4 RESTORE THE *EFQ* OPTION WORD
  2680. SX2 A0 SET FET ADDRESS
  2681. PL X1,EFQ5 IF NOT TO VERIFY
  2682. AX4 18
  2683. SA0 A4 SAVE VALUE OF A4
  2684. FERROR X2,X4
  2685. SA4 A0 RESET A4
  2686. EQ EFQ5 GET NEXT OPTION
  2687.  
  2688. * PROCESS END OF COMMAND.
  2689.  
  2690. EFQ10 SA1 INDEX
  2691. SX1 X1-.FILE
  2692. NZ X1,EXT IF EXIT XEDIT
  2693. EFQ11 READ E.IN,RECALL
  2694. RJ RDF
  2695. EQ NCM PROCESS END OF COMMAND
  2696.  
  2697. * TABLE OF *EFQ* OPTIONS.
  2698. * FORMAT IS-
  2699. * 12/2000B+59-BIT NUMBER,6/PFM CODE,24/VERIFY ADDR,18/ROUTINE
  2700.  
  2701. EFQA VFD 12/2000B+59-2,6/1,24/FSV.,18/EFQ6 SAVE
  2702. VFD 12/2000B+59-1,6/6,24/FRP.,18/EFQ6 REPLACE
  2703. VFD 12/2000B+59-0,6/0,24/FLC.,18/EFQ7 LOCAL
  2704. VFD 12/2000B+59-3,6/0,24/FCP.,18/EFQ8 COPYBACK
  2705. DATA 0
  2706. EFQB BSS 1 STORAGE FOR EDIT FILE STATUS
  2707. FLL SPACE 4,15
  2708. ** FLL - FIND LONG LINE PROCESSOR.
  2709. *
  2710. * ENTRY (NUMS) = NUMBER OF LONG LINES TO FIND.
  2711. * (IW) = WIDTH. IGNORE LINES OF LENGTH .LE. WIDTH.
  2712. *
  2713. * EXIT TO *NCM*.
  2714. *
  2715. * USES A - 1, 2, 6.
  2716. * X - 1, 2, 6.
  2717. *
  2718. * CALLS SAC, VFY.
  2719.  
  2720.  
  2721. FLL RJ SAC SET ASCII PROCESSING
  2722. FLL1 SA1 E.STR-1 GET CHARS IN CURRENT LINE
  2723. SA2 IW
  2724. IX1 X2-X1
  2725. PL X1,FLL2 IF LINE TOO SHORT
  2726. RJ VRY VERIFY LONG LINE
  2727. SA1 NUMS
  2728. SX6 B1
  2729. IX6 X1-X6
  2730. AX1 1
  2731. ZR X1,NCM IF COUNT FINISHED, EXIT
  2732. SA6 A1
  2733. FLL2 RJ WTF ADVANCE TO NEXT LINE
  2734. RJ RDF
  2735. EQ FLL1 CHECK NEXT LINE
  2736. FLN SPACE 4,15
  2737. ** FLN - ADVANCE TO SPECIFIED LINE NUMBER.
  2738. *
  2739. * ENTRY (NUMS) = LINE NUMBER.
  2740. *
  2741. * EXIT TO *VRT*.
  2742. *
  2743. * USES A - 1.
  2744. * X - 1, 6.
  2745. *
  2746. * CALLS GLN.
  2747.  
  2748.  
  2749. FLN SA1 NUMS
  2750. SX6 B1
  2751. IX6 X1-X6
  2752. PL X6,FLN1 IF LINE NUMBER SPECIFIED
  2753. SX1 B1+
  2754. FLN1 RJ GLN GET LINE NUMBER
  2755. EQ VRT EXIT, VERIFY LINE
  2756. IIB SPACE 4,15
  2757. ** IIB - *INSERT* AND *INSERT BEFORE* PROCESSOR.
  2758. *
  2759. * ENTRY (NUMS) = NUMBER OF LINES TO INSERT.
  2760. * (X1) = PROCESSOR ADDRESS.
  2761. *
  2762. * EXIT TO *NCM*.
  2763. *
  2764. * USES X - 1, 2, 6, 7.
  2765. * A - 0, 1, 2, 6, 7.
  2766. * B - 7.
  2767. *
  2768. * CALLS RDL, TCD, TLB, WTF.
  2769. *
  2770. * MACROS WRITEC.
  2771. *
  2772. * NOTES A NULL LINE WILL OVERRIDE THE LINE COUNT.
  2773.  
  2774.  
  2775. IIB BSS 0 ENTRY
  2776. AX1 18 GET ROUTINE JUMP ADDRESS
  2777. SA2 NUMS
  2778. SA0 X1 SET JUMP ADDRESS
  2779. SX6 B1
  2780. IX6 X2-X6
  2781. SA6 A2+
  2782. IIB1 RJ RDL GET DATA LINE
  2783. NZ X1,NCM IF A NULL LINE ENCOUNTERED
  2784. RJ TCD TAB CODED DATA LINE
  2785. IIB2 SB7 A0
  2786. JP B7 EXECUTE PROCESSOR
  2787.  
  2788. * *INSERT BEFORE* PROCESSOR.
  2789.  
  2790. IIB3 WRITEC E.OUT,D.LINE PUT LINE JUST RECEIVED
  2791. SA1 IWHERE UPDATE *IWHERE*
  2792. SX6 B1
  2793. IX6 X1+X6
  2794. SA6 A1+
  2795. EQ IIB5 PROCESS NEXT LINE
  2796.  
  2797. * *INSERT* PROCESSOR.
  2798.  
  2799. IIB4 RJ WTF WRITE EXISTING LINE
  2800.  
  2801. * MOVE NEW LINE TO *E.LINE*.
  2802.  
  2803. RJ TLB TRANSFER LINE TO BUFFER
  2804. IIB5 SA1 NUMS
  2805. SX6 B1
  2806. IX6 X1-X6
  2807. BX7 X7-X7
  2808. SA6 A1 DECREMENT LINES LEFT
  2809. SA7 NOMOD SET MODIFICATIONS MADE
  2810. PL X6,IIB1 IF MORE LINES
  2811. EQ NCM EXIT
  2812. INP SPACE 4,15
  2813. ** INP - ENTRY INPUT MODE REQUEST.
  2814. *
  2815. * ENTRY (NUMS) = ESCAPE CHARACTER.
  2816. *
  2817. * EXIT IF ERROR, TO *ABT* OR *CER*.
  2818. * ELSE, TO *PEC*.
  2819. *
  2820. * USES A - 1, 2, 6, 7.
  2821. * X - 1, 2, 6, 7.
  2822. * B - 6, 7.
  2823. *
  2824. * CALLS RDL, RTA, STK, TAB, UPL, WTF.
  2825. *
  2826. * MACROS WRITEC.
  2827.  
  2828.  
  2829. INP SA1 NUMS MOVE INPUT ESCAPE CHARACTER
  2830. SA2 BATCH
  2831. BX6 X1
  2832. SB6 =C+ *INPUT* ESCAPE CHAR. REQUIRED - BATCH MODE.+
  2833. PL X1,INP0 IF CHARACTER SPECIFIED
  2834. NZ X2,ABT IF BATCH MODE, EXIT
  2835. INP0 SA6 INPCHAR SET ESCAPE CHARACTER
  2836.  
  2837. INP1 MX7 59 SET INPUT MODE
  2838. SA7 INPMODE
  2839. WRITEC OUTPUT,(=C* INPUT*)
  2840. INP2 SA1 PREFIX
  2841. SX6 1BS"PLUS"
  2842. .CYB IF DEF,CYBRNET
  2843. BX6 -X6*X1 CLEAR PLUS PREFIX
  2844. .CYB ELSE
  2845. BX6 X6+X1 SET + PREFIX
  2846. .CYB ENDIF
  2847. SA6 A1
  2848. RJ RDL READ DATA LINE
  2849. NZ X1,PEC IF <CR> (RETURN TO EDIT MODE)
  2850. SA1 D.LINE
  2851. SB6 D.STR
  2852. RJ UPL UNPACK TEXT LINE
  2853. SA1 D.STR
  2854. SA2 INPCHAR
  2855. IX2 X2-X1
  2856. SB6 A1-B1
  2857. ZR X2,INP3 IF INPUT MODE ESCAPE CHAR
  2858. MX6 0
  2859. SA6 NOMOD SET MODIFICATIONS MADE
  2860. RJ TAB TAB TEXT LINE
  2861. RJ WTF
  2862. SB7 E.LINE SET DESTINATION
  2863. SB6 D.STR
  2864. RJ RTA PACK LINE INTO EDIT LINE BUFFER
  2865. EQ INP2 PROCESS NEXT LINE
  2866.  
  2867. INP3 SB7 S.LINE PACK COMMAND LINE INTO SPECIAL BUFFER
  2868. SB6 D.STR+1 AND SKIP ESCAPE CHARACTER
  2869. RJ RTA
  2870. SA1 S.DEV
  2871. RJ STK PROCESS ESCAPED COMMANDS
  2872. SB2 STK.
  2873. EQ CER COMMAND STACKING ERROR, EXIT
  2874. LCT SPACE 4,20
  2875. ** LCT - LOCATE SPECIFIED STRING.
  2876. *
  2877. * ENTRY (X5) .NE. 0.
  2878. * (NUMS) = NUMBER OF MATCHES TO FIND.
  2879. * IF -0, THEN DO NOT ADVANCE POINTER.
  2880. * (MCOUNT) = 0.
  2881. * STRING POINTERS ARE INITIALIZED PROPERLY.
  2882. *
  2883. * EXIT TO *NCM*.
  2884. *
  2885. * USES A - 1, 2, 3, 6, 7.
  2886. * X - 1, 2, 3, 5, 6, 7.
  2887. * B - 4.
  2888. *
  2889. * CALLS LOC, RDF, VRY, WTF.
  2890. *
  2891. * MACROS ERROR.
  2892.  
  2893.  
  2894. IF DEF,TIMES
  2895. LCTA BSS 0 TIMING ENTRY
  2896. SX5 0 SET NOT TO CALL LOC
  2897. ENDIF
  2898.  
  2899. LCT BSS 0 NORMAL ENTRY
  2900. SA1 NUMS
  2901. NZ X1,LCT1 IF COUNT IS .NE. 0
  2902. NG X1,LCT1 IF *0* COUNT WAS SPECIFIED
  2903. SX6 B1 RESET COUNT TO 1
  2904. SA6 A1
  2905. LCT1 SB4 E.STR-1 SET FWA-1 FOR SEARCH
  2906.  
  2907. IF DEF,TIMES,1
  2908. ZR X5,LCT1.1 IF IN DEBUGGING MODE
  2909.  
  2910. RJ LOC SEARCH EXISTING LINE FOR STRING
  2911.  
  2912. IF DEF,TIMES,1
  2913. LCT1.1 BSS 0
  2914.  
  2915. ZR B5,LCT3 IF STRING NOT FOUND
  2916. RJ VRY
  2917. SA2 MCOUNT
  2918. SA1 NUMS
  2919. SX6 B1
  2920. IX7 X2+X6 INCREMENT NUMBER OF MATCHES
  2921. IX6 X1-X6 DECREMENT NUMBER OF LINES
  2922. SA7 A2
  2923. AX1 1
  2924. ZR X1,NCM IF FINISHED, EXIT
  2925. SA6 A1
  2926. LCT2 RJ WTF ADVANCE TO NEXT LINE
  2927. RJ RDF
  2928. EQ LCT1 SEARCH NEXT LINE
  2929.  
  2930. * STRING NOT IN LINE. CHECK FOR *0* OPTION.
  2931.  
  2932. LCT3 SA1 NUMS
  2933. NZ X1,LCT2 IF NOT *0* OPTION
  2934. LCT4 ERROR SNF. ENTRY FOR * STRING NOT FOUND.*
  2935. SA3 C.STR-1 SET TO *READ* FOR NEXT CMD
  2936. PX6 B0,X3
  2937. SA6 A3
  2938. EQ NCM EXIT
  2939. MOD SPACE 4,10
  2940. ** MOD - MODIFY LINE(S).
  2941. *
  2942. * ENTRY AT *MOD* FOR *MODIFY* COMMAND.
  2943. * AT *MOD1* FOR *QMOD* COMMAND.
  2944. * AT *MOD2* FOR *YQMOD* COMMAND.
  2945. *
  2946. * USES A - 1, 3, 6, 7.
  2947. * X - 1, 3, 6, 7.
  2948. *
  2949. * CALLS ETL, ITM, MDY, PCN, RDF, RDL, SAC, SCD, VRY, WTF.
  2950.  
  2951.  
  2952. * ENTRY TO PROCESS *MODIFY* COMMAND.
  2953.  
  2954. MOD RJ SCD SET CODED FOR SHIFT
  2955. SX6 1
  2956. SA1 E.LINE
  2957. SA6 NUMS FORCE COUNT TO 1
  2958. SA3 MODA SET SHIFT WORD
  2959. RJ ETL ECHO TEXT LINE
  2960. EQ MOD2 PERFORM MODIFICATION
  2961.  
  2962. * ENTRY FOR *QMOD* COMMAND.
  2963.  
  2964. MOD1 RJ PCN PRINT COLUMN NUMBERS
  2965.  
  2966. * ENTRY FOR *YQMOD* COMMAND.
  2967.  
  2968. MOD2 RJ SAC SET ASCII PROCESSING
  2969. RJ RDL READ DATA LINE
  2970. NZ X1,NCM IF NOTHING THERE, EXIT
  2971. MOD3 RJ MDY MODIFY LINE
  2972. PL B3,MOD4 IF NO TRUNCATION
  2973. RJ ITM
  2974. MOD4 SX7 1
  2975. SA7 NOMOD SET MODIFICATIONS MADE
  2976. SA7 E.LMOD SET LINE MODIFICATIONS MADE
  2977. RJ VRY AND THEN VERIFY IT
  2978. SA1 NUMS
  2979. SX6 B1
  2980. IX6 X1-X6
  2981. AX1 1
  2982. ZR X1,NCM IF FINISHED
  2983. SA6 A1
  2984. RJ WTF
  2985. RJ RDF
  2986. EQ MOD3 PROCESS NEXT LINE
  2987.  
  2988. MODA CON 2L +11 PARAMETER FOR *ETL*
  2989.  
  2990. MOD RMT BATCH PARAMETER DEFINITION
  2991. CON 3L +17
  2992. RMT
  2993.  
  2994. NXT SPACE 4,10
  2995. ** NXT - PROCESS NEXT COMMAND.
  2996. *
  2997. * ENTRY (NUMS) = NUMBER OF LINES TO MOVE.
  2998. * (NUMS+1) = DIRECTION OF MOVE (-0 = BACKWARDS,
  2999. * +0 = FORWARDS).
  3000. *
  3001. * USES A - 1, 2, 6.
  3002. * X - 1, 2, 6.
  3003. *
  3004. * CALLS MPR, VRT.
  3005.  
  3006.  
  3007. NXT SA1 NUMS
  3008. MX6 0 SET E.NMODE TO CODED
  3009. SA2 A1+B1
  3010. BX1 X1-X2 OBTAIN PROPER DISPLACEMENT
  3011. NZ X1,NXT1 IF NOT ZERO DISPLACEMENT (ASSUME 1)
  3012. SX1 B1 SET *NEXT-1* COMMAND
  3013. NXT1 SA6 E.NMODE
  3014. RJ MPR MOVE THE POINTER
  3015. EQ VRT VERIFY AND RETURN
  3016. PNT SPACE 4,15
  3017. ** PNT - PRINT COMMAND PROCESSOR.
  3018. *
  3019. * ENTRY (NUMS) = NUMBER OF LINES TO PRINT.
  3020. *
  3021. * EXIT TO *NCM*.
  3022. *
  3023. * USES A - 1, 2, 4, 6.
  3024. * X - 1, 2, 4, 6.
  3025. *
  3026. * CALLS RDF, SCD, WTF.
  3027. *
  3028. * MACROS WRITEC.
  3029.  
  3030.  
  3031. PNT SA1 NUMS
  3032. SA2 IWHERE
  3033. SX6 B1
  3034. IX6 X1-X6 DECREMENT BY ONE (MAKE TESTING EASIER)
  3035. NG X2,PNT2 IF IN CREATION MODE
  3036. SA6 NUMS
  3037. RJ SCD SET CODED LINE FORMAT
  3038. PNT1 SA4 IW PRINT LINE
  3039. WRITEC OUTPUT,E.LINE
  3040. SA1 NUMS
  3041. SX6 B1
  3042. IX6 X1-X6 DECREMENT COUNT
  3043. NG X6,NCM IF DONE, EXIT
  3044. SA6 NUMS
  3045. RJ WTF
  3046. RJ RDF
  3047. EQ PNT1 PRINT NEXT LINE
  3048.  
  3049. PNT2 WRITEC OUTPUT,(=C* NULL LINE - IN CREATION MODE*)
  3050. EQ NCM EXIT
  3051. RLP SPACE 4,15
  3052. ** RLP - *REPLACE* PROCESSOR.
  3053. *
  3054. * ENTRY (NUMS) = NUMBER OF LINES TO REPLACE.
  3055. *
  3056. * EXIT TO *NCM*.
  3057. *
  3058. * USES X - 2, 6, 7.
  3059. * A - 2, 6, 7.
  3060. *
  3061. * CALLS RDF, RDL, TCD, TLB, WTF.
  3062. *
  3063. * NOTES A NULL LINE WILL OVERRIDE THE LINE COUNT.
  3064.  
  3065.  
  3066. RLP1 RJ WTF COPY DATA LINE TO EDIT FILE
  3067.  
  3068. * READ EDIT FILE. IF EOI, EXIT TO *NCM*.
  3069.  
  3070. RJ RDF
  3071.  
  3072. RLP BSS 0 ENTRY
  3073. RJ RDL GET DATA LINE
  3074. NZ X1,NCM IF EMPTY <CR> WAS ENCOUNTERED
  3075. RJ TCD TAB CODED DATA LINE
  3076. RJ TLB TRANSFER LINE TO *E.LINE*
  3077. SA2 NUMS DECREMENT LINE COUNT
  3078. SX7 B1
  3079. IX6 X2-X7
  3080. IX2 X6-X7
  3081. BX7 X7-X7
  3082. SA7 NOMOD SET MODIFICATIONS MADE
  3083. SA6 A2+
  3084. PL X2,RLP1 IF LINE COUNT NOT EXHAUSTED
  3085. EQ NCM EXIT
  3086. RMA SPACE 4,15
  3087. ** RMA - PROCESS RIGHT MARGIN COMMAND.
  3088. *
  3089. * ENTRY (NUMS) = NEW VALUE OF MARGIN (0 = RESET TO MAXIMUM).
  3090. *
  3091. * EXIT (IW) = THE VALUE OF THE RIGHT MARGIN.
  3092. * IF NO PARAMETER GIVEN, *MAXWD*.
  3093. * IF WIDTH IS NOT IN RANGE, TO *CER*, ELSE TO *NCM*.
  3094. *
  3095. * USES A - 1, 6.
  3096. * X - 1, 2, 3, 6.
  3097. * B - 2.
  3098.  
  3099.  
  3100. RMA SA1 NUMS
  3101. SX3 X1-MAXWD-1
  3102. NZ X1,RMA1 IF WIDTH SPECIFIED (ELSE DEFAULT TO 160)
  3103. SX1 160D
  3104. RMA1 SX2 X1-MINWD
  3105. BX3 -X3+X2
  3106. LX6 X1
  3107. SB2 ILL.
  3108. NG X3,CER IF WIDTH NOT IN RANGE
  3109. SA6 IW
  3110. EQ NCM EXIT
  3111. SWN SPACE 4,15
  3112. ** SWN - SET WINDOWS.
  3113. *
  3114. * ENTRY (NUMS) = LEFT WINDOW.
  3115. * (NUMS+1) = RIGHT MARGIN.
  3116. *
  3117. * EXIT (LMW) = LEFT WINDOW.
  3118. * (RMW) = RIGHT WINDOW.
  3119. * (RTWD) = RIGHT WINDOW MARGIN.
  3120. * IF ERROR, TO *CER*, ELSE TO *NCM*.
  3121. *
  3122. * USES A - 1, 2, 6, 7.
  3123. * X - 1, 2, 3, 4, 5, 6, 7.
  3124. * B - 2.
  3125.  
  3126.  
  3127. SWN SA1 NUMS
  3128. SA2 A1+B1
  3129. IX3 X2-X1 POSITIVE, IF LEFT .LE. RIGHT
  3130. SX4 X1-1 POSITIVE IF 0 .LT. LEFT
  3131. SX5 X2-161 NEGATIVE IF RIGHT .LE. 160
  3132. BX3 X3+X4
  3133. BX3 -X5+X3
  3134.  
  3135. * (X3) = POSITIVE, IF 0 .LT. LEFT .LE. RIGHT .LE. 160.
  3136.  
  3137. SB2 ARG.
  3138. NG X3,CER IF ARGUMENTS NOT PROPER
  3139. SX7 X2+
  3140. SA7 RTWD
  3141. SX6 X1+E.STR-2 SET FWA -1 OF START
  3142. SX7 X2+E.STR SET LWA+1 FOR SEARCH
  3143. SA6 LMW
  3144. SA7 A6+B1
  3145. EQ NCM EXIT
  3146. RST SPACE 4,15
  3147. ** RST - RESTORE FILE TO PREVIOUS CONDITION.
  3148. *
  3149. * ENTRY NONE.
  3150. *
  3151. * EXIT TO *NCM*.
  3152. * (IWHERE) = 0.
  3153. * (NOMOD) = 73B, INDICATES NO MODIFICATIONS.
  3154. *
  3155. * USES A - 6, 7.
  3156. * X - 6, 7.
  3157. *
  3158. * CALLS TOP.
  3159.  
  3160.  
  3161. RST BX7 X7-X7 SET IWHERE TO 0 (FORCE REWIND)
  3162. MX6 73B SET *NOMOD* TO INDICATE NO MODIFICATIONS
  3163. SA7 IWHERE
  3164. SA6 NOMOD
  3165. RJ TOP RESET FILES
  3166. EQ NCM EXIT
  3167. SCH SPACE 4,10
  3168. ** SCH - SET CHARACTER IN WORD.
  3169. *
  3170. * ENTRY (NUMS) = CHARACTER FOR PLACEMENT.
  3171. * (X1) = ADDRESS TO PLACE CHARACTER.
  3172. *
  3173. * EXIT TO *NCM*
  3174. * ((X1)) = (NUMS).
  3175. *
  3176. * USES A - 2, 6.
  3177. * X - 1, 2, 6.
  3178.  
  3179.  
  3180. SCH AX1 18 SHIFT MODIFIER WORD
  3181. SA2 NUMS
  3182. SX1 X1 REMOVE EXCESS CHARACTERS
  3183. LX1 -1
  3184. BX6 X2
  3185. SA6 X1+ PUT CHARACTER
  3186. EQ NCM EXIT
  3187. SFG SPACE 4,20
  3188. ** SFG - SET FLAG.
  3189. *
  3190. * ENTRY (X1) = COMMAND DESCRIPTOR WORD, FORM IS -
  3191. * 24/,17/ADDR,1/MODE,18/
  3192. * ADDR = ADDRESS OF THE FLAG TO SET.
  3193. * MODE = SET, IF *VERIFY* MODE.
  3194. * CLEAR, IF *BRIEF* MODE.
  3195. * (NUMS) = +- PARAMETER,
  3196. * IF NEGATIVE, SET FLAG TO CONDITION OPPOSITE
  3197. * THAT INDICATED BY *MODE*.
  3198. * IF POSITIVE, SET FLAG TO CONDITION INDICATED
  3199. * BY *MODE*.
  3200. *
  3201. * EXIT TO *NCM*.
  3202. *
  3203. * USES A - 3, 6.
  3204. * X - 1, 3, 6.
  3205.  
  3206.  
  3207. SFG AX1 18
  3208. SX1 X1 ISOLATE PARAMETER
  3209. SA3 NUMS GET +- MODE
  3210. LX1 -1
  3211. BX6 X1-X3 OBTAIN PROPER CONDITION
  3212. SA6 X1 SAVE NEW VALUE
  3213. EQ NCM EXIT
  3214. STB SPACE 4,10
  3215. ** STB - SET TABS.
  3216. *
  3217. * ENTRY (NUMS TO NUMS+NTABS) = TAB SETTINGS DESIRED.
  3218. *
  3219. * EXIT (TABS - TABS+NTABS-1) = IF ALL PARAMETERS ARE VALID
  3220. * NEW TAB SETTINGS.
  3221. * IF PARAMETERS ARE VALID, TO *NCM*, ELSE TO *CER*.
  3222. *
  3223. * USES A - 1, 2, 6, 7.
  3224. * X - 1, 2, 6, 7.
  3225. * B - 2, 5, 6, 7.
  3226.  
  3227.  
  3228. STB SA1 IW
  3229. SB7 160 DEFAULT LINE WIDTH
  3230. ZR X1,STB0 IF USING DEFAULT
  3231. SB7 X1
  3232. STB0 SB6 B0 SET VALUE OF LAST TAB
  3233. SA1 NUMS-1
  3234. MX6 0
  3235. SA6 NUMS+NTABS ASSURE ZERO MARKER
  3236. SB2 ILL. ERROR MESSAGE
  3237. STB1 SA1 A1+B1
  3238. ZR X1,STB2 IF END OF LINE (ALL OK)
  3239. SB5 X1
  3240. GT B5,B7,CER IF TAB IS PAST LINE WIDTH
  3241. LE B5,B6,CER IF TABS IS .LE. LAST TAB
  3242. SB6 B5
  3243. EQ STB1 CHECK NEXT TAB
  3244.  
  3245. STB2 SA2 NUMS-1
  3246. SA6 TABS CLEAR FIRST TAB
  3247. STB3 SA2 A2+B1 GET NEXT TAB
  3248. SA6 A6+B1 ZERO NEXT TAB
  3249. BX7 X2
  3250. SA7 A6-B1 PUT CURRENT TAB
  3251. NZ X2,STB3 IF NOT FINISHED
  3252. EQ NCM TABS SET, EXIT
  3253. TGL SPACE 4,15
  3254. ** TGL - PROCESS TOGGLES.
  3255. *
  3256. * ENTRY (X1) = (DECA), ADDRESS OF WORD TO PROCESS.
  3257. * (NUMS) = *+* PARAMETER.
  3258. * IF (NUMS) .GT. 0, SET FLAG TO ON.
  3259. * IF (NUMS) .LT. 0, SET FLAG TO OFF.
  3260. * IF (NUMS) .EQ. 0, TOGGLE STATE OF FLAG.
  3261. *
  3262. * EXIT TO *NCM*.
  3263. *
  3264. * USES A - 2, 3, 6.
  3265. * X - 1, 2, 3, 6.
  3266.  
  3267.  
  3268. TGL AX1 18 OBTAIN ADDRESS
  3269. SA3 NUMS
  3270. SA2 X1 FLAG TO PROCESS
  3271. NZ X3,TGL1 IF +- SPECIFIED
  3272. LX3 X2 MOVE TOGGLE UP
  3273. TGL1 BX6 -X3 TOGGLE FLAG
  3274. SA6 A2
  3275. EQ NCM EXIT
  3276. TRN SPACE 4,10
  3277. ** TRN - TRUNCATE COMMAND.
  3278. *
  3279. * ENTRY (NUMS) = NUMBER OF LINES TO PROCESS.
  3280. *
  3281. * USES A - 1, 5, 6, 7.
  3282. * X - 1, 2, 5, 6, 7.
  3283. * B - 2, 6.
  3284. *
  3285. * CALLS RDF, SAC, TSL, VRY, WTF.
  3286.  
  3287.  
  3288. TRN BSS 0 ENTRY
  3289. SA5 IW GET DESIRED WIDTH
  3290. RJ SAC SET ASCII MODE
  3291. TRN1 SA1 E.STR-1 GET EXISTING LINE WIDTH
  3292. IX2 X5-X1
  3293. SX7 B1
  3294. PL X2,TRN2 IF LINE ALREADY SHORT
  3295. SB2 X5+1
  3296. MX6 2
  3297. SA7 E.LMOD SET LINE MODIFICATION
  3298. SA6 A1+B2 SET NEW END OF LINE
  3299. SA7 NOMOD SET MODIFICATION MADE TO FILE
  3300. SB6 E.STR-1 SET LINE WIDTH CELL
  3301. RJ TSL TRIM SPACES OFF LINE
  3302. TRN2 RJ VRY VERIFY LINE
  3303. SA1 NUMS
  3304. SX6 B1+
  3305. IX6 X1-X6 DECREMENT COUNT
  3306. AX1 1
  3307. ZR X1,NCM IF FINISHED, EXIT
  3308. SA6 A1+
  3309. RJ WTF
  3310. RJ RDF
  3311. EQ TRN1 RETURN TO PROCESS NEXT LINE
  3312. TTN SPACE 4,10
  3313. ** TTN - TOP AND TOPNULL PROCESSOR.
  3314. *
  3315. * ENTRY (INDEX) = COMMAND TABLE INDEX FOR CURRENT COMMAND.
  3316. *
  3317. * USES A - 1, 2, 6.
  3318. * X - 1, 2, 6.
  3319. *
  3320. * CALLS TOP.
  3321.  
  3322.  
  3323. * REWIND FILES, IF *TN*, *TOP* WILL INSERT A BLANK LINE.
  3324.  
  3325. TTN RJ TOP
  3326. SA1 INDEX
  3327. SA2 NOMOD
  3328. SX1 X1-.TOPNUL POSITIVE, IF *TOPNULL*, MINUS, IF *TOP*
  3329.  
  3330. * HANDLE CASE WHERE (IWHERE) = 1, AND COMMAND IS *TOP*,
  3331. * AND (NOMOD) = FALSE.
  3332.  
  3333. BX6 X1*X2
  3334. SA6 A2
  3335. EQ NCM EXIT
  3336. WHR SPACE 4,15
  3337. ** WHR - PROCESS WHERE COMMAND.
  3338. *
  3339. * ENTRY (IWHERE) = CURRENT LINE COUNT.
  3340. *
  3341. * EXIT TO *NCM*.
  3342. *
  3343. * USES A - 1.
  3344. * X - 1, 6.
  3345. *
  3346. * CALLS CDD.
  3347. *
  3348. * MACROS WRITEC, WRITEO.
  3349.  
  3350.  
  3351. WHR SA1 IWHERE
  3352. NG X1,WHR1 IF IN CREATION MODE
  3353. RJ CDD
  3354. MX1 12
  3355. BX6 -X1*X6
  3356. LX6 12 MOVE END OF LINE BYTE
  3357. WRITEO OUTPUT
  3358. EQ NCM EXIT
  3359.  
  3360. WHR1 WRITEC OUTPUT,(=C* 0 - IN CREATION MODE.*)
  3361. EQ NCM EXIT
  3362. WRM SPACE 4,10
  3363. ** WRM - WRITE RECORD MARK.
  3364. *
  3365. * ENTRY (X1) = BITS 18 - 35 CONTAIN DESIRED *CIO* FUNCTION.
  3366. *
  3367. * EXIT TO *NCM*.
  3368. *
  3369. * USES A - 6.
  3370. * X - 1, 2, 6, 7.
  3371. *
  3372. * CALLS =XCIO=.
  3373.  
  3374.  
  3375. WRM SX2 FTA SELECT FET
  3376. AX1 18
  3377. SX7 X1
  3378. MX6 0
  3379. BX7 -X7 SPECIFY AUTO RECALL
  3380. SA6 NOMOD SET MODIFICATION
  3381. RJ =XCIO=
  3382. EQ NCM EXIT
  3383.  
  3384. YZP SPACE 4,15
  3385. ** YZP - Y/Z COMMAND PROCESSOR.
  3386. *
  3387. * ENTRY (NUMS) = IF NO PARAMETER, 0
  3388. * ELSE, FWA OF PARAMETERS.
  3389. * (NUMS+1) = LWA OF PARAMETER.
  3390. *
  3391. * EXIT IF ERROR, TO *CER*, ELSE TO *STK*.
  3392. *
  3393. * USES A - 1, 2, 3, 4, 5, 6, 7.
  3394. * X - 1, 2, 3, 4, 5, 6, 7.
  3395. * B - 6, 7.
  3396. *
  3397. * CALLS RTA, STK.
  3398.  
  3399.  
  3400. YZP SA1 NUMS GET FWA OF PARAMETER
  3401. SA2 A1+B1 GET LWA+1
  3402. SA3 X1 DELIMITER CHARACTER
  3403. ZR X1,YZP2 IF NO PARAMETER
  3404. SA5 INDEX
  3405. SA4 X2 LAST CHARACTER
  3406. SB6 X1+B1 SET FWA OF STRING TO PACK
  3407. SX5 X5-.Z 0 IF *Z* COMMAND
  3408. MX7 1
  3409. NZ X5,YZP1 IF NOT *Z* COMMAND
  3410. BX3 X3+X7 SET TO ECHO COMMANDS
  3411. YZP1 LX6 X3 MOVE DELIMITER/ECHO FLAG
  3412. SB7 Y.LINE
  3413. SA6 Y.DEV+1 SET DELIMITER CHARACTER
  3414. BX7 X7+X4 SET PSEUDO END OF LINE
  3415. SA7 A4
  3416. RJ RTA PACK LINE
  3417. SA1 NUMS+1
  3418. SA1 X1+ GET PSEUDO END OF LINE
  3419. MX7 1
  3420. BX6 -X7*X1 REMOVE PSEUDO END OF LINE
  3421. LX1 1
  3422. NG X1,YZP1.1 IF TRUE END OF LINE
  3423. SA6 A1+ REPLACE ENTRY
  3424. YZP1.1 SA1 Y.DEV
  3425. RJ STK STACK ENTRY. IF NO ERRORS, EXIT.
  3426. SB2 STK.
  3427. EQ CER IF STACKING ERROR, EXIT
  3428.  
  3429. YZP2 SB2 ARG.
  3430. EQ CER PARAMETER ERROR, EXIT
  3431. TITLE SUBROUTINES.
  3432. ABT SPACE 4,15
  3433. ** ABT - ABORT XEDIT.
  3434. *
  3435. * ENTRY (B6) = ADDRESS OF ABORT MESSAGE.
  3436. *
  3437. * EXIT TO *EXT*.
  3438. * (EXTA) = -1, INDICATES ABORT.
  3439. *
  3440. * USES A - 6.
  3441. * X - 6.
  3442. *
  3443. * MACROS WRITEC.
  3444. *
  3445. * NOTES DO NOT *RJ* TO THIS SUBROUTINE.
  3446.  
  3447.  
  3448. ABT SX6 -1 CHANGE EXIT MODE
  3449. SA6 EXTA
  3450. WRITEC OUTPUT,B6 ISSUE MESSAGE
  3451. EQ EXT EXIT XEDIT
  3452. ASF SPACE 4,20
  3453. ** ASF - ANALYZE STRING FIELDS.
  3454. *
  3455. * ENTRY (P1LP - P3RP) = POINTERS TO STRINGS.
  3456. *
  3457. * EXIT STRING DEFINITIONS CHECKED AGAINST BITS IN COMMAND
  3458. * MODIFIER WORD.
  3459. * (LOCA - LOCC) = INITIALIZED FOR USE BY *LOC*.
  3460. * (SPCP) = NEGATIVE IF WINDOW WAS SPECIFIED.
  3461. * (B2) = 0 IF NO ERROR ENCOUNTERED,
  3462. * ELSE, ORDINAL OF ERROR MESSAGE.
  3463. * IF ERROR, TO *NER*.
  3464. *
  3465. * USES A - 1, 2, 3, 4, 6, 7.
  3466. * X - 0, 1, 2, 3, 4, 6, 7.
  3467. * B - 2, 3, 4, 5, 6, 7.
  3468. *
  3469. * CALLS SAC, VIS.
  3470. *
  3471. * NOTES ROUTINE IS DESIGNED TO BE CALLED IMMEDIATELY AFTER
  3472. * THE STRINGS ARE PARSED VIA *PRM*.
  3473.  
  3474.  
  3475. ASF11 SA1 COMMAND
  3476. SA2 P3RP
  3477. LX1 59-33 MODIFIER 15, 2 STRINGS NEEDED
  3478. PL X1,ASF IF NOT ABOVE
  3479. ZR X2,ASF10 IF NOT 2 STRINGS (ARG ERROR)
  3480.  
  3481. ASF PS ENTRY/EXIT
  3482. SA3 P1LP
  3483. SA2 PREFIX
  3484. ZR X3,ASF9 IF NO STRINGS
  3485. SA1 GLOBAL
  3486. MX6 -18
  3487. LX2 59-/PREFIX/W (NEXT BIT IS -A-)
  3488. BX7 -X6*X1 SET GLOBAL
  3489. LX6 B1,X2
  3490. SX4 B0
  3491. PL X6,ASF1 IF NOT ANCHOR
  3492. MX4 1
  3493. ASF1 LX7 18
  3494. SX1 E.STR-1 SET MINIMUM STARTING-1
  3495. BX6 X6+X2
  3496. PL X6,ASF2 IF NOT WINDOW/ANCHOR
  3497. SA1 LMW GET WINDOW LEFT MARGIN
  3498. ASF2 IX7 X7+X4
  3499. BX7 X1+X7
  3500. SA7 LOCA SAVE FIRST LOCATE PARAMETER WORD
  3501.  
  3502. * INITIALIZE *LOCB* AND *LOCC*.
  3503. *
  3504. * NOTE- LWA+1 FOR SCAN IS SET VERY HIGH. THIS IS DONE FOR
  3505. * TWO REASONS. THE FIRST, THIS ROUTINE IS ALSO CALLED BY
  3506. * *OCTCHANGE*, WHICH MAY USE DOUBLE SIZE BUFFERS, AND THE
  3507. * SECOND IS THAT IT DOES NOT MAKE MUCH DIFFERENCE AS THE
  3508. * LOCATE SUBROUTINE, *LOC*, WILL FORCE LWA+1 TO BECOMES THE
  3509. * EOL CHARACTER OF THE STRING BEING SEARCHED.
  3510.  
  3511. SA1 P1LP
  3512. SB2 E.STR+3*MAXWD 1.SET LWA+1 AVAIL FOR SCAN
  3513. SA3 P2LP
  3514. SB3 B2 2. SET LWA+1 AVAIL FOR SCAN
  3515. MX0 1
  3516. SA4 RMW OBTAIN WINDOW RIGHT MARGIN+1
  3517. SB5 18
  3518. SB6 B0 1. STRING LENGTH
  3519. SB4 X4
  3520. LX6 X1,B5 1. FWA COMPARE
  3521. SB7 B7-B7 2. STRING LENGTH
  3522. LX7 X3,B5 2. FWA COMPARE
  3523. SA4 SPCP RESET WINDOW PARAMETER
  3524. BX1 X7
  3525. BX7 -X0*X4
  3526. SA7 SPCP
  3527. BX7 X1
  3528. SA1 P1LP
  3529. SA4 TRIM
  3530. BX4 X4+X2 NEG. IF WINDOW OR TRIM
  3531. PL X4,ASF3 IF NOT ABOVE
  3532. BX6 X0+X6 1. SET TRIM
  3533. BX7 X0+X7 2. SET TRIM
  3534. ASF3 PL X2,ASF4 IF NOT WINDOW PROCESSING
  3535. SA4 SPCP SET WINDOW PARAMETER
  3536. BX4 X4+X0
  3537. BX2 X7
  3538. BX7 X4
  3539. SA7 SPCP
  3540. BX7 X2
  3541. SB2 B4
  3542. SB3 B4
  3543. ASF4 LX2 /PREFIX/W-/PREFIX/A
  3544. SA4 PRMB GET AND/NOT LOGIC FLAG
  3545. ZR X3,ASF5 IF ONLY ONE STRING
  3546. NZ X4,ASF5 IF *---* LOGIC
  3547. BX6 X0+X6 1. SET TRIM (ALL CHARS SIGNIFICANT)
  3548. ASF5 BX0 X0*X4
  3549. LX0 36-59 POSITION FLAG
  3550. PL X2,ASF6 IF NOT ANCHOR
  3551. SB2 B4 1. RESET RIGHT MARGIN
  3552. ASF6 BX7 X7+X0 2. SET POS/NEG LOGIC FLAG
  3553. SA2 A1+B1
  3554. SA4 A3+B1
  3555. IX1 X2-X1
  3556. IX3 X4-X3
  3557. SB6 X1
  3558. SB7 X3
  3559. SX1 B2
  3560. SX3 B3
  3561. BX6 X6+X1
  3562. BX7 X7+X3
  3563. PX6 B6
  3564. PX7 B7
  3565. SA6 LOCB
  3566. SA7 A6+B1
  3567. SA1 LOCE SET NORMAL SEARCH
  3568. GT B6,ASF7 IF FIRST STRING NOT NULL
  3569. NZ X4,ASF8 IF THERE IS A SECOND STRING
  3570. SA1 LOCF SET NULL SEARCH
  3571. ASF7 BX6 X1
  3572. SA6 LOC+1 CHANGE ENTRY POINT TO *LOC*
  3573. * RJ VIS VOID INSTRUCTION STACK
  3574. RJ SAC SET ASCII PROCESSING
  3575. SB2 B0 SET NO ERROR
  3576. EQ ASF RETURN
  3577.  
  3578. ASF8 GT B7,ASF7 IF SECOND STRING NOT NULL
  3579. EQ ASF10 SET *ARG* ERROR
  3580.  
  3581. ASF9 SA1 LOCD SET FOUND STRING (NO FIELDS)
  3582. SA2 COMMAND
  3583. SB2 B0 SET *ASF* SUCCESSFUL
  3584. BX6 X1
  3585. SA6 LOC+1
  3586. RJ VIS VOID INSTRUCTION STACK
  3587. LX2 59-34 MODIFIER BIT 16, 1 STRING NEEDED
  3588. PL X2,ASF11 IF NOT ABOVE
  3589. ASF10 SB2 ARG. SET ERROR
  3590. EQ ASF RETURN
  3591. BTL SPACE 4,10
  3592. ** BTL - ISSUE *BAD TEXT LINE ENCOUNTERED* MESSAGE.
  3593. *
  3594. * ENTRY NONE.
  3595. *
  3596. * EXIT TO *NCM*.
  3597. *
  3598. * USES B - 2.
  3599. *
  3600. * CALLS IEM.
  3601.  
  3602.  
  3603. BTL SB2 BTL. SET UP ERROR MESSAGE
  3604. RJ IEM ISSUE ERROR MESSAGE
  3605. EQ NCM EXIT
  3606. CER SPACE 4,15
  3607. ** CER - COMMAND ERROR PROCESSOR.
  3608. *
  3609. * ENTRY (B2) = ERROR MESSAGE ORDINAL.
  3610. *
  3611. * EXIT TO *NCM* AFTER POPPING STACK TO MAIN DEVICE AND
  3612. * READING NEXT COMMAND LINE (VIA *NCL*).
  3613. * IF BATCH MODE, TO *ABT*.
  3614. *
  3615. * USES A - 1, 2, 5, 6, 7.
  3616. * X - 1, 2, 5, 6, 7.
  3617. * B - 2, 6, 7.
  3618. *
  3619. * CALLS IEM.
  3620.  
  3621.  
  3622. CER ERROR B2 ISSUE ERROR MESSAGE
  3623.  
  3624. * ENTRY POINT FOR COMMAND ERROR, BUT ISSUED OWN MESSAGE.
  3625.  
  3626. CER1 SA2 BATCH ABORT/ELSE RETURN TO MAIN INPUT
  3627. SB6 =C* BATCH ABORT - COMMAND ERROR.*
  3628. NZ X2,ABT IF BATCH MODE
  3629. SA1 INPMODE
  3630. SB7 -I.DEV SET DEVICE TO CHECK AGAINST
  3631. PL X1,CER2 IF NOT IN INPUT MODE
  3632. SA5 C.ON GET CURRENT DEVICE
  3633. SB7 -Y.DEV
  3634. SB2 X5+B7
  3635. ZR B2,NCL IF *Y/Z* COMMAND DEVICE
  3636. SB7 -S.DEV SET SPECIAL INPUT DEVICE LINE
  3637. CER2 SA5 C.ON POP STACK AND GET NEXT COMMAND LINE
  3638. SB2 X5+B7 COMPARE DEVICES
  3639. MX6 1 PREPARE TO IDLE DEVICE
  3640. ZR B2,NCL IF POPPED TO PROPER DEVICE, EXIT
  3641. SA5 X5 GET NEW DEVICE
  3642. SA6 A5 IDLE OLD DEVICE
  3643. SA2 X5+B1 GET OLD C.STR-1 WORD
  3644. BX7 X5
  3645. LX6 X2
  3646. SA7 C.ON POP STACK
  3647. SA6 C.STR-1
  3648. EQ CER2 CHECK TO SEE IF AT PRIMARY
  3649. CFF SPACE 4,20
  3650. ** CFF - COPY FAST FILE.
  3651. *
  3652. * ENTRY (CFET) LOADED WITH FILE NAME.
  3653. * AT LEAST ONE READ STARTED ON *E.IN*.
  3654. *
  3655. * EXIT FILE COPIED.
  3656. * BOTH FILES *NOT BUSY*.
  3657. *
  3658. * USES A - 1, 2, 3, 6, 7.
  3659. * X - 1, 2, 3, 6, 7.
  3660. *
  3661. * MACROS READ, RECALL, WRITE, WRITEF, WRITER.
  3662. *
  3663. * COPIES INCOMING EDIT FILE STARTING AT CURRENT BUFFER
  3664. * POSITION, TO THE FILE NAME WHICH IS IN *CFET*.
  3665. * NEITHER FILE IS REWOUND BEFORE COPYING.
  3666. * WARNING, THIS ROUTINE ASSUMES THAT THE BUFFER POINTERS
  3667. * FOR THE TWO FILES ARE IDENTICAL - THUS USE ONLY ON *E.IN*
  3668. * AND *CFET*.
  3669.  
  3670.  
  3671. CFF PS ENTRY/EXIT
  3672. SA1 E.IN+2 INITIALIZE OUTPUT FET TO AGREE WITH
  3673. SA2 A1+B1 THE INPUT FET
  3674. BX6 X1
  3675. SA3 A1-B1 GET *FIRST*
  3676. LX7 X2
  3677. SX3 X3 MASK OUT ADDRESS FIELD OF *FIRST*
  3678. SA1 A2+B1 GET *LIMIT*
  3679. SA6 CFET+2
  3680. SX1 X1 MASK OUT ADDRESS FIELD OF *LIMIT*
  3681. SA7 A6+B1
  3682. IX6 X1-X3 BUFFER SIZE (LIMIT-FIRST)
  3683. SA6 CFFA SAVE CALCULATED BUFFER SIZE
  3684. SA3 E.IN CHECK READ FET STATUS
  3685. EQ CFF3 CHECK FOR EOR/EOF/EOI AT ENTRY
  3686.  
  3687. CFF1 SA1 CFET+3 GET WRITE FET OUTPUT POINTER
  3688. BX6 X1
  3689. SA6 E.IN+3 REFLECT WRITE PROCESSING IN READ FET
  3690. READ E.IN RESTART READ FET
  3691. RECALL CFET WAIT FOR *WRITE* TO COMPLETE
  3692. CFF2 SA3 E.IN SET READ FET STATUS
  3693. SA1 E.IN+2
  3694. SA2 CFET+3 INFORM THE TWO FETS ABOUT ACTIVITY
  3695. BX6 X1 IN THE OTHER FET
  3696. LX7 X2
  3697. SA6 A2-B1
  3698. SA7 A1+B1
  3699. CFF3 LX3 59-0
  3700. PL X3,CFF4 IF READ FET BUSY
  3701. LX3 59-4-59+0
  3702. NG X3,CFF6 IF AT EOR/EOF/EOI
  3703.  
  3704. * CALL *CIO* FOR *READ* IF SUFFICIENT SPACE IS IN THE BUFFER.
  3705.  
  3706. IX6 X2-X1 OUT - IN
  3707. ZR X6,CFF3.1 IF BUFFER IS EMPTY
  3708. BX3 X6
  3709. SA1 CFFA GET BUFFER SIZE
  3710. AX3 60 SIGN OF (OUT-IN)
  3711. BX2 X3*X1 BUFFER SIZE IF (OUT.LT.IN), ELSE 0
  3712. IX7 X2+X6 SPACE IN BUFFER
  3713. AX7 7 0 IF .LT. 200B WORDS OF SPACE
  3714. ZR X7,CFF4 IF NOT ENOUGH SPACE
  3715. CFF3.1 READ A3 RESTART THE READ FET
  3716. CFF4 SA3 CFET
  3717. LX3 59-0
  3718. PL X3,CFF5 IF WRITE FET BUSY
  3719.  
  3720. * CALL *CIO* FOR *WRITE* IF SUFFICIENT DATA IS IN THE BUFFER.
  3721.  
  3722. SA1 CFET+2 GET *IN*
  3723. SA2 A1+B1 GET *OUT*
  3724. IX6 X1-X2 IN - OUT
  3725. BX3 X6
  3726. SA1 CFFA GET CALCULATED BUFFER SIZE
  3727. AX3 60 SIGN OF (IN-OUT)
  3728. BX2 X3*X1 BUFFER SIZE IF (IN.LT.OUT), ELSE 0
  3729. IX7 X2+X6 AVAILABLE DATA IN BUFFER
  3730. AX7 7 0 IF .LT. 200B WORDS OF DATA
  3731. ZR X7,CFF5 IF NOT ENOUGH DATA AVAILABLE
  3732. WRITE CFET RESTART THE WRITE FET
  3733. CFF5 RECALL WAIT FOR SOMETHING TO HAPPEN
  3734. EQ CFF2 CONTINUE COPY
  3735.  
  3736. * CHECK EOR/EOF/EOI AND PROCESS ACCORDINGLY
  3737.  
  3738. CFF6 SA1 E.IN+2 UPDATE OUTPUT BUFFER POINTER
  3739. LX3 59-3-59+4
  3740. BX6 X1
  3741. SA6 CFET+2
  3742. NG X3,CFF7 IF NOT EOR
  3743. WRITER CFET
  3744. EQ CFF1 CONTINUE COPY
  3745.  
  3746. CFF7 LX3 59-9-59+3
  3747. NG X3,CFF8 IF EOI
  3748. WRITEF CFET
  3749. EQ CFF1 CONTINUE COPY
  3750.  
  3751. CFF8 RECALL CFET WAIT FOR OUTPUT TO SETTLE
  3752. EQ CFF RETURN
  3753.  
  3754. CFFA CON 0 TEMPORARY STORAGE FOR BUFFER SIZE
  3755. CHS SPACE 4,20
  3756. ** CHS - CHANGE STRING(S).
  3757. *
  3758. * ENTRY (A0) = FWA OF SCRATCH BUFFER.
  3759. * (X0) = LWA+1 OF SCRATCH BUFFER.
  3760. * (SIGN BIT OF X0 = 1 IF *STRING* MODE).
  3761. *
  3762. * EXIT (B5) = 0, IF STRING NOT FOUND.
  3763. * (X5) = 0, IF TRUNCATION OCCURED.
  3764. * NEW CHANGED LINE (IF STRING FOUND) IN SCRATCH BUFFER.
  3765. * THE NEW LINE SHOULD BE RUN THROUGH *TSL*.
  3766. * B5 SHOULD BE TESTED BEFORE X5.
  3767. *
  3768. * USES A - 0, 1, 2, 5, 6.
  3769. * X - 1, 2, 4, 5, 6.
  3770. * B - 2, 3, 4, 5, 6, 7.
  3771. *
  3772. * CALLS LOC.
  3773.  
  3774.  
  3775. CHS15 SX5 0 SET TRUNCATION OCCURED
  3776. CHS16 MX6 2 SET END OF LINE IN SCRATCH BUFFER
  3777. SB5 1 SET STRING FOUND
  3778. SA6 B6
  3779.  
  3780. CHS PS ENTRY/EXIT
  3781. MX6 0
  3782. SB4 E.STR-1 SET FIRST SEARCH ADDR
  3783. SA5 B4+B1
  3784. SA6 CHSB COUNT COUNTER (VOID INFINITE LENGTH)
  3785. RJ LOC SEARCH FOR STRING
  3786. SB6 A0
  3787. SB3 X0
  3788. SA1 LOC+1
  3789. ZR B5,CHS IF STRING NOT FOUND, RETURN
  3790. SB7 X1+ IF C//STR/ FORM, 0
  3791.  
  3792. * COPY TO SCRATCH THAT PORTION OF LINE BEFORE MATCH.
  3793.  
  3794. CHS1 SB2 A5
  3795. SX4 B1
  3796. GE B2,B4,CHS5 IF ALREADY AT START OF MATCH
  3797. CHS2 PL X5,CHS3 IF NOT AT END OF EDIT LINE
  3798. SA5 CHSA SET TO BLANK(SPECIAL CASE)
  3799. CHS3 LT B6,B3,CHS4 IF NOT FULL SCRATCH BUFFER
  3800. SX4 X5-1R
  3801. NZ X4,CHS15 IF TRUNCATION
  3802. CHS4 BX6 X5
  3803. SB2 B2+B1 STEP A5 VALUE
  3804. SA6 B6
  3805. SA5 A5+B1
  3806. SB6 B6+X4 CONDITIONALLY INCREMENT SCRATCH POINTER
  3807. LT B2,B4,CHS2 IF MORE TO COPY
  3808.  
  3809. * COPY TO SCRATCH THE NEW STRING, PREPARE FOR NEXT SEARCH.
  3810.  
  3811. CHS5 SB4 B5-B1 SET TO SKIP MATCHED STRING
  3812. NG X5,CHS6 IF AT END OF EDIT LINE (REMAIN THERE)
  3813. NG X5,CHS14 IF AT END OF LINE
  3814.  
  3815. * RESET TO AFTER MATCHED STRING, NEVER PAST EOL CHARACTER.
  3816.  
  3817. SA5 B5
  3818. CHS6 SA2 P3RP
  3819. SA1 A2-B1 P3LP
  3820. ZR X2,CHS9 IF NO STRING FOR REPLACEMENT
  3821. SB2 X1
  3822. SB5 X2
  3823. GE B2,B5,CHS9 IF NO STRING (NULL)
  3824. SA1 B2
  3825. CHS7 BX6 X1
  3826. SB2 B2+B1
  3827. LT B6,B3,CHS8 IF END OF SCRATCH BUFFER
  3828. SX4 X1-1R
  3829. NZ X4,CHS15 IF TRUNCATION
  3830. CHS8 SA6 B6+
  3831. SB6 B6+X4 CONDITIONALLY INCREMENT SCRATCH POINTER
  3832. SA1 B2
  3833. LT B2,B5,CHS7 IF MORE TO TRANSFER
  3834.  
  3835. * READY TO LOOK FOR NEXT STRING.
  3836.  
  3837. CHS9 SA0 B6 UPDATE A0
  3838. NG X0,CHS13 IF STRING MODE
  3839. CHS10 ZR B7,CHS11 IF C//STR/ OPTION
  3840. RJ LOC CHECK FOR NEXT MATCH
  3841. SB6 A0
  3842. SB3 X0
  3843. SA1 CHSB
  3844. SB7 B1 SET NOT C//STR/ OPTION
  3845. SX6 X1+B1
  3846. AX1 9
  3847. SA6 A1
  3848. NZ X1,CHS10.1 IF IN INFINITE LOOP
  3849. NZ B5,CHS1 IF MATCH FOUND
  3850. CHS10.1 SX4 1 RESET (X4)
  3851.  
  3852. * COPY REMAINDER OF LINE TO SCRATCH.
  3853.  
  3854. CHS11 NG X5,CHS16 IF FINISHED
  3855. LT B6,B3,CHS12 IF END OF SCRATCH BUFFER
  3856. SX4 X5-1R
  3857. NZ X4,CHS15 IF TRUNCATION
  3858. CHS12 BX6 X5
  3859. SA6 B6
  3860. SA5 A5+B1
  3861. SB6 B6+X4
  3862. EQ CHS11 CONTINUE COPY
  3863.  
  3864. * STRING MODE - CHECK TO SEE IF FINISHED.
  3865.  
  3866. CHS13 SA1 NUMS
  3867. SX6 B1
  3868. IX6 X1-X6
  3869. AX1 1
  3870. SA6 A1
  3871. NZ X1,CHS10 IF MORE STRINGS
  3872. EQ CHS11 COPY REST OF LINE
  3873.  
  3874. * CHECK FOR ANY INFINITE LOOPS
  3875.  
  3876. CHS14 SA1 CHSB
  3877. SX6 X1+B1
  3878. SA6 A1
  3879. AX1 9
  3880. ZR X1,CHS6 IF NOT INFINITE
  3881. EQ CHS RETURN
  3882.  
  3883. CHSA DATA 1R SPECIAL CASE HANDLING
  3884. VFD 2/-0,*P/
  3885. CHSB BSS 1 INFINITE LOOP KLUDGE
  3886. ETL SPACE 4,20
  3887. ** ETL - ECHO TEXT LINE.
  3888. *
  3889. * ENTRY (A1) = FWA OF TEXT LINE.
  3890. * (X1) = TEXT.
  3891. * (X3) = PREFIX DEFINITIONS (SEE ETLA FOR EXAMPLE).
  3892. *
  3893. * EXIT DESIRED TEXT LINE ECHOED AFTER INSERTING UP
  3894. * TO NINE LEADING CHARACTERS.
  3895. *
  3896. * USES A - 1, 6, 7.
  3897. * X - 1, 2, 3, 4, 6 ,7.
  3898. * B - 2.
  3899. * E.SCR.
  3900. *
  3901. * MACROS WRITEC.
  3902.  
  3903.  
  3904. ETL1 BX6 -X4*X1 GET END OF LINE BYTE
  3905. LX1 B2 SHIFT WORD
  3906. BX7 -X2*X1
  3907. IX7 X7+X3
  3908. BX3 X2*X1
  3909. SA7 A7+1 SAVE NEXT WORD
  3910. SA1 A1+B1 READ AHEAD TO NEXT
  3911. NZ X6,ETL1 IF NOT END OF LINE
  3912. BX7 X3
  3913. SA7 A7+B1
  3914. SA6 A7+B1 INSURE PROPER END OF LINE BYTE
  3915. WRITEC OUTPUT,E.SCR+1
  3916.  
  3917. ETL PS ENTRY/EXIT
  3918. MX2 1
  3919. SB2 X3 GET SHIFT COUNT-1
  3920. SA7 E.SCR
  3921. AX2 B2 EXTEND MASK
  3922. SB2 B2-59
  3923. BX3 X2*X3 CLEAR SHIFT COUNT
  3924. MX4 -12
  3925. SB2 -B2
  3926. EQ ETL1 WRITE TEXT
  3927.  
  3928. ETLA CHAR (VFD 6/0),QM. DATA LINE PROMPT
  3929. VFD 6/1R ,*P/11
  3930. ETLB CHAR (VFD 6/0),QM. COMMAND LINE PROMPT
  3931. CHAR (VFD 6/0),QM.
  3932. VFD 6/1R ,*P/17
  3933.  
  3934. ETL RMT REMOTE FOR BATCH ORIGIN
  3935. CHAR (VFD 12/1L ),QM.
  3936. VFD 6/1R ,*P/17
  3937. CHAR (VFD 12/1L ),QM.
  3938. CHAR (VFD 6/0),QM.
  3939. VFD 6/1R ,*P/23D
  3940. RMT
  3941. EXT SPACE 4,15
  3942. ** EXT - EXIT XEDIT.
  3943. *
  3944. * ENTRY (EXTA) = EXIT CODE.
  3945. *
  3946. * EXIT PROGRAM TERMINATED.
  3947. *
  3948. * USES A - 0, 1, 2, 4, 5.
  3949. * X - 0, 1, 2, 3, 4, 5, 6.
  3950. *
  3951. * MACROS CSET, DISTC, MESSAGE, RETURN, REWIND, WRITEO, WRITER.
  3952. *
  3953. * NOTES ROUTINE RETURNS SCRATCH FILES (SCRA-SCRG),
  3954. * TURNS OFF ASCII MODE (IF *AS* PARAMETER USED)
  3955. * AND DOES OTHER HOUSEKEEPING.
  3956.  
  3957.  
  3958. EXT SA1 COPY
  3959. ZR X1,EXT1 IF NO COPY FILE
  3960. WRITER FTD,RECALL CLOSE COPY FILE
  3961. REWIND X2
  3962. EXT1 MX0 3
  3963. SA0 FTD SET FIRST FET TO LOOK AT
  3964. LX0 -21D POSITION A-G MASK
  3965. SA5 =0LSCR
  3966. EXT2 SA4 A0 GET FILE NAME
  3967. BX2 X4-X5 COMPARE NAMES
  3968. BX1 -X0*X4 CLEAR A-G BITS
  3969. AX2 18
  3970. ZR X2,EXT3 IF NAME IS *SCR* (NOT ONE OF XEDIT,S)
  3971. BX1 X1-X5
  3972. AX1 18
  3973. NZ X1,EXT3 IF NOT SRCA-SRCG
  3974. RETURN A0
  3975. EXT3 SA0 A0+7 STEP TO NEXT FET
  3976. SX3 A0-LFET
  3977. NG X3,EXT2 IF SCAN NEXT FET
  3978.  
  3979. * CLEAN UP TELEX SPECIAL STATUS.
  3980.  
  3981. SA2 PROMPT
  3982. ZR X2,EXT4 IF DISTC NOT ON
  3983. SX6 B1
  3984. LX6 48 0001 BYTE
  3985. WRITEO OUTPUT
  3986. DISTC OFF
  3987. EXT4 SA1 OUTPUT+2
  3988. SA2 A1+B1
  3989. IX2 X2-X1 COMPARE *IN* AND *OUT*
  3990. ZR X2,EXT5 IF NOTHING IN BUFFER TO FLUSH
  3991. WRITER OUTPUT,R FLUSH BUFFER (WITH RECALL)
  3992. EXT5 SA2 AS
  3993. SX2 X2-3RASC
  3994. NZ X2,EXT6 IF NOT SPECIAL ASCII MODE
  3995. CSET RESTORE RESTORE INITIAL MODE
  3996. EXT6 RJ FNL ISSUE DAYFILE MESSAGE
  3997. MESSAGE (=0),1 CLEAR MESSAGE BUFFER
  3998. SA1 EXTA
  3999. NG X1,EXT7 IF ABORT XEDIT
  4000. ENDRUN END XEDIT
  4001.  
  4002. EXT7 ABORT ABORT XEDIT
  4003.  
  4004. GFN SPACE 4,20
  4005. ** GFN - GET FILE NAME.
  4006. *
  4007. * ENTRY (A5) = ADDRESS OF PRESET CHARACTER.
  4008. * (X5) = PRESET CHARACTER.
  4009. *
  4010. * EXIT (X6) = FILE NAME IF .NE. 0.
  4011. * = 0, IF RESERVED OR BAD (NOT INCLUDING SPECIAL).
  4012. * (A1) = ADDRESS OF SPECIAL NAME ENTRY (IF SPECIAL).
  4013. * 0, THEN NULL.
  4014. * 1, THEN OUTPUT.
  4015. * (X1) = NON-ZERO IF SPECIAL, RESERVED OR BAD NAME.
  4016. * (B4) = 0, IF TOO MANY CHARACTERS IN THE FILE NAME.
  4017. * = 1, IF SPECIAL CHARACTERS IN THE FILE NAME.
  4018. * (B6) = ERROR MESSAGE ORDINAL (IF ERROR).
  4019. * (A5) = ADDRESS OF NEXT NON-BLANK OR SECOND COMMA.
  4020. * (X5) = NEXT NON-BLANK CHARACTER OR SECOND COMMA.
  4021. *
  4022. * USES A - 1, 5.
  4023. * X - 1, 3, 4, 5, 6, 7.
  4024. * B - 4, 6.
  4025.  
  4026.  
  4027. GFN7 NG X5,GFN8 IF AT END OF LINE
  4028. SB4 X5-1R
  4029. ZR B4,GFN8 IF BLANK
  4030. NE B4,B1,GFN3.1 IF SPECIAL CHARACTER
  4031. GFN8 LX6 6
  4032. PL X6,GFN8 IF NOT LEFT JUSTIFIED
  4033. BX7 X7-X7 SET NO COMMA FOUND
  4034. GFN9 SX4 X5-1R
  4035. ZR X4,GFN10 IF BLANK CHARACTER
  4036. SX4 X5-1R,
  4037. NZ X4,GFN11 IF NOT COMMA
  4038. NZ X7,GFN11 IF 2ND COMMA
  4039. SX7 1 SET COMMA ENCOUNTERED
  4040. GFN10 SA5 A5+1
  4041. PL X5,GFN9 IF NOT END OF LINE
  4042. GFN11 MX7 1 REMOVE POSITION BIT
  4043. BX6 -X7*X6
  4044. SB6 B0 INDICATE NO ERROR
  4045. LX6 12 LEFT JUSTIFY NAME
  4046. SA1 GFNA-1 PRESET TO LIST OF RESERVED NAMES
  4047. ZR X6,GFN6 IF NO FILE NAME
  4048. GFN12 SA1 A1+B1
  4049. ZR X1,GFN IF END OF LIST
  4050. BX3 X6-X1
  4051. AX4 B1,X3
  4052. NZ X4,GFN12 IF NOT THIS FILE NAME
  4053. LX3 -1
  4054. AX3 59
  4055. BX6 X3*X6 IF BAD, WILL ZERO - ELSE LEAVE IT ALONE
  4056. SB6 BFN.*100B+3 SET -RESERVED FILE NAME-
  4057.  
  4058. GFN PS ENTRY/EXIT
  4059. BX6 X6-X6 CLEAR ASSEMBLY
  4060. SB6 B0 SET NO ERROR (END OF LINE)
  4061. NG X5,GFN6 IF END OF LINE
  4062. SX6 4000B SET POSITION INDICATOR
  4063. GFN1 ZR X5,GFN4 IF BAD FILE NAME
  4064. SX4 X5-1R9-1
  4065. GFN2 PL X4,GFN3 IF NOT ALPHANUMERIC
  4066. LX6 6
  4067. BX6 X6+X5
  4068. NG X6,GFN3.2 IF TOO MANY CHARACTERS
  4069. SA5 A5+1
  4070. PL X5,GFN1 IF NOT END OF LINE
  4071. EQ GFN7 GET FILE NAME
  4072.  
  4073. GFN3 SX3 X5-7601B
  4074. NG X3,GFN7 IF LESS THAN 7601B
  4075. SX4 X3-1RZ
  4076. PL X4,GFN7 IF .GT. LOWER CASE Z
  4077. SX5 X3+B1 GET LOWER CASE LETTER
  4078. EQ GFN2 TEST CHARACTER
  4079.  
  4080. * BAD FILE NAME PROCESSING.
  4081.  
  4082. GFN3.1 SB4 B1+
  4083. EQ GFN4 PROCESS BAD FILE ERROR
  4084.  
  4085. GFN3.2 SB4 B0+
  4086. GFN4 SB6 BFN.*100B+1 SET -BAD FILE NAME-
  4087. GFN5 SX6 B0 CLEAR FILE NAME
  4088. MX1 1 SET ERROR FLAG
  4089. EQ GFN RETURN
  4090.  
  4091. GFN6 SB6 BFN.*100B+2 SET -NO FILE NAME-
  4092. EQ GFN5 CLEAR FILE NAME
  4093.  
  4094. * RESERVED FILE NAMES.
  4095.  
  4096. GFNA DATA 0LSCRA,0LSCRB,0LSCRC,0LSCRD,5LINPUT
  4097. DATA 0LSCRE,0LSCRF,0LSCRG
  4098.  
  4099. * FILES REQUIRING SPECIAL HANDLING.
  4100.  
  4101. GFNB CON 4LNULL+1
  4102. CON 6LOUTPUT+1
  4103. GFNBL EQU *-GFNB NUMBER OF SPECIAL NAMES
  4104. DATA 0 END MARKER
  4105. GLN SPACE 4,30
  4106. ** GLN - GET LINE NUMBER (ADVANCE TO IT).
  4107. *
  4108. * ENTRY (X1) = LINE NUMBER TO FIND.
  4109. * IF SIGN BIT SET, THEN ASSUMED CALLED FROM *MPR*
  4110. * WHICH IMPLIES-
  4111. * 1. THAT THE VERIFY FLAG IS ALREADY SET UP.
  4112. * 2. THAT X1 CONTAINS THE ABSOLUTE LINE POSITION.
  4113. * 3. THAT THE FILE IS ALREADY REWOUND IF NEEDED.
  4114. *
  4115. * EXIT (X6) = 0 IF LINE NUMBER FOUND.
  4116. *
  4117. * USES A - 1, 2, 6, 7.
  4118. * X - 1, 2, 3, 6, 7.
  4119. *
  4120. * CALLS RDF, TOP, WTF.
  4121. *
  4122. * ROUTINE WILL REWIND THE FILE IF THE LINE NUMBER LIES
  4123. * BEFORE THE CURRENT POINTER POSITION. IF THE USER
  4124. * IS IN *WHERE* MODE, THIS ROUTINE WILL POSITION
  4125. * THE FILE TO THE SPECIFIED LINE.
  4126. *
  4127. * NOTES UNLESS CALLED FROM *MPR*, THIS ROUTINE WILL
  4128. * AUTOMATICALLY CANCEL THE VERIFICATION OF EOR/EOF,S
  4129. * IF THE FILE NEEDS TO BE RESET. THIS IS DONE BY
  4130. * SHIFTING *VERIFY* RIGHT AND THEN CLEARING THE SIGN
  4131. * BIT (VERIFY OFF) - WHEN EXITING *GLN*, BIT 58 IS
  4132. * SHIFTED TO BIT 59 (RESTORING PREVIOUS VERIFICATION).
  4133. *
  4134.  
  4135.  
  4136. GLN9 SA1 VERIFY RESTORE OLD VERIFICATION STATUS
  4137. LX7 B1,X1
  4138. SA7 A1
  4139.  
  4140.  
  4141. GLN PS ENTRY/EXIT
  4142. MX6 1
  4143. BX6 -X6*X1 STRIP OFF SIGN BIT
  4144. MX7 0
  4145. SA6 GLNA SAVE LINE TO FIND
  4146. SA7 GLNB SAVE *NOT REWOUND* FLAG
  4147. ZR X6,GLN IF NO LINE NUMBER TO FIND
  4148. NG X1,GLN7 IF CALLED FROM *MPR*
  4149. SA2 VERIFY
  4150. AX2 60 EXTEND FLAG STATUS
  4151. BX6 X2
  4152. SA6 A2+
  4153. SA1 LNFLAG
  4154. PL X1,GLN7 IF PROCESSING AS IWHERE.
  4155. GLN1 SA1 E.LMOD
  4156. NZ X1,GLN3 IF LINE IS UNPACKED
  4157. SA1 E.LINE GET LINE NUMBER
  4158. BX6 X6-X6 CLEAR ASSEMBLY
  4159. MX7 -6 CHARACTER MASK
  4160.  
  4161. * ASSEMBLE LINE NUMBER FROM PACKED WORD.
  4162.  
  4163. GLN2 LX1 6
  4164. BX2 -X7*X1 GET CHARACTER
  4165. ZR X2,GLN5 IF END OF NUMBER
  4166. SX3 X2-1R9-1 NEGATIVE IF OK
  4167. SX2 X2-1R0 POSITIVE IF OK
  4168. BX1 X7*X1 REMOVE PRESENT CHARACTER
  4169. BX3 -X2*X3
  4170. PL X3,GLN5 IF CHARACTER IS NOT NUMBER
  4171. BX3 X6
  4172. LX6 2 *4
  4173. IX6 X6+X3 *5
  4174. LX6 1 *10
  4175. IX6 X6+X2 ADD NEW CHARACTER
  4176. EQ GLN2 ASSEMBLE NEXT CHARACTER
  4177.  
  4178. * ASSEMBLE LINE FROM STRING.
  4179.  
  4180. GLN3 SA1 E.STR
  4181. BX6 X6-X6 CLEAR ASSEMBLY
  4182. MX7 -10 CHARACTER COUNT
  4183. GLN4 NG X1,GLN5 IF END OF LINE
  4184. SX3 X2-1R9-1
  4185. SX2 X2-1R0
  4186. AX7 1 DECREMENT CHARACTER COUNT
  4187. BX3 -X2*X3 NEGATIVE IF NUMBER
  4188. PL X3,GLN5 IF NOT A NUMBER
  4189. BX3 X6
  4190. LX6 2 *4
  4191. IX6 X6+X3 *5
  4192. SA1 A1+B1 NEXT CHAR.
  4193. LX6 1
  4194. IX6 X6+X2 ADD NEXT NUMBER
  4195. NZ X7,GLN4 IF NOT 10 CHARACTERS
  4196.  
  4197. * CHECK TO SEE IF GOT LINE NUMBER.
  4198.  
  4199. GLN5 SA1 GLNA
  4200. IX6 X6-X1
  4201. PL X6,GLN6 IF ON OR PAST NUMBER
  4202. RJ WTF
  4203. RJ RDF
  4204. EQ GLN1 CHECK NEXT LINE
  4205.  
  4206. GLN6 ZR X6,GLN9 IF FOUND LINE NUMBER
  4207. SA2 GLNB
  4208. NZ X2,GLN9 IF RESET FILE AT LEAST ONCE
  4209. MX6 -1
  4210. SA6 A2
  4211. RJ TOP
  4212. SA1 VERIFY
  4213. MX6 1
  4214. BX6 -X6*X1 CLEAR EOR/EOF VERIFICATION
  4215. SA6 A1
  4216. EQ GLN1 SEARCH FROM TOP OF FILE
  4217.  
  4218. * IF REALLY IN *IWHERE* MODE.
  4219.  
  4220. GLN7 SA1 GLNA
  4221. SA2 IWHERE
  4222. IX6 X2-X1
  4223. PL X6,GLN8 IF AT OR PAST POSITION
  4224. RJ WTF
  4225. RJ RDF
  4226. EQ GLN7 GET NEXT LINE
  4227.  
  4228. GLN8 ZR X6,GLN9 IF FOUND
  4229. RJ TOP RESET AND RE-TRY
  4230. SA1 VERIFY
  4231. MX6 1
  4232. BX6 -X6*X1 CLEAR AUTO VERIFICATION
  4233. SA6 A1
  4234. EQ GLN7 GET NEXT LINE
  4235.  
  4236. GLNA DATA 0 LINE NUMBER TO FIND
  4237. GLNB DATA 0 RESET FILE FLAG
  4238. ICH SPACE 4,10
  4239. ** ICH - INITIALIZE CHARACTERS.
  4240. *
  4241. * ENTRY (A1) = FWA OF PARAMETER LIST.
  4242. * (X1) = FIRST WORD OF PARAMETERS.
  4243. *
  4244. * EXIT CHARACTERS LOADED INTO PROPER CELLS.
  4245. *
  4246. * USES A - 1, 2, 3, 6.
  4247. * X - 1, 2, 3, 6.
  4248. * B - 6, 7.
  4249.  
  4250.  
  4251. ICH1 SA2 CHARSFT OBTAIN SHIFT VALUE
  4252. SB6 X2
  4253. ICH2 SA2 X1 GET REPLACEMENT CHARACTER
  4254. UX1,B7 X1 GET SHIFT COUNT
  4255. AX2 B6
  4256. AX1 18
  4257. SX2 X2 REMOVE EXCESS CHARACTER
  4258. SA3 X1 WORD TO MODIFY
  4259. LX2 B7 SHIFT INTO POSITION
  4260. SA1 A1+B1
  4261. BX6 X3-X2 ADD CHARACTERS
  4262. SA6 A3
  4263. NZ X1,ICH2 IF MORE TO LIST
  4264.  
  4265. ICH PS ENTRY/EXIT
  4266. NZ X1,ICH1 IF THERE IS A TABLE
  4267. EQ ICH RETURN
  4268.  
  4269. IEM SPACE 4,15
  4270. ** IEM - ISSUE EXPLAIN ERROR MESSAGE.
  4271. *
  4272. * ENTRY (B2) = ERROR MESSAGE ORDINAL IN THE FOLLOWING FORMS -
  4273. * FORM 1 - 18/PRIMARY ORDINAL.
  4274. * FORM 2 - 13/PRIMARY ORDINAL,5/SECONDARY ORDINAL.
  4275. *
  4276. * EXIT (EXPLAIN) = UPDATED ERROR MESSAGE ENTRIES.
  4277. * MESSAGE ISSUED.
  4278. *
  4279. * USES A - 1, 4, 6.
  4280. * X - 1, 4, 6.
  4281. * B - 2.
  4282. *
  4283. * MACROS WRITEC.
  4284.  
  4285.  
  4286. IEM PS ENTRY/EXIT
  4287. SA1 EXPLAIN
  4288. SX4 B2
  4289. AX4 6
  4290. LX1 -12 SHIFT EXPLAIN WORD
  4291. NZ X4,IEM1 IF GOTTEN PRIMARY
  4292. SX4 B2
  4293. IEM1 PX6 B2,X1 PUT NEW EXPLAIN ENTRY
  4294. SA6 A1
  4295. SA4 MESSAGE+X4 GET MESSAGE STARTING ADDR
  4296. WRITEC OUTPUT,X4 ISSUE MESSAGE
  4297. EQ IEM RETURN
  4298.  
  4299. IFM SPACE 4,15
  4300. ** IFM - ISSUE FILE MESSAGE.
  4301. *
  4302. * ENTRY (X1) = FILE NAME TO USE (LOWER 18 CAN BE GARBAGE).
  4303. * (B2) = ERROR MESSAGE (SEE *IEM* FOR FORMATS).
  4304. *
  4305. * EXIT (EXPLAIN) = UPDATED EXPLAIN ERROR MESSAGE ENTRIES.
  4306. * MESSAGE ISSUED.
  4307. *
  4308. * USES A - 2, 3, 4, 6.
  4309. * X - 1, 2, 3, 4, 6, 7.
  4310. * B - 3.
  4311. *
  4312. * MACROS WRITEC.
  4313.  
  4314.  
  4315. IFM PS ENTRY/EXIT
  4316. SX4 B2
  4317. AX4 6
  4318. SA2 EXPLAIN
  4319. LX2 -12
  4320. NZ X4,IFM1 IF NOT LONGER FORM
  4321. SX4 B2
  4322. IFM1 SA3 MESSAGE+X4 GET MESSAGE POINTER
  4323. PX6 B2,X2
  4324. SA3 X3 GET FIRST WORD OF MESSAGE
  4325. MX7 6
  4326. BX7 X7*X3 GET UPPER CHARACTER
  4327. MX2 42
  4328. SA6 A2
  4329. SB3 60-12
  4330. ZR X7,IFM2 IF CHARACTER IS 00B (FIRST PART OF 0007B)
  4331. BX6 X7
  4332. LX7 2
  4333. SB3 60-6
  4334. BX7 X7*X6 NEGATIVE IF UPPER CHARACTER = 55B (BLANK)
  4335. NG X7,IFM2 IF BATCH STYLE MESSAGE
  4336. SB3 B0
  4337. IFM2 BX1 X2*X1 REMOVE LOWER 18 BITS
  4338. SX6 B1
  4339. SA4 =01010101010101010101B
  4340. IX6 X1-X6 SPACE FILL FILE NAME
  4341. BX6 X6-X1
  4342. AX6 6
  4343. BX6 X4*X6
  4344. BX7 X6
  4345. SA4 =10H
  4346. LX6 5
  4347. IX7 X6-X7
  4348. BX6 X6+X7
  4349. BX4 X6*X4 MASK BLANKS FOR LOWER BITS
  4350. LX7 B3,X2
  4351. BX3 -X7*X3 REMOVE EXISTING FILE NAME
  4352. BX4 X4*X2 REMOVE LOWER 18 BITS OF BLANKS
  4353. IX4 X4+X1 MERGE BLANKS WITH FILENAME
  4354. LX4 B3 POSITION NAME
  4355. BX6 X4+X3 MERGE INTO MESSAGE
  4356. SA6 A3
  4357. WRITEC OUTPUT,A6 ISSUE MESSAGE
  4358. EQ IFM RETURN
  4359.  
  4360. ITM SPACE 4,15
  4361. ** ITM - ISSUE TRUNCATION MESSAGE.
  4362. *
  4363. * ENTRY (IWHERE) = LINE POSITION.
  4364. *
  4365. * EXIT MESSAGE ISSUED.
  4366. *
  4367. * USES A - 1, 6.
  4368. * X - 1, 6.
  4369. * B - 2.
  4370. *
  4371. * CALLS CDD, IEM.
  4372.  
  4373.  
  4374. ITM PS ENTRY/EXIT
  4375. SA1 IWHERE
  4376. RJ CDD
  4377. SA1 MESSAGE+TRUNC.
  4378. MX6 -12
  4379. BX6 X6*X4 SET EOL BYTE
  4380. SB2 TRUNC.
  4381. SA6 X1+2 PLACE POSITION (CHANGE MESSAGE)
  4382. RJ IEM
  4383. EQ ITM RETURN
  4384.  
  4385. PCN SPACE 4,10
  4386. ** PCN - PRINT COLUMN NUMBERS.
  4387. *
  4388. * ENTRY NONE.
  4389. *
  4390. * EXIT COLUMN NUMBERS PRINTED.
  4391. *
  4392. * MACROS WRITEC.
  4393.  
  4394.  
  4395. PCN PS ENTRY/EXIT
  4396. WRITEC OUTPUT,PCNA
  4397. WRITEC X2,PCNB
  4398. EQ PCN RETURN
  4399.  
  4400. PCNA CON 3H 0,2H 1,2H 2,2H 3,2H 4,2H 5,2L 6
  4401. PCNB BSS 0
  4402. DATA H* 12345678901234567890123456789012345678*
  4403. DATA C*90123456789012345678901234567890*
  4404. PCNAL EQU *-PCNA
  4405. ERD SPACE 4,15
  4406. ** ERD - PROCESS END OF FILE READ.
  4407. *
  4408. * ENTRY AT *ERD*.
  4409. * AT *ERD1*.
  4410. * AT *ERD5*.
  4411. *
  4412. * EXIT TO *TOP*.
  4413. * TO *TOP1.1* IF IN LOOK MODE.
  4414. *
  4415. * USES A - 1, 2, 4, 6, 7.
  4416. * X - 2, 4, 6, 7.
  4417. * B - 6.
  4418. *
  4419. * CALLS RDF.
  4420. *
  4421. * MACROS READ, RECALL, REWIND, WRITER.
  4422.  
  4423.  
  4424. ERD PS ENTRY
  4425. SA1 *-1
  4426. MX7 0
  4427. BX6 X1 COPY ENTRY WORD TO EXIT WORD
  4428. SA7 DF NO MORE DELETES OF EOF-S
  4429. SA6 TOP EXIT WORD
  4430. SA7 DR NO MORE DELETES OF EOR-S
  4431. SA4 UPDATE
  4432. PL X4,TOP1.1 IF IN LOOK MODE
  4433.  
  4434. * ENTRY FROM *TOP*.
  4435.  
  4436. ERD1 SA2 RC
  4437. NZ X2,ERD2 IF NO DATA READ
  4438. WRITER E.OUT
  4439. ERD2 SA4 E.IN
  4440. LX4 59-9
  4441. PL X4,ERD9 IF EOI NOT SET
  4442. REWIND E.OUT
  4443. REWIND E.IN,RECALL
  4444. RECALL E.OUT
  4445. SA1 FS CHECK READ FILE NAME STATUS
  4446. NG X1,ERD4 IF NAME TOP1
  4447. SA4 E.OUT
  4448. SA1 ERDA
  4449. MX2 42
  4450. BX6 X4-X1
  4451. BX6 X2*X6 REMOVE UNWANTED
  4452. NZ X6,ERD3 IF NOT A MATCH
  4453. SA1 A1+1 GET OTHER SCRATCH NAME
  4454. ERD3 BX6 X1
  4455. MX7 60
  4456. SA6 E.IN
  4457. SA7 FS
  4458. REWIND A6,RECALL REWIND FILE TO BE WRITTEN ON
  4459. ERD4 SA1 E.OUT SWITCH FILE NAMES IN FETS
  4460. SA2 E.IN
  4461. BX6 X1
  4462. BX7 X2
  4463. SA6 A2
  4464. SA7 A1
  4465.  
  4466. * ENTRY FROM *TOP*.
  4467.  
  4468. ERD5 SA1 INDEX
  4469. SX6 B1 RESET *IWHERE*
  4470. MX7 60
  4471. SA6 IWHERE
  4472. SA7 NOMOD SET NO MODIFICATIONS
  4473. SX1 X1-.QUIT
  4474. ZR X1,ERD6 IF QUIT COMMAND
  4475. SX1 X1+.QUIT-.END
  4476. ZR X1,ERD6 IF END COMMAND
  4477. SX1 X1+.END-.FILE
  4478. NZ X1,ERD7 IF NOT FILE COMMAND
  4479. ERD6 RECALL E.IN
  4480. EQ TOP EXIT
  4481.  
  4482. ERD7 READ E.IN
  4483. MX6 1
  4484. SA6 RC SET *NO DATA READ* FLAG
  4485. SA1 INDEX
  4486. SB6 X1-.TOPNUL
  4487. ZR B6,ERD8 IF TOPNULL COMMAND
  4488. RJ RDF
  4489. EQ TOP EXIT
  4490.  
  4491. ERD8 SX6 2R
  4492. BX7 X7-X7
  4493. LX6 -12
  4494. SA7 E.LMOD SET NO LINE MODIFICATION
  4495. SA6 E.LINE SET BLANK LINE AS EXISTING
  4496. SA7 E.CMODE SET CURRENT MODE
  4497. EQ TOP EXIT
  4498.  
  4499. * XEDIT SHOULD NEVER JUMP TO HERE.
  4500.  
  4501. ERD9 SB6 =C* XEDIT INTERNAL ERROR (ERD). NOTIFY CONSULTANT.*
  4502. EQ ABT ABORT, EXIT
  4503.  
  4504. ERDA CON 0LSCRA+1
  4505. CON 0LSCRB+1
  4506. ERDB BSS 1
  4507. LOC SPACE 4,15
  4508. ** LOC - LOCATE STRING SPECIFIED.
  4509. *
  4510. * ENTRY (X3) = NUMBER OF CHARACTERS IN LINE.
  4511. * (X4) = EDIT LINE STARTING ADDRESS - 1.
  4512. * (X5) = FIRST CHARACTER OF EDIT LINE.
  4513. * (B4) = DESIRED STARTING ADDRESS - 1 FOR SEARCH
  4514. * (E.STR).
  4515. * (LOCA - LOCC) = PARAMETERS.
  4516. * (SPCP) = NEGATIVE IF WINDOW WAS SPECIFIED.
  4517. *
  4518. * EXIT (B4) = FWA OF MATCH (IN E.STR).
  4519. * (B5) = LWA +1 OF MATCH (IN E.STR).
  4520. * 0, IF STRING NOT FOUND.
  4521. *
  4522. * USES A- 1, 2, 3, 4, 7.
  4523. * X- 1, 2, 3, 4, 6, 7.
  4524. * B- 2, 3, 4, 5, 6, 7.
  4525. *
  4526. * CALLS LST.
  4527.  
  4528.  
  4529. LOC9 SB5 0 SET STRING NOT FOUND
  4530.  
  4531. LOC PS ENTRY/EXIT
  4532.  
  4533. * THERE ARE THREE OPTIONS, EACH SET BY CODE MODIFICATION.
  4534. * THE THREE WORDS ARE GIVEN BELOW.
  4535.  
  4536. LOC RMT
  4537.  
  4538. LOCD SB5 1 THERE ARE NO STRINGS
  4539. EQ LOC EXIT
  4540.  
  4541. LOCE SA4 LOCA NORMAL STRING SEARCH REQUIRED
  4542. SA3 E.STR-1
  4543. LOCF EQ LOC8 NULL STRING ROUTINE
  4544. - VFD *P/0 SPECIAL FLAG (SEE CHS)
  4545. RMT
  4546.  
  4547. BSSZ 1 ALLOCATE SPACE FOR WORD
  4548. SB7 X4+ LEFTMOST STARTING ADDRESS - 1
  4549. SB2 X3+E.STR ADDRESS OF END OF LINE
  4550. SA1 TRIM
  4551. SA2 SPCP
  4552. NG X1,LOC1.1 IF *TRIM* FLAG SET
  4553. PL X2,LOC1.1 IF WINDOW NOT SPECIFIED
  4554.  
  4555. * BLANK FILL LINE OUT TO THE SPECIFIED WINDOW.
  4556.  
  4557. SA2 RTWD SET TO RIGHT WINDOW MARGIN
  4558. ZR X2,LOC1.1 IF WINDOW NOT SPECIFIED
  4559. SB3 X3 SET TO LENGTH OF LINE
  4560. SB6 X2
  4561. GE B3,B6,LOC1.1 IF LINE IS LONGER THAN WINDOW
  4562. SB3 B6-B3
  4563. SB3 B2+B3
  4564. SX6 1R SET TO BLANK
  4565. LOC1 SA6 B2
  4566. SB2 B2+B1
  4567. NE B2,B3,LOC1 IF NOT FILLED TO RIGHT WINDOW
  4568. MX6 2 SET END OF LINE INDICATOR
  4569. SA6 B2
  4570. LOC1.1 SA2 A4+B1 1/TRIM,11/LENGTH,12/,18/COMPARE,18/R.MAR
  4571. AX4 18
  4572. GE B7,B4,LOC1.2 IF LEFT START = MAX(DESIRED,WINDOW)
  4573. SB7 B4
  4574. LOC1.2 UX6,B6 X2 STRING LENGTH, X6 = TRIM FLAG
  4575. SA1 B7 SET STARTING CHARACTER-1 (E.STR)
  4576. AX2 18
  4577. SB3 X6 RIGHT MARGIN (VIA WINDOW/ANCHOR)
  4578. PL X4,LOC2 IF NOT ANCHOR MODE
  4579. SB3 B3+B6 ADD LENGTH OF STRING
  4580. SB3 B3-B1 COMPENSATE FOR EXTRA WORD IN ADDITION
  4581. LOC2 SA2 X2 GET STARTING ADDR OF COMPARE STRING
  4582. GE B2,B3,LOC3 IF RIGHT MARGIN NOT PAST LINE WIDTH
  4583. SB3 B2 RESET TO LINE WIDTH
  4584. LOC3 LX7 X2
  4585. SA7 B2+B1 SET COMPARE (IMMEDIATELY AFTER EOL)
  4586. SB5 B5-B5 SET FAILURE
  4587. SX7 X4 PUT GLOBAL CHARACTER
  4588. ZR B6,LOC4 IF NO STRING
  4589. RJ LST LOCATE STRING
  4590. NZ B7,LOC IF STRING NOT FOUND (FAILURE)
  4591. SB4 A1 SET FIRST CHARACTER OF MATCH
  4592. SB5 A1+B6 SET LWA+1
  4593. SB7 B5-1
  4594. SX4 0 SET NO ANCHOR
  4595. LOC4 SA3 LOCC 1/TRIM,11/LENGTH,30/STARTING,18/MARGIN
  4596. UX6,B6 X3 (X3) = TRIM, (B6) = LENGTH
  4597. AX6 18
  4598. NG X4,LOC5 IF ANCHOR (AND NULL FIRST STRING)
  4599. SB3 X3+ RESET RIGHT MARGIN
  4600. LOC5 SA2 X6
  4601. GE B2,B3,LOC6 IF TO SET TO MINIMUM (MARGIN,LINE WIDTH)
  4602. SB3 B2
  4603. LOC6 ZR B6,LOC IF NO SECOND STRING
  4604. SX4 X7
  4605. LX7 X2
  4606. SA7 B2+B1 SET COMPARE AFTER END OF STRING
  4607. SX7 X4 RESTORE GLOBAL CHARACTER
  4608. SA1 B7+ SET POINTER FOR SECOND STRING
  4609. RJ LST
  4610. LX6 59-18
  4611. SB5 A1+B6 SET ENDING CHARACTER
  4612. NG X6,LOC7 IF NEGATIVE LOGIC
  4613. ZR B7,LOC IF POSITIVE AND FOUND IT
  4614. EQ LOC9 SET FAILURE
  4615.  
  4616. LOC7 NZ B7,LOC IF NEGATIVE AND NOT FOUND
  4617. EQ LOC9 STRING NOT FOUND
  4618.  
  4619. * SEARCHING FOR NULL STRING. FOUND ONLY WHEN AT
  4620. * THE BEGINNING OF A LINE/WINDOW (DEPENDING ON TRIM SET).
  4621.  
  4622. LOC8 SA4 LOCA
  4623. SB7 X4
  4624. SB5 X4+B1 SET LWA+1 OF SEARCH
  4625. SA2 TRIM
  4626. GT B4,B7,LOC9 IF STARTING PAST MINIMUM (FAIL)
  4627. SB4 X4+1 SET FWA OF MATCH
  4628. PL X2,LOC IF NOT TRIM (SUCCESSFUL)
  4629. MX2 2 CHECK FOR EOL
  4630. BX2 X2-X5
  4631. ZR X2,LOC9 IF NOT EOL
  4632. SA1 E.STR-1 GET LINE WIDTH
  4633. SB3 X1+E.STR
  4634. GE B7,B3,LOC9 IF PAST LAST NON-BLANK (FAIL)
  4635. EQ LOC RETURN
  4636.  
  4637. LOC HEREL ASSEMBLE ENTRY OPTIONS
  4638.  
  4639. ** LOCA - LOCC - LOCATE DEFINITION CELLS.
  4640. *
  4641. * FORMAT FOR THE THREE WORDS IS-
  4642. *
  4643. * 1/A,11/ ,12/,18,GLOBAL ,18/L.MARGIN.
  4644. * 1,T,11/L,12/,18,COMPARE ,18/R.MARGIN.
  4645. * 1/T,11/L,12/,18,COMPARE ,18/R.MARGIN.
  4646. *
  4647. * WHERE-
  4648. * *A* = 1 IF ANCHOR IS SET.
  4649. * *T* = 1 IF TRIM SET (ALL CHARS IN STRING SIGNIFICANT).
  4650. * *L* = LENGTH OF ASSOCIATED STRING.
  4651. * *GLOBAL* = THE CHARACTER THAT MATCHES ALL.
  4652. * *COMPARE* = FWA IF ASSOCIATED STRING (IN COMMAND).
  4653. * *RMARGIN* = ADDRESS OF LEFTMOST POSSIBLE STARTING
  4654. * CHARACTER-1.
  4655. * *L.MARGIN* = ADDRESS OF RIGHTMOST POSSIBLE ENDING
  4656. * CHARACTER+1.
  4657.  
  4658. LOCA BSSZ 1 LOCATE ENVIRONMENT WORD
  4659. LOCB BSSZ 1 FIELD ONE DEFINITION
  4660. LOCC BSSZ 1 FIELD TWO DEFINITION
  4661. LST SPACE 4,20
  4662. ** LST - LOCATE STRING IN EDIT LINE.
  4663. *
  4664. * ENTRY (A1) = FWA-1 OF START OF SCAN IN EDIT LINE.
  4665. * (A2) = FWA OF COMPARE STRING IN COMMAND LINE.
  4666. * (X2) = FIRST WORD OF STRING IN COMMAND LINE.
  4667. * (X6) = NEGATIVE IF TRAILING GLOBAL/BLANKS ARE
  4668. * IMPORTANT.
  4669. * (X7) = GLOBAL CHARACTER (MUST NOT BE MASK OF 2).
  4670. * (B3) = LWA+1 AVAILABLE FOR SCANNING (USUALLY EOL).
  4671. * (B6) = LENGTH OF COMPARE STRING.
  4672. * ASSUMES THAT THE FIRST CHARACTER OF THE COMPARE
  4673. * STRING HAS BEEN PLACED AT EOL+1.
  4674. *
  4675. * EXIT (A1) = FWA OF POSSIBLE MATCH.
  4676. * (B6) = LENGTH-1 OF POSSIBLE MATCH.
  4677. * (B7) = 0, IF MATCH.
  4678. * IF (A1)+1 .GE. (B3) AT ENTRY, THEN IF THE COMPARE
  4679. * STRING IS BLANK/GLOBAL AND TRIM IS OFF, THEN THE
  4680. * RESPONSE IS -
  4681. * (B7) = 0 (SUCCESSFUL MATCH).
  4682. * (A1) = (A1) AT ENTRY.
  4683. * (B6) = 0.
  4684. *
  4685. * USES A - 1, 3, 4.
  4686. * X - 1, 3, 4.
  4687. * B - 6, 7.
  4688.  
  4689.  
  4690. LST4 SA1 A1+B1 MOVE START OF STRING POINTER
  4691. BX3 X1-X2
  4692. ZR X3,LST6 IF MATCH
  4693. IX3 X2-X7
  4694. ZR X3,LST6 IF FIRST COMPARE IS GLOBAL
  4695. LST5 SA1 A1+B1 MOVE START OF STRING POINTER
  4696. IX3 X1-X2
  4697. NZ X3,LST5 IF NOT A MATCH
  4698. LST6 SB7 A1-B3 DETERMINE LENGTH OF EDIT LEFT
  4699. SB7 -B7
  4700. LT B7,B6,LST8 IF NOT ENOUGH SPACE LEFT FOR MATCH
  4701. SB7 B6-1
  4702. LST7 ZR B7,LST IF END OF STRING (MATCH)
  4703. SA3 A1+B7
  4704. SA4 A2+B7
  4705. SB7 B7-B1
  4706. IX3 X3-X4
  4707. ZR X3,LST7 IF MATCH (TRY NEXT)
  4708. NG X7,LST4 IF GLOBAL NOT USED (IN STACK)
  4709. IX4 X4-X7
  4710. ZR X4,LST7 IF COMPARE IS GLOBAL
  4711. EQ LST4 CONTINUE
  4712.  
  4713. LST8 NG X6,LST2 IF TRAILING CHARACTERS SIGNIFICANT
  4714. SX4 B7-1
  4715. NG X4,LST3 IF PAST LWA AVAILABLE
  4716. SB6 B6-B1 DECREASE COMPARE STRING
  4717. SA4 A2+B6
  4718. SX3 X4-1R
  4719. ZR X3,LST6 IF LAST COMPARE IS BLANK (REMOVE IT)
  4720. IX3 X4-X7
  4721. ZR X3,LST6 IF LAST COMPARE IS GLOBAL (REMOVE IT)
  4722. LST PS ENTRY/EXIT
  4723.  
  4724. SB7 A1-B3 CHECK A1 VS B3
  4725. SB7 B7+B1
  4726. LT B7,LST4 IF STARTING NOT PAST LAST CHARACTER
  4727. NG X6,LST2 IF TRIM (FAILURE)
  4728. SA1 A1+B1 CHANGE POINTER
  4729. SB7 B0 SET SUCCESSFUL
  4730. LST1 LE B6,LST IF COMPARE IS ALL BLANKS/GLOBAL
  4731. SB6 B6-B1
  4732. SA4 A2+B6
  4733. SX3 X4-1R
  4734. ZR X3,LST1 IF COMPARE IS BLANK
  4735. IX3 X4-X7
  4736. ZR X3,LST1 IF COMPARE IS GLOBAL
  4737. LST2 SB7 B1 SET STRING NOT FOUND
  4738. EQ LST BEGIN SCANNING
  4739.  
  4740. LST3 SA1 B3-B1
  4741. EQ LST+1 RESTART SCAN AT END OF LINE
  4742.  
  4743. MDY SPACE 4,15
  4744. ** MDY - PROCESS MODIFY DIRECTIVES.
  4745. *
  4746. * ENTRY (E.STR) = ORIGINAL LINE (UNPACKED).
  4747. * (D.STR) = DIRECTIVES LINE (UNPACKED).
  4748. *
  4749. * EXIT (B3) = NEGATIVE, IF TRUNCATION ENCOUNTERED.
  4750. * (E.STR) = NEW TEXT LINE.
  4751. *
  4752. * USES A - 1, 2, 6.
  4753. * X - 1, 2, 6, 7.
  4754. * B - 2, 3, 4, 6.
  4755. * E.SCR.
  4756. *
  4757. * CALLS TSL.
  4758.  
  4759.  
  4760. MDY5 SX6 1R SET BLANK CHARACTER
  4761. MDY6 GT B3,B4,MDY1 IF AT END OF BUFFER
  4762. SA6 B3
  4763. SB3 B3+B1 SET TO NEXT PLACE TO SAVE
  4764. MDY7 SA2 A2+B2 GET NEXT *E.STR* CHARACTER
  4765. NO
  4766. PL X2,MDY8 IF NOT AT END OF LINE
  4767. SX6 1R
  4768. SB2 B0 SET TO NOT ESCAPE END OF LIE
  4769. BX2 X2+X6 GET END LINE (WITH BLANK)
  4770. MDY8 SA1 A1+B1 GET NEXT DIRECTIVES CHARACTER
  4771. SX6 X2 MOVE CURRENT TEXT CHAR
  4772. SX7 X1-1R
  4773. ZR X7,MDY6 IF SPACE DIRECTIVE
  4774. NG X1,MDY16 IF END OF DIRECTIVE LINE
  4775. CHAR (SX7 X1-0),SH.
  4776. ZR X7,MDY7 IF SHARP (DELETE TEXT CHAR)
  4777. CHAR (SX7 X1-0),AM.
  4778. ZR X7,MDY5 IF AMPERSAND (SET TEXT TO BLANK)
  4779. BX6 X1
  4780. SB6 X1+B5 B5 = -UP ARROW
  4781. NZ B6,MDY6 IF CHARACTER (REPLACE TEXT)
  4782. MDY9 SA1 A1+B1 GET NEXT DIRECTIVES
  4783. CHAR (SX3 X1-0),SH.
  4784. BX6 X1
  4785. SX7 B6+B1 SET NUMBER OF CHARACTERS SCANNED
  4786. NG X1,MDY10 IF END OF DIRECTIVES
  4787. SB6 B6+B1 INCREMENT COUNT OF CHARACTERS SCANNED
  4788. ZR X3,MDY11 IF SHARP
  4789. GT B3,B4,MDY2 IF PAST 160 CHARACTERS
  4790. SA6 B3
  4791. SB3 B3+B1
  4792. EQ MDY9 LOOP
  4793.  
  4794. MDY10 SX6 1R
  4795. NZ B6,MDY14 IF SOMETHING WAS AFTER THE UPARROW
  4796. SX7 X7+B1 INCREMENT CHARACTER COUNT
  4797. SA2 A2-B2 RESET CHARACTER POINTER
  4798. EQ MDY12 ELSE INSERT ONE SPACE
  4799.  
  4800. MDY11 SX7 B6+B1
  4801. NE B6,B1,MDY14 IF NOT (UP ARROW)(SHARP)
  4802. SX7 B1 RESET COPY COUNTER
  4803. MDY12 GT B3,B4,MDY4 IF POSSIBLE TRUNCATION
  4804. SA6 B3
  4805. SB3 B3+B1
  4806. MDY13 SA2 A2+B2 GET NEXT E.STR CHARACTER
  4807. PL X2,MDY14 IF NOT END OF LINE
  4808. SB2 B0
  4809. SX6 1R
  4810. BX2 X2+X6
  4811. MDY14 SX6 X2
  4812. SX7 X7-1
  4813. MDY15 PL X7,MDY12 IF MORE TO MOVE
  4814. PL X1,MDY8 IF MORE DIRECTIVES
  4815.  
  4816. * END OF DIRECTIVES, COPY REST OF TEXT.
  4817.  
  4818. MDY16 NG X2,MDY19 IF END OF TEXT
  4819. GT B3,B4,MDY3 IF END OF BUFFER
  4820. SX6 X2+
  4821. SA6 B3
  4822. SB3 B3+B1
  4823. MDY17 SA2 A2+B1 GET NEXT TEXT
  4824. SX6 X2
  4825. EQ MDY16 CONTINUE COPY
  4826.  
  4827. * SET TRUNCATION FLAG AND CLEANUP.
  4828.  
  4829. MDY18 SB2 -1
  4830.  
  4831. * SET END OF LINE AND COPY BACK TO *E.STR*.
  4832.  
  4833. MDY19 MX6 2
  4834. NO
  4835. SA6 B3+ SA6/SA1 *MUST* BE IN THIS ORDER
  4836. SB6 E.STR
  4837. SA1 E.SCR
  4838. MDY20 BX6 X1
  4839. SB6 B6+B1
  4840. SA1 A1+B1
  4841. SA6 B6-B1
  4842. PL X6,MDY20 IF NOT FINISHED
  4843. SB6 E.STR-1 SET LINE WIDTH CELL
  4844. SB3 B2 MOVE TRUNCATION FLAG
  4845. RJ TSL TRIM ANY TRAILING SPACES
  4846. MDY PS ENTRY/EXIT
  4847.  
  4848. CHAR (SB5 -0),UA.
  4849. SB2 B1 SET NOT AT END OF TEXT LINE
  4850. SB3 E.SCR SET NEXT SAVE CHAR ADDR
  4851. SB4 E.SCR+159 SET LWA
  4852. SA1 D.STR-1
  4853. SA2 E.STR-1
  4854. EQ MDY7 BEGIN LOOP
  4855.  
  4856. * HANDLE SPECIAL CASES OF FULL BUFFER, ADDING CHARACTERS.
  4857.  
  4858. MDY1 SX7 X6-1R
  4859. ZR X7,MDY7 IF SPACE (NO TRUNCATION)
  4860. EQ MDY18 TRUNCATE
  4861.  
  4862.  
  4863. MDY2 SX7 X6-1R
  4864. ZR X7,MDY9 IF SPACE (NO TRUNCATION)
  4865. EQ MDY18 TRUNCATE
  4866.  
  4867. MDY3 SX7 X6-1R
  4868. ZR X7,MDY17 IF SPACE (NO TRUNCATION)
  4869. EQ MDY18 TRUNCATE
  4870.  
  4871. MDY4 SX7 X6-1R
  4872. ZR X7,MDY13 IF SPACE (NO TRUNCATION)
  4873. EQ MDY18 TRUNCATE
  4874.  
  4875. MPR SPACE 4,15
  4876. ** MPR - MOVE POINTER.
  4877. *
  4878. * ENTRY (X1) = NUMBER OF LINES TO MOVE.
  4879. *
  4880. * EXIT IF (X1) IS NEGATIVE AT ENTRY, THE FILE IS REWOUND.
  4881. *
  4882. * USES A - 1, 3, 4, 6, 7.
  4883. * X - 1, 2, 3, 4, 6, 7.
  4884. *
  4885. * CALLS GLN, TOP.
  4886. *
  4887. * NOTES IF (X1) = -0 AT ENTRY, THIS ROUTINE WILL FORCE A COPY
  4888. * TO THE NEXT SCRATCH FILE AND RETURN THE POINTER
  4889. * TO THE CURRENT POINTER POSITION.
  4890.  
  4891.  
  4892. MPR1 SA1 GLNA RETRIEVE DESIRED LINE FROM HOLDING
  4893. RJ GLN ADVANCE TO LINE
  4894. MPR PS ENTRY/EXIT
  4895.  
  4896. SA3 IWHERE
  4897. SA4 VERIFY
  4898. MX2 1
  4899. IX6 X3+X1 GET DESIRED *IWHERE* VALUE
  4900. BX7 X2*X1 GET DIRECTION OF MOVE
  4901. SX3 B1
  4902. IX3 X6-X3
  4903. PL X3,MPR0 IF MOVING TO A LEGAL POSITION
  4904. SX6 B1 SET DESIRED TO 1
  4905. MPR0 IX6 X6+X2 SET SIGN BIT (*MPR* FLAG)
  4906. AX4 60 EXTEND STATUS OF VERIFY
  4907. SA6 GLNA HOLD DESIRED POSITION
  4908. BX7 -X7*X4 SET TEMPORARY VERIFICATION STATUS
  4909. SA7 A4 RESET VERIFICATION FLAG
  4910. PL X1,MPR1 IF FORWARD MOTION
  4911. RJ TOP
  4912. EQ MPR1 MOVE TO DESIRED POSITION
  4913. RDF SPACE 4,30
  4914. ** RDF - READ EDIT FILE LINE.
  4915. *
  4916. * ENTRY LINE CONTROL (*E.NMODE*, ETC) SET.
  4917. *
  4918. * EXIT LINE READ INTO *E,LINE*.
  4919. * IF *E.NMODE* = ASCII, THEN THE LINE IS UNPACKED
  4920. * TO *E.STR*.
  4921. * THIS ROUTINE USUALLY EXITS NORMALLY. IF THE ROUTINE
  4922. * ENCOUNTERS THE END OF INFORMATION, THE ROUTINE EXITS
  4923. * TO *NCM*, UNLESS PRESETTING, THEN TO *RDF2*.
  4924. * IF IN CREATION MODE, THIS ROUTINE RETURNS WITHOUT
  4925. * READING.
  4926. *
  4927. * USES A - 1, 2, 3, 4, 6, 7.
  4928. * X - 1, 2, 3, 4, 6, 7.
  4929. * B - 2, 4, 6, 7.
  4930. *
  4931. * CALLS CIO=, ERO, RTB, STL, UPL, VIS.
  4932. *
  4933. * MACROS READ, READC, WRITEC.
  4934. *
  4935. * NOTES FILE MARKS WILL BE RETAINED ACROSS THE FILE UNLESS
  4936. * THE CORRESPONDING COUNTER IS SET (DF/DR).
  4937. * IN ADDITION, IF IN VERIFY MODE (AND TOGGLE SET), THE
  4938. * MESSAGE --EOR--/--EOF-- WILL BE PRINTED.
  4939. * AFTER EACH TEXT LINE IS READ, *TLX* (TELEX INTERRUPT)
  4940. * IS CHECKED. IF SET, ROUTINE EXITS TO *NCM*.
  4941.  
  4942.  
  4943. RDF11 SA1 TLX
  4944. ZR X1,RDF IF NO INTERRUPT
  4945. RJ STL PROCESS INTERRUPT
  4946. RDF PS ENTRY/EXIT
  4947.  
  4948. * FIRST WORD OF ROUTINE IS REPLACED WHEN OUT
  4949. * OF CREATION MODE.
  4950.  
  4951. SA1 IWHERE PREPARE FOR CREATION MODE CHECK
  4952. EQ RDF1 CHECK CREATION MODE
  4953.  
  4954. RDF RMT NORMAL CODE FOLLOWS
  4955. SB0 0 TEMPORARY
  4956. SB0 0
  4957. RMT
  4958.  
  4959. READC E.IN,E.LINE,33D
  4960. SB4 X1+B1
  4961. NG B4,RDF9 IF AT EOI
  4962.  
  4963. * WORD IS REPLACED IF TO VERIFY EOR/EOF.
  4964.  
  4965. RDFA NE B4,B1,RDF3 IF EOR/EOF
  4966. SB7 E.LINE
  4967. RJ RTB TRIM OFF TRAILING BLANKS
  4968. SA1 E.NMODE GET NEEDED MODE
  4969. MX6 0
  4970. SA3 IW
  4971. SA6 A1+B1 SET CURRENT MODE TO CODED
  4972. SA6 A6+B1 SET NO MODIFICATIONS
  4973. SA6 RC SET DATA READ
  4974. ZR X1,RDF11 IF CODED MODE DESIRED
  4975. SA1 E.LINE CONVERT TO ASCII
  4976. SB6 E.STR
  4977. RJ UPL
  4978. SA6 E.STR-1 SET NUMBER OF CHARS IN LINE
  4979. SX7 B1 SET CURRENT MODE TO ASCII
  4980. SA7 E.CMODE SET CURRENT MODE OF LINE
  4981. EQ RDF11 CHECK FOR INTERRUPT
  4982.  
  4983. * CREATION MODE CHECK.
  4984.  
  4985. RDF1 NG X1,RDF IF IN CREATION MODE
  4986. SA2 INITZ
  4987. ZR X2,RDF2 IF INITIALIZING (CREATION MODE POSSIBLE)
  4988. SA1 RDFG CHANGE INSTRUCTIONS
  4989. BX6 X1
  4990. SA6 RDF+1 CHANGE CREATION MODE CHECKER
  4991. RJ VIS VOID INSTRUCTION STACK
  4992. RDF2 BSS 0
  4993. RDFG BSS 0
  4994. RDF HEREL
  4995. JP RDF+2 CONTINUE PROCESSING
  4996.  
  4997. * EOF/EOR ENCOUNTERED.
  4998.  
  4999. RDF3 SB7 B6-E.LINE
  5000. NZ B7,BTL IF ENCOUNTERED NON-TEXT LINE
  5001. ZR B4,RDF3.1 IF EOF
  5002. SB4 B1+ SET (B4) = EOR TYPE
  5003. RDF3.1 SA1 ITOGGLF+B4
  5004. SA2 VERIFY
  5005. BX6 X1*X2
  5006. PL X6,RDF4 IF NO VERIFICATION
  5007. SA3 RDFE
  5008. SX6 B4
  5009. BX7 X3
  5010. SA7 RDFA RESET CODE AT RDFA
  5011. SA6 RDFB
  5012. RJ VIS VOID INSTRUCTION STACK
  5013. RDF4 SA4 UPDATE
  5014. PL X4,RDF6 IF IN LOOK MODE
  5015. SA3 DF+B4 DELETION COUNT
  5016. SA4 RDFC+B4
  5017. ZR X3,RDF5 IF NOT DELETING RECORD MARK
  5018. SX6 B1+
  5019. IX6 X3-X6
  5020. SA6 A3 REPLACE COUNTER
  5021. EQ RDF6 READ, DELETE RECORD MARK
  5022.  
  5023. RDF5 SX2 E.OUT
  5024. MX6 1
  5025. BX7 -X4 SET FUNCTION AND AUTO-RECALL
  5026. SA6 RC SET NO DATA READ
  5027. RJ CIO=
  5028. RDF6 READ E.IN
  5029. EQ RDF2 RESTART ROUTINE
  5030.  
  5031. * VERIFY EOR/EOF.
  5032.  
  5033. RDF7 SA1 RDFB
  5034. MX6 1
  5035. SX7 B4
  5036. PX7 B6,X7
  5037. SA7 RDFD SAVE B4
  5038. NG X1,RDF8 IF NOTHING TO VERIFY
  5039. SB4 EOF.+X1
  5040. SA3 EXPLAIN
  5041. SA4 MESSAGE+B4 GET MESSAGE POINTER
  5042. AX3 12
  5043. SA6 A1 CLEAR MESSAGE FLAG
  5044. PX7 B4,X3
  5045. SA7 A3 REPLACE EXPLAIN WORD
  5046. WRITEC OUTPUT,X4
  5047. RDF8 SA1 RDFF RESET INSTRUCTION WORD
  5048. SA2 RDFD RETRIEVE STATUS OF B4
  5049. BX6 X1
  5050. SB4 X2
  5051. UX2,B6 X2 RETRIEVE *B6*
  5052. SA6 RDFA
  5053. RJ VIS VOID INSTRUCTION STACK
  5054. JP RDFA CONTINUE AND VOID STACK
  5055.  
  5056. * EOI ENCOUNTERED.
  5057.  
  5058. RDF9 BX6 X6-X6
  5059. MX7 1
  5060. SA6 DF DELETE NO MORE EOF,S
  5061. SA7 RDFB SET NO VERIFICATION NECESSARY
  5062. SA6 DR DELETE NO MORE EOR,S
  5063. SA1 INITZ
  5064. ZR X1,/PRESET/PRF1 IF PRESETTING XEDIT
  5065. SA4 EXPLAIN
  5066. SB2 EOI.
  5067. AX4 12
  5068. SA3 MESSAGE+B2
  5069. PX6 B2,X4
  5070. SA6 A4
  5071. WRITEC OUTPUT,X3 ISSUE *END OF FILE* MESSAGE
  5072. SA1 IWHERE
  5073. AX1 1 ZERO IF CREATION MODE OR IWHERE = 1
  5074. ZR X1,RDF10 IF NO FILE
  5075. RJ ERD PROCESS END OF FILE
  5076. EQ NCM EXIT
  5077.  
  5078. * EOI AND NOTHING IN FILE.
  5079.  
  5080. RDF10 SB6 =C* YOU DELETED THE ENTIRE FILE.*
  5081. EQ ABT ABORT XEDIT
  5082.  
  5083. RDFB DATA -1 EOF/EOR ENCOUNTERED (LEVEL NUMBER)
  5084. RDFC CON 34B,24B CIO CODES FOR WRITEF/WRITER
  5085. RDFD BSSZ 1 STORAGE FOR B4 WHEN VERIFYING
  5086. RDFE EQ RDF7 CODE TO CAUSE EOR/EOF MESSAGE ON RE-ENTRY
  5087. RDFF NE B4,B1,RDF3 IF EOR/EOF (EXACT IMAGE OF *RDFA*)
  5088. SB7 E.LINE
  5089. RDL SPACE 4,30
  5090. * RDL - READ DATA LINE INTO *D.LINE*.
  5091. *
  5092. * ENTRY NONE.
  5093. *
  5094. * EXIT (X1) = READC X1 REGESTER CONVENTION AS FOLLOWS -
  5095. * (X1) = 0 FOR TRANSFER COMPLETE.
  5096. * (X1) = -1 IF EOF DETECTED ON FILE.
  5097. * (X1) = -2 IF EOI DETECTED ON FILE.
  5098. * (X1) = ADDRESS PLUS ONE OF LAST WORD TRANSFERED TO
  5099. * WORKING BUFFER, IF EOR WAS DETECTED ON FILE
  5100. * BEFORE TRANSFER WAS COMPLETE.
  5101. * IF (X1) .NE. 0, THEN *D.LINE* IS NOT CHANGED.
  5102. * TO *ABT* IF FATAL ERROR.
  5103. * IF (X1) = 0, THEN THE FOLLOWING IS ALSO DONE -
  5104. * IF *E.NMODE* = 1 (ASCII), THEN THE DATA LINE IS
  5105. * UNPACKED TO *D.STR*, AND THE DATA LINE WIDTH IS
  5106. * ENTERED INTO *D.STR*.
  5107. *
  5108. * USES A - 1, 2, 3, 4, 6, 7.
  5109. * X - 1, 2, 3, 4, 6, 7.
  5110. * B - 2, 3, 5, 6, 7.
  5111. *
  5112. * CALLS NDL, RTB, RTOA, UPL.
  5113. *
  5114. * MACROS READ, READC.
  5115.  
  5116.  
  5117. RDL8 SX7 2R SET BLANK LINE AS LINE
  5118. LX7 -12
  5119. SA7 D.LINE
  5120. RDL9 SA2 A2
  5121. PX6 B0,X2
  5122. SA6 A2 *C.STR*-1
  5123. MX1 0 SET SUCCESSFUL READ
  5124.  
  5125. * CHECK DESIRED MODE OF LINE.
  5126.  
  5127. RDL10 SA2 E.NMODE
  5128. ZR X2,RDL IF CODED
  5129. SA1 D.LINE
  5130. SB6 D.STR
  5131. RJ UPL UNPACK DATA LINE
  5132. MX1 0 SET SUCCESSFUL READ
  5133. SA6 D.STR-1 SET LENGTH
  5134.  
  5135. RDL PS ENTRY/EXIT
  5136. SA1 PREFIX
  5137. SA2 C.STR-1
  5138. LX1 59-/PREFIX/PLUS
  5139. UX3 B3,X2
  5140. .CYB IF DEF,CYBRNET
  5141. PL X1,RDL4 IF + PREFIX GET DATA FROM COMMAND
  5142. .CYB ELSE
  5143. NG X1,RDL4 IF + PREFIX (READ REQUIRED)
  5144. .CYB ENDIF
  5145. LE B3,RDL3 IF POINTER FLAG IS READ
  5146. SA4 A2+B3 GET NEXT CHARACTER FROM COMMAND LINE
  5147. SB4 X2 DELIMITER
  5148. NG X4,RDL8 IF AT END OF LINE
  5149. SB6 A2+B3 GET FIRST CHARACTER
  5150. SB7 D.LINE SET DESTINATION FOR RTOA
  5151. RDL1 SB5 X4
  5152. EQ B5,B4,RDL2 IF FOUND DELIMITER
  5153. SB3 B3+B1
  5154. SA4 A2+B3 GET NEXT CHARACTER
  5155. PL X4,RDL1 IF NOT AT END OF LINE
  5156. SB3 -B1 SET POSITION
  5157. RDL2 MX6 1
  5158. SB2 A4 SET END OF DATA LINE ADDRESS
  5159. BX6 X6+X4
  5160. SB3 B3+B1 SET NEXT AVAILABLE CHARACTER
  5161. SA6 A4 SET PSEUDO END OF LINE
  5162. PX7 B3,X2
  5163. SA7 A2 REPLACE CHARACTER POINTER
  5164. RJ RTOA PACK DATA LINE TO D.LINE
  5165. ZR B3,RDL9 IF AT REAL END OF LINE
  5166. SA2 B2
  5167. MX1 0 SET READ SUCCESSFUL
  5168. SX6 X2 CLEAR PSEUDO END LINE
  5169. SA6 A2
  5170. EQ RDL10 CHECK MODE OF LINE
  5171.  
  5172. * READ REQUIRED FROM COMMAND LINE SOURCE.
  5173.  
  5174. RDL3 RJ NDL
  5175. ZR X1,RDL+1 IF NOT <CR>, RETRY READ
  5176. EQ RDL ELSE RETURN
  5177.  
  5178. * READ REQUIRED FROM PRIMARY INPUT SOURCE.
  5179.  
  5180. RDL4 SA1 NCLA
  5181. SA3 TTYIN
  5182. BX6 X1+X3
  5183. SA6 A1 REPLACE READ REQ,D FLAG
  5184. NZ X1,RDL6 IF READ NOT NEEDED
  5185. RDL5 READ INPUT,RECALL
  5186. RDL6 READC INPUT,D.LINE,33D READ DATA
  5187. ZR X1,RDL7 IF SUCCESSFUL
  5188. SA2 TTYIN
  5189. SB6 =C* BATCH MODE ABORT. END OF RECORD ENCOUNTERED.*
  5190. SA3 TLX
  5191. MX6 0
  5192. SA6 A3 CLEAR INTERRUPT STATUS
  5193. NZ X2,ABT IF NOT *TTY* INPUT FILE
  5194. NZ X3,RDL5 IF INTERRUPTED
  5195. EQ RDL RETURN
  5196.  
  5197. RDL7 SB7 D.LINE
  5198. RJ RTB TRIM TRAILING BLANKS
  5199. BX7 X7-X7
  5200. MX1 0 SET SUCCESSFUL READ
  5201. SA7 TLX IGNORE INTERRUPTS
  5202. EQ RDL10 CHECK MODE OF LINE
  5203.  
  5204. RTA SPACE 4,10
  5205. ** RTA - CONVERT 160K1 TO C FORMAT (MAX 33 WORDS).
  5206. *
  5207. * ENTRY (B6) = INCOMING STRING ADDRESS.
  5208. * (B7) = OUTGOING STRING ADDRESS.
  5209. *
  5210. * EXIT STRING IS CONVERTED.
  5211. *
  5212. * USES A - 1, 6.
  5213. * X - 1, 2, 6, 7.
  5214. * B - 4, 6, 7.
  5215.  
  5216.  
  5217. RTA PS ENTRY/EXIT
  5218. RTOA EQU RTA
  5219. SB4 6 SHIFT VALUE
  5220. BX6 X6-X6 CLEAR ASSEMBLY
  5221. MX7 1 POSITION INDICATOR
  5222. SX1 B0+ INITIALIZE FOR POSSIBLE BLANK LINE
  5223. EQ RTA2 BEGIN CONVERSION
  5224.  
  5225. RTA1 LX7 6 SHIFT POSITION
  5226. BX6 X6+X1 MERGE CHARACTERS
  5227. PL X7,RTA2 IF NOT FULL WORD
  5228. SA6 B7
  5229. SB7 B7+1
  5230. BX6 X6-X6 CLEAR ASSEMBLY
  5231. RTA2 BX2 X1
  5232. SA1 B6 GET NEXT CHARACTER
  5233. NG X1,RTA4 IF END OF BUFFER REACHED
  5234. RTA3 LX6 6
  5235. SB6 B6+1
  5236. AX2 B4,X1
  5237. ZR X2,RTA1 IF NO ASCII ESCAPE CHARACTER
  5238. LX7 6
  5239. LX6 6
  5240. PL X7,RTA1 IF ASCII CAN FIT INTO THIS WORD
  5241. LX6 -6 SHIFT ASSEMBLY BACK
  5242. LX1 -7
  5243. BX6 X6+X2
  5244. LX7 6
  5245. AX1 60-7 REMOVE ASCII ESCAPE
  5246. SA6 B7 SAVE WORD
  5247. SB7 B7+B1
  5248. BX6 X1
  5249. EQ RTA2 LOOP, PROCESS NEXT WORD
  5250.  
  5251. RTA4 SB6 B6-1 RESET CHARACTER POINTER
  5252. ZR X2,RTA6 IF LAST CHARACTER WAS A COLON
  5253. RTA5 SA1 =40004000400040004000B
  5254. SA6 B7
  5255. BX2 X1*X7
  5256. NZ X2,RTA7 IF ON BYTE BOUNDRY
  5257.  
  5258. RTA6 SX1 1R
  5259. EQ RTA3 BLANK FILL TO BYTE BOUNDARY
  5260.  
  5261. RTA7 NG X7,RTA IF WORD IS FULL, RETURN
  5262. RTA8 LX7 12
  5263. LX6 12
  5264. PL X7,RTA8 IF NOT LEFT JUSTIFIED
  5265. SA6 B7
  5266. ZR X6,RTA IF ASSURE A ZERO WORD, RETURN
  5267. BX6 X6-X6
  5268. SA6 A6+B1
  5269. EQ RTA RETURN
  5270. RTB SPACE 4,15
  5271. ** RTB - REMOVE TRAILING BLANKS FROM A CODED LINE.
  5272. *
  5273. * ENTRY (B6) = LWA+1 OF CODED LINE.
  5274. * (B7) = FWA OF CODED LINE.
  5275. *
  5276. * EXIT UNSIGNIFICANT BLANKS REMOVED FROM LINE.
  5277. *
  5278. * USES A - 1, 2, 3, 6, 7.
  5279. * X - 1, 2, 3, 4, 6, 7.
  5280. * B - 3, 5, 6.
  5281. *
  5282. * CALLS RTA, UPL.
  5283. *
  5284. * NOTES THIS ROUTINE IS DESIGNED TO BE CALLED IMMEDIATELY
  5285. * FOLLOWING A CALL TO *RDC*. THE ONLY PRESET NEEDED
  5286. * IN THAT CASE IS TO SET B7. B6 IS SET VIA *RDC*.
  5287.  
  5288.  
  5289. RTB7 SA1 B6-B1 GET NEXT WORD
  5290. SB6 A1
  5291. LT B6,B7,RTB5 IF BEGINNING OF LINE
  5292. RTB8 BSS 0
  5293. BX6 -X2-X1 111111 WHERE BLANK
  5294. BX4 X3*X6 100000 WHERE POSSIBLE BLANK
  5295. BX6 -X3*X6 011111 WHERE POSSIBLE BLANK
  5296. LX4 -5 000001 WHERE POSSIBLE BLANK
  5297. IX6 X4+X6 100000 WHERE BLANK
  5298. BX6 X3*X6 100000 ONLY WHERE BLANK
  5299. ZR X6,RTB5 IF NO BLANKS
  5300. SX4 B3
  5301. IX4 X1-X4 FIND LEFT MOST BIT
  5302. BX4 X1-X4 REMOVE EXCESS UPPER BITS
  5303. AX4 1 POSITION MASK
  5304. BX4 X3*X4 100000 ONLY WHERE RIGHT 00B
  5305. BX6 X6+X4 MERGE BLANKS AND 00B
  5306. BX4 X6-X3 40 WHERE NOT (BLANK.OR.RIGHT 00)
  5307. LX4 -1
  5308. IX6 X4-X7 FIND LEFT MOST BIT
  5309. BX4 X4-X6 REMOVE EXCESS UPPER BITS
  5310. AX4 5 POSITION MASK
  5311. BX6 -X4*X1 REMOVE CHARACTERS FROM WORD
  5312. IX1 X6-X1 COMPARE INITIAL AND FINAL
  5313. ZR X1,RTB4 IF NO CHANGE
  5314. SA6 A1 REPLACE WORD
  5315. SB3 B0 SET ZERO SEARCH OFF
  5316. NG X4,RTB7 IF THIS WORD ENTIRELY ZEROED
  5317. BX7 X4 CHECK LAST CHARACTER FOR 00B
  5318. AX7 6
  5319. BX4 X7-X4 77 AT LAST CHAR REMOVED
  5320. SA3 =00770077007700770077B
  5321. BX7 X4*X3
  5322. NZ X7,RTB9 IF LAST CHAR REMOVED IS ODD-ADD BLANK
  5323. LX4 6
  5324. BX7 X6*X4 =0 IF LAST CHARACTER IS 00B
  5325. NZ X7,RTB IF NEXT TO LAST NOT 00B
  5326. BX3 X4 ADD 2 BLANKS
  5327. LX4 -6
  5328. LX3 -12
  5329. BX4 X4+X3
  5330. RTB9 BX2 X4*X2 ADD 1 OR 2 BLANKS
  5331. IX6 X6+X2
  5332. SA6 A1
  5333.  
  5334. RTB PS ENTRY/EXIT
  5335. SA1 B6-B1
  5336. NZ X1,RTB0 IF WORD CONTAINS DATA
  5337. SB6 B6-B1
  5338.  
  5339. * CHECK FOR AUTOMATIC TRUNCATION TO 160 CHARACTERS.
  5340.  
  5341. RTB0 SX7 B6-B7
  5342. SB3 B1 SET CHECK FOR TRAILING 00,S
  5343. SX7 X7-16D
  5344. NG X7,RTB3 IF .LT. 16 WORDS SIGNIFICANT NO TRUNCATE
  5345. SA2 AS
  5346. SX6 2R PREPARE BLANKS
  5347. ZR X2,RTB2 IF NOT IN ASCII MODE (TRUNCATE)
  5348. SA2 =74747474747474747474B
  5349. SA3 =01010101010101010101B
  5350. SB5 B6-1
  5351.  
  5352. * SEARCH FOR 74/76 CODES.
  5353.  
  5354. RTB1 SA1 B5 GET CURRENT WORD
  5355. BX4 -X1*X3 ISOLATE COMPLEMENT OF LOWER BIT
  5356. BX7 X2*X1 GET UPPER 4 BITS
  5357. LX4 2
  5358. SB5 B5-B1
  5359. IX4 X4+X7
  5360. BX4 X4*X3
  5361. NZ X4,RTB6 IF WORD CONTAINS ASCII
  5362. GE B5,B7,RTB1 IF MORE TO CHECK
  5363. RTB2 LX6 -12 ASSURE TRUNCATION BUT HANDLE COLON
  5364. SA6 B7+16D
  5365. SB6 A6+B1 RESET LWA+1 POINTER
  5366. RTB3 SA2 =10H
  5367. SA3 =40404040404040404040B
  5368. SX7 B1
  5369. EQ RTB7 REMOVE TRAILING BLANKS
  5370.  
  5371. RTB4 NZ X4,RTB IF TRAILING ZEROS LOOKED FOR AND FOUND
  5372.  
  5373. * HERE IF NO BLANKS FOUND IN WORD.
  5374.  
  5375. RTB5 NZ B3,RTB IF NO CHANGES MADE
  5376. SX6 2R PLACE BLANK IN LAST WORD. JUST IN CASE
  5377. LX6 -12 OF POSSIBLE 00B CHARACTER IN CURRENT WORD
  5378. SA6 A1+B1
  5379. EQ RTB RETURN
  5380.  
  5381. * PROCESS TRUNCATION WHEN UNPACK NECESSARY.
  5382.  
  5383. RTB6 SA1 B7 SET FIRST WORD
  5384. SB6 E.SCR SET TO SCRATCH AREA
  5385. SB3 B7 SAVE FWA OF CODED BUFFER
  5386. RJ UPL
  5387. SB6 E.SCR
  5388. SB7 B3
  5389. RJ RTA RE-PACK TRUNCATED LINE
  5390. EQ RTB RETURN
  5391. SAC SPACE 4,15
  5392. ** SAC - SET ASCII MODE LINE AND READS.
  5393. *
  5394. * ENTRY NONE.
  5395. *
  5396. * EXIT LINE IN *E.STR* BUFFER,
  5397. * *E.NMODE* SET TO ASCII.
  5398. *
  5399. * USES A - 1, 6, 7.
  5400. * X - 1, 6, 7.
  5401. * B - 6.
  5402. *
  5403. * CALLS UPL.
  5404.  
  5405.  
  5406. SAC PS ENTRY/EXIT
  5407. SA1 E.CMODE
  5408. SX6 B1
  5409. BX1 X1-X6
  5410. SA6 A1-B1 SET E.NMODE TO ASCII
  5411. ZR X1,SAC IF LINE ALREADY UNPACKED
  5412. MX7 0
  5413. SA6 A1 SET CURRENT MODE TO ASCII
  5414. SA7 A1+B1 SET NO LINE MODIFICATIONS
  5415.  
  5416. * UNPACK LINE.
  5417.  
  5418. SA1 E.LINE
  5419. SB6 E.STR
  5420. RJ UPL UNPACK LINE
  5421. SA6 E.STR-1 SET NUMBER OF CHARACTERS IN LINE
  5422. EQ SAC RETURN
  5423. SCD SPACE 4,10
  5424. ** SCD - SET CODED LINE.
  5425. *
  5426. * ENTRY NONE.
  5427. *
  5428. * EXIT CURRENT LINE IN *E.LINE*.
  5429. * *E.CMODE* SET TO CODED.
  5430. *
  5431. * USES A - 1, 2, 6.
  5432. * X - 1, 2, 6.
  5433. * B - 6, 7.
  5434. *
  5435. * CALLS RTA.
  5436.  
  5437.  
  5438. SCD PS ENTRY/EXIT
  5439. SA1 E.CMODE
  5440. MX6 0
  5441. SA2 A1+B1 GET E.LMOD
  5442. SA6 A1-B1 SET E.NMODE TO CODED
  5443. SA6 A1 SET CURRENT MODE TO CODED
  5444. ZR X2,SCD IF NO LINE MODIFICATIONS
  5445. SA6 A1+B1 SET NO MODIFICATIONS
  5446. SB6 E.STR
  5447. SB7 E.LINE
  5448. RJ RTA PACK LINE
  5449. EQ SCD RETURN
  5450. STL SPACE 4,15
  5451. ** STL - PROCESS TLX INTERRUPTS.
  5452. *
  5453. * ENTRY NONE.
  5454. *
  5455. * EXIT RETURNS TO CALLER IF NO TLX INTERRUPT SENSED,
  5456. * ELSE REWINDS THE OUTPUT BUFFER AND EXITS TO *CER1* TO
  5457. * POP THE INPUT STACK.
  5458. *
  5459. * USES A - 1, 2, 6.
  5460. * X - 1, 2, 6.
  5461. *
  5462. * MACROS DISTC, RECALL.
  5463.  
  5464.  
  5465. STL PS ENTRY/EXIT
  5466. MX6 0
  5467. SA2 TLX
  5468. ZR X2,STL IF NO INTERRUPT, RETURN
  5469. SA6 A2
  5470. DISTC ON,TLX
  5471. RECALL OUTPUT
  5472. SA1 =XOUTPUT+1
  5473. MX6 -18
  5474. BX6 -X6*X1
  5475. SA6 A1+1 IN=OUT=FIRST
  5476. SA6 A6+1
  5477. EQ CER1 GET NEXT INPUT LINE, EXIT
  5478. STK SPACE 4,15
  5479. ** STK - STACK INPUT DEVICES.
  5480. *
  5481. * ENTRY (A1) = NEW DEVICE ADDRESS (EG. *I.DEV*).
  5482. *
  5483. * EXIT RETURNS IF DEVICE IS NOT AVAILABLE (USUALLY BUSY),
  5484. * ELSE, ROUTINE EXITS TO NCM TO PROCESS THE NEW DEVICE.
  5485. *
  5486. * USES A - 1, 3, 4, 6, 7.
  5487. * X - 1, 3, 4, 6, 7.
  5488. * B- 7.
  5489. *
  5490. * CALLS UPL.
  5491. *
  5492. * NOTES THIS ROUTINE ASSUMES THAT .LINE FOR THE DEVICE HAS
  5493. * BEEN PRE-LOADED WITH THE SPECIFIED COMMAND LINE.
  5494.  
  5495.  
  5496. STK PS ENTRY/EXIT
  5497. SA3 C.STR-1 MOVE TO DEVICE WORD
  5498. SA4 C.ON GET POINTER TO CURRENT DEVICE
  5499. BX6 X3
  5500. SA6 X4+1
  5501.  
  5502. * UNSTACK ANYTHING THAT CAN BE SAFELY REMOVED.
  5503.  
  5504. STK1 SA3 X4+B1 GET CHARACTER POINTER WORD
  5505. SX6 X4-I.DEV
  5506. UX7,B7 X3 B7 .LE. 0, IF READY TO READ NEXT LINE
  5507. ZR X6,STK2 IF ON PRIMARY INPUT DEVICE
  5508. GT B7,STK2 IF DEVICE NOT AT END OF LINE
  5509. SA3 X4-1 OBTAIN FET POINTER FOR DEVICE
  5510. BX6 X3
  5511. AX3 60 EXTEND *CMDPOP* FLAG
  5512. BX6 -X3*X6 0, IF OK TO POP DEVICE
  5513. NZ X6,STK2 IF (FET) .AND. (.NOT. *CMDPOP*)
  5514.  
  5515. * POP STACK AND RE-TEST.
  5516.  
  5517. MX6 1
  5518. SA4 X4 GET NEW DEVICE
  5519. SA6 A4 IDLE OLD DEVICE
  5520. SA2 X4+B1 GET NEW C.STR-1 WORD
  5521. BX7 X4
  5522. LX6 X2
  5523. SA7 C.ON RESET ACTIVE DEVICE POINTER
  5524. SA6 C.STR-1 RESET CHARACTER POINTER
  5525. EQ STK1 UNSTACK
  5526.  
  5527. * PUSH NEW ENTRY ONTO STACK.
  5528.  
  5529. STK2 SA1 A1
  5530. SX6 A1
  5531. BX7 X4
  5532. SA4 A1+B1 NEW DELIMITER WORD
  5533. PL X1,STK IF REQUESTED DEVICE IS STILL ACTIVE
  5534. SA6 C.ON RESET C.ON
  5535. SA7 A1 PUT STACK ENTRY
  5536. PX6 B1,X4 RESET CHARACTER POINTER
  5537. SA6 C.STR-1
  5538. SA1 A1-34D SET FWA OF CODED LINE
  5539. SB6 C.STR
  5540. RJ UPL UNPACK LINE
  5541. EQ NCM PROCESS NEW LINE, EXIT
  5542. TAB SPACE 4,20
  5543. ** TAB - TAB INPUT LINE ACCORDING TO TAB SETTINGS.
  5544. *
  5545. * ENTRY (B6) = FWA-1 OF TEXT LINE.
  5546. *
  5547. * EXIT LINE TABBED.
  5548. * TRAILING SPACES ARE NOT DELETED.
  5549. * (X7) = 0 IF NO TRUNCATION.
  5550. *
  5551. * USES A - 1, 3, 4, 6, 7.
  5552. * X - 1, 2, 3, 4, 6, 7.
  5553. * B - 3, 4, 5, 7.
  5554. * E.SCR.
  5555. *
  5556. * CALLS TSL.
  5557.  
  5558.  
  5559. TAB1 SA1 A1+1 GET NEXT
  5560. SA6 B3
  5561. SB3 B3+B1
  5562. LT B3,B4,TAB2 IF NOT 160 CHARACTERS WORTH
  5563. SX7 X6-1R
  5564. NZ X5,TAB5 IF NOT BLANK (TRUNCATE)
  5565. SB3 B4+
  5566. TAB2 BX6 X1
  5567. IX2 X1-X3
  5568. NZ X2,TAB1 IF NOT TAB CHARACTER
  5569. TAB3 ZR X4,TAB1 IF END OF TABS
  5570. SB5 X4+E.SCR-1
  5571. SA4 A4+B1
  5572. LT B5,B3,TAB3 IF PAST EXISTING TAB
  5573. SA1 A1+B1
  5574. LE B5,B3,TAB2 IF CURRENTLY POINTING AT TAB
  5575. TAB4 SA7 B3 BLANK TO TAB POSITION
  5576. SB3 B3+B1
  5577. LT B3,B5,TAB4 IF NOT AT TAB POSITION
  5578. PL X1,TAB2 IF MORE DATA
  5579. SX7 0 SET NO TRUNCATION
  5580. TAB5 MX6 2
  5581. SA1 E.SCR PREPARE TO COPY BACK
  5582. SA6 B3
  5583. TAB6 BX6 X1
  5584. SB7 B7+B1
  5585. SA1 A1+B1
  5586. SA6 B7-B1
  5587. PL X6,TAB6 IF MORE
  5588. RJ TSL TRIM TRAILING SPACES
  5589. TAB PS ENTRY/EXIT
  5590.  
  5591. SA3 TABCHAR
  5592. SX7 B0 SET NO TRUNCATION
  5593. SB7 B6+B1
  5594. NG X3,TAB IF NO TAB CHARACTER IS DEFINED
  5595. SA4 A3+B1
  5596. SA1 B6+B1 SET FIRST CHARACTER IN LINE
  5597. SB3 E.SCR
  5598. SX7 1R
  5599. SB4 E.SCR+160D
  5600. EQ TAB2 PROCESS TABS
  5601. TCD SPACE 4,15
  5602. ** TCD - TABULATE CODED DATA LINE.
  5603. *
  5604. * ENTRY (D.LINE) = DATA LINE.
  5605. *
  5606. * EXIT (C.LINE) = TABBED LINE.
  5607. *
  5608. * USES A - 1, 3.
  5609. * X - 1, 3.
  5610. * B - 6, 7.
  5611. * E.SCR.
  5612. *
  5613. * CALLS RTA, TAB, UPL.
  5614.  
  5615.  
  5616. TCD PS ENTRY/EXIT
  5617. SA3 TABCHAR
  5618. NG X3,TCD IF NO TAB CHARACTER
  5619. SA1 D.LINE
  5620. SB6 D.STR
  5621. RJ UPL
  5622. SB6 D.STR-1
  5623. RJ TAB TABULATE
  5624. SB7 D.LINE
  5625. SB6 D.STR
  5626. RJ RTA REPACK LINE
  5627. EQ TCD RETURN
  5628. TLB SPACE 4,10
  5629. ** TLB - TRANSFER DATA LINE TO *E.LINE* BUFFER.
  5630. *
  5631. * EXIT LINE TRANSFERRED FROM *D.LINE* TO *E.LINE*.
  5632. *
  5633. * USES X - 1, 2, 6, 7.
  5634. * A - 1, 6, 7.
  5635. * B - 5, 6.
  5636.  
  5637.  
  5638. TLB SUBR ENTRY/EXIT
  5639. SB5 B0
  5640. SB6 D.LINE
  5641. MX2 -12
  5642. SB7 E.LINE
  5643. TLB1 SA1 B6+B5
  5644. LX7 X1
  5645. BX6 -X2*X1
  5646. SA7 B7+B5
  5647. SB5 B5+B1
  5648. NZ X6,TLB1 IF NOT END OF LINE
  5649. SA6 E.CMODE SET CURRENT MODE TO CODED
  5650. SA6 A6+1 SET NO LINE MODIFICATIONS
  5651. EQ TLBX RETURN
  5652. TOP SPACE 4,15
  5653. ** TOP - MOVE POINTER TO TOP OF FILE.
  5654. *
  5655. * ENTRY AT *TOP*.
  5656. * AT *TOP1.1* FROM *ERD*.
  5657. *
  5658. * EXIT TO *ERD1* IF EOI ENCOUNTERED.
  5659. * TO *ERD5* IF END OF FILE.
  5660. *
  5661. * USES A - 1, 2, 3, 4, 6, 7.
  5662. * X - 0, 1, 2, 3, 4, 6, 7.
  5663. * B - 6, 7.
  5664. *
  5665. * CALLS CFF, ERD, WTF.
  5666. *
  5667. * MACROS READ, RECALL, REWIND, WRITEF, WRITER, WRITEW.
  5668.  
  5669.  
  5670. TOP PS ENTRY/EXIT
  5671. SA2 IWHERE LINE COUNT
  5672. SA3 INDEX SUBSCRIPT OF LAST CONNAND
  5673. SX3 X3-.TOPNUL
  5674. ZR X3,TOP1 IF TOPNULL COMMAND
  5675. SX6 B1
  5676. IX2 X2-X6
  5677. ZR X2,TOP IF ALREADY AT TOP, RETURN
  5678. TOP1 SA1 NOMOD
  5679. PL X1,TOP2 IF THERE WERE MODS. READ REST OF FILE
  5680.  
  5681. * ENTRY FROM *ERD*.
  5682.  
  5683. TOP1.1 REWIND FTA,RECALL
  5684. REWIND FTB,RECALL
  5685. EQ ERD5 PROCESS END OF FILE
  5686.  
  5687. TOP2 RECALL E.IN
  5688. RECALL E.OUT
  5689. RJ WTF WRITE CURRENT LINE
  5690. EQ TOP6 TRANSFER FILE
  5691.  
  5692. TOP3 READ E.IN RESTART READ
  5693. TOP4 RECALL WAIT FOR CIO TO DO SOMETHING
  5694. EQ TOP6 TRANSFER FILE
  5695.  
  5696. TOP5 WRITEW E.OUT,B6,B7 WRITE BUFFER
  5697. SX7 X0 MOVE E.IN(OUT) POINTER
  5698. MX6 0
  5699. SA7 E.IN+3 UPDATE OUT
  5700. SA6 RC SET DATA READ
  5701. TOP6 SA1 E.IN+2 IN
  5702. SA2 A1+B1 OUT
  5703. SX0 X1
  5704. IX6 X1-X2 IN-OUT (CONSECUTIVE WORDS IN BUFFER)
  5705. PL X6,TOP7 IF (IN-OUT) IS LARGEST BLOCK
  5706. SA3 A2+B1 LIMIT
  5707. SA4 A1-B1 FIRST
  5708. IX6 X3-X2 LIMIT-OUT
  5709. SX0 X4
  5710. TOP7 SB6 X2 SET STARTING ADDRESS
  5711. SB7 X6 SET WORD COUNT
  5712. NZ B7,TOP5 IF WORDS TO TRANSFER
  5713. SA4 E.IN
  5714. LX4 59-0
  5715. PL X4,TOP4 IF FILE BUSY
  5716. SA1 E.IN+2
  5717. SA2 A1+B1 RECHECK POINTERS
  5718. BX1 X1-X2
  5719. NZ X1,TOP6 IF CIO JUST FINISHED
  5720. LX4 0-3
  5721. NG X4,TOP8 IF EOF OR EOI
  5722. WRITER E.OUT FLUSH BUFFER
  5723. EQ TOP9 READ FILE
  5724.  
  5725. TOP8 LX4 3-4
  5726. PL X4,TOP3 IF FULL BUFFER
  5727. LX4 4-9
  5728. NG X4,ERD1 IF AT EOI
  5729. WRITEF E.OUT FLUSH BUFFER
  5730. TOP9 READ E.IN BEGIN READ OF NEXT SECTION OF FILE
  5731. RECALL E.OUT WAIT FOR WRITE FET TO SETTLE
  5732. SA1 X2
  5733. MX7 1
  5734. SA7 RC SET NO DATA READ
  5735. BX6 X1 MOVE FILE NAME TO *CFET*
  5736. SA6 CFET
  5737. RJ CFF COPY REMAINDER OF FILE
  5738. EQ ERD1 PROCESS EOI ENCOUNTERED
  5739. TSL SPACE 4,15
  5740. ** TSL - TRIM SPACES OFF LINE (STRING BUFFER).
  5741. *
  5742. * ENTRY (A6) = FWA OF END OF LINE CHARACTER.
  5743. * (X6) = MASK OF 2.
  5744. *
  5745. * EXIT LINE TRIMMED.
  5746. * (E.STR-1) = NEW LINE LENGTH.
  5747. *
  5748. * USES A - 1, 6.
  5749. * X - 1, 6.
  5750. * B - 2.
  5751.  
  5752.  
  5753. TSL1 SB2 B2-B1 POSITION BACK TO NEXT CHARACTER
  5754. LE B2,B6,TSL2 IF AT START OF LINE -1
  5755. SA1 B2
  5756. SX1 X1-1R
  5757. ZR X1,TSL1 IF CHARACTER WAS A BLANK
  5758. TSL2 SA6 B2+B1 PUT NEW END CHARACTER
  5759. SX6 B2-B6 GET NEW LENGTH
  5760. SA6 B6+ SET NEW LENGTH
  5761.  
  5762. TSL PS ENTRY/EXIT
  5763. SB2 A6
  5764. EQ TSL1 PROCESS TRIM
  5765.  
  5766. UPL SPACE 4,30
  5767. ** UPL - UNPACK LINE TO ASCII BUFFER.
  5768. *
  5769. * ENTRY (A1) = FWA OF CODED LINE.
  5770. * (X1) = FIRST WORD OF CODED LINE.
  5771. * (B6) = FWA STRING BUFFER.
  5772. *
  5773. * EXIT (X6) = COUNT OF SIGNIFICANT CHARACTERS.
  5774. * (B5) = FWA OF BUFFER (NULL LINE IF (B5) = (B6)).
  5775. * (B6) = ADDRESS OF END OF LINE MARKER.
  5776. * (B7) = IF .GT. 0, THEN LWA OF BUFFER.
  5777. * IF (B7) = (B6), THEN BUFFER IS FULL.
  5778. * IF (B7) = 0 AND (B2) .LT. 0, THEN 3 OR MORE TRAILING
  5779. * BLANKS WERE REMOVED.
  5780. * LINE UNPACKED WITH ASCII ESCAPE CHARACTERS INCLUDED
  5781. * IN WORDS WHERE NEEDED.
  5782. * END OF LINE TERMINATOR (MASK OF 1) AFTER LAST
  5783. * NON-BLANK CHARACTER (OR AT END OF BUFFER - (B7)).
  5784. *
  5785. * USES A - 1, 2, 6.
  5786. * X - 0, 1, 2, 3, 4, 6, 7.
  5787. * B - 2, 5, 6, 7.
  5788. *
  5789. * NOTES LINES ARE ASSUMED TO BE 160 CHARACTERS LONG.
  5790. * ASCII MODE WILL BE USED IF (UPLA) = 2B,
  5791. * NORMAL MODE IS USED IF (UPLA) = 100B.
  5792. * TRAILING SPACES ARE NOT CONSIDERED SIGNIFICANT.
  5793. * TRAILING 00B CHARACTERS (COLON/64 CHARACTER SET) ARE
  5794. * SIGNIFICANT ONLY IF THERE IS A NON-00B CHARACTER
  5795. * FOLLOWING THEM IN THE CODED LINE. THIS AGREES WITH
  5796. * THE DEFINITION OF THE END OF LINE BYTE.
  5797.  
  5798.  
  5799. UPL1 SX7 X7-76B TEST FOR ASCII
  5800. ZR X7,UPL6 IF ASCII
  5801. UPL2 SA6 B6 SAVE ASSEMBLY
  5802. SB6 B6+B1
  5803. GE B6,B7,UPL8 IF SAVED LAST CHARACTER
  5804. UPL3 LX1 6 GET NEXT CHARACTER
  5805. BX6 -X2*X1
  5806. SB2 B2-B1 DECREMENT COUNT
  5807. BX7 X6+X0 IF ESCAPE = 76B
  5808. UPL4 PL B2,UPL1 IF NOT LAST CHARACTER OF WORD
  5809. ZR X4,UPL10 IF END OF LINE REACHED
  5810. UPL5 SA1 A1+B1 GET NEXT WORD
  5811. SB2 9 RESET CHARACTER POSITION
  5812. BX4 -X3*X1 0, IF END OF LINE
  5813. NZ X7,UPL1 IF NOT PROCESSING ASCII
  5814. EQ UPL2 IF ON SECOND PART OF ASCII
  5815.  
  5816. * PROCESS ASCII CHARACTER.
  5817.  
  5818. UPL6 LX1 6 GET NEXT CHARACTER
  5819. SB2 B2-B1 DECREMENT COUNT
  5820. BX7 -X2*X1
  5821. LX6 6 SHIFT ESCAPE OVER
  5822. IX6 X6+X7 FORM ASCII WORD
  5823. MX7 0 SET ON SECOND PART OF ASCII
  5824. PL B2,UPL2 IF NEW WORD NOT NEEDED
  5825. EQ UPL4 GET NEXT WORD
  5826.  
  5827. * END OF BUFFER REACHED.
  5828. * DETERMINE SIGNIFICANCE OF LAST CHARACTER.
  5829.  
  5830. UPL7 MX6 2
  5831. SA6 B6 SET LAST CHARACTER
  5832. EQ UPL13 FINISH UNPACK OPERATION
  5833.  
  5834. UPL8 NZ X6,UPL10 IF LAST CHARACTER .NE. 0
  5835. NZ X4,UPL7 IF MORE FOLLOWS, LAST 0 IS COLON
  5836. UPL9 LX1 6 SEE IF MORE CHARACTERS FOLLOW
  5837. BX6 -X2*X1
  5838. SB2 B2-1
  5839. NZ X6,UPL7 IF CHARACTER FOLLOWS, 0 IS COLON
  5840. PL B2,UPL9 IF MORE IN WORD, ELSE LAST IS NOT COLON
  5841.  
  5842. * END OF LINE REACHED. TRIM 00B AND BLANKS.
  5843.  
  5844. UPL10 SB6 B6-B1 SKIP TRAILING ZEROS
  5845. SA1 B6 GET LAST CHARACTER
  5846. LT B6,B5,UPL12 IF PAST START OF BUFFER
  5847. ZR X1,UPL10 IF 00B CHARACTER
  5848. SB7 B0 SET POSSIBLE BLANKS TRIMMED
  5849. SB2 B6-B1
  5850. UPL11 SX1 X1-1R SKIP TRAILING BLANKS
  5851. NZ X1,UPL12 IF NOT BLANK
  5852. SB6 B6-B1
  5853. SA1 B6
  5854. GE B6,B5,UPL11 IF NOT PAST START OF BUFFER
  5855. UPL12 SB6 B6+1 PUT MARK AFTER LAST NON-BLANK
  5856. MX6 2
  5857. SA6 B6
  5858. UPL13 SX6 B6-B5 GET CHARACTER COUNT
  5859. NZ B7,UPL IF NOT CHECKING TRAILING BLANKS
  5860. SB2 B6-B2
  5861.  
  5862. UPL PS ENTRY/EXIT
  5863. SA2 UPLA
  5864. MX3 -12 END OF LINE MASK
  5865. SB5 B6 MARK FIRST CHARACTER POSITION
  5866. SX0 X2 SET MODE OF UNPACK
  5867. MX2 -6 CHARACTER MASK
  5868. BX4 -X3*X1 TEST FOR END OF LINE
  5869. SB2 9 SET CHARACTER POSITION
  5870. SB7 B6+MAXWD SET LWA+1
  5871. EQ UPL3 PROCESS UNPACK
  5872.  
  5873. UPLA CON 100B SET NO ASCII (RESET IN PRESET IF NEEDED)
  5874. VAL SPACE 4,15
  5875. ** VAL - EVALUATE NUMERIC STRING.
  5876. *
  5877. * ENTRY (A5) = FWA OF NUMERIC STRING.
  5878. * (X5) = FIRST WORD OF NUMERIC STRING.
  5879. *
  5880. * EXIT (A5) = LWA+1 OF NUMERIC STRING.
  5881. * (X5) = ((A5)).
  5882. * (X6) = NUMBER EVALUATED.
  5883. * = -0, IF NUMBER 0 WAS SPECIFIED.
  5884. *
  5885. * USES A - 5.
  5886. * X - 3, 4, 5, 6, 7.
  5887. * B - 2, 3, 4.
  5888. *
  5889. * NOTES THIS ROUTINE CONVERTS AN ASTERISK (*) TO 2**30 - 1.
  5890. *
  5891.  
  5892.  
  5893. VAL1 SX4 X5-1R9-1
  5894. SX3 X5-1R0
  5895. BX4 -X3*X4
  5896. PL X4,VAL2 IF NOT A NUMBER
  5897. LX4 B2,X6 *4
  5898. IX4 X6+X4 *5
  5899. SA5 A5+B1 NEXT CHARACTER
  5900. LX4 1 *10
  5901. SX7 X7+B1 SET CHARACTER ENCOUNTERED FLAG
  5902. IX6 X4+X3
  5903. PL X5,VAL1 IF NOT END OF LINE
  5904.  
  5905. VAL2 ZR X7,VAL3 IF NO NUMBERS ENCOUNTERED
  5906. NZ X6,VAL4 IF NOT JUST 0 USED
  5907. MX6 60 SET -0 FLAG
  5908. EQ VAL4 END OF NUMBERS
  5909.  
  5910. VAL3 SX7 X5-1R*
  5911. NZ X7,VAL4 IF NOT *
  5912. SA5 A5+1 STEP OVER *
  5913. MX6 -30
  5914. BX6 -X6 SET * EQUIVALENT
  5915. VAL4 SB4 X5-1R
  5916. ZR B4,VAL5 IF BLANK
  5917. NE B4,B1,VAL IF NOT COMMA
  5918. NZ B3,VAL IF SECOND COMMA
  5919. VAL5 SA5 A5+B1
  5920. SB3 B3+B4 SET COMMA FLAG
  5921. PL X5,VAL4 IF NOT END OF LINE
  5922.  
  5923. VAL PS ENTRY/EXIT
  5924. BX6 X6-X6 CLEAR ASSEMBLY
  5925. SB2 B1+B1
  5926. MX7 0 CLEAR CHARACTER ENCOUNTERED
  5927. SB3 B0 SET NO COMMA
  5928. PL X5,VAL1 IF NOT END OF LINE
  5929. EQ VAL RETURN
  5930. VIS SPACE 4,10
  5931. ** VIS - VOID INSTRUCTION STACK.
  5932. *
  5933. * *VIS* SHOULD BE CALLED IMMEDIATELY AFTER ALL INSTRUCTION
  5934. * MODIFICATIONS TO VOID THE INSTRUCTION STACK.
  5935.  
  5936.  
  5937. VIS SUBR ENTRY/EXIT
  5938. EQ VIS RETURN
  5939. VRT SPACE 4,10
  5940. ** VRT - VERIFY LINE AND RETURN TO *NCM*.
  5941. *
  5942. * ENTRY NONE.
  5943. *
  5944. * EXIT TO *NCM*.
  5945. *
  5946. * CALLS VRY.
  5947. *
  5948. * NOTES DO NOT RETURN JUMP TO THIS ROUTINE.
  5949.  
  5950.  
  5951. VRT RJ VRY VERIFY LINE
  5952. EQ NCM EXIT
  5953. VRY SPACE 4,15
  5954. ** VRY - VERIFY XEDIT OPERATIONS.
  5955. *
  5956. * ENTRY NONE.
  5957. *
  5958. * EXIT CURRENT LINE WRITTEN OF *VERIFY* TRUE.
  5959. * THE LINE IS PACKED IF NEEDED AND HOUSEKEEPING DONE.
  5960. *
  5961. * USES A - 1, 4, 6.
  5962. * X - 1, 4, 6.
  5963. * B - 6, 7.
  5964. *
  5965. * CALLS RTA.
  5966. *
  5967. * MACROS WRITEC.
  5968.  
  5969. VRY1 WRITEC OUTPUT,E.LINE
  5970.  
  5971. VRY PS ENTRY/EXIT
  5972. SA4 VERIFY
  5973. PL X4,VRY IF NOT IN *VERIFY* MODE
  5974. SA1 E.LMOD
  5975. ZR X1,VRY1 IF NO MODIFICATIONS OR PACKED
  5976. SA1 A1-1
  5977. ZR X1,VRY1 IF CODED FORMAT
  5978. SB6 E.STR RE-PACK LINE
  5979. SB7 E.LINE
  5980. MX6 0 SET LMOD TO NO LINE MOD
  5981. SA6 A1+B1 E.LMOD
  5982. RJ RTOA
  5983. EQ VRY1 WRITE LINE
  5984. WTF SPACE 4,15
  5985. ** WTF - WRITE EDIT LINE.
  5986. *
  5987. * ENTRY (IWHERE) = IF CREATION MODE, .LE. ZERO.
  5988. * ELSE, LINE COUNT.
  5989. *
  5990. * EXIT (IWHERE) = IF CREATION MODE, 1.
  5991. * IF UPDATING, (IWHERE) + 1.
  5992. *
  5993. * USES A - 1, 2, 3, 6, 7.
  5994. * X - 1, 2, 3, 6, 7.
  5995. * B - 6, 7.
  5996. *
  5997. * CALLS RTOA, VIS.
  5998. *
  5999. * MACROS WRITEC
  6000.  
  6001.  
  6002. WTF2 WRITEC E.OUT,E.LINE
  6003. WTF3 SA3 IWHERE BUMP IWHERE
  6004. SX7 B1
  6005. IX7 X3+X7
  6006. SA7 A3
  6007.  
  6008. WTF PS ENTRY/EXIT
  6009. SA1 UPDATE
  6010. PL X1,WTF3 IF NOT UPDATING FILE.
  6011.  
  6012. * WORD IS REPLACED AFTER FIRST ENTRY.
  6013.  
  6014. WTFA SA1 WTFB
  6015. EQ WTF1 PRESET CODE
  6016.  
  6017. * NORMAL CODE FOLLOWS.
  6018.  
  6019. WTF RMT
  6020. SA1 E.LMOD
  6021. ZR X1,WTF2 IF NO MODIFICATION
  6022. RMT
  6023.  
  6024. SA1 A1-B1
  6025. ZR X1,WTF2 IF IN CODED MODE
  6026. SB6 E.STR
  6027. SB7 E.LINE
  6028. RJ RTOA RE-PACK LINE
  6029. MX6 0
  6030. SA6 E.LMOD SET NO MODIFICATIONS
  6031. EQ WTF2 WRITE LINE
  6032.  
  6033. * PRESET CODE.
  6034.  
  6035. WTF1 SA2 IWHERE
  6036. BX6 X1
  6037. SX7 B1
  6038. SA6 WTFA REPLACE PRESET JUMP
  6039. RJ VIS VOID INSTRUCTION STACK
  6040. PL X2,WTF+1 IF NOT CREATION MODE
  6041. SA7 A2 SET IWHERE = 1
  6042. MX6 0
  6043. SA7 NOMOD SET MODIFICATIONS MADE
  6044. SA6 RC SET DATA READ
  6045. EQ WTF RETURN (NO LINE TO WRITE OUT)
  6046.  
  6047. WTFB BSS 0
  6048. WTF HEREL
  6049. TITLE SPECIAL PURPOSE SUBROUTINES.
  6050. LCB SPACE 4,25
  6051. ** LCB - LOAD CIRCULAR BUFFER.
  6052. *
  6053. * ENTRY (A2) = ADDRESS OF OUT.
  6054. * (A3) = ADDRESS OF FIRST.
  6055. * (A4) = RETURN ADDRESS.
  6056. * (B4) = OUT.
  6057. *
  6058. * EXIT TO RETURN ADDRESS -1 IF CONTINUATION READ.
  6059. * TO RETURN ADDRESS IF EOR/EOF.
  6060. * (X1) = LAST WORD ADDRESS OF WORKING BUFFER.
  6061. * = -1 IF EOF.
  6062. * = -2 IF EOI.
  6063. *
  6064. * MACROS READ, RECALL.
  6065. *
  6066. * NOTES ROUTINE IS COPIED FROM COMCRDW.
  6067. * REQUEST READ IF BUFFER IS EMPTY, NOT BUSY AND NOT
  6068. * EOR/EOF. IF BUFFER IS BUSY, RECALL AND RETURN.
  6069. * MODIFIED TO RETURN EOI STATUS IF FET UNDER
  6070. * INVESTIGATION HAS A ZERO FILENAME. (ASSUMES OPTIONS
  6071. * SUCH AS I=0 USED).
  6072.  
  6073.  
  6074. LCB= SA1 A3-B1 CHECK BUFFER STATUS
  6075. SX6 B4 STORE OUT
  6076. LX1 59-0
  6077. SA6 A2
  6078. NG X1,LCB2 IF BUFFER NOT BUSY
  6079. SX6 -2 PREPARE EOI STATUS
  6080. ZR X1,LCB8 IF NO FILE NAME (EG. L=0 USED)
  6081. RECALL
  6082. LCB1 SB2 A4-B1 CONTINUE READ
  6083. JP B2 RETURN
  6084.  
  6085. LCB2 SA1 A2-B1 RE-READ IN
  6086. SB3 X1
  6087. NE B3,B4,LCB1 IF BUFFER NOT EMPTY
  6088. SA1 A3-B1 CHECK BUFFER STATUS
  6089. LX1 59-4
  6090. NG X1,LCB3 IF EOR/EOF/EOI
  6091. READ A3-B1 XEDIT ONLY USES READ FUNCTION
  6092. SB2 A4-B1
  6093. JP B2 RETURN
  6094.  
  6095. LCB3 LX6 B1,X1
  6096. SA1 A3 SET IN = OUT = FIRST
  6097. SX7 X1
  6098. SA7 A1+B1
  6099. SX1 -B1 SET EOF RESPONCE
  6100. SB2 A4 SET RETURN ADDRESS
  6101. NG X6,LCB4 IF EOF
  6102. MX2 -4
  6103. SX1 B6
  6104. LX6 -14+4
  6105. BX2 -X2*X6
  6106. SB3 X2+
  6107. EQ B3,B1,LCB6 IF LEVEL 1
  6108.  
  6109. LCB4 SX2 A3-B1 RESET (X2)
  6110. SA7 A7+B1
  6111. NG X1,LCB7 IF EOF/EOI
  6112. LCB5 JP B2 RETURN
  6113.  
  6114. LCB6 SA7 A7+B1 STORE OUT
  6115. READ A3-B1,R RESTART TELETYPE READ
  6116. SB2 A4-B1
  6117. JP B2 RETURN
  6118.  
  6119. LCB7 LX6 3-9
  6120. PL X6,LCB5 IF NOT EOI
  6121. LX1 1 SET -2 RESPONSE
  6122. JP B2 RETURN
  6123.  
  6124. LCB8 SB2 A4
  6125. BX1 X6 MOVE EOI STATUS
  6126. JP B2 RETURN
  6127.  
  6128. RDX SPACE 4,20
  6129. ** RDX - READ EXIT.
  6130. *
  6131. * ENTRY (A2) = ADDRESS OF OUT.
  6132. * (A3) = ADDRESS OF FIRST.
  6133. * (A4) = RETURN ADDRESS.
  6134. * (X3) = FIRST.
  6135. * (B3) = IN.
  6136. * (B4) = OUT.
  6137. * (B5) = LIMIT.
  6138. *
  6139. * EXIT TO RETURN ADDRESS.
  6140. *
  6141. * MACROS READ.
  6142. *
  6143. * NOTES ROUTINE COPIED FROM COMCRDW.
  6144. * EXIT FROM READ SUBROUTINE TO CALLER.
  6145. * IF CIRCULAR BUFFER IS BUSY, OR EOR/EOF IS SENSED, NO
  6146. * ACTION IS TAKEN. OTHERWISE, THE WORD COUNT REMAINING
  6147. * IN THE BUFFER IS CHECKED AND A READ FUNCTION ISSUED.
  6148. * IF NECESSARY.
  6149.  
  6150.  
  6151. RDX= SA1 A3-B1 CHECK BUFFER STATUS
  6152. SX6 B4
  6153. LX1 59
  6154. SA6 A2 STORE OUT
  6155. SX2 A3-B1 RESET (X2)
  6156. PL X1,RDX1 IF BUFFER BUSY
  6157. LX1 -4
  6158. NG X1,RDX1 IF EOR/EOF/EOI SET
  6159. SA1 A2-B1 REREAD IN
  6160. SB3 X1
  6161.  
  6162. * IF BUFFER IS NOT BUSY, CHECK SIZE AND ISSUE READ.
  6163.  
  6164. SX6 B3-B4 (IN-OUT)
  6165. SB2 X3 (LIMIT-FIRST)
  6166. LX3 X6,B1 2*(IN-OUT)
  6167. SX7 B5-B2
  6168. AX6 60 SIGN OF (IN-OUT)
  6169. BX4 X6-X7 INVERT BUFFER IF OUT >= IN
  6170. IX6 X4-X3 BUFFER SIZE - 2*(IN-OUT)
  6171. AX7 9
  6172. NG X6,RDX1 IF BUFFER THRESHOLD NOT REACHED
  6173. ZR X7,RDX1 IF BUFFER NOT BIG ENOUGH TO READ AHEAD
  6174. READ X2 READ FILE
  6175.  
  6176. RDX1 SX1 B0 RESPONSE =0
  6177. SB2 A4
  6178. JP B2 RETURN
  6179. SPACE 4
  6180. * COMMON DECKS NEEDED GLOBALLY.
  6181.  
  6182. *CALL COMCCDD
  6183. *CALL COMCCFD
  6184. *CALL COMCCIO
  6185. *CALL COMCCPM
  6186. *CALL COMCCUA
  6187. *CALL COMCEDT
  6188. *CALL COMCLFM
  6189. *CALL COMCOVL
  6190. *CALL COMCPFM
  6191. *CALL COMCRDC
  6192. *CALL COMCSYS
  6193. *CALL COMCWTC
  6194. *CALL COMCWTO
  6195. *CALL COMCWTW
  6196. *CALL COMCZTB
  6197. SPACE 4
  6198. IF -DEF,ACCTE,3
  6199. TITLE PRESET AND BUFFER ALLOCATION.
  6200. QUAL$ BSS 0 COMMON DECK QUAL DONE BY XEDIT
  6201. QUAL PRESET
  6202.  
  6203.  
  6204. ** NOTE- PRESET RESIDES IN TWO LOCATIONS. THE MAJOR AREA
  6205. * RESIDES IN THE OUTGOING EDIT FILE BUFFER. THE OTHER
  6206. * SECTION DEALS ONLY WITH THE LAST MINUTE DETAILS WHICH
  6207. * COULD BE WIPED OUT BY USING THE EDIT FILES. THIS CODE
  6208. * RESIDES IN THE D.STR ARRAY.
  6209. PRF SPACE 4,20
  6210. ** PRF - PRESET EDIT FILE.
  6211. *
  6212. * ENTRY AT *PRF*, IF FILE IS LOCAL.
  6213. * AT *PRF3*, IF *C* PARAMETER USED.
  6214. * AT *PRF4*, IF *P* PARAMETER USED.
  6215. * (D.STR) = EDIT FILE NAME.
  6216. *
  6217. * EXIT TO *NCM* TO PROCESS COMMANDS.
  6218. * TO *ABT* IF FATAL ERROR.
  6219. *
  6220. * USES A - 1, 2, 3, 4, 5, 6, 7.
  6221. * X - 1, 2, 3, 4, 5, 6, 7.
  6222. * B - 3, 6, 7.
  6223. *
  6224. * CALLS GFN, RDF, RDL, RTA, SFN, STF STK, UPL.
  6225. *
  6226. * MACROS ATTACH, DISTC, GET, READ, RECALL, RENAME,
  6227. * REWIND, STATUS, WRITEC.
  6228.  
  6229.  
  6230. ORG D.STR FILE PRESET
  6231. PRF EQ PRF8 PROCESS LOCAL FILE
  6232.  
  6233. * BAD FILE READ.
  6234.  
  6235. PRF1 REWIND E.IN,RECALL
  6236. READ X2,RECALL
  6237. READ X2,RECALL
  6238. SA1 X2
  6239. LX1 59-9 POSITION EOI BIT
  6240. SX4 PRFB * FILE NOT XEDIT-ABLE.
  6241. PL X1,PRF6 IF ABOVE
  6242. SA1 E.IN+2 CHECK IN POINTER
  6243. SX1 X1-BUFB
  6244. NZ X1,PRF6 IF DATA ON FILE
  6245. PRF2 BSS 0
  6246. IF DEF,CYBRNET,2
  6247. WRITEC OUTPUT,PRFC * EMPTY FILE/CREATION MODE ASSUMED
  6248. SKIP 2
  6249. SX4 PRFC * EMPTY OR FILE NOT FOUND.
  6250. EQ PRF6 CREATE FILE
  6251.  
  6252. * ENTER IF *C* PARAMETER SPECIFIED (CREATION MODE).
  6253.  
  6254. PRF3 SA1 UPDATE
  6255. SB6 PRFE * UPDATE/CREATION MODE CONFLICT.*
  6256. PL X1,ABT IF ABOVE
  6257. REWIND E.IN,RECALL
  6258. REWIND E.OUT,RECALL REWIND SCRATCH FILES
  6259. SA1 PRFA PUT NAME INTO FET
  6260. SX7 1031B NOT BUSY, EOI ENCOUNTERED
  6261. SX6 -B1
  6262. BX7 X7+X1
  6263. SA6 IWHERE SET CREATION MODE FLAG
  6264. SA7 E.IN
  6265. SA6 RC SET NO DATA READ
  6266. SA6 FS SET NOT READING OFF EDIT FILE
  6267. EQ PRF10 COMPLETE INITIALIZATION
  6268.  
  6269. * ENTER IF *P* PARAMETER SPECIFIED.
  6270.  
  6271. PRF4 SA1 PRFA OLSCRB
  6272. SA2 IFN
  6273. MX7 59
  6274. BX7 -X7+X1 SET *NOT BUSY*
  6275. SA7 FS SET READING OFF SCRATCH FILE
  6276. LX6 X2
  6277. SA7 FT
  6278. SA6 FT+8
  6279. GET FT
  6280. SA3 X2
  6281. SX1 36000B LOAD MASK
  6282. BX6 X1*X3
  6283. ZR X6,PRF5 IF FILE GOTTEN
  6284. SA1 UPDATE
  6285. PL X1,PRF4.1 IF IN LOOK MODE
  6286. ATTACH X2,,,,W
  6287. EQ PRF4.2 CHECK FOR ERROR
  6288.  
  6289. PRF4.1 ATTACH X2,,,,R
  6290. PRF4.2 SA3 X2
  6291. SX1 36000B
  6292. BX6 X1*X3
  6293. SX4 ERR SET ERROR MESSAGE TO PFM
  6294. NZ X6,PRF6 IF ABOVE
  6295. MX7 1 SET *ATTACH* BIT
  6296. LX7 57-59
  6297. SA7 SPCP
  6298. SA1 FT+8
  6299. MX6 42 RENAME FOR D.A. EXIT PROBLEMS
  6300. SX7 B0
  6301. BX1 X6*X1
  6302. SA7 FS SET READING OFF PRIMARY FILE
  6303. RENAME FT,X1
  6304. PRF5 SA1 FT GET NAME
  6305. MX6 42
  6306. SX7 B1
  6307. BX2 X6*X1 CLEAR LOWER BITS
  6308. IX7 X2+X7 SET COMPLETE
  6309. RECALL E.IN
  6310. SA7 E.IN PUT NEW FILENAM INTO FET
  6311. SA1 SPCP SET *P* AS SPECIFIED PARAMETER
  6312. MX7 1
  6313. LX7 58-59
  6314. BX7 X1+X7
  6315. SA7 A1
  6316. EQ PRF9 SET UP FILE FOR EDITING
  6317.  
  6318. * PROCESS EDITFIL ERROR.
  6319. * (X4) = ADDRESS OF ERROR MESSAGE.
  6320.  
  6321. PRF6 WRITEC OUTPUT,X4 ISSUE MESSAGE
  6322. SA1 PRFF
  6323. SX6 X1-1 DECREMENT RETRY COUNT
  6324. SA6 A1+
  6325. ZR X1,PRF13 IF EXCEEDED RETRY LIMIT
  6326.  
  6327. PRF7 WRITEC OUTPUT,PRFH * NAME EDIT FILE
  6328. RJ RDL READ A LINE (NOTE- PRELIX + INITIALLY SET)
  6329. NZ X1,PRF7 IF HIT A CARRIAGE RETURN
  6330. SA1 D.LINE
  6331. SB6 E.STR *E.STR* USED AS SCRATCH
  6332. RJ UPL
  6333. SA5 E.STR
  6334. RJ GFN GET SPECIFIED EDITFIL NAME
  6335. SX4 =C* RESERVED FILE NAME.*
  6336. SB6 B6-303B
  6337. ZR B6,PRF7.1 IF RESERVED FILE NAME
  6338. SX4 PRFL
  6339. NZ B4,PRF7.1 IF SPECIAL CHARACTERS
  6340. SX4 PRFM
  6341. PRF7.1 NZ X1,PRF6 IF FILE NAME ERROR
  6342. SA6 IFN
  6343. NG X5,PRF8 IF END OF LINE
  6344. MX3 -6 EXTRACT LOWER CASE PART OF CHARACTER
  6345. BX5 -X3*X5
  6346. SX4 X5-1RC
  6347. ZR X4,PRF3 IF *C* USED
  6348. SX4 X5-1RP
  6349. ZR X4,PRF4 IF *P* USED
  6350.  
  6351. * NO PARAMETER USED
  6352.  
  6353. PRF8 SA1 IFN PUT EDIT NAME INTO FET
  6354. MX7 59D
  6355. BX7 -X7+X1 SET FET *NOT BUSY*
  6356. RECALL E.IN
  6357. MX6 0
  6358. SA7 E.IN SET NAME INTO FET
  6359. SA6 FS SET READING OFF EDIT FILE
  6360. RJ STF SET TERMINAL FILE
  6361. NZ X6,PRF9 IF EDITFIL NOT TYPE *TT*
  6362. SA1 E.IN
  6363. MX6 42
  6364. BX1 X6*X1
  6365. RJ SFN SPACE FILE NAME
  6366. SX4 =C* FILENAM CANNOT BE ASSIGNED TO THE TERMINAL.*
  6367. LX6 -6
  6368. SA6 X4 INSERT FILE NAME INTO MESSAGE
  6369. EQ PRF6 PROCESS EDITFIL ERROR
  6370.  
  6371. PRF9 REWIND E.IN,RECALL REWIND BOTH SCRATCH FILES
  6372. REWIND E.OUT,RECALL
  6373. BX7 X7-X7
  6374. SA7 E.IN+5 INITIALIZE STATUS RESPONCE CELLS
  6375. SA7 A7+B1
  6376. STATUS E.IN,P
  6377. SA1 E.IN+5 GET FNT ENTRY OF EDITFIL
  6378. ZR X1,PRF2 IF FILE NOT THERE
  6379. BX6 X1
  6380. LX1 59-14D EXECUTE ONLY FLAG
  6381. SX4 PRFJ * CANNOT EDIT EXECUTE ONLY FILES
  6382. NG X1,PRF6 IF ABOVE
  6383. READ E.IN
  6384. MX6 1
  6385. SA6 RC SET DAT READ
  6386. RJ RDF READ INITIAL LINE
  6387. PRF10 SA1 IFN MOVE FILE NAME
  6388. BX7 X1
  6389. SA7 IRFN
  6390. SA7 ISFN
  6391. SA7 INITZ SET INITIALIZATION COMPLETE
  6392. PRF10.1 SA1 JOPR
  6393. * EQ PRF11 (DB PARAMETER SPECIFIED)
  6394. MX2 -12
  6395. LX1 0-24
  6396. BX1 -X2*X1 ISOLATE ORIGIN TYPE
  6397. SX1 X1-TXOT
  6398. NZ X1,PRF11 IF NOT TELEX ORIGIN
  6399. DISTC ON,TLX
  6400.  
  6401. * PROCESS *FR* PARAMETER.
  6402.  
  6403. PRF11 SA1 PRFG
  6404. ZR X1,NCM IF *FR* NOT USED
  6405. SA1 E.LINE
  6406. SB6 E.STR
  6407. RJ UPL
  6408. SA1 E.STR-1
  6409. SB6 A1+1
  6410.  
  6411. * LOCATE FIRST CHARACTER AFTER 2 CONSECUTIVE BLANKS.
  6412.  
  6413. PRF12 SA1 A1+B1
  6414. SB3 A1-B6
  6415. NG X1,NCM IF END OF LINE REACHED, EXIT
  6416. SX2 X1-1R
  6417. ZR X2,PRF12 IF CHARACTER WAS A BLANK
  6418. SB6 A1+B1
  6419. LE B3,B1,PRF12 IF NOT AT LEAST 2 CONSECUTIVE BLANKS
  6420. SB6 B6-B1 SET TO FIRST CHARACTER
  6421. SB7 P.LINE
  6422. RJ RTA PACK COMMAND LINE
  6423. SA1 P.DEV SET COMMAND TO PREVIOUS COMMAND
  6424. RJ STK STACK DEVICES AND EXIT TO NCM
  6425. .J IFEQ DEBUG,1 IF DEBUG ON
  6426. WRITEC OUTPUT,PRFK
  6427. .J ENDIF
  6428. EQ NCM EXIT, PROCESS COMMANDS
  6429.  
  6430. * BATCH MODE - RETRY COUNT ABORT.
  6431.  
  6432. PRF13 SB6 PRFI * BATCH MODE - RETRY COUNT EXCEEDED.
  6433. EQ ABT ABORT XEDIT
  6434.  
  6435. PRFA DATA 0LSCRB
  6436. PRFB DATA C* FILE NOT XEDIT-ABLE.*
  6437. IF DEF,CYBRNET,2
  6438. PRFC DATA C* EMPTY FILE/ CREATION MODE ASSUMED.*
  6439. SKIP 1
  6440. PRFC DATA C* EMPTY OR FILE NOT FOUND.*
  6441. PRFE DATA C* LOOK/CREATION MODE CONFLICT.*
  6442. PRFF CON -1 RETRY COUNT. STOP WHEN 0 (SET IN PRESET)
  6443. PRFG DATA 0 .NE. 0 IF *FR* USED
  6444. PRFH DATA 10HNAME EDIT
  6445. VFD 24/4HFILE,12/0001B,24/
  6446. PRFI DATA C* BATCH ABORT - RETRY COUNT EXCEEDED.*
  6447. PRFJ DATA C* CANNOT EDIT EXECUTE ONLY FILES.*
  6448. PRFK DATA C+ *FR* COMMAND STACKING ERROR.+
  6449. PRFL DATA C* INCORRECT CHARACTERS IN FILE NAME.*
  6450. PRFM DATA C* TOO MANY CHARACTERS IN FILE NAME.*
  6451.  
  6452. ERRPL *-D.STR-D.STRL-1 IF PRF OVERFLOWS SCRATCH ARRAY
  6453. ORG * RESET ORIGIN
  6454. QUAL *
  6455. SPACE 4
  6456. * XEDIT BUFFERS.
  6457.  
  6458. USE BUFFERS FLUSH LITERALS
  6459.  
  6460. BUFA EQU * OUTGOING EDIT FILE
  6461. BUFB EQU BUFA+BUFAL INCOMING EDIT FILE
  6462. BUFI EQU BUFB+BUFBL PRIMARY INPUT FILE
  6463. BUFO EQU BUFI+BUFIL OUTPUT FILE
  6464. MINFL EQU BUFO+BUFOL+1 MINIMUM FL FOR XEDIT
  6465. BUFC EQU MINFL ALTERNATE INPUT FILE
  6466. BUFD EQU BUFC+BUFCL COPY/READ FILE
  6467. MAXFL EQU BUFD+BUFDL MAX FL FOR MAIN PROGRAM
  6468. RFL= EQU MINFL+1 INITIAL FIELD LENGTH
  6469. FWAOVL EQU MAXFL+2 MINIMUM OVERLAY FIELD LENGTH
  6470. PRS SPACE 4,15
  6471. ** PRS - PRESET XEDIT AND BEGIN EXECUTION.
  6472. *
  6473. * ENTRY NONE.
  6474. *
  6475. * EXIT TO *PRF*.
  6476. *
  6477. * USES A - ALL.
  6478. * X - ALL.
  6479. * B - 1, 2, 3, 4, 5, 6.
  6480. *
  6481. * CALLS ARG, ICH, UPL, VIS.
  6482. *
  6483. * MACROS ABORT, CSET, GETFNT, GETJA, MEMORY, MESSAGE,
  6484. * MOVE, OPEN, TSTATUS, WRITE, WRITEC.
  6485.  
  6486.  
  6487. XEDIT SB1 1 ENTRY
  6488. QUAL PRESET
  6489. IF DEF,TIMING,1
  6490. GETJA TIMING
  6491. MEMORY CM,,RECALL,RFL=
  6492. SA1 PRSS GET TOOLNAME FOR *FNL* CALL
  6493. RJ INT STORE INITIAL *CUA* VARIABLES
  6494.  
  6495. BX6 X6-X6 CLEAR BUFFER CONTROL WORD
  6496. SA6 PRSI
  6497. SA1 B1+B1
  6498. MX0 42
  6499. BX2 X0*X1
  6500. NZ X2,PRS2 IF FILE NAME PRESENT
  6501. PRS1 GETFNT PRSA
  6502. SA1 PRSI+1 GET FILE NAME
  6503. BX2 X0*X1
  6504. NZ X2,PRS2 IF FILE FOUND
  6505. SA3 PRSI
  6506. NG X3,PRS1 IF FILE NOT FOUND
  6507. SA2 PRSB =0LTAPE1
  6508. PRS2 SX7 B1
  6509. SA3 ACTR
  6510. BX7 X2
  6511. SB4 X3-1 SET NUMBER OF PARAMETERS
  6512. SA7 IFN PUT INCOMING NAME
  6513. LE B4,PRS4 IF 1 PARAMETER OR LESS
  6514. SA4 3
  6515. SB5 PRSC
  6516. RJ ARG PROCESS ARGUMENT TABLE
  6517. RJ VIS VOID INSTRUCTION STACK
  6518. ZR X1,PRS4 IF NO ERRORS
  6519. SA0 PRSD C* ERROR IN XEDIT ARGUMENTS.*
  6520.  
  6521. * PRESET ERROR ROUTINE - (A0) = ADDRESS OF MESSAGE.
  6522.  
  6523. PRS3 RJ FNL ISSUE ACCOUNTING MESSAGE
  6524. MESSAGE A0 ISSUE MESSAGE TO DAYFILE
  6525.  
  6526. ABORT
  6527.  
  6528. * IF *NH* PARAMETER, (PRS4) = EQ PRS5.
  6529. *
  6530. PRS4 WRITEC OUTPUT,PRSN XEDIT HEADER MESSAGE
  6531.  
  6532. * CHECK FOR FILE NAME CONFLICTS
  6533.  
  6534. PRS5 SA0 PRSF * FILE NAME CONFLICT.*
  6535. SB2 FFET-7
  6536. SB3 LFET-7
  6537. PRS6 SB2 B2+7 STEP TO NEXT OUTSIDE FET ADDRESS
  6538. GE B2,B3,PRS8 IF LOOPED THROUGH ALL FILES
  6539. SA1 B2+
  6540. SB4 B2+7
  6541. PRS7 SA2 B4 GET INNER LOOP FET NAME
  6542. BX3 X1-X2
  6543. SB4 B4+7
  6544. ZR X2,PRS7.1 IF NO FILE THERE (L=0)
  6545. ZR X3,PRS3 IF FILE NAMES COMPARE (ERROR)
  6546. PRS7.1 LE B4,B3,PRS7 IF NOT FINISHED WITH INNER LOOP FET
  6547. EQ PRS6 CHECK NEXT FILE NAME FROM FET-S
  6548.  
  6549. * PRESET INPUT AND OUTPUT FETS.
  6550.  
  6551. PRS8 SA1 OUTPUT SET UP RA+2 WITH FILE TO BE FLUSHED
  6552. MX2 42
  6553. SX6 A1
  6554. BX2 X1*X2
  6555. BX6 X2+X6
  6556. MX7 0
  6557. SA6 B1+B1
  6558. SA7 A6+B1
  6559. OPEN INPUT,READNR,RECALL
  6560. SA1 OUTPUT
  6561. ZR X1,PRS9 IF NO NAME PRESENT
  6562. OPEN OUTPUT,ALTERNR,RECALL
  6563. WRITE OUTPUT,* HANDLE OPEN BUG
  6564.  
  6565. * DETERMINE ASCII/CHARACTER SET/ORIGIN CODES.
  6566.  
  6567. PRS9 GETJO PRSR
  6568. SA2 BATCH
  6569. SA1 PRSR
  6570. SX6 X1-TXOT
  6571. BX6 X6+X2 0, IF *TXOT*, ELSE BATCH
  6572. SA6 A2
  6573. SA1 CSMR CHARACTER SET MODE
  6574. SB2 18D 64 CHARACTER SET OFFSET
  6575. NG X1,PRS10 IF 64 CHARACTER SET
  6576. SB2 B0 63 CHARACTER SET OFFSET
  6577. PRS10 SA5 AS
  6578. ZR X6,PRS11 IF TXOT AND *B* PARAMETER NOT USED
  6579. BX6 X6-X6 SET NO ASCII
  6580. ZR X5,PRS14 IF NO ASCII DESIRED
  6581. MX6 1 SET ASCII FLAG FOR *PRS14*
  6582. SB2 36D SET 64/ASCII
  6583. EQ PRS14 PRESET CHARACTERS
  6584.  
  6585. PRS11 TSTATUS TSTATUS
  6586. SA1 TSTATUS
  6587. MX3 -6
  6588. AX1 3*6
  6589. PRS11.1 BX6 -X3*X1 DETERMINE IF TERM TYPE HAS A *D*
  6590. LX1 -6
  6591. ZR X6,PRS11.1 IF NOT CHARACTER
  6592. + SX4 X6-1RD
  6593. NZ X4,PRS12 IF NOT ...D TERMINAL TYPE
  6594. SB2 B0 SET OLD CHARACTER SET
  6595. SA6 A5 TURN ON ASCII FLAG (NON ZERO)
  6596. EQ PRS14 PRESET CHARACTERS
  6597.  
  6598. PRS12 SA1 A1+B1
  6599. SX2 4
  6600. BX6 X2*X1
  6601. NZ X6,PRS13 IF ASCII FLAG SET
  6602. ZR X5,PRS14 IF ASCII NOT REQUIRED
  6603. CSET ASCII
  6604. SX6 3RASC SET SPECIAL ASCII FLAG
  6605.  
  6606. PRS13 SA6 A5 SET ASCII FLAG
  6607. SB2 36 SET 64/ASCII
  6608.  
  6609. * PRESET CHARACTERS DEPENDENT ON CHARACTER SET.
  6610.  
  6611. PRS14 SX7 B1+B1
  6612. SA1 CHARSET
  6613. ZR X6,PRS14.1 IF ASCII NOT ON
  6614. SA7 UPLA SET UNPACKS TO ASCII MODE
  6615. PRS14.1 SX6 B2 SAVE SHIFT VALUE
  6616. MX7 0
  6617. SA6 CHARSFT
  6618. SA7 CCDR+8 PLACE END OF LINE
  6619. RJ ICH INITIALIZE CHARACTERS
  6620.  
  6621. * MOVE COMMAND IMAGE TO *C.STR* AND ANALYZE.
  6622.  
  6623. SA1 CCDR
  6624. SB6 C.STR SET STRING DESTINATION
  6625. RJ UPL
  6626. MOVE 9,CCDR,I.LINE MOVE COMMAND IMAGE
  6627. SA1 C.STR-1
  6628. MX7 1
  6629. SB2 B1 SET CHARACTER POINTER
  6630. SA7 C.STR SET DEFAULT END OF LINE
  6631. SA7 C.STR+80 ALLOW ONLY 80 CHAR ON COMMAND
  6632.  
  6633. PRS15 SB2 B2+B1 INCREMENT POINTER
  6634. SA2 A1+B2
  6635. NG X2,PRS20 IF END OF LINE
  6636. SX3 X2-1R.
  6637. ZR X3,PRS16 IF .
  6638. SX3 X2-1R)
  6639. NZ X3,PRS15 IF NOT )
  6640. PRS16 SA2 A2+B1 GET DELIMITER CHARACTER
  6641. SB2 B2+2 SET POINTER TO CHARACTER AFTER DELIMITER
  6642. BX4 X2
  6643. NG X2,PRS20 IF END OF LINE
  6644. SX3 X2-1R
  6645. ZR X3,PRS20 IF BLANK (ASSUME IGNORE REST OF COMMAND)
  6646. SX6 B1
  6647. AX4 6
  6648. .CYB IF DEF,CYBRNET
  6649. + SX7 1R^ UP ARROW INVALID DELIMITER CHARACTER
  6650. ZR X4,PRS16.1 IF CHARACTER NOT ASCII
  6651. SX7 7402B SET FOR ASCII UP ARROW
  6652. SX6 7601B SET LOWER CASE A
  6653. .CYB ELSE
  6654. ZR X4,PRS16.1 IF CHARACTER IS NOT ASCII
  6655. SX6 7601B SET LOWER CASE A
  6656. .CYB ENDIF
  6657. PRS16.1 IX3 X2-X6 NEGATIVE IF NOT ALPHABETIC
  6658. SX6 X6+26D
  6659. IX4 X2-X6 POSITIVE IF NOT ALPHABETIC
  6660. BX3 -X3*X4 NEGATIVE IF DELIMITER IS ALPHABETIC
  6661. .CYB IF DEF,CYBRNET
  6662. NG X3,PRS17 IF DELIMITER IS ALPHA USE ;
  6663. IX6 X7-X2 UP ARROW CHECK
  6664. ZR X6,PRS17 IF YES THEN USE ;
  6665. SX7 X2-1R/-1 POSITIVE IF DELIMITER ABOVE /
  6666. SX6 X2-1R0 NEGATIVE IF BELOW 0
  6667. BX6 X7-X6 POSITIVE IFF BOTH SIGNS SAME
  6668. PL X6,PRS18 IF NOT +,-,*, OR / USE DELIMITER
  6669. PRS17 SX2 1R; USE SEMI-COLON
  6670. SB2 B2-1 MOVE POINTER BACK
  6671. PRS18 PX6 B2,X2 FORM C.STR WORD
  6672. .CYB ELSE
  6673. NG X3,PRS19 IF INCORRECT DELIMITER CHARACTER
  6674. PX6 B2,X2 FORM C.STR WORD
  6675. .CYB ENDIF
  6676. SA6 A1 PUT C.STR-1
  6677. MX2 -18
  6678. ECHO 4,P=(I.DEV,S.DEV)
  6679. SA1 P+1 SET DELIMITERS IN OTHER DEVICES
  6680. BX1 X2*X1
  6681. IX7 X1+X6
  6682. SA7 A1
  6683. EQ PRS20 CHECK INPUT AND OUTPUT FILES
  6684.  
  6685. * INCORRECT DELIMITER CHARACTER.
  6686.  
  6687. PRS19 SA1 BATCH
  6688. SA0 PRSG * INCORRECT DELIMITER CHARACTER.*
  6689. NZ X1,PRS3 IF BATCH MODE
  6690. WRITEC OUTPUT,A0 ISSUE MESSAGE TO TERMINAL
  6691. PRS20 SA1 INPUT+1 CHECK INPUT/OUTPUT = *TT*
  6692. SA2 OUTPUT+1
  6693. MX6 1
  6694. BX1 -X6*X1
  6695. BX2 -X6*X2
  6696. AX1 48
  6697. AX2 48
  6698. SX7 X1-2RTT
  6699. SX2 X2-2RTT
  6700. IX2 X2+X7
  6701. MX6 0
  6702. ZR X2,PRS21 IF BOTH ARE *TT*
  6703. SA6 PROMPT CLEAR ISSUING OF SPECIAL PROMPT
  6704. SA7 TTYIN SET STATUS OF INPUT FET
  6705. MOVE 2,PRSM,PRFH CHANGE *NAME EDIT FILE* MESSAGE
  6706. SX7 B1 IF EITHER NOT *TT*, ALLOW ONE RETRY
  6707. SA7 PRFF
  6708. PRS21 SA1 BATCH
  6709. ZR X1,PRS22 IF TELEX ORIGIN
  6710. MOVE PRSHL,PRSH,MESSAGE+1 MOVE BATCH ERROR MESSAGES
  6711. MOVE 2,PRSO,ETLA CHANGE BATCH ECHO STATUS
  6712. MOVE 1,PRSP,MODA CHANGE BATCH MODIFY SHIFT
  6713. PRS22 EQ PRF PRESET FILE
  6714.  
  6715. PRSA VFD 38/0LDUMMY,1/1,3/,18/1 DUMMY GETFNT FET
  6716. VFD 36/,6/10B,18/PRSI
  6717. BSS 6
  6718. VFD 12/1+2*1+1,6/,18/1S"PTFT",2/,1/1,1/,1/,1/,18/PRSI
  6719. BSS 4
  6720. PRSB DATA 0LTAPE1
  6721. PRSC BSS 0 ARGUMENT TABLE
  6722. AS ARG -ACTR,AS
  6723. B ARG -PRSR,BATCH
  6724. C ARG -PRSJ,PRF
  6725. DB ARG -PRSL,PRF10.1
  6726. FR ARG -ACTR,PRFG
  6727. I ARG INPUT,INPUT
  6728. L ARG OUTPUT,OUTPUT
  6729. LK ARG -PRSZ,UPDATE
  6730. NH ARG -PRSQ,PRS4
  6731. P ARG -PRSK,PRF
  6732. ARG
  6733. PRSD DATA C* ERROR IN XEDIT ARGUMENTS.*
  6734. PRSF DATA C* FILE NAME CONFLICT.*
  6735. PRSG DATA C* INCORRECT DELIMITER CHARACTER.*
  6736. PRSH BSS 0 BATCH ERROR MESSAGE TABLE
  6737. ERRPRS HERE
  6738. PRSHL EQU *-PRSH
  6739. PRSI BSS 1+2*1+1
  6740. PRSJ EQ PRF3 *C* PARAMETER
  6741. PRSK EQ PRF4 *P* PARAMETER
  6742. PRSL EQ PRF11 *DB* PARAMETER
  6743. PRSM DATA C* NAME EDIT FILE*
  6744. PRSN DATA C* "VERSION"*
  6745. PRSO BSS 0
  6746. ETL HEREL ECHO HEADER WORDS
  6747. PRSP BSS 0
  6748. MOD HEREL ECHO MODIFY WORD
  6749. PRSQ EQ PRS5 *NH* PARAMETER
  6750. PRSR DATA 100B PSEUDO BATCH
  6751. PRSZ DATA 0 SET LOOK MODE
  6752. PRSS VFD 60/PRST ADDRESS OF TOOLNAME
  6753. PRST VFD 60/0HXEDIT TOOLNAME FOR *CUA* MESSAGE
  6754.  
  6755. USE SETCHAR
  6756. DATA 0 SET END MARKER
  6757. USE *
  6758. SPACE 4
  6759. * COMMON DECKS NEEDED IN PRESET.
  6760.  
  6761. *CALL COMCARG
  6762. *CALL COMCDXB
  6763. *CALL COMCMVE
  6764. QUAL *
  6765. *CALL COMCSFN
  6766. *CALL COMCSTF
  6767. SPACE 4
  6768. .MH2 EQU MH2
  6769. OVLDEF 1,(USER INFORMATION ROUTINES)
  6770. SPACE 4
  6771. ** DEFINE ALTERNATE CHARACTER REPLACEMENTS.
  6772. *T 24/AS, 18/64 C, 18/63 C
  6773. *
  6774. * AS = ASCII 6/12 CHARACTER SET.
  6775. * 64 C = 64 CHARACTER SET.
  6776. * 63 C = 63 CHARACTER SET.
  6777.  
  6778. AM. VFD 24/67B,18/67B,18/67B AMPERSAND
  6779. FN. VFD 24/2RTH,18/2RTH,18/2RTH END OF HELP FILE NAME
  6780. QM. VFD 24/71B,18/71B,18/71B QUESTION MARK
  6781. SH. VFD 24/60B,18/60B,18/60B SHARP
  6782. UA. VFD 24/7402B,18/76B,18/76B UP ARROW
  6783. SPACE 4
  6784. MH2 SET .MH2
  6785. TITLE MACROS LOCAL TO OVERLAY.
  6786. ENDHELP SPACE 4,10
  6787. ** ENDHELP - CLOSE EXPLAIN ENTRY.
  6788. *
  6789. *
  6790. * ENDHELP
  6791. *
  6792. * ENTRY (A) = A MICRO CONTAINING THE NAME OF THE
  6793. * EXPLAIN ENTRY.
  6794. *
  6795. * EXIT A SYMBOL IS EQUATED TO THE LENGTH OF THE MESSAGE.
  6796. *
  6797. * NOTES THIS MACRO IS TO BE USED END AN EXPLAIN ENTRY.
  6798.  
  6799. PURGMAC ENDHELP
  6800.  
  6801. ENDHELP MACRO
  6802. "A"_L EQU *-"A"_A
  6803. ENDM ENDHELP
  6804. EXPP SPACE 4,15
  6805. ** EXPP - DEFINE PRIMARY EXPLAIN ENTRY.
  6806. *
  6807. *
  6808. * EXPP NAME
  6809. *
  6810. * ENTRY *NAME* = NAME OF ERROR MESSAGE.
  6811. *
  6812. * NOTES MACRO INITIALIZES THE DEFINITION FOR THE MESSAGE
  6813. * TEXT. THE *ENDHELP* MACRO IS USED TO CLOSE THE
  6814. * DEFINITION. THE TABLE FORMATS ARE PLACED IN AN
  6815. * UNLABELED REMOTE BLOCK.
  6816.  
  6817. PURGMAC EXPP
  6818.  
  6819. EXPP MACRO NAME
  6820. NAME_A BSS 0
  6821. A MICRO 1,, NAME
  6822. RMT
  6823. ORG TMSG+NAME-1
  6824. VFD 12/2000B+NAME_L
  6825. IF DEF,NAME_S,1
  6826. VFD 30/NAME_S
  6827. VFD *P/NAME_A
  6828. ORG *
  6829. RMT
  6830. ENDM EXPP
  6831. EXPS SPACE 4,10
  6832. ** EXPS - DEFINE SECONDARY EXPLAIN ENTRY TEXT.
  6833. *
  6834. *
  6835. * EXPS NAME,LEVEL
  6836. *
  6837. * ENTRY *NAME* = NAME OF ERROR MESSAGE.
  6838. * *LEVEL* = LEVEL FOR MESSAGE (1-31).
  6839. *
  6840. * NOTES MACRO SERVES SAME PURPOSE AS *EXPP*.
  6841.  
  6842. PURGMAC EXPS
  6843.  
  6844. EXPS MACRO NAME,LEVEL
  6845. IF -DEF,NAME_S,1
  6846. NAME_S BSS 32D
  6847. NAME_LEVEL_A BSS 0
  6848. A MICRO 1,, NAME_LEVEL
  6849. RMT
  6850. ORG NAME_S+LEVEL_B
  6851. VFD 12/2000B+NAME_LEVEL_L,*P/NAME_LEVEL_A
  6852. ORG *
  6853. RMT
  6854. ENDM EXPS
  6855. EXPLAIN SPACE 4,20
  6856. ** EXP - PROCESS EXPLAIN COMMAND.
  6857. *
  6858. * ENTRY (EXPLAIN) = EXPLAIN ERROR MESSAGE POINTERS.
  6859. *
  6860. * EXIT TO *NCM*.
  6861. *
  6862. * USES A - 0, 1, 4, 6.
  6863. * X - 0, 1, 2, 4, 5, 6, 7.
  6864. * B - 2, 3, 7.
  6865. *
  6866. * MACROS WRITEC, WRITEO, WRITEW.
  6867. *
  6868. * NOTES EXPLAIN ISSUES A MORE DETAILED STATEMENT CONCERNING
  6869. * THE LAST 4 XEDIT MESSAGES. EACH TIME THE EXPLAIN
  6870. * COMMAND IS USED, XEDIT WILL GIVE THE LAST ENTRY, AND
  6871. * REMOVE IT FROM THE STACK (THUS THE NEXT EXPLAIN WILL
  6872. * ISSUE THE ENTRY FOR THE PREVIOUS MESSAGE.) THIS
  6873. * COMMAND WILL WORK ONLY FOR THE LAST NON-EXPLAIN
  6874. * COMMAND.
  6875.  
  6876.  
  6877. EXP SA1 EXPLAIN ENTRY
  6878. LX1 12 POSITION LAST ENTRY
  6879. UX1 B7,X1 (B7) = EXPLAIN ENTRY
  6880. MX7 -24
  6881. LX1 12
  6882. BX6 X7*X1 REMOVE THIS EXPLAIN ENTRY
  6883. SA6 A1 REPLACE STACK
  6884. LE B7,NCM IF NO ENTRY ON STACK, EXIT
  6885. SX0 B7 ........PS/.........P
  6886. LX0 -6 S........P/P.........
  6887. SX2 X0 = PRIMARY IF THERE IS A SECONDARY
  6888. NZ X2,EXP0 IF THERE IS A SECONDARY
  6889. SX0 B7 /.........P
  6890. EXP0 BX2 X7*X0 S........./..........
  6891. LX2 6 .........S/..........
  6892. SA1 TMSG-1+X0 GET PRIMARY MESSAGE INDEX
  6893. ZR X1,EXP2 IF NO ENTRY FOR THIS ERROR
  6894. SA0 X1 SET MESSAGE ADDRESS
  6895. UX3,B2 X1 GET MESSAGE LENGTH
  6896. ZR X2,EXP1 IF NO SUB-INDEX
  6897. AX1 18
  6898. ZR X1,EXP1 IF NO SUB-TABLE
  6899. SB3 X1
  6900. SA1 X2+B3 GET SUB-INDEX MESSAGE TABLE ENTRY
  6901. ZR X1,EXP1 IF NO ENTRY
  6902. UX3 B2,X1 SET LENGTH
  6903. SA0 X1 SET ADDRESS
  6904. EXP1 SX5 B2 SAVE LENGTH
  6905. MX6 0
  6906. WRITEO OUTPUT ISSUES LINE FEED
  6907. WRITEC X2,EXPA * EXPLANATION OF-
  6908. SA4 MESSAGE+X0
  6909. WRITEC X2,X4 ECHO OFFENDING ERROR MESSAGE
  6910. WRITEW X2,A0,X5 ISSUE EXPLANATION
  6911. EQ NCM EXIT
  6912.  
  6913. * NO EXPLAIN ENTRY FOUND.
  6914.  
  6915. EXP2 WRITEC OUTPUT,EXPB
  6916. SA4 MESSAGE+X0
  6917. WRITEC X2,X4
  6918. EQ NCM EXIT
  6919.  
  6920. EXPA DATA C* EXPLANATION OF-*
  6921. EXPB DATA C* NO ENTRY FOUND FOR*
  6922.  
  6923. TMSG BSSZ 40B
  6924. SPACE 4
  6925. ** EXPLAIN ENTRY DEFINITIONS.
  6926.  
  6927. EXPP ARG.
  6928. DATA C* USUALLY MEANS THE USE OF AN EMPTY STRING IN THE*
  6929. DATA C* FIRST STRING OF A CHANGE OR LOCATE COMMAND.*
  6930. ENDHELP
  6931.  
  6932. EXPP BFN.
  6933. DATA C* FILE NAME WAS NOT OF PROPER FORM OR IT WAS A*
  6934. DATA C* FILE NAME WHICH IS RESERVED BY XEDIT.*
  6935. ENDHELP
  6936.  
  6937. EXPP BTL.
  6938. DATA C* THE EDIT FILE CONTAINS AT LEAST ONE LINE OF *
  6939. DATA C* DATA THAT IS NOT IN A FORM XEDIT CAN UNDERSTAND.*
  6940. ENDHELP
  6941.  
  6942. EXPP CNV.
  6943. DATA C* DURING CERTAIN MODES WITHIN XEDIT, SOME COMMANDS*
  6944. DATA C* ARE DISABLED.*
  6945. ENDHELP
  6946.  
  6947. EXPP DEL.
  6948. DATA C* MISSING STRING DELIMITER IN THE STRING FIELD OF*
  6949. DATA C* A COMMAND. A DELIMITER IS ASSUMED AFTER THE LAST*
  6950. DATA C* NONBLANK CHARACTER OF THE COMMAND LINE.*
  6951. ENDHELP
  6952.  
  6953. EXPP EMI.
  6954. DATA C* SPECIFIED IF DEFAULT FILE FUNCTION IS INCORRECT*
  6955. DATA C* ON SPECIFIED OR DEFAULT FILE.*
  6956. ENDHELP
  6957.  
  6958. EXPP EOF.
  6959. DATA C* AN END OF FILE MARK HAS BEEN READ FROM THE EDIT*
  6960. DATA C* FILE, AND, UNLESS A DEOF COMMAND WAS BEING*
  6961. DATA C* PROCESSED, IT HAS BEEN RETAINED.*
  6962. ENDHELP
  6963.  
  6964. EXPP EOR.
  6965. DATA C* AN END OF RECORD MARK HAS BEEN READ FROM THE EDIT*
  6966. DATA C* FILE, AND, UNLESS A DEOR COMMAND WAS BEING*
  6967. DATA C* PROCESSED, IT HAS BEEN RETAINED.*
  6968. ENDHELP
  6969.  
  6970. EXPP EOI.
  6971. DATA C* THE EDITOR HAS GONE PAST THE LAST LINE OF THE FILE*
  6972. DATA C* WHILE TRYING TO COMPLETE PROCESSING OF THE LAST*
  6973. DATA C* COMMAND. PROCESSING OF THAT COMMAND IS STOPPED AND*
  6974. DATA C* THE POINTER IS MOVED TO THE TOP OF THE FILE.*
  6975. ENDHELP
  6976.  
  6977. EXPP FCP.
  6978. DATA C* THE SPECIFIED FILE HAS BEEN REWOUND AND RE-COPIED.*
  6979. DATA C* THIS IS THE DEFAULT ACTION FOR THE END, FILE, AND*
  6980. DATA C* QUIT COMMANDS IF THE FILE IS EITHER DIRECT ACCESS*
  6981. DATA C* OR A MAGNETIC TAPE FILE.*
  6982. ENDHELP
  6983.  
  6984. EXPP FCR.
  6985. DATA C* THE SPECIFIED FILE IS EITHER AN EXECUTE OR APPEND*
  6986. DATA C* ONLY FILE; OR IS EITHER NOT A LOCAL FILE, OR A*
  6987. DATA C* PERMANENT FILE DEPENDING ON THE SPECIFIED COMMAND*
  6988. DATA C* OPTION.*
  6989. ENDHELP
  6990.  
  6991. EXPP FLC.
  6992. DATA C* THE SPECIFIED FILE HAS BEEN MADE A LOCAL FILE.*
  6993. DATA C* FOR THE END, FILE, AND QUIT COMMANDS, THIS*
  6994. DATA C* FUNCTION IS DEFAULT FOR INDIRECT ACCESS FILES.*
  6995. ENDHELP
  6996.  
  6997. EXPP FRP.
  6998. DATA C* THE PERMANENT FILE COPY HAS BEEN REPLACED.*
  6999. ENDHELP
  7000.  
  7001. EXPP FSV.
  7002. DATA C* A PERMANENT FILE COPY HAS BEEN SAVED.*
  7003. ENDHELP
  7004.  
  7005. EXPP ILL.
  7006. DATA C* USUALLY MEANS A NONNUMERIC CHARACTER IN A NUMERIC*
  7007. DATA C* FIELD OR EXTRA INFORMATION IN A COMMAND.*
  7008. ENDHELP
  7009.  
  7010. EXPP LFM.
  7011. DATA C+ THE SYSTEM LOCAL FILE PROCESSOR HAS DETECTED AN+
  7012. DATA C* ERROR. PLEASE REPORT THE PROBLEM, ALONG WITH AS*
  7013. DATA C* MUCH INFORMATION AS POSSIBLE REGARDING THIS XEDIT*
  7014. DATA C* RUN, TO A CONSULTANT.*
  7015. ENDHELP
  7016.  
  7017. EXPP LNNF.
  7018. DATA C* THE SPECIFIED LINE NUMBER COULD NOT BE LOCATED.*
  7019. ENDHELP
  7020.  
  7021. EXPP LNTL.
  7022. DATA C* IN THE ALN, ALNS, OR RLN COMMAND, THE LINE*
  7023. DATA C* NUMBER BECAME GREATER THAN 99999.*
  7024. ENDHELP
  7025.  
  7026. EXPP NSC.
  7027. DATA C* THE COMMAND IS INCORRECT OR AN IMPROPER SEPARATOR*
  7028. DATA C* WAS USED AFTER THE COMMAND.*
  7029. ENDHELP
  7030.  
  7031. EXPP PFM.
  7032. DATA C* ERROR IN PERMANENT FILE OPERATION.*
  7033. ENDHELP
  7034.  
  7035. EXPP SNF.
  7036. DATA C* IF A 0 IS USED FOR THE REPEAT COUNT ON ANY STRING*
  7037. DATA C* SEARCH COMMAND, AND THE STRING IS NOT IN THE*
  7038. DATA C* CURRENT LINE, XEDIT ISSUES THE ABOVE MESSAGE*
  7039. DATA C* AND DOES NOT ADVANCE THE POINTER. (ALSO, ANY*
  7040. DATA C* REMAINING COMMANDS ON A DELIMITED COMMAND*
  7041. DATA C* LINE ARE IGNORED. IN ADDITION, THE 0 IS USED*
  7042. DATA C* IF USING THE INPUT MODE ECSAPE CHARACTER.*
  7043. ENDHELP
  7044.  
  7045. EXPP STK.
  7046. DATA C* AN ATTEMPT WAS MADE TO RECURRSIVELY USE AN INPUT*
  7047. DATA C* SOURCE. AN EXAMPLE OF THIS IS-*
  7048. DATA C* Y/PRINT/Y-WHERE-*
  7049. DATA C* IN THE EXAMPLE, THE Y/Z COMMAND ATTEMPTS TO CALL*
  7050. DATA C* ANOTHER Y/Z COMMAND, WHICH IS INCORRECT.*
  7051. ENDHELP
  7052.  
  7053. EXPP TRUNC.
  7054. DATA C* AS A RESULT OF A COMMAND, THE LINE WHOSE POSITION*
  7055. DATA C* IS GIVEN HAS BEEN TRUNCATED TO 160 CHARACTERS.*
  7056. DATA C* THIS ACTION OCCURS AUTOMATICALLY WHENEVER A LINE*
  7057. DATA C* IS EXTENDED WITHIN XEDIT TO INCLUDE MORE THAN*
  7058. DATA C* 160 CHARACTERS.*
  7059. ENDHELP
  7060. SPACE 4
  7061. ** ARGUMENT ERROR SECONDARY EXPLANATIONS.
  7062.  
  7063. EXPS ARG.,1 F0 CONFLICT IN INPUT MODE
  7064. DATA C+ WHILE USING THE COMMAND ESCAPE CHARACTER OF+
  7065. DATA C+ *INPUT* MODE TO ENTER COMMANDS, THE MOVEMENT OF+
  7066. DATA C* THE POINTER IS DISALLOWED. FOR THIS REASON, XEDIT*
  7067. DATA C* FORBIDS USERS FROM ENTERING ANY REPEAT COUNT ON*
  7068. DATA C+ ANY COMMANDS (FOR EXAMPLE - THE *LOCATE* OR +
  7069. DATA C+ *CHANGE* COMMANDS). ALSO VOIDED ARE ANY PREFIX+
  7070. DATA C* CHARACTERS WHICH POSITION THE POINTER.*
  7071. ENDHELP
  7072. SPACE 4
  7073. ** BAD FILE NAME SECONDARY EXPLANATIONS.
  7074.  
  7075. EXPS BFN.,1 BAD FILE NAME
  7076. DATA C* THE FILE NAME ENTERED CONTAINS EITHER INCORRECT*
  7077. DATA C* CHARACTERS, OR IS TOO LONG.*
  7078. ENDHELP
  7079.  
  7080. EXPS BFN.,2 NO FILE NAME
  7081. DATA C* THE COMMAND IS MISSING A REQUIRED FILE NAME.*
  7082. ENDHELP
  7083.  
  7084. EXPS BFN.,3 RESERVED FILE NAME
  7085. DATA C* THE FILE NAME ENTERED IS ONE WHICH IS RESERVED BY*
  7086. DATA C* XEDIT. A PARTIAL LIST INCLUDES- INPUT, OUTPUT,*
  7087. DATA C* SCRA, SCRB, ... SCRF, SCRG AND (FOR COPY AND*
  7088. DATA C* COPYD COMMANDS) THE EDIT FILE NAME.*
  7089. ENDHELP
  7090. SPACE 4
  7091. ** COMMAND NOT VALID SECONDARY EXPLANATIONS.
  7092.  
  7093. EXPS CNV.,1
  7094. DATA C* WHILE CREATING A FILE UNDER XEDIT, VARIOUS COM-*
  7095. DATA C* MANDS ARE DISABLED AS THEY ATTEMPT TO REFERENCE*
  7096. DATA C* OR MODIFY PARTS OF THE FILE WHICH DO NOT EXIST.*
  7097. DATA C* CREATION MODE IS AUTOMATICALLY EXITED UPON ENTRY*
  7098. DATA C* OF THE FIRST TEXT LINE (USE THE INSERT OR INPUT*
  7099. DATA C* COMMANDS).*
  7100. ENDHELP
  7101.  
  7102. EXPS CNV.,3
  7103. DATA C* WHILE USING THE INPUT MODE COMMAND ESCAPE OPTION,*
  7104. DATA C* ANY COMMAND WHICH MOVES THE POINTER IS NOT ALLOWED.*
  7105. DATA C* THE COMMAND SPECIFIED IS THUS INCORRECT.*
  7106. ENDHELP
  7107. SPACE 4
  7108. ** EMI - FILE FUNCTION INCORRECT SECONDARY EXPLANATIONS.
  7109.  
  7110. EXPS EMI.,1
  7111. DATA C* THE SPECIFIED FILE CANNOT BE UPDATED. THIS CAN*
  7112. DATA C* RESULT IF THE FILE IS LOCK OR NOT IN WRITE MODE.*
  7113. ENDHELP
  7114.  
  7115. EXPS EMI.,2
  7116. DATA C+ THE *L* PARAMETER IS INCORRECT ON DIRECT ACCESS+
  7117. DATA C* OR MAGNETIC TAPE FILES.*
  7118. ENDHELP
  7119. SPACE 4
  7120. ** FILE CANNOT BE ACCESSED SECONDARY EXPLANATIONS.
  7121. *
  7122.  
  7123.  
  7124. EXPS FCR.,1
  7125. DATA C* THE FILE IS AN EXECUTE OR APPEND ONLY FILE THUS*
  7126. DATA C* IS NOT ACCESSABLE.*
  7127. ENDHELP
  7128.  
  7129. EXPS FCR.,2
  7130. DATA C* THE FILE IS NOT PRESENTLY LOCAL TO THE JOB. ALSO,*
  7131. DATA C* WHEN IF THE FILE IS DIRECT ACCESS (AND CURRENTLY*
  7132. DATA C* ATTACHED) THE FILE CANNOT BE ACCESS FROM THE*
  7133. DATA C* PERMANENT FILE AREA.*
  7134. ENDHELP
  7135.  
  7136. EXPS FCR.,3
  7137. DATA C* THE FILE IS NOT OBTAINABLE FROM THE PERMANENT*
  7138. DATA C* FILE AREA.*
  7139. ENDHELP
  7140. SPACE 4
  7141. ** PFM SECONDARY EXPLANATIONS.
  7142. EXPS PFM.,1 (FILE) BUSY.
  7143. DATA C* DIRECT ACCESS FILE IS ATTACHED ELSEWHERE IN WRITE*
  7144. DATA C* MODE.*
  7145. ENDHELP
  7146.  
  7147. EXPS PFM.,2 (FILE) NOT FOUND.
  7148. DATA C* SPECIFIED FILE COULD NOT BE FOUND.*
  7149. ENDHELP
  7150.  
  7151. EXPS PFM.,4 (FILE) NOT ON MASS STORAGE.
  7152. DATA C* SPECIFIED FILE DOES NOT RESIDE ON A MASS STORAGE*
  7153. DATA C* DEVICE.*
  7154. ENDHELP
  7155.  
  7156. EXPS PFM.,5 (FILE) ALREADY PERMANENT.
  7157. DATA C* THERE IS ALREADY A FILE EITHER SAVED OR DEFINED*
  7158. DATA C* UNDER THE DESIRED NAME. TRY USING THE RENAME*
  7159. DATA C* PARAMETER.*
  7160. ENDHELP
  7161.  
  7162. EXPS PFM.,10 USER ACCESS NOT VALID
  7163. DATA C* USER IN NOT VALIDATED TO SAVE FILES AND/OR TO*
  7164. DATA C* ACCESS A REMOVABLE DEVICE.*
  7165. ENDHELP
  7166.  
  7167. EXPS PFM.,12 FILE TOO LONG.
  7168. DATA C* THE SPECIFIED FILE IS TOO LONG TO BE SAVED OR*
  7169. DATA C* REPLACED.*
  7170. ENDHELP
  7171.  
  7172. EXPS PFM.,16 PF UTILITY ACTIVE.
  7173. DATA C* DUE TO ACTIVITY WITHIN THE SYSTEM, THE SPECIFIED*
  7174. DATA C* PERMANENT FILE OPERATION CANNOT BE DONE AT THE*
  7175. DATA C* PRESENT TIME. THE OPERATION SHOULD BE RETRIED*
  7176. ENDHELP
  7177.  
  7178. EXPS PFM.,20 CATALOG OVERFLOW - FILES.
  7179. DATA C* YOU HAVE EXCEEDED YOUR VALIDATED LIMIT FOR THE*
  7180. DATA C* MAXIMUM NUMBER OF PERMANENT FILES.*
  7181. ENDHELP
  7182.  
  7183. EXPS PFM.,21 CATALOG OVERFLOW - SIZE.
  7184. DATA C* THE CUMULATIVE SIZE OF THE INDIRECT ACCESS FILES*
  7185. DATA C* IN YOUR CATALOG HAVE EXCEEDED YOUR VALIDATION*
  7186. DATA C* LIMIT.*
  7187. ENDHELP
  7188.  
  7189. EXPS PFM.,23 I/O SEQUENCE ERROR.
  7190. DATA C* PLEASE NOTIFY A CONSULTANT OF THIS ERROR,*
  7191. DATA C* ENCLOSING (IF POSSIBLE) A HARD COPY OF YOUR*
  7192. DATA C* SESSION. PLEASE RETRY YOUR COMMAND.*
  7193. ENDHELP
  7194.  
  7195. EXPS PFM.,30 TRACK LIMIT
  7196. DATA C* PERMANET FILE DEVICE HAS RUN OUT OF TRACKS. PLEASE*
  7197. DATA C* NOTIFY CONSULTANT AS SOON AS POSSIBLE.*
  7198. ENDHELP
  7199.  
  7200. EXPS PFM.,31 FILE LENGTH ERROR
  7201. DATA C* ERROR IN PERMANENT FILE. NOTIFY CONSULTANT AS SOON*
  7202. DATA C* AS POSSIBLE. PLEASE DO NOT USE THE SPECIFIED FILE.*
  7203. ENDHELP
  7204.  
  7205. EXPS PFM.,33 DIRECT ACCESS FILE ERROR
  7206. DATA C* ERROR IN SYSTEM DIRECT ACCESS FILE DEFINITION.*
  7207. DATA C* PLEASE NOTIFY CONSULTANT AS SOON AS POSSIBLE.*
  7208. ENDHELP
  7209.  
  7210. EXPS PFM.,34 REPLACE ERROR
  7211. DATA C* NOTIFY CONSULTANT.*
  7212. ENDHELP
  7213.  
  7214. EXPS PFM.,35 PFM ABORTED
  7215. DATA C* PERMANENT FILE MANAGER ABORTED. RETRY OPERATION.*
  7216. ENDHELP
  7217. HELP SPACE 4,30
  7218. ** HELP - PROCESS XEDIT HELP COMMAND.
  7219. *
  7220. * ENTRY (IN - IN+80) = COMMAND LINE.
  7221. * (LSEP) = SUBSCRIPT OF SEPARATOR.
  7222. *
  7223. * EXIT HELP ENTRY LISTED.
  7224. *
  7225. * USES A - 1, 2, 3, 5, 6, 7.
  7226. * X - ALL.
  7227. * B - 2, 3.
  7228. *
  7229. * CALLS HTI.
  7230. *
  7231. * MACROS CSET, GET, OPEN, READ, READW, RECALL, REWIND,
  7232. * STATUS, WRITEC, WRITER, WRITEW.
  7233. *
  7234. * NOTES HELP PICKS THE COMMAND OFF THE ARGUMENT OF THE HELP
  7235. * COMMAND. IF NO COMMAND IS SPECIFIED, A LISTING OF ALL XEDIT
  7236. * COMMANDS AND COMMAND ABBREVIATIONS AND PREFIX CHARACTERS IS
  7237. * GIVEN. IF A COMMAND OR PREFIX CHARACTER IS SPECIFIED ON THE
  7238. * HELP COMMAND, IT IS COMPARED WITH THOSE IN THE XEDIT COMMAND
  7239. * TABLE AND THE UNABBREVIATED FORM IS SELECTED. XEDITI FILE
  7240. * IS THEN GOTTEN FROM THE LIBRARY IF IT IS NOT ALREADY LOCAL.
  7241. * THE FILE IS THEN SEARCHED FOR A MATCHING COMMAND AND THE
  7242. * COMMAND ENTRY IS PRINTED OUT. NOTE - PAGEINATION LINES ARE
  7243. * FLAGGED WITH A *>*. THE LINE BEFORE EACH COMMAND ENTRY IS
  7244. * FLAGGED WITH A *-* IN COLUMN 35.
  7245.  
  7246.  
  7247. HELP SA1 NUMS RESTORE A5 POINTER
  7248. SA2 A1+B1
  7249. MX7 1
  7250. ZR X1,HLP21 IF NO PARAMETER
  7251. SA2 X2
  7252. SA5 X1
  7253. NG X5,HLP21 IF NO PARAMETER
  7254. BX6 X7+X2
  7255. SA6 A2
  7256. SA1 A5+B1 CHECK NEXT CHARACTER
  7257. PL X1,HLP0 IF NOT END OF LINE
  7258. MX1 0 CLEAR CHARACTER
  7259. HLP0 SX4 X5-1R0
  7260. SX3 X5-1R+
  7261. SX2 X5 MOVE CHARACTER
  7262. LX2 6
  7263. BX2 X2+X1
  7264. SB2 X2
  7265. BX3 -X4*X3 NEG. IF NUMBER
  7266. SA2 HLPA
  7267. NG X3,HLP11 IF A NUMBER
  7268. SB3 X2
  7269. HLP1 EQ B3,B2,HLP12 IF SPECIAL CHARACTER
  7270. SA2 A2+B1
  7271. SB3 X2
  7272. NZ X2,HLP1 IF NOT END OF LIST
  7273. MX6 1 PREPARE TO PARSE COMMAND
  7274. MX4 26
  7275. MX3 -6
  7276. LX4 -5 PREPARE CHARACTER MASK
  7277. HLP2 BX0 -X3*X5 REMOVE ASCII
  7278. SB3 X0+4
  7279. LX1 B3,X4 SHIFT MASK
  7280. PL X1,HLP4 IF NOT A-Z
  7281. BX1 X3*X5
  7282. ZR X1,HLP3 IF NOT ASCII CHARACTER
  7283. SX1 X1-7600B
  7284. NZ X1,HLP4 IF NOT LOWER CASE A-Z
  7285.  
  7286. * MERGE CHARACTERS.
  7287.  
  7288. HLP3 LX6 6
  7289. BX6 X6+X0
  7290. SA5 A5+1
  7291. PL X5,HLP2 IF MORE CHARACTERS
  7292.  
  7293. * CHECK FOR LEGAL PARAMETER.
  7294.  
  7295. HLP4 BX1 -X3*X6 ISOLATE LAST CHARACTER OF COMMAND
  7296. MX0 1
  7297. SX4 X1-1RW
  7298. ZR X4,HLP5 IF *W* POSTFIX
  7299. SX4 X1-1RA
  7300. NZ X4,HLP6 IF NOT *A* POSTFIX
  7301. HLP5 BX6 X3*X6 REMOVE POSTFIX
  7302. HLP6 LX6 6
  7303. PL X6,HLP6 IF NOT LEFT JUSTIFIED
  7304. BX6 -X0*X6 REMOVE POSITION BIT
  7305. SA1 JUMP SEARCH COMMAND TABLE
  7306. SA6 JUMPX SET NAME AT END
  7307. HLP7 BX3 X1-X6
  7308. SA1 A1+B1
  7309. NZ X3,HLP7 IF NOT A MATCH
  7310. NG X3,HLP7 IF COMPARED A INFORMATION WORD
  7311. NG X1,HLP9 IF PRESENTLY ON AN INFORMATION WORD
  7312. HLP8 BX6 X1
  7313. SA1 A1+B1
  7314. PL X1,HLP8 IF NOT AT AN INFORMATION WORD
  7315. HLP9 SX1 X1
  7316. ZR X1,HLP10 IF COMMAND NOT IN TABLE
  7317. EQ HLP13 PROCESS COMMAND
  7318.  
  7319. HLP10 SA6 HLPF
  7320. WRITEC OUTPUT,HLPE
  7321. EQ NCM CONTINUE
  7322.  
  7323. * PROCESS NUMERIC PARAMETER.
  7324.  
  7325. HLP11 SX6 1R$
  7326. LX6 -6
  7327. EQ HLP13 PROCESS COMMAND
  7328.  
  7329. * PROCESS SPECIAL COMMAND.
  7330.  
  7331. HLP12 MX3 42
  7332. BX6 X2*X3 ISOLATE SEARCH PATTERN:
  7333. EQ HLP13 PROCESS COMMAND.
  7334. HLP13 SA1 NUMS+1
  7335. SA2 X1
  7336. SX7 X2
  7337. LX2 1
  7338. NG X2,HLP13.1 IF REAL EOL
  7339. SA7 A2
  7340. HLP13.1 SA2 HLPK
  7341. SA6 HLPH COMMAND TO SEARCH FOR
  7342. SA6 A2
  7343. NZ X2,HLP14 IF XEDITI ALREADY GOTTEN
  7344. STATUS XEDITI
  7345. SA1 XEDITI
  7346. SX3 7776B
  7347. BX3 X3*X1
  7348. NZ X3,HLP14 IF FILE GOTTEN
  7349. GET XEDITI,,,,,,IP
  7350. HLP14 OPEN XEDITI,READNR,RECALL
  7351. REWIND XEDITI,R
  7352. READ XEDITI
  7353. SA5 HLPH COMMAND TO SEARCH FOR
  7354. LX6 X5,B1
  7355. SB2 B1+B1
  7356. BX7 X6+X5
  7357. LX4 X7,B2
  7358. SA3 HLPI =10HHHHHHHHHHH
  7359. BX6 X4+X7
  7360. LX7 -2
  7361. BX4 X6+X7
  7362. BX3 X3*X4 BIT 3 OF CHAR SET IF CHAR NOT ZERO
  7363. AX7 X3,B1
  7364. BX0 X5 MASK
  7365. BX4 X7+X3
  7366. LX7 X4,B2
  7367. BX6 X4+X7
  7368. AX7 X4,B2
  7369. BX0 X6+X7 COMMAND MASK
  7370. HLP15 MX6 0
  7371. SA6 E.SCR+3
  7372. READC XEDITI,E.SCR,8
  7373. ZR X1,HLP16 IF NO EOF/EOR
  7374. RECALL X2
  7375. WRITEC OUTPUT,HLPG
  7376. EQ NCM EXIT
  7377.  
  7378. HLP16 SA1 HLPJ
  7379. ZR X1,HLP17 IF HELP ENTRY EXPECTED
  7380. SA1 E.SCR+3
  7381. SA3 =6L -
  7382. BX6 X1-X3
  7383. LX6 6*6 SHIFT CHARACTER AFTER - TO CHARACTER 9
  7384. AX6 6 PROCESS CBR/CCR DIFFERENCE
  7385. SA6 HLPJ SET HELP ENTRY EXPECTED IF - IN COL 35
  7386. EQ HLP15 READ NEXT LINE
  7387.  
  7388. HLP17 SA1 E.SCR
  7389. ZR X1,HLP15 IF BLANK LINE
  7390. BX2 X1
  7391. LX2 2*6
  7392. SX2 X2-2R
  7393. ZR X2,HLP15 IF LINE BEGINS WITH 2 BLANKS
  7394. AX1 54
  7395. SX6 X1-1R>-777700B
  7396. ZR X6,HLP15 IF PAGINATION
  7397. SA6 HLPJ CLEAR HELP ENTRY EXPECTED FLAG
  7398. SA1 A1
  7399. BX3 X1-X5 CHECK FOR COMMAND MATCH
  7400. BX6 X0*X3
  7401. NZ X6,HLP15 IF NO MATCH
  7402. BX7 X0
  7403. AX7 6
  7404. BX7 -X0*X7 MASK FOR NEXT CHARACTER
  7405.  
  7406. * NO COMMAND IS .GE. 9 CHARACTERS IN LENGTH.
  7407.  
  7408. SA2 =10H
  7409. BX2 X1-X2 COMPARE WITH BLANK
  7410. BX3 X7*X1
  7411. BX2 X7*X2
  7412. ZR X3,HLP17.1 IF NEXT CHARACTER IS 00B
  7413. NZ X2,HLP15 IF NEXT CHARACTOR IS NOT BLANK (55B)
  7414. HLP17.1 SA1 CSMR
  7415. PL X1,HLP18 IF 63 CHARACTER SET
  7416. SA2 BATCH
  7417. NZ X2,HLP18 IF BATCH MODE
  7418. SA1 AS
  7419. ZR X1,HLP18 IF ALREADY IN NORMAL CHARACTER SET MODE
  7420. CSET NORMAL
  7421.  
  7422. * A MATCH IS FOUND IN THE XEDIT HELP FILE. LIST ENTRY.
  7423.  
  7424. HLP18 WRITEC OUTPUT,E.SCR
  7425. RJ HTI CHECK FOR INTERRUPT
  7426. HLP19 READC XEDITI,E.SCR
  7427. NZ X1,HLP20 IF EOF/EOR
  7428. SA1 E.SCR+3
  7429. SA2 =6L -
  7430. BX3 X1-X2
  7431. LX3 6*6
  7432. AX3 6 REMOVE CHARACTOR 36
  7433. ZR X3,HLP20 IF END OF ENTRY
  7434. SA1 E.SCR
  7435. AX1 54
  7436. SB2 X1-1R>-777700B
  7437. ZR B2,HLP19 IF PAGEINATION
  7438. EQ HLP18 WRITE NEXT LINE
  7439.  
  7440. HLP20 RECALL XEDITI
  7441. EQ HLP23 EXIT
  7442.  
  7443. HLP21 SA1 CSMR
  7444. PL X1,HLP22 IF 63 CHARACTER SET
  7445. SA2 BATCH
  7446. NZ X2,HLP22 IF BATCH MODE
  7447. SA1 AS
  7448. ZR X1,HLP22 IF ALREADY IN NORMAL MODE
  7449. CSET NORMAL
  7450. HLP22 BSS 0
  7451. WRITEW OUTPUT,HLPC,HLPD
  7452. HLP23 RJ HTI CHECK FOR INTERRUPT
  7453. SA1 CSMR
  7454. PL X1,NCM IF 63 CHARACTER SET, EXIT
  7455. SA2 BATCH
  7456. NZ X2,NCM IF IN BATCH MODE
  7457. SA1 AS
  7458. ZR X1,NCM IF TERMINAL WAS IN NORMAL MODE
  7459. WRITER OUTPUT,RECALL
  7460. CSET ASCII
  7461. EQ NCM RETURN
  7462.  
  7463. HLPA BSS 0
  7464. HELPSP HERE ASSEMBLY SPECIAL FORMS
  7465. DATA 0
  7466.  
  7467. D OPSYN DATA
  7468. HLPC BSS 0
  7469. D C*THE FOLLOWING IS A LIST OF ALL XEDIT COMMANDS AND IN BRACKETS,*
  7470. D C*THEIR ABBREVIATIONS.*
  7471. D C* *
  7472. MHELP (.)
  7473. MHELP (-)
  7474. HELP HERE
  7475. DATA C$"MH1"$ ASSEMBLE LAST LINE
  7476. D C* *
  7477. D C*ANY COMMAND MAY BE PREFIXED BY ANY NUMBER OR COMBINATION OF *
  7478. D 30HTHE PREFIX CHARACTERS - *X*, *
  7479. VFD 30/5H/*, *
  7480. CHAR (VFD 6/0),UA.
  7481. VFD 24/4H*, O
  7482. DATA C-R *+*.-
  7483. D C* *
  7484. D C*A COMPLETE WRITEUP ON XEDIT IS AVAILABLE ON THE LIBRARY FILE*
  7485. VFD 30/5H#XEDI
  7486. CHAR (VFD 12/0),FN.
  7487. VFD 18/3H.#
  7488. D C* *
  7489. D C*INFORMATION FOR A SPECIFIC COMMAND OR PREFIX CHARACTER MAY BE*
  7490. D C*OBTAINED BY ENTERING THE COMMAND -*
  7491. VFD 24/4H
  7492. CHAR (VFD 6/0),QM.
  7493. CHAR (VFD 6/0),QM.
  7494. VFD 24/4H HEL
  7495. DATA 10HP,CMD -
  7496. VFD 42/7HOR-
  7497. CHAR (VFD 6/0),QM.
  7498. CHAR (VFD 6/0),QM.
  7499. VFD 6/1R
  7500. DATA C*H,CMD*
  7501. D C*WHERE CMD IS THE PREFIX OR POSTFIX CHARACTER OR THE COMMAND*
  7502. D C*TO BE EXPLAINED.*
  7503. HLPD EQU *-HLPC
  7504.  
  7505. HLPE DATA H*COMMAND NOT FOUND -*
  7506. HLPF DATA C*COMMAND *
  7507. HLPG DATA H*NO HELP ENTRY FOUND FOR -*
  7508. HLPH DATA C*COMMAND *
  7509. HLPI DATA 10HHHHHHHHHHH
  7510. HLPJ DATA 0 HELP ENTRY EXPECTED FLAG
  7511. HLPK DATA 0 IF ZERO, GET XEDITI FILE
  7512. SPACE 4,20
  7513. ** HTI - *HELP* COMMAND TELEX INTERRUPT PROCESSOR.
  7514. *
  7515. * ENTRY NONE.
  7516. *
  7517. * EXIT RETURNS TO CALLER IF NO TLX INTERRUPT SENSED,
  7518. * ELSE REWINDS THE OUTPUT BUFFER, RESETS THE
  7519. * CHARACTER SET AND EXITS TO *CER1* TO POP THE
  7520. * INPUT STACK.
  7521. *
  7522. * USES A - 1, 2, 6.
  7523. * X - 1, 2, 6.
  7524. *
  7525. * MACROS CSET, DISTC, RECALL.
  7526.  
  7527. HTI PS ENTRY/EXIT.
  7528. MX6 0
  7529. SA2 TLX
  7530. ZR X2,HTI IF NO INTERRUPT, RETURN
  7531. SA6 A2
  7532. DISTC ON,A2
  7533. RECALL OUTPUT
  7534. SA1 =XOUTPUT+1
  7535. MX6 -18
  7536. BX6 -X6*X1
  7537. SA6 A1+B1 IN=OUT=FIRST
  7538. SA6 A6+B1
  7539. SA2 BATCH
  7540. NZ X2,CER1 IF IN BATCH
  7541. SA2 AS
  7542. ZR X2,CER1 IF ALREADY IN NORMAL CHAR SET MODE
  7543. CSET RESTORE
  7544. EQ CER1 EXIT, POP INPUT STACK
  7545.  
  7546. XEDITI BSS 0
  7547. CHAR= 24D,XEDI,FN. -TI- OR -64-
  7548. XEDI FILEB XBUF,1001B,FET=12,USN=LIBRARY,EPR
  7549.  
  7550. USE BUFFERS
  7551. XBUFL EQU 1001B
  7552. XBUF EQU * XEDITI BUFFER
  7553. LWA EQU XBUF+XBUFL+17B
  7554.  
  7555. USE SETCHAR
  7556. DATA 0 SET END OF CHARACTER PRESET
  7557. USE *
  7558. HERE ASSEMBLE THE DEFERRED EXPLAIN ENTRY DATA
  7559. OVLDEF 2,(LOW USAGE COMMANDS)
  7560. TITLE LOCAL FETS AND STORAGE.
  7561. ** FETS.
  7562.  
  7563. RFET FILEC RBUF,BUFRL,EPR,FET=7
  7564. TITLE COMMAND PROCESSORS.
  7565. CPY SPACE 4,15
  7566. ** CPY - COPY/COPYD PROCESSORS.
  7567. *
  7568. * ENTRY (COPY) = NAME OF LAST COPY FILE.
  7569. *
  7570. * EXIT TO *NCM*, COPY COMPLETE.
  7571. *
  7572. * USES A - 0, 1, 2, 3, 4, 5, 6.
  7573. * X - ALL.
  7574. *
  7575. * CALLS LOC, RDF, VFY, WTF.
  7576. *
  7577. * MACROS REWIND, WRITEC, WRITER.
  7578.  
  7579.  
  7580. CPY11 MX6 0 SET NOMOD WHEN USING COPYD
  7581. SA6 NOMOD
  7582. CPY SA5 IFN
  7583. SA3 ISFN
  7584. SB2 BFN.*100B+3 * RESERVED FILE NAME *
  7585. SA2 COPY
  7586. BX3 X5-X3
  7587. ZR X3,CER IF COPY TO EDIT FILE
  7588. BX0 X2-X5 =0 IF COPY TO SAME FILE
  7589. LX6 X5
  7590. SX7 B1
  7591. SA6 A2 SAVE COPY FILE NAME
  7592. BX5 X5+X7 MERGE COMPLETE BIT
  7593. ZR X0,CPY1 IF CONSECUTIVE COPIES
  7594. ZR X2,CPY1 IF NO PREVIOUS COPY FILE
  7595. WRITER FTD,RECALL
  7596. REWIND FTD,RECALL
  7597. CPY1 SA0 FTD SET FET ADDRESS
  7598. SA1 GFNB
  7599.  
  7600. * DETERMINE IF THE FILE NAME IS A SPECIAL ONE.
  7601.  
  7602. CPY2 BX2 X1-X5
  7603. AX2 17
  7604. ZR X2,CPY10 IF SPECIAL NAME
  7605. SA1 A1+B1
  7606. NZ X1,CPY2 IF MORE IN LIST
  7607. BX6 X5
  7608. ZR X0,CPY3 IF CONSECUTIVE COPIES
  7609. SA6 FTD PUT NAME INTO FET
  7610. REWIND A6,RECALL
  7611.  
  7612. * PREPARE FOR A COPY OPERATION.
  7613.  
  7614. CPY3 SA1 INDEX
  7615. SX5 X1-.COPY =0 IF NOT TO DELETE
  7616. CPY4 RJ LOC ATTEMPT TO LOCATE LINE
  7617. ZR B5,CPY8 IF NOT FOUND
  7618. SX1 A0-OUTPUT
  7619. ZR X1,CPY5 IF OUTPUT (IF VERIFY = DUPLICATE LINES)
  7620. RJ VRY VERIFY LOCATE
  7621. CPY5 WRITEC A0,E.LINE PLACE LINE
  7622. SA1 NUMS
  7623. SX6 B1
  7624. IX6 X1-X6
  7625. AX1 1
  7626. ZR X1,CPY9 IF COUNT FINISHED
  7627. SA6 A1
  7628. CPY6 NZ X5,CPY7 IF *COPYD* COMMAND
  7629. RJ WTF
  7630. CPY7 RJ RDF
  7631. EQ CPY4 PROCESS NEXT LINE
  7632.  
  7633. * LINE IS NOT FOUND.
  7634.  
  7635. CPY8 SA1 NUMS
  7636. NG X1,LCT4 IF STRING NOT FOUND
  7637. WRITEC A0,E.LINE
  7638. EQ CPY6 COPY LINE
  7639.  
  7640. * CLEANUP FROM COMMAND.
  7641.  
  7642. CPY9 ZR X5,NCM IF NOT COPYD
  7643. RJ RDF CREAM EXISTING LINE
  7644. EQ NCM EXIT
  7645.  
  7646. * PROCESS SPECIAL FILES.
  7647.  
  7648. CPY10 SA3 A1+CPYA-GFNB
  7649. SA4 X3 GET ACTUAL NAME TO USE
  7650. AX3 18
  7651. BX6 X4
  7652. SA0 X3 SET FET TO USE
  7653. SA6 FTD
  7654. EQ CPY3 PERFORM COPY
  7655.  
  7656. * TABLE OF SPECIAL FILE OPERATIONS.
  7657. * VFD 42/FET ADDR,18/FILE NAME
  7658.  
  7659. CPYA VFD 42/FTD,18/=0 *NULL* FILE
  7660. VFD 42/OUTPUT,18/=0 *OUTPUT* FILE
  7661. A SET *-CPYA
  7662. BSSZ GFNBL-A SCRATCH REST (WILL EXPLODE IF USED)
  7663. DLB SPACE 4,10
  7664. ** DLB - DELETE LEADING BLANKS.
  7665. *
  7666. * ENTRY (NUMS) = NUMBER OF LINES TO PROCESS.
  7667. *
  7668. * EXIT TO *NCM*.
  7669. *
  7670. * USES A - 1, 6, 7.
  7671. * X - 1, 5, 6, 7.
  7672. * B - 2, 3.
  7673. *
  7674. * CALLS RDF, SAC, WTF.
  7675.  
  7676.  
  7677. DLB SA1 NUMS
  7678. SX6 B1
  7679. IX6 X1-X6
  7680. + SA6 A1
  7681. MX5 -0 SET NO MODIFICATIONS
  7682. RJ SAC SET ASCII PROCESSING
  7683. DLB1 SA1 E.STR-1
  7684. SB3 -1R
  7685. SX7 -1 RESET CHARACTER COUNTER
  7686.  
  7687. DLB2 SA1 A1+B1 SEARCH FOR FIRST NON-BLANK
  7688. SB2 B3+X1
  7689. NG X1,DLB6 IF END OF LINE (ALL BLANKS)
  7690. ZR B2,DLB2 IF CHARACTER IS A BLANK
  7691. SX6 A1-E.STR
  7692. ZR X6,DLB4 IF NO LEADING BLANKS
  7693. DLB3 BX6 X1 REPACK CHARACTERS
  7694. SX7 X7+B1 INCREMENT CHARACTER COUNT
  7695. SA6 E.STR+X7
  7696. SA1 A1+B1
  7697. PL X6,DLB3 IF NOT AT END OF LINE
  7698. SX6 B1
  7699. MX5 0 SET MODIFICATIONS MADE TO FILE
  7700. SA7 E.STR-1 SET NUMBER OF CHARACTERS IN LINE
  7701. SA6 E.LMOD SET MODIFICATION MADE TO LINE
  7702.  
  7703. * CHECK FOR MORE LINES TO PROCESS.
  7704.  
  7705. DLB4 SA1 NUMS
  7706. SX6 B1+
  7707. IX6 X1-X6
  7708. SA6 A1
  7709. NG X6,DLB5 IF FINISHED
  7710. RJ WTF
  7711. RJ RDF
  7712. EQ DLB1 PROCESS NEXT LINE
  7713. DLB5 SA1 NOMOD UPDATE MODIFICATION STATUS
  7714. BX6 X5*X1
  7715. SA6 A1
  7716. EQ NCM EXIT
  7717.  
  7718. * PROCESS TOTALLY BLANK LINE.
  7719.  
  7720. DLB6 MX5 0 SET MODIFICATION TO FILE
  7721. RJ RDF READ NEXT LINE
  7722. SA1 NUMS
  7723. SX6 B1+
  7724. IX6 X1-X6
  7725. NG X6,DLB5 IF FINISHED
  7726. SA6 A1
  7727. EQ DLB1 PROCESS NEXT LINE
  7728.  
  7729. LTB SPACE 4,15
  7730. ** LTB - LIST TAB SETTINGS.
  7731. *
  7732. * ENTRY (TABS) = TAB SETTINGS.
  7733. *
  7734. * EXIT TO *NCM*.
  7735. *
  7736. * USES A - 1, 2, 5, 6, 7.
  7737. * X - 1, 2, 3, 4, 5, 6, 7.
  7738. * B - 4, 5, 6, 7.
  7739. *
  7740. * CALLS CDD.
  7741. *
  7742. * MACROS WRITEC.
  7743.  
  7744.  
  7745. LTB BSS 0
  7746. SB1 1
  7747. SA5 TABS
  7748. SB6 LTBA+1
  7749. SB7 B0
  7750. LTB1 SA1 A5+B7 PUT CURRENT TABS INTO MESSAGE
  7751. MX5 0
  7752. ZR X1,LTB2 IF END OF TABS
  7753. RJ CDD CONSTRUCT MESSAGE
  7754. LX4 60-6
  7755. BX5 X4
  7756. SB7 B7+B1
  7757. SA1 A5+B7
  7758. ZR X1,LTB2 IF END OF TABS
  7759. RJ CDD
  7760. SB4 6*4
  7761. SB4 B4-B2
  7762. LX6 B4,X6
  7763. MX7 6*6
  7764. BX5 X7*X5
  7765. BX6 -X7*X6
  7766. BX6 X6+X5
  7767. SA6 B6
  7768. SB6 B6+B1
  7769. SB5 8
  7770. SB7 B7+B1
  7771. LT B7,B5,LTB1 IF NOT FINISHED WITH TABS
  7772. MX5 0
  7773. LTB2 BX7 X5
  7774. SA7 B6
  7775. MX7 0
  7776. SA7 B6+B1 PUT EOL AFTER LAST TAB
  7777. SA1 TABCHAR PUT CURRENT TAB CHARACTER INTO MESSAGE
  7778. PL X1,LTB3 IF TAB CHARACTER IS DEFINED
  7779. SX1 1R
  7780. LTB3 LX1 7*6
  7781. MX6 6
  7782. SA2 LTBA
  7783. LX6 7*6+6
  7784. BX7 -X6*X2 PUT LOWER PART OF CHARACTER
  7785. BX7 X7+X1
  7786. LX6 6
  7787. BX3 X6*X1
  7788. NZ X3,LTB4 IF NOT ASCII CHARACTER
  7789. SX1 1R
  7790. LX1 8*6 POSITION
  7791. LTB4 BX7 -X6*X7
  7792. BX7 X7+X1
  7793. SA7 A2
  7794. WRITEC OUTPUT,LTBA
  7795. EQ NCM EXIT
  7796.  
  7797. LTBA DATA 10H TABS
  7798. BSSZ NTABS/2+2
  7799. NBL SPACE 4
  7800. ** NBL - CHANGE ERROR MESSAGES TO CONTAIN NO BELLS.
  7801. *
  7802. * ENTRY NONE.
  7803. *
  7804. * EXIT TO *NCM*.
  7805. *
  7806. * USES A - 1.
  7807. * X - 1.
  7808. *
  7809. * MACROS MOVE.
  7810. *
  7811. * NOTES THIS COMMAND SWITCHES THE ERROR MESSAGES ISSUED TO A
  7812. * TIME SHARING TERMINAL TO THOSE CONTAINING NO BELLS.
  7813. * THIS COMMAND FROM A BATCH JOB FUNCTIONS AS A NO-OP.
  7814.  
  7815.  
  7816. NBL SA1 BATCH
  7817. NZ X1,NCM IF BATCH ORIGIN
  7818. MOVE NBLAL,NBLA,MESSAGE+1 SWITCH MESSAGES
  7819. EQ NCM EXIT
  7820.  
  7821. NBLA BSS 0 TABLE OF ERROR MESSAGES
  7822. ERROVL HERE
  7823. NBLAL EQU *-NBLA
  7824. OCT SPACE 4,20
  7825. ** OCT - PROCESS OCTCHANGE COMMAND.
  7826. *
  7827. * ENTRY (NUMS) = FWA OF PARAMETERS.
  7828. * (NUMS+1) = LWA OF PARAMETERS.
  7829. *
  7830. * EXIT TO *NCM*, IF CHANGE COMPLETE.
  7831. * TO *CER*, IF ARGUMENT ERROR.
  7832. * TO *LCT4*, IF STRING NOT FOUND.
  7833. *
  7834. * USES A - 0, 1, 5, 6, 7.
  7835. * X - ALL.
  7836. * B - 4, 6, 7.
  7837. *
  7838. * CALLS ASF, CHS, RCP, RDF, RTA, RTR, SCP, VAL,
  7839. * VRY, WTF.
  7840. *
  7841. * MACROS MOVE.
  7842. *
  7843. * NOTES *OCT* PROCESSES ONLY A SUBSET OF CHANGE OPTIONS.
  7844.  
  7845.  
  7846. OCT BX7 X7-X7 CLEAR CELLS
  7847. MX6 0
  7848. SA6 P1LP
  7849. SA7 P2RP
  7850. SA6 A6+B1
  7851. SA7 A7+B1
  7852. SA6 A6+B1
  7853. SA7 A7+B1
  7854. RJ SCP SET COMMAND PAREMETERS
  7855. ZR X1,OCT12 IF NO PARAMETERS
  7856. SX6 D.STR+1
  7857. SB6 B0 SET FIRST PASS
  7858. MX1 1 SET POSITION
  7859. SA7 D.STR SET FWA OF CREATED STRING -1
  7860. SA6 P1LP SET FIRST STRING POINTER
  7861. BX7 X7-X7 CLEAR ASSEMBLY
  7862.  
  7863. * CONVERT OCTAL DIGITS.
  7864.  
  7865. OCT1 NG X5,OCT2 IF END OF PARAMETERS/LINE
  7866. SX4 X5-1R0
  7867. SX3 X5-1R7-1
  7868. LX7 3
  7869. BX3 -X4*X3 NEGATIVE IF OCTAL NUMBER
  7870. PL X3,OCT2 IF NOT A NUMBER
  7871. BX7 X7+X4 MERGE
  7872. SA5 A5+B1
  7873. LX1 30 UPDATE POSITION
  7874. PL X1,OCT1 IF ON FIRST POSITION
  7875. SA7 A7+B1 SAVE ASSEMBLY
  7876. BX7 X7-X7
  7877. EQ OCT1 LOOP
  7878.  
  7879. OCT2 PL X1,OCT12 IF ON SECOND HALF (ERROR)
  7880. SX6 A7+B1 GET LWA+1 FOR STRING
  7881. SA6 A6+B1 SAVE ADDRESS
  7882.  
  7883. * SKIP TRAILING BLANKS/ONE COMMA.
  7884.  
  7885. OCT3 SB4 X5-1R
  7886. ZR B4,OCT4 IF BLANK
  7887. NE B4,B1,OCT5 IF NOT COMMA
  7888. NZ X7,OCT5 IF NOT FIRST COMMA
  7889.  
  7890. OCT4 SX7 B4+X7 UPDATE COMMA STATUS
  7891. SA5 A5+B1
  7892. EQ OCT3 PROCESS NEXT CHARACTER
  7893.  
  7894. * CHECK WHICH FIELD.
  7895.  
  7896. OCT5 BX7 X7-X7 RESET ASSEMBLY
  7897. SB6 B6+B1
  7898. NE B6,B1,OCT6 IF ON SECOND FIELD
  7899. SX6 A7+B1
  7900. SA6 P3LP SET SECOND POINTER
  7901. EQ OCT1 PARSE SECOND STRING
  7902.  
  7903. OCT6 RJ VAL GET REPETITION COUNT
  7904. SA6 NUMS SAVE COUNT
  7905. PL X5,OCT12 IF NOT END OF COMMAND
  7906. RJ ASF GET STRING PARAMETERS
  7907. NZ B2,OCT12 IF ERROR IN ANALYSIS
  7908. RJ RCP RESET COMMAND PARAMETERS
  7909. SX6 M.CODED
  7910. SA6 E.NMODE SET BACK TO CODED
  7911.  
  7912. * BEGIN TO OCTCHANGE.
  7913.  
  7914. OCT7 SB7 9
  7915. SA1 E.LINE BREAK LINE INTO 6 BIT PARTS
  7916. MX3 -12
  7917. SX6 B1 SET SOMETHING IN X6
  7918. MX2 -6
  7919. BX4 -X3*X1 GET END OF LINE BYTE
  7920. SA6 E.STR-1
  7921. SA0 OCBUF SET FWA OF SCRATCH BUFFER
  7922. OCT8 LX1 6
  7923. BX6 -X2*X1
  7924. SB7 B7-B1
  7925. SA6 A6+B1
  7926. PL B7,OCT8 IF MORE IN WORD
  7927. ZR X4,OCT9 IF END OF LINE
  7928. SB7 9 RESET CHARACTER COUNT
  7929. SA1 A1+B1
  7930. BX4 -X3*X1
  7931. EQ OCT8 BREAK UP NEXT WORD
  7932.  
  7933. OCT9 SA1 A6-B1
  7934. MX6 2
  7935. OCT9.1 SA1 A1-B1
  7936. ZR X1,OCT9.1 IF LAST NON-BLANK NOT FOUND
  7937. SA6 A1+B1
  7938. SX7 A6-E.STR SET NUMBER OF CHARACTERS IN LINE
  7939. SA7 E.STR-1
  7940. SX0 OCBUF+320D SET LWA+1 OF BUFFER
  7941. RJ CHS CHANGE STRING(S)
  7942. ZR B5,OCT13 IF STRING NOT FOUND
  7943.  
  7944. * COPY NEW LINE BACK INTO *E.STR*.
  7945.  
  7946. SA1 OCBUF
  7947. MX7 0
  7948. SA6 E.STR-1
  7949. SA7 NOMOD SET MODIFICATIONS MADE
  7950. OCT10 BX6 X1
  7951. SA1 A1+B1
  7952. SA6 A6+1
  7953. PL X6,OCT10 IF MORE
  7954. SB6 E.STR
  7955. SB7 E.STR REPACK TO SAME (RTA DOES NOT CHECK LENGTH)
  7956. RJ RTA REPACK LINE
  7957. SB7 E.STR
  7958. RJ RTB TRIM LINE
  7959. MOVE 33D,E.STR,E.LINE
  7960. RJ VRY
  7961. SA1 NUMS
  7962. SX6 B1
  7963. IX6 X1-X6
  7964. AX1 1
  7965. ZR X1,NCM IF CHANGE COMPLETE, EXIT
  7966. SA6 A1
  7967. OCT11 RJ WTF
  7968. RJ RDF ADVANCE TO NEXT
  7969. EQ OCT7 PROCESS NEXT OCTCHANGE
  7970.  
  7971. OCT12 SB2 ARG.
  7972. RJ RCP RESET END OF LINE
  7973. EQ CER PROCESS ERROR
  7974.  
  7975. * PROCESS STRING NOT FOUND.
  7976.  
  7977. OCT13 SA1 NUMS
  7978. PL X1,OCT11 IF NOT 0 OPTION
  7979. EQ LCT4 EXIT, STRING NOT FOUND
  7980. PBL SPACE 4,15
  7981. ** PBL - PROCESS BAD LINE COMMANDS.
  7982. *
  7983. * ENTRY (X1) = COMMAND DESCRIPTOR WORD. MODIFIER FIELD IS -
  7984. * -1 FOR DELETE BAD LINE (DBADL).
  7985. * +1 FOR FIND BAD LINE (FBADL).
  7986. * (NUMS) = NUMBER OF LINES TO PROCESS.
  7987. *
  7988. * USES A - 1, 2, 6.
  7989. * X - 1, 2, 3, 4, 5, 6.
  7990. *
  7991. * CALLS RDF, SCD, VRY, WTF.
  7992. *
  7993.  
  7994.  
  7995. PBL AX1 18
  7996. SX5 X1 X5 = COMMAND TYPE
  7997. RJ SCD SET CODED LINE
  7998. PBL1 SA1 E.LINE
  7999. MX2 -6
  8000. LX1 6
  8001. BX3 -X2*X1 GET FIRST CHARACTER
  8002. SX4 X3-1R9-1 NEGATIVE, IF OK
  8003. SX3 X3-1R0 POSITIVE, IF OK
  8004. BX3 -X3*X4 NEGATIVE, IF OK
  8005. NG X3,PBL3 IF LINE NUMBER AT START
  8006. RJ VRY
  8007. PL X5,PBL2 IF FBADL COMMAND
  8008. RJ RDF CREAM EXISTING LINE
  8009. MX6 0 SET MODIFICATIONS MADE
  8010. SA6 NOMOD
  8011. PBL2 SA1 NUMS
  8012. SX6 B1+
  8013. IX6 X1-X6
  8014. AX1 1
  8015. ZR X1,NCM IF FINISHED, EXIT
  8016. SA6 A1+
  8017. NG X5,PBL1 IF DBADL COMMAND
  8018. PBL3 RJ WTF
  8019. RJ RDF
  8020. EQ PBL1 PROCESS FBADL
  8021. PLN SPACE 4,20
  8022. ** PLN - PROCESS LINE NUMBER COMMANDS.
  8023. *
  8024. * ENTRY (X1) = COMMAND DESCRIPTOR WORD.
  8025. * COMMAND MODIFIER (BITS 35-18) CONTAINS THE FUNCTION.
  8026. * =-2, ADDLNS.
  8027. * =-1, ADDLN.
  8028. * = 0, DELETELN.
  8029. * = 1, REPLACELN.
  8030. * EXIT TO *CER*, IF ERROR.
  8031. *
  8032. * USES A - 1, 2, 3, 6, 7.
  8033. * X - ALL.
  8034. * B - 2, 5, 6, 7.
  8035. *
  8036. * CALLS CDD, RDF, TOP, WTF.
  8037.  
  8038.  
  8039. PLN AX1 18
  8040. SX5 X1
  8041. SX7 30 DEFAULT BIT COUNT
  8042. SA7 PLNB
  8043. MX6 30 DEFAULT CHARACTER SIZE
  8044. SB2 X1+B1
  8045. PL B2,PLN0 IF NOT ADDLNS
  8046. MX6 36 LENGTHEN CHARACTER MASK
  8047. PLN0 SA6 PLNA
  8048. RJ TOP REWIND FILES
  8049. SA1 NUMS
  8050. MX7 0
  8051. BX6 X1
  8052. SA2 A1+B1
  8053. NZ X6,PLN0.1 IF STARTING LINE NUMBER NOT ZERO
  8054. SX6 B1 SET TO DEFAULT
  8055. PLN0.1 SA7 NOMOD SET MODIFICATIONS FLAG
  8056. SA6 A1+
  8057. BX7 X2
  8058. NZ X7,PLN0.2 IF STEP IS NOT ZERO
  8059. SX7 B1
  8060. PLN0.2 SA7 A2
  8061. NG X5,PLN6 IF NOT TO DELETE LINE NUMBER
  8062.  
  8063. * REMOVE LINE NUMBER.
  8064.  
  8065. PLN1 SA1 E.LINE REMOVE LINE NUMBERS
  8066. SA2 =40404040404040404040B
  8067. BX3 X2*X1 4X IF BIT 5 IS SET
  8068. SB5 60-5
  8069. LX4 B5,X3 000001 IF BIT 5 WAS SET
  8070. IX4 X3-X4 011111 IF BIT 5 WAS SET
  8071. BX4 X4+X3 111111 IF BIT 5 WAS SET
  8072. SA3 =05050505050505050505B
  8073. BX6 X4-X1 COMPLEMENT CHARS .GE. 40B
  8074. IX6 X6+X3 1XXXXX IF A NUMBER
  8075. BX3 X2*X6 100000 IF A NUMBER
  8076. LX4 B5,X3 000001 IF A NUMBER
  8077. IX4 X3-X4 011111 IF A NUMBER
  8078. BX4 X4+X3 111111 IF A NUMBER
  8079. MX6 1
  8080. PL X4,PLN9 IF NO LINE NUMBER
  8081. PLN2 AX6 6 EXTEND MASK
  8082. BX7 -X4*X6
  8083. ZR X6,PLN3 IF ALL WORD IS NUMBERS
  8084. ZR X7,PLN2 IF NOT FINISHED WITH MASK
  8085. PLN3 LX4 B1,X6 MASK OFF EXTRA BIT
  8086. BX4 X6*X4
  8087. CX0 X4
  8088. SB7 X0 SHIFT TO LEFT JUSTIFY WORD
  8089. MX3 -12 END OF LINE CHECKER
  8090. BX0 -X3*X1 0, IF THIS IS LAST WORD IN LINE
  8091. BX6 -X4*X1 REMOVE LINE NUMBER
  8092. LX6 B7 LEFT JUSTIFY REMAINING
  8093. LX4 B7 POSITION MASK
  8094. PLN4 ZR X0,PLN5 IF LAST WORD OF LINE
  8095. SA1 A1+B1
  8096. BX0 -X3*X1
  8097. LX1 B7
  8098. BX2 X4*X1
  8099. IX7 X2+X6
  8100. BX6 -X4*X1
  8101. SA7 A1-B1
  8102. EQ PLN4 PROCESS NEXT WORD IN LINE
  8103.  
  8104. PLN5 SA6 A1+
  8105. PLN6 ZR X5,PLN9 IF NOT ADDING LINE NUMBERS
  8106. SA1 NUMS GET BASE
  8107. SA2 A1+B1 INCREMENT
  8108. IX6 X1+X2
  8109. SA6 A1+
  8110. RJ CDD
  8111. SA3 PLNB
  8112. SA2 PLNA
  8113. SB7 X3+
  8114. GE B7,B2,PLN6.2 IF LINE NUMBER FITS WITHIN FIELD
  8115. PLN6.1 ZR X2,PLN10 IF MASK ALREADY MAXIMUM SIZE
  8116. SB7 B7+6 INCREMENT FIELD SIZE
  8117. SX7 B7
  8118. SA7 A3
  8119. AX2 6 EXTEND MASK
  8120. BX7 X2
  8121. SA7 A2+
  8122. LT B7,B2,PLN6.1 IF STILL LARGER THAN FIELD
  8123. PLN6.2 SA3 =66666666B BLANK .EOR. 0000
  8124. BX3 -X2*X3 TRIM MASK TO FIELD SIZE
  8125. LX3 B2 JUSTIFY MASK
  8126. CX4 X2 DETERMINE SIZE
  8127. SB6 E.LINE SET FWA
  8128. BX6 X6-X3
  8129. SB5 B7-60D
  8130. SB7 X4-60D
  8131. SA1 B6+ GET FIRST WORD
  8132. AX6 B5
  8133. SB5 B6+33D SET LWA+1
  8134. MX3 -12 END OF LINE BYTE MASK
  8135. BX6 X2*X6 REMOVE EXCESS
  8136.  
  8137. PLN7 BX4 -X3*X1
  8138. AX1 B7
  8139. BX7 -X2*X1
  8140. IX7 X7+X6
  8141. BX6 X2*X1
  8142. SA1 B6+B1
  8143. SA7 B6
  8144. SB6 B6+B1
  8145. ZR X4,PLN8 IF END OF LINE FOUND
  8146. LT B6,B5,PLN7 IF NOT END OF BUFFER
  8147. PLN8 SA6 B6+
  8148. PLN9 RJ WTF STEP TO NEXT LINE
  8149. RJ RDF
  8150. PL X5,PLN1 IF TO DELETE LINE NUMBERS
  8151. EQ PLN6 ADD NEW LINE NUMBERS
  8152.  
  8153. PLN10 BX7 X7-X7 RESTORE FILE
  8154. MX6 -1 SET NO MODS
  8155. SA7 IWHERE
  8156. SA6 NOMOD
  8157. RJ TOP
  8158. SB2 LNTL. LINE NUMBER TOO LARGE
  8159. EQ CER EXIT
  8160.  
  8161. PLNA DATA 0 MASK STORAGE
  8162. PLNB DATA 0 FIELD SIZE STORAGE
  8163. RDP SPACE 4,20
  8164. ** RDP - READ/READP PROCESSOR.
  8165. *
  8166. * ENTRY (NUMS) = FWA OF PARAMETERS.
  8167. * (NUMS+1) = LWA OF PARAMETERS.
  8168. *
  8169. * EXIT TO *NCM*.
  8170. *
  8171. * USES A - 0, 1, 2, 3, 4, 6, 7.
  8172. * X - 0, 1, 2, 3, 4, 6, 7.
  8173. * B - 2, 5, 6, 7.
  8174. *
  8175. * CALLS GAF, GFN, MPR, RCP, RTB, SCP, WTF.
  8176. *
  8177. * MACROS FERROR, READ, READC, RECALL, RETURN, REWIND,
  8178. * STATUS, WRITER.
  8179. *
  8180. * NOTES READ/READP READS ALTERNATE FILES INTO EDIT FILE.
  8181.  
  8182.  
  8183. RDP SA4 INDEX
  8184. SA0 X4-.READP
  8185. RJ SCP SET COMMAND PARAMETERS
  8186. SB2 BFN.*100B+2 NO FILE NAME
  8187. ZR X1,CER IF NO PARAMETERS
  8188. MX6 0
  8189. SA6 NOMOD SET MODIFICATIONS MADE
  8190.  
  8191. * GET NEXT FILE NAME AND CONTINUE.
  8192.  
  8193. RDP1 RJ GFN
  8194. SB5 B6-BFN.*100B-2
  8195. SA3 COPY
  8196. ZR B5,RDP12 IF ENCOUNTERED END OF LIST
  8197. BX7 X3-X6 =7 IF USING COPY FILE
  8198. BX4 X6
  8199. NZ X1,RDP11 IF ERROR IN FILE NAME
  8200. SA6 IFN SAVE NAME
  8201. SA2 E.IN
  8202. BX2 X2-X6
  8203. AX2 18
  8204. ZR X2,RDP13 IF WANT TO READ CURRENT EDIT FILE
  8205. NZ X7,RDP2 IF NOT READING COPY FILE
  8206. SA7 A3 CLEAR COPY FILE NAME
  8207. WRITER FTD,RECALL
  8208.  
  8209. RDP2 SB2 A0
  8210. NZ B2,RDP3 IF FILES ARE LOCAL
  8211. SA4 =0LSCRF
  8212. RJ GAF GET OR ATTACH FILE
  8213. NZ X6,RDP10 IF FILE NOT OBTAINED
  8214. SA4 =0LSCRF
  8215.  
  8216. * FILE OBTAINED, CHECK READ ACCESS.
  8217. * (X4) = LOCAL FILE NAME.
  8218.  
  8219. RDP3 MX6 0
  8220. SX7 B1
  8221. SA6 SFET+5 CLEAR FNT/FST INFORMATION
  8222. BX7 X7+X4
  8223. SA6 A6+B1
  8224. SA7 RFET
  8225. SA7 SFET
  8226. STATUS A7,P
  8227. SB6 FCR.*100B+2
  8228. SA1 SFET+5
  8229. ZR X1,RDP10 IF FILE NOT FOUND
  8230. SX2 240000B
  8231. SB6 FCR.*100B+1
  8232. BX2 X2*X1
  8233. NZ X2,RDP10 IF NOT ALLOWED TO READ FILE
  8234. REWIND RFET,RECALL
  8235. RDP4 READ RFET
  8236. RDP5 RECALL RFET
  8237. RDP6 SA1 RFET+2 SEE IF ANY MORE DATA ON FILE
  8238. SA2 A1+B1
  8239. BX1 X1-X2
  8240. NZ X1,RDP7 IF THERE IS DATA ON FILE
  8241. SA1 RFET
  8242. LX1 59-0
  8243. PL X1,RDP5 IF FET BUSY
  8244. LX1 0-4
  8245. PL X1,RDP4 IF NOT END OF SOMETHING
  8246. LX1 4-3
  8247. NG X1,RDP9 IF NOT EOR ON FILE
  8248. READ RFET,RECALL
  8249. SA1 RFET+2 LOOK AHEAD FOR NEXT NON-NULL RECORD
  8250. SA2 A1+B1
  8251. BX1 X1-X2
  8252. ZR X1,RDP9 IF EMPTY RECORD/FILE OR EOI FOUND
  8253. RJ WTF
  8254. WRITER E.OUT,RECALL
  8255. EQ RDP8 READ LINE
  8256.  
  8257. RDP7 RJ WTF
  8258. RDP8 READC RFET,E.LINE,33D READ NEXT LINE
  8259. NZ X1,BTL IF BAD TEXT LINE FOUND
  8260. SB7 E.LINE
  8261. RJ RTB CLEAN UP LINE JUST READ
  8262. EQ RDP6 PROCESS LINE
  8263.  
  8264. * PROCESS END OF FILE READ.
  8265.  
  8266. RDP9 REWIND RFET,RECALL
  8267. SB2 A0
  8268. NZ B2,RDP1 IF NOT *READP*
  8269. RETURN RFET,RECALL
  8270. EQ RDP1 PROCESS NEXT FILE
  8271.  
  8272. * PROCESS ERROR AND PROPER TERMINATION.
  8273.  
  8274. RDP10 FERROR IFN,B6
  8275. EQ RDP12 FINISH PROCESS
  8276.  
  8277. RDP11 ERROR B6
  8278. RDP12 RJ RCP RESET LINE PARAMETERS
  8279. EQ NCM EXIT
  8280.  
  8281. * PROCESS READ REQUEST ON CURRENT EDIT FILE.
  8282.  
  8283. RDP13 MX1 60 SET -0
  8284. RJ MPR COPY EDIT FILE TO SCRATCH
  8285. SA4 IFN RELOAD FILE NAME
  8286. EQ RDP2 PROCESS COPY
  8287. TITLE SUBROUTINE LOCAL TO OVERLAY.
  8288. GAF SPACE 4,15
  8289. ** GAF - GET/ATTACH FILE.
  8290. *
  8291. * ENTRY (X4) = SCRATCH NAME.
  8292. * (X6) = PERMANENT FILE NAME.
  8293. *
  8294. * EXIT (X6) = 0, IF FILE OBTAINED.
  8295. * (B6) = ERROR ORDINAL IF (X6) .NE. 0.
  8296. *
  8297. * USES A - 3, 6, 7.
  8298. * X - 1, 3, 6, 7.
  8299. * B - 6.
  8300. *
  8301. * MACROS ATTACH, GET.
  8302.  
  8303.  
  8304. GAF PS ENTRY/EXIT
  8305. SA6 PFET+8 SET PERM. NAME
  8306. MX7 -1
  8307. BX7 -X7+X4
  8308. SA7 PFET SET LOCAL NAME
  8309. GET A7
  8310. SA3 X2
  8311. SX1 36000B
  8312. BX6 X1*X3
  8313. ZR X6,GAF IF GOTTEN, RETURN
  8314. ATTACH X2,,,,R ATTACH IN READ MODE
  8315. SA3 X2
  8316. SX1 36000B
  8317. BX6 X1*X3
  8318. SB6 FCR.*100B+3 SET ERROR ORDINAL
  8319. EQ GAF RETURN
  8320. RCP SPACE 4,15
  8321. ** RCP - RESET COMMAND PARAMETERS.
  8322. *
  8323. * ENTRY (NUMS+1) = ADDRESS OF WORD CONTAINING LWA+1
  8324. * OF COMMAND LINE.
  8325. *
  8326. * EXIT END OF COMMAND FLAG RESET IF NEEDED.
  8327. *
  8328. * USES A - 1, 2, 6.
  8329. * X - 1, 2, 6.
  8330. *
  8331. * NOTES SINCE *SCP* SETS (NUMS+1) = 0 IF THERE
  8332. * ARE NO PARAMETERS, THIS ROUTINE CAN BE CALLED
  8333. * IF THIS IS TRUE (WILL LOSE UPPER BITS OF WORD 0).
  8334.  
  8335.  
  8336. RCP PS ENTRY/EXIT
  8337. SA1 NUMS+1
  8338. SA2 X1
  8339. SX6 X2
  8340. LX2 1
  8341. NG X2,RCP IF REAL EOL, RETURN
  8342. SA6 A2
  8343. EQ RCP RETURN
  8344. SCP SPACE 4,15
  8345. ** SCP - SET COMMAND PARAMETERS.
  8346. *
  8347. * ENTRY (NUMS) = FWA OF PARAMETERS.
  8348. * (NUMS+1) = LWA+1 OF PARAMETERS.
  8349. *
  8350. * EXIT (A5) = IF PARAMETERS ARE PRESENT, FWA OF PARAMETERS.
  8351. * (X5) = FIRST WORD OF PARAMETERS.
  8352. * (X1) = IF NO PARAMETERS, 0.
  8353. * END OF PARAMETERS SET IN LAST WORD OF PARAMETERS.
  8354. *
  8355. * USES A - 1, 2, 5, 6.
  8356. * X - 1, 2, 5, 6, 7.
  8357.  
  8358.  
  8359. SCP1 SX6 0
  8360. SA6 NUMS+1
  8361.  
  8362. SCP PS ENTRY/EXIT
  8363. SA1 NUMS
  8364. SA2 A1+B1
  8365. MX7 1
  8366. ZR X1,SCP1 IF NO PARAMETERS
  8367. SA2 X2
  8368. SA5 X1
  8369. BX6 X7+X2 SET END OF STRING
  8370. SA6 A2
  8371. EQ SCP RETURN
  8372. TITLE LOCAL COMMON DECKS AND BUFFERS.
  8373. ** COMMON DECKS.
  8374. *
  8375.  
  8376.  
  8377. *CALL COMCMVE
  8378.  
  8379. USE SETCHAR
  8380. DATA 0 SET END OF CHARACTER PRESET
  8381. USE *
  8382. BUFFERS SPACE 4
  8383. ** BUFFERS.
  8384. *
  8385.  
  8386.  
  8387. USE BUFFERS
  8388. .A MAX MAXWD*2+1,BUFRL
  8389. OCBUF BSS 0
  8390. RBUF BSS 0
  8391. BSSZ .A+1
  8392. LWA EQU *+17B SET OVERLAY LWA
  8393. END