Table of Contents

O26

Table Of Contents

  • [00007] O26 - CONSOLE TEXT EDITOR.
  • [00009] CONSOLE TEXT EDITOR.
  • [00027] DIRECT CELL ALLOCATIONS AND ASSEMBLY CONSTANTS.
  • [00072] OVERLAY CONTROL AND MACRO DEFNITIONS.
  • [00099] COMMAND - GENERATE COMMAND OVERLAY.
  • [00131] DKP - DISPLAY KEYBOARD POINTER.
  • [00169] EDW - EDIT AND DISPLAY WORD.
  • [00240] ENTER - ENTER SPECIAL SYNTAX.
  • [00262] ENTRY - DEFINE OVERLAY ENTRY POINT.
  • [00287] JMP - THREADED JUMP.
  • [00307] OVLN - GENERATE OVERLAY NUMBER.
  • [00323] OVERLAY LOADER.
  • [00324] SUBROUTINES / MESSAGES.
  • [00326] LOV - LOAD OVERLAY.
  • [00375] LPP - LOAD PP PROGRAM.
  • [00458] CDL - CLEAR DISPLAY LINES.
  • [00499] ERL - ERASE LINE.
  • [00513] ERR - ERROR MESSAGES.
  • [00535] MAIN PROGRAM.
  • [00537] MAIN PROGRAM.
  • [00573] DPP - CLEAR *DIS* FLAG AND DROP PP.
  • [00595] DBF - DISPLAY BUFFER.
  • [00750] DBS - DISPLAY BUFFER STATUS.
  • [00837] DKB - DISPLAY KEYBOARD BUFFER.
  • [00923] DLL - DISPLAY LAST LINE.
  • [00954] KEYBOARD INPUT.
  • [01044] KBI - KEYBOARD INPUT.
  • [01265] DISPLAY SUBROUTINES.
  • [01267] CDA - CHECK DISPLAY ADDRESS.
  • [01287] CFC - CHECK FIRST CHARACTER.
  • [01485] DIL - DISPLAY INSERT LINE.
  • [01522] DIM - DISPLAY INSERT MARK.
  • [01564] DKL - DISPLAY KEYBOARD LINE.
  • [01630] DKP - DISPLAY KEYBOARD POINTER.
  • [01635] DKS - DISPLAY KEYBOARD STRING.
  • [01726] EDW - EDIT AND DISPLAY WORD.
  • [01731] RID - REQUEST AND INITIALIZE DISPLAY.
  • [01766] MAIN PROGRAM SUBROUTINES.
  • [01768] PDS - PUSH DOWN I/O STACK.
  • [01790] PRO - PROCESS ROLLOUT FLAG WHILE IN HOLD.
  • [01820] TIO - TRY I/O.
  • [02054] WIO - WAIT I/O.
  • [02067] KEYBOARD ENTRY PROCESSING.
  • [02069] INT - INTERPRET KEYBOARD BUFFER.
  • [02171] CIF - CLEAR INSERT FLAG.
  • [02180] PLB - PROCESS *LEFT BLANK*.
  • [02187] RET - NORMAL RETURN.
  • [02207] ABT - ABORT LOAD.
  • [02216] KIC - INCOMPLETE RETURN.
  • [02235] ERR - FORMAT ERROR RETURN.
  • [02242] ADD - ASSEMBLE DECIMAL DIGITS.
  • [02285] ASN - ASSEMBLE NAME.
  • [02321] CIO - CALL CIO.
  • [02342] CRS - CHECK RECORD STATUS.
  • [02359] DNL - DELETE NEXT LINE.
  • [02403] MBD - MOVE BUFFER DOWN.
  • [02463] PKL - PACK LINE INTO BUFFER BUF.
  • [02537] PRT - PROCESS TAB.
  • [02596] RDL - READ LINE FROM BUFFER.
  • [02709] SDB - SHIFT DATA BLOCK IN CENTRAL MEMORY.
  • [02733] SDS - SET DISPLAY.
  • [02780] SFL - SEARCH FOR LINE.
  • [02843] SFN - SET FILE NAME.
  • [02882] SFS - SET FILE STATUS.
  • [02955] SIL - SET INSERT LINE.
  • [02986] SIP - SET IN POINTER.
  • [03004] WRW - WRITE AND REWIND FILE.
  • [03025] RESIDENT ENTRY PROCESSORS.
  • [03087] PRESET PROGRAM.
  • [03089] TTAB - TAB TABLE.
  • [03104] PRS - PRESET PROGRAM.
  • [03281] SCT - STORE COMMAND TABLE.
  • [03296] TSFM - TABLE OF SPECIAL FORMATS.
  • [03387] IOF - I/O FUNCTION PROCESSOR.
  • [03759] SDF - SET DEFINED FILE.
  • [04053] ELB - ENTER LINE IN BUFFER.
  • [04101] CRB - CHECK ROOM IN BUFFER.
  • [04121] MBU - MOVE BUFFER UP.
  • [04561] SFR - SEARCH FOR RECORD.
  • [04652] SPN - SET PROCEDURE NAME AS RECORD NAME.
  • [04907] CIR - CHECK INDEX RECORD.
  • [04954] RRI - READ RANDOM INDEX.
  • [04982] RRR - READ RANDOM RECORD.
  • [05247] ASD - ASSEMBLE DIGITS.
  • [05263] CIL - CHECK INSERT LINE.
  • [05283] MBU - MOVE BUFFER UP.
  • [05332] RLB - REPLACE LINE IN CM BUFFER.
  • [05629] AOD - ASSEMBLE OCTAL DIGITS.
  • [05674] BUFFERS.

Source Code

O26.txt
  1. IDENT O26,O26
  2. PERIPH
  3. BASE MIXED
  4. SST MDC,RDS
  5. *COMMENT O26 - CONSOLE TEXT EDITOR.
  6. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  7. TITLE O26 - CONSOLE TEXT EDITOR.
  8. O26 SPACE 4,10
  9. *** O26 - CONSOLE TEXT EDITOR.
  10. * D. A. CAHLANDER. 70/05/05.
  11. * G. R. MANSFIELD. 70/10/25.
  12. * D. A. CAHLANDER. 71/06/05.
  13. * A. D. FORET. 74/12/05.
  14. * P. D. HAAS. 84/02/08.
  15. DOC SPACE 4,10
  16. *** O26 PROVIDES THE CAPABILITY TO CREATE AND EDIT A FILE
  17. * FROM THE 6612 CONSOLE. A CM BUFFER IS USED TO STORE AND
  18. * EDIT THE BCD LINES BEFORE WRITING THE FILE. THE CM
  19. * BUFFER SIZE = FL - 140, AND ALL LINES OF A FILE MUST FIT
  20. * IN THE BUFFER.
  21. OPERATOR SPACE 4,10
  22. *** OPERATOR MESSAGES.
  23. *
  24. *
  25. * *REQUEST DISPLAY. (O26)* = O26 IS WAITING FOR THE DISPLAY
  26. * TO BE ASSIGNED.
  27. TITLE DIRECT CELL ALLOCATIONS AND ASSEMBLY CONSTANTS.
  28. DIRECT SPACE 4,20
  29. **** DIRECT LOCATION ASSIGNMENTS.
  30.  
  31.  
  32. LL EQU 15 LAST LINE POSITION STATUS
  33. DA EQU 16 - 17 DISPLAY ADDRESS
  34. AB EQU 20 - 24 ASSEMBLY BUFFER (5 LOCATIONS)
  35. CA EQU 25 CHARACTER ADDRESS
  36. XC EQU 26 X-COORDINATE
  37. YC EQU 27 Y-COORDINATE
  38. KE EQU 30 KEYBOARD ENTRY
  39. KI EQU 31 KEYBOARD INDEX
  40. KM EQU 32 KEYBOARD MESSAGE
  41. KP EQU 33 KEYBOARD PREVIOUS STATUS
  42. DR EQU 34 DISPLAY REFRESH STATUS
  43. LC EQU 35 CHARACTER COUNT OF LINE
  44.  
  45. * MAINTAIN FOLLOWING ORDER.
  46.  
  47. SI EQU 36 SCAN INDEX
  48. UC EQU 37 UPPER CASE FLAG
  49. IP EQU 40 - 41 INSERT POSITION (2 LOCATIONS)
  50. HF EQU 42 HOLD FLAG
  51.  
  52. IF EQU 43 INSERT FLAG
  53. DL EQU 44 DISPLAY LENGTH
  54. KD EQU 45 KEYBOARD BUFFER DISPLAY STATUS
  55. SF EQU 46 SCAN FLAG
  56. SC EQU 47 SCAN NUMBER
  57.  
  58. IO EQU 57 I/O BUSY FLAG
  59. FT EQU 60 - 61 FIRST ADDRESS OF BUFFER (2 LOCATIONS)
  60. IN EQU 62 - 63 NEXT INPUT ADDRESS (2 LOCATIONS)
  61. OT EQU 64 - 65 NEXT OUTPUT ADDRESS (2 LOCATIONS)
  62. LM EQU 66 - 67 LIMIT ADDRESS OF BUFFER (2 LOCATIONS)
  63. ****
  64. ASSEMBLY SPACE 4,10
  65. ** ASSEMBLY CONSTANTS.
  66.  
  67.  
  68. CH EQU CHDS DISPLAY CHANNEL
  69. FET EQU 10 ADDRESS OF FILE FET
  70. FETL EQU 10 FET LENGTH
  71. SBUF EQU FET+FETL ADDRESS OF CM SYNTAX BUFFER
  72. TITLE OVERLAY CONTROL AND MACRO DEFNITIONS.
  73. OVL SPACE 4,20
  74. ** OVERLAY CONTROL.
  75.  
  76.  
  77. NAME MICRO 1,, O26
  78. OVNG MICRO 1,, OP OVERLAY NUMBER GENERATOR
  79. OVNB MICRO 1,1, "OVNG" OVERLAY NAME BIAS MICRO
  80. OVNB EQU 1R"OVNB" OVERLAY NAME BIAS
  81. NOREF .L,.N
  82. .N SET 0 OVERLAY NUMBER
  83. .N MICRO 1,,
  84. .L SET *
  85. COMCMAC SPACE 4,15
  86. * MACRO DEFINITIONS AND INSTRUCTION CONSTANTS.
  87.  
  88.  
  89. *CALL COMPMAC
  90. *CALL COMDMAC
  91. SPACE 4,10
  92. ** COMMON DECKS.
  93.  
  94.  
  95. *CALL COMSCPS
  96. *CALL COMSPIM
  97. *CALL COMSSRT
  98. COMMAND SPACE 4,20
  99. ** COMMAND - GENERATE COMMAND OVERLAY.
  100. *
  101. *
  102. * COMMAND (SUBTITLE)
  103. * ENTRY *SUBTITLE* = COMMAND SUBTITLE.
  104.  
  105.  
  106. PURGMAC COMMAND
  107. COMMAND MACRO TXT
  108. LOCAL A
  109. QUAL
  110. .M OVLN .N
  111. QUAL O26".M"
  112. TTL O26/9".M" - TXT
  113. TITLE
  114. HERE
  115. QUAL
  116. USE END FORCE LITERALS*/
  117. A EQU *
  118. .N SET .N+1
  119. .N MICRO 1,, ".M"
  120. QUAL O26".N"
  121. IDENT 9".N",OVL TXT
  122. ORG OVL
  123. *COMMENT O26 - TXT
  124. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  125. QUAL
  126. IFC NE,*".N"*OB*,1
  127. .L MAX A,.L
  128. QUAL *
  129. COMMAND ENDM
  130. DKP SPACE 4,10
  131. ** DKP - DISPLAY KEYBOARD POINTER.
  132. *
  133. * ENTRY (XC) = X-COORDINATE.
  134. * (YC) = Y-COORDINATE.
  135. * (T2) = ADDRESS OF NEXT CHARACTER.
  136. *
  137. * MACROS CFNC.
  138.  
  139.  
  140. PURGMAC DKPM545,DKPM721
  141.  
  142. DKPM545 MACRO *** CC545 CODE ***
  143. LDD UC
  144. ZJN DKP1
  145. LCN 4
  146. DKP1 SBN YINC
  147. ADD YC
  148. OAN CH+40
  149. LDN 1RA
  150. OAN CH+40
  151. LDD XC
  152. OAN CH+40
  153. LDN 1RI
  154. OAN CH+40
  155. UJN DKPX
  156. DKPM545 ENDM
  157.  
  158.  
  159. DKPM721 MACRO *** CDC721 CODE ***
  160. CFNC BIVF
  161. CFNC DSCF
  162. LDI T2
  163. LPN 77
  164. OAN CH+40
  165. CFNC EIVF
  166. UJN DKPX
  167. DKPM721 ENDM
  168. EDW SPACE 4,10
  169. ** EDW - EDIT AND DISPLAY WORD.
  170. *
  171. * ENTRY (CM - CM+4) = WORD TO BE PROCESSED.
  172. *
  173. * USES T1.
  174. *
  175. * MACROS CFNC.
  176.  
  177.  
  178. PURGMAC EDWM545,EDWM721
  179.  
  180. EDWM545 MACRO *** CC545 CODE ***
  181. LDD CM
  182. SBD XC
  183. MJN EDW1
  184. LPN 77
  185. STD CM
  186. EDW1 LDD CM+1
  187. SBD XC
  188. MJN EDW2
  189. LPN 77
  190. STD CM+1
  191. EDW2 LDD CM+2
  192. SBD XC
  193. MJN EDW3
  194. LPN 77
  195. STD CM+2
  196. EDW3 LDD CM+3
  197. SBD XC
  198. MJN EDW4
  199. LPN 77
  200. STD CM+3
  201. EDW4 LDD CM+4
  202. SBD XC
  203. MJN EDW6
  204. LPN 77
  205. NJN EDW5
  206. LDN 1R
  207. EDW5 STD CM+4
  208. EDW6 LDN 5
  209. OAM CM,CH
  210. UJP EDWX
  211. EDWM545 ENDM
  212.  
  213.  
  214. EDWM721 MACRO *** CDC721 CODE ***
  215. LDN CM
  216. STD T1
  217. EDW10 LDI T1
  218. SBD XC
  219. MJN EDW11
  220. LPN 77
  221. LMC 2L
  222. STI T1
  223. EDW11 AOD T1
  224. LMN CM+5
  225. NJN EDW10
  226. EDW12 SOD T1
  227. LMN CM-1
  228. ZJN EDW13
  229. LDI T1
  230. ZJN EDW12
  231. LDD T1
  232. SBN CM-1
  233. OAM CM,CH
  234. LDD CM+4
  235. NJN EDWX
  236. EDW13 CFNC EELF
  237. UJP EDWX
  238. EDWM721 ENDM
  239. ENTER SPACE 4,15
  240. ** ENTER - ENTER SPECIAL SYNTAX.
  241. *
  242. *
  243. *ADDR ENTER (SYNTAX)
  244. * ENTRY *ADDR* = OVERLAY ENTRY ADDRESS.
  245. * *SYNTAX* = SYNTAX OF COMMAND.
  246.  
  247.  
  248. PURGMAC ENTER
  249. MACRO ENTER,ADDR,SYNTAX
  250. LOCAL A
  251. A SET *
  252. CON ADDR/10000+100*OVNB,ADDR-ADDR/10000*10000
  253. ORG *O-2
  254. ENTER MICRO 1,, SYNTAX
  255. ESS MICCNT ENTER
  256. ESS DECMIC ESS
  257. LOC A
  258. VFD 42/"ESS"L_SYNTAX,18/ADDR
  259. LOC A+1
  260. ENTER ENDM
  261. ENTRY SPACE 4,15
  262. ** ENTRY - DEFINE OVERLAY ENTRY POINT.
  263. *
  264. *
  265. *NAME ENTRY ADDR
  266. * ENTRY *NAME* = ENTRY POINT NAME.
  267. * *ADDR* = ADDRESS OF ENTRY POINT.
  268. * IF *ADDR* IS NOT PRESENT, ADDRESS OF ENTRY
  269. * POINT IS THE CURRENT VALUE OF THE ORIGIN COUNTER.
  270.  
  271.  
  272. PURGMAC ENTRY
  273. MACRO ENTRY,NAME,ADDR
  274. IFC NE,*ADDR**
  275. RMT
  276. QUAL
  277. NAME EQU .N*10000B+/O26".N"/ADDR
  278. QUAL *
  279. RMT
  280. ELSE 4
  281. NAME BSS 0
  282. QUAL
  283. NAME EQU .N*10000B+/O26".N"/NAME
  284. QUAL *
  285. ENTRY ENDM
  286. JMP SPACE 4,10
  287. ** JMP - THREADED JUMP.
  288. *
  289. *
  290. * JMP ADDR
  291. * ENTRY *ADDR* = JUMP ADDRESS.
  292.  
  293.  
  294. PURGMAC JMP
  295. JMP MACRO ADDR
  296. IF -DEF,.ADDR,2
  297. NOREF .ADDR
  298. .ADDR MAX ADDR,*-40
  299. IFGT .ADDR,*-40
  300. UJN .ADDR
  301. .ADDR SET *-1
  302. ELSE 2
  303. .ADDR SET *
  304. LJM ADDR
  305. JMP ENDM
  306. OVLN SPACE 4,15
  307. ** OVLN - GENERATE OVERLAY NUMBER.
  308. *
  309. *
  310. *A OVLN B
  311. * ENTRY *B* = OVERLAY NUMBER.
  312. * EXIT *A* = MICRO OF OVERLAY NAME.
  313.  
  314.  
  315. PURGMAC OVLN
  316. MACRO OVLN,A,B
  317. LOCAL C
  318. C SET B/1R4
  319. C MICRO C+1,1, "OVNG"
  320. A MICRO B-C*1R4+1,1, ABCDEFGHIJKLMNOPQRSTUVWXYZ01234
  321. A MICRO 1,, "C""A"
  322. OVLN ENDM
  323. TITLE OVERLAY LOADER.
  324. TITLE SUBROUTINES / MESSAGES.
  325. LOV SPACE 4,20
  326. ** LOV - LOAD OVERLAY.
  327. *
  328. * ENTRY (A) = BITS 17-12 OVERLAY INDEX.
  329. * BITS 11-00 ENTRY ADDRESS.
  330. *
  331. * USES T0, AB - AB+4.
  332. *
  333. * CALLS LPP.
  334.  
  335.  
  336. QUAL
  337. USE END
  338. USE PRS
  339. USE LOV
  340. PRSA BSS 0
  341. LOC MSFW
  342.  
  343. LOV STM LOVA SET ENTRY
  344. SHN -14
  345. ZJN LOV1 IF RESIDENT
  346. STD T0
  347. SHN 1
  348. SCN 77
  349. LMD T0
  350. SCN 40
  351. ADC 3R9OA-1
  352. STM LOVB+4
  353. SHN -14
  354. STM LOVB+3
  355. SHN 6
  356. LMM OVL-5
  357. SHN 6
  358. LMM LOVB+4
  359. SHN 6
  360. LMM OVL-4
  361. ZJN LOV1 IF PROGRAM IN CORE
  362. RJM LPP LOAD PP PROGRAM
  363. LOV1 LDN ZERL CLEAR ASSEMBLY BUFFER
  364. CRD AB
  365. LDC KBI8 CLEAR OVERLAY LOAD
  366. STM KBIA
  367. AOD DR
  368. LDD CA (A) = CHARACTER ADDRESS
  369. LJM *
  370. LOVA EQU *-1
  371.  
  372.  
  373. LOVB VFD 24/3L1DL,12/CH,24/0
  374. LPP SPACE 4,20
  375. ** LPP - LOAD PP PROGRAM.
  376. *
  377. * ENTRY (LOVB+3 - LOVB+4) = PP PROGRAM NAME.
  378. *
  379. * EXIT TO *KIC* IF WAITING FOR OVERLAY TO BE LOADED.
  380. * TO *ABT* IF CHANNEL TIMEOUT.
  381. * TO *ABT1* IF NO PP AVAILABLE FOR *1DL*.
  382. *
  383. * USES T1, CM - CM+4, KM.
  384. *
  385. * MACROS CFNC, DFIM, EXECUTE, MONITOR.
  386.  
  387.  
  388. LPP SUBR ENTRY/EXIT
  389. EXECUTE 1DL,=
  390. LDD MA
  391. CWM LOVB,ON
  392. LDN 1 DISABLE QUEUING OF PP REQUEST
  393. STD CM+1
  394. MONITOR RPPM REQUEST 1DL
  395. LDD CM+1 CHECK CALL
  396. STM LPPA
  397. NJN LPP1 IF PP AVAILABLE
  398. LDC ERRC MESSAGE = *SYSTEM BUSY - PPU.*
  399. STD KM
  400. LJM ABT1
  401.  
  402. * WAIT FOR 1DL.
  403.  
  404. LPP1 RJM KBIA SET RE-ENTRY
  405. DFIM (CON SDCF),*+1
  406. LDC DDCF DESELECT DISPLAY
  407. CFNC
  408. LDC ** READ PP INPUT REGISTER
  409. LPPA EQU *-1
  410. CRD CM
  411. LDD CM+1 CHECK INPUT REGISTER
  412. SCN 37
  413. SHN 6
  414. LMD CM
  415. LMC 3RL1D
  416. ZJN LPP2 IF *1DL*
  417. SHN 14
  418. LMN 1R1
  419. NJN LPP5 IF *1DL* NOT LOADING
  420. LPP2 LDD CM+2
  421. LMC 7777
  422. ZJN LPP3 IF TRANSMISSION READY
  423. DCN CH+40
  424. CCF *+2,CH
  425. LDC ERRB MESSAGE = *SYSTEM BUSY - DISK.*
  426. LJM KIC INCOMPLETE ENTRY
  427.  
  428. * INPUT OVERLAY.
  429.  
  430. LPP3 LDD TH DELAY
  431. SBN 1
  432. NJN *-1 IF DELAY NOT ELAPSED
  433. DCN CH+40
  434. * LDN 0 SET READY RECEIVE
  435. STD CM+2
  436. LDM LPPA
  437. CWD CM
  438. ACN CH
  439. LCN 0 SET TIMER
  440. STD T1
  441. LPP4 FJM LPP6,CH IF CHANNEL FULL
  442. SOD T1
  443. NJN LPP4 IF CHANNEL NOT TIMED OUT
  444. LPP5 DCN CH+40
  445. CCF *+2,CH
  446. LJM ABT ABORT
  447.  
  448. LPP6 LCN 0 INPUT OVERLAY
  449. IAM OVL-5,CH
  450. LDD KM CHECK MESSAGE
  451. LMC ERRB
  452. CCF *+2,CH
  453. NJN LPP7 IF NOT *DISK BUSY.*
  454. * LDN 0 CLEAR KEYBOARD MESSAGE
  455. STD KM
  456. LPP7 LJM LPPX RETURN
  457. CDL SPACE 4,15
  458. ** CDL - CLEAR DISPLAY LINES.
  459. *
  460. * ENTRY (DR) = DISPLAY REFRESH STATUS.
  461. * (IO) = I/O BUSY STATUS.
  462. *
  463. * EXIT (A) = (DR) = 0.
  464. *
  465. * USES T1, YC.
  466. *
  467. * CALLS ERL.
  468. *
  469. * MACROS CFNC, DFIM.
  470.  
  471.  
  472. CDL3 CFNC CHSF CLEAR HIDDEN SCREEN
  473. LDN 0
  474. STD DR DISABLE REFRESH NEXT PASS
  475.  
  476. CDL SUBR ENTRY/EXIT
  477. LDM DBFD
  478. NJN CDL1 IF DISPLAY NOT ROLLING
  479. AOD DR
  480. CDL1 CFNC SLSF SELECT LEFT SCREEN - SMALL CHARACTERS
  481. LDD DR
  482. ADD IO SET REFRESH STATUS
  483. STM DBFC
  484. NJN CDL3 IF DISPLAY REFRESH ENABLED
  485. STD T1
  486. CDL2 LDM CDLA,T1
  487. ZJN CDLX IF ALL LINES CLEARED
  488. STD YC
  489. RJM ERL ERASE LINE
  490. AOD T1
  491. UJN CDL2 LOOP
  492.  
  493.  
  494. CDLA CON HL01
  495. CON HL02
  496. CON HL04
  497. CON 0
  498. ERL SPACE 4,10
  499. ** ERL - ERASE LINE.
  500. *
  501. * ENTRY (XC) = X-COORDINATE.
  502. * (YC) = Y-COORDINATE.
  503. *
  504. * MACROS CFNC.
  505.  
  506.  
  507. ERL SUBR ENTRY/EXIT
  508. LDN 2
  509. OAM XC,CH OUTPUT COORDINATES
  510. CFNC EELF
  511. UJN ERLX RETURN
  512. ERR SPACE 4,15
  513. ** ERR - ERROR MESSAGES.
  514.  
  515.  
  516. ERRA DATA C*FORMAT ERROR.*
  517.  
  518. ERRB DATA C*DISK BUSY.*
  519.  
  520. ERRC DATA C*PP BUSY.*
  521.  
  522. ERRD DATA C*REPEAT ENTRY.*
  523.  
  524. DFIM (CON LN27)
  525. ERRE CON LN45,CH03
  526. DATA C*RECORD TOO LONG.*
  527. ERREL EQU *-ERRE
  528.  
  529. ERRF DATA C*CANNOT PERFORM I/O ON FILE.*
  530.  
  531.  
  532. ERRNG PPFW-* IF PP RESIDENT MEMORY OVERFLOW
  533. LOC *O
  534. PRSAL EQU *-PRSA
  535. TITLE MAIN PROGRAM.
  536. O26 SPACE 4,20
  537. ** O26 - MAIN PROGRAM.
  538.  
  539.  
  540. ORG PPFW
  541. O26 LJM PRS PRESET PROGRAM
  542.  
  543. O261 RJM CDL CLEAR DISPLAY LINES
  544. O262 RJM SYS DISPLAY SYSTEM STATUS
  545. DCN CH+40
  546. DFIM (CON LDMI)
  547. UJN O263 DISPLAY BUFFER
  548.  
  549. CON DBFC
  550. NJN O263 IF SCREENS BEING REPAINTED
  551. LDD KI
  552. LMD KP
  553. ZJN O264 IF NO KEYBOARD INPUT
  554. O263 RJM DBF DISPLAY BUFFER
  555. DCN CH+40
  556. RJM DKB DISPLAY KEYBOARD BUFFER
  557. DFIM (LDD KI)
  558. UJN O265 DISPLAY BUFFER STATUS
  559.  
  560. STD KP SET PREVIOUS INDEX = CURRENT
  561. LDN 0
  562. STD KD
  563. O264 RJM KBI CHECK KEYBOARD INPUT
  564. O265 RJM DBS DISPLAY BUFFER STATUS
  565. CFNC THVF TRANSFER HIDDEN SCREEN TO VISIBLE
  566. DCN CH+40
  567. RJM KBI KEYBOARD INPUT
  568. RJM TIO TRY I/O
  569. O266 RJM PSS PAUSE FOR SYSTEM
  570. DFIM (CON O261),*+1
  571. LJM O262 LOOP
  572. DPP SPACE 4,10
  573. ** DPP - CLEAR *DIS* FLAG AND DROP PP.
  574. *
  575. * EXIT TO PPR.
  576. *
  577. * USES CM - CM+4.
  578. *
  579. * MACROS MONITOR.
  580. *
  581. * NOTE THIS ROUTINE IS CALLED FROM *COMDDSP* ROUTINE *PSS*.
  582.  
  583.  
  584. DPP BSS 0 ENTRY
  585. LDN ZERL
  586. CRD CM
  587. LDN 10 SET MASK FOR *JCIW*
  588. STD CM+4
  589. LDN CCTS CLEAR *DIS* FLAG
  590. STD CM+1
  591. MONITOR SJCM
  592. MONITOR DPPM DROP PP
  593. LJM PPR EXIT TO PP RESIDENT
  594. DBF SPACE 4,20
  595. ** DBF - DISPLAY BUFFER.
  596. *
  597. * ENTRY (OT - OT+1) = DISPLAY ADDRESS.
  598. *
  599. * EXIT (DL) = DISPLAY LENGTH.
  600. * (LL) = 0 IF EXIT ON LAST LINE OF SCREEN.
  601. * (DA - DA+1) = ADDRESS OF LAST LINE + 1.
  602. *
  603. * USES T1 - T7, CM - CM+4.
  604. *
  605. * CALLS CDA, DIL, EDW.
  606. *
  607. * MACROS CFNC, DFIM.
  608.  
  609.  
  610. DBF SUBR ENTRY/EXIT
  611. LDD OT SET DISPLAY ADDRESS
  612. STD DA
  613. LDD OT+1
  614. STD DA+1
  615. LDN 0 SET DISPLAY LENGTH
  616. STD DL
  617. LDC SLSF SET LEFT SCREEN
  618. STM DBFB
  619. LDC LN06 SET FIRST LINE
  620. DBFA EQU *-1
  621. STD YC
  622. DFIM (UJN DBF1)
  623. LMC LN06
  624. ZJN DBF1 IF TOP OF SCREEN
  625. AOM DBFA ADVANCE Y
  626. STM DBFD
  627. DBF1 LDC SLSF
  628. DBFB EQU *-1
  629. CFNC SELECT SCREEN - SMALL CHARACTERS
  630. DBF2 RJM CDA CHECK DISPLAY ADDRESS
  631. PJN DBFX IF BUFFER EMPTY
  632. RJM DIL DISPLAY INSERT LINE
  633. LDN 0
  634. STD T3 CLEAR WORD COUNTS
  635. STD T4
  636. LDM DBFC
  637. ZJN DBF3 IF DISPLAY REFRESH DISABLED
  638. LDN 2
  639. OAM XC,CH
  640. OAN CH+40
  641. LDC 2R .
  642. OAN CH+40
  643.  
  644. * DISPLAY LINE.
  645.  
  646. DBF3 LDD DA READ WORD
  647. SHN 6
  648. ADD RA
  649. SHN 6
  650. ADD DA+1
  651. CRD CM
  652. AOD DL ADVANCE DISPLAY LENGTH
  653. LDD SF
  654. ZJN DBF7 IF SCAN NOT SET
  655.  
  656. * DISPLAY SCAN LINE.
  657.  
  658. AOD T3 COUNT WORD READ
  659. SBD SC
  660. SBN 1
  661. PJN DBF5 IF WORD REACHED
  662. DBF4 LJM DBF9 PROCESS END OF WORD
  663.  
  664. DBF5 SBN 6
  665. MJN DBF7 IF SIX WORDS NOT DISPLAYED
  666. SBN 10
  667. MJN DBF4 IF EIGHT WORDS NOT SKIPPED
  668. DBF6 LJM DBF10 PROCESS AS END OF LINE
  669.  
  670. * DISPLAY NORMAL LINE.
  671.  
  672. DBF7 AOD T4 COUNT WORD DISPLAYED
  673. LMN 7
  674. NJN DBF8 IF NOT 7TH WORD
  675. STD T4
  676. LDC CH05 RESET X-COORDINATE
  677. OAN CH+40
  678. LCN YINC
  679. RAD YC
  680. OAN CH+40
  681. DFIM (ADC -LN25)
  682. ADC -LN42
  683. MJN DBF6 IF SCREEN OVERFLOW
  684. RJM CDA CHECK DISPLAY ADDRESS
  685. MJN DBF8 IF BUFFER NOT EMPTY
  686. LJM DBFX RETURN
  687.  
  688. DBF8 LDC 1
  689. DBFC EQU *-1
  690. ZJN DBF9 IF REFRESH DISABLED
  691. RJM EDW DISPLAY WORD
  692.  
  693. * PROCESS END-OF-WORD.
  694.  
  695. DBF9 AOD DA+1 ADVANCE WORD ADDRESS
  696. SHN -14
  697. RAD DA
  698. LDD CM+4
  699. ZJN DBF10 IF END OF LINE
  700. LDD DA
  701. SBD IN
  702. SHN 14
  703. ADD DA+1
  704. SBD IN+1
  705. PJN DBF10 IF ADDRESS .GE. *IN*
  706. LJM DBF3 LOOP
  707.  
  708. * PROCESS END-OF-LINE.
  709.  
  710. DBF10 LDC 1 ADVANCE LINE NUMBER
  711. DBFD EQU *-1
  712. NJN DBF12 IF ROLL NOT NEEDED
  713. AOD DR
  714. LDD DA
  715. STD OT
  716. LDD DA+1 SET FIRST LINE ADDRESS
  717. STD OT+1
  718. LDD YC SET NEW Y-COORDINATE
  719. DFIM (UJN DBF11)
  720. SBN 2*YINC
  721. STM DBFA
  722. DBF11 STM DBFD SET ROLL NOT NEEDED
  723. DFIM (LCN YINC)
  724. DBF12 LCN 2*YINC
  725. RAD YC
  726. DFIM (ADC -LN25)
  727. ADC -LN41
  728. MJN DBF13 IF BOTTOM OF SCREEN
  729. STD LL
  730. LJM DBF2 LOOP
  731.  
  732. DBF13 LDD HN SET NEXT SCREEN
  733. RAM DBFB
  734. ERRNZ SLSF+100-SRSF CODE DEPENDS ON VALUE
  735. SHN 21-6
  736. PJN DBF14 IF RIGHT SCREEN DISPLAYED
  737. FJM *,CH
  738. DCN CH+40
  739. DFIM (CON LN06),*+1
  740. LDC LN06-LN41+YINC RESET LINE NUMBER
  741. DFIM (STD YC)
  742. RAD YC
  743. LJM DBF1 LOOP
  744.  
  745. DBF14 LDD HF SET ROLL FLAG
  746. STM DBFD
  747. RJM DIL DISPLAY INSERT LINE
  748. LJM DBFX RETURN
  749. DBS SPACE 4,20
  750. ** DBS - DISPLAY BUFFER STATUS.
  751. *
  752. * USES T1, CM - CM+4.
  753. *
  754. * CALLS D6S, DOL.
  755. *
  756. * MACROS CFNC, DISPLA, MONITOR.
  757.  
  758.  
  759. DBS SUBR ENTRY/EXIT
  760. CFNC SLSF
  761. LDD IO
  762. ZJN DBS1 IF I/O NOT BUSY
  763. DISPLA CH04,HL02,(CIO BUSY.)
  764. DBS1 DISPLA CH01,HL01,(O26. FILE = )
  765. LDD RA READ FILE NAME
  766. SHN 6
  767. ADN FET
  768. CRD CM
  769. LDN 4 DISPLAY FILE NAME
  770. OAM CM,CH
  771. LDM CRSB CHECK WRITE LOCKOUT
  772. ZJN DBS2 IF WRITE ALLOWED
  773. LDN 1R*
  774. DBS2 OAN CH+40
  775. LDD CM+4 DISPLAY STATUS
  776. RJM D6S
  777. DISPLA ,,(RS=) DISPLAY CURRENT RECORD SIZE
  778. LDD IN
  779. SBD FT
  780. SHN 14
  781. ADD IN+1
  782. SBD FT+1
  783. SHN 14 PRESERVE PRU COUNT
  784. STD CM
  785. SHN 6 DISPLAY WORD COUNT IN BUFFER
  786. RJM D6S
  787. LDD CM COMPARE WITH ORIGINAL BUFFER SIZE
  788. LMM TIOG
  789. ZJN DBS3 IF SAME FILE PRU SIZE
  790. DISPLA ,,(**.) SET WARNING IF FILE CHANGED PRU SIZE
  791. DBS3 DISPLA ,,(CM=)
  792. LDD LM COMPUTE STORAGE
  793. SBD IN
  794. SHN 14
  795. ADD LM+1
  796. SBD IN+1
  797. RJM D6S DISPLAY STORAGE
  798. LDD CP READ MESSAGE 2
  799. ADN MS2W
  800. STD T1
  801. CRD CM
  802. LDD CM
  803. NJN DBS4 IF SET
  804. LDD CP READ MESSAGE 1
  805. ADN MS1W
  806. CRD CM
  807. STD T1
  808. DBS4 LDN 2 OUTPUT COORDINATES
  809. OAM DBSA,CH
  810. LDD T1 DISPLAY MESSAGE
  811. RJM DOL
  812. LDD CP READ JOB CONTROL
  813. ADN STSW
  814. CRD CM
  815. LDD CM+2 CHECK ROLLOUT FLAG
  816. LPN 1
  817. ZJN DBS5 IF NOT SET
  818. DISPLA CH25,HL02,(ROLLOUT.),H
  819. DBS5 LDD CM+1
  820. ZJN DBS8 IF ERROR FLAG NOT SET
  821. SOD CM
  822. LPN 37
  823. NJN DBS8 IF .GT. 1 PP ASSIGNED
  824. STD IO
  825. LDN ZERL
  826. CRD CM CLEAR RANDOM ACCESS
  827. LDD RA
  828. SHN 6
  829. ADN FET+6
  830. CWD CM
  831. MONITOR CEFM CLEAR ERROR FLAG
  832. DBS8 LJM DBSX RETURN
  833.  
  834.  
  835. DBSA CON CH01,HL04
  836. DKB SPACE 4,20
  837. ** DKB - DISPLAY KEYBOARD BUFFER.
  838. *
  839. * ENTRY (KM) = ADDRESS OF KEYBOARD MESSAGE. (IF (KM) = 0,
  840. * NO MESSAGE.)
  841. * (KI) = KEYBOARD INDEX.
  842. * (KD) = 0 IF KEYBOARD BUFFER NOT DISPLAYED.
  843. *
  844. * USES T1, T3, YC.
  845. *
  846. * CALLS DKL, ERL, HIL.
  847. *
  848. * MACROS CFNC, DFIM, DISPLA.
  849.  
  850.  
  851. DKB SUBR ENTRY/EXIT
  852. CFNC SLSF
  853. DFIM (CON LN50),*+1
  854. LDC LN48 SET Y-COORDINATE
  855. STD YC
  856. LDN 2 OUTPUT MESSAGE COORDINATES
  857. OAM ERRE,CH
  858. LDD KM
  859. ZJN DKB3 IF NO MESSAGE
  860. STD T1 DISPLAY MESSAGE
  861. LMC ERRE
  862. ZJN DKB2 IF *RECORD TOO LONG*
  863. DKB1 LDI T1
  864. OAN CH+40
  865. ZJN DKB3 IF END OF MESSAGE
  866. AOD T1
  867. UJN DKB1
  868.  
  869. DKB2 LDC ERREL*10000+ERRE
  870. RJM HIL
  871. DKB3 LDD IF
  872. ZJN DKB4 IF NO INSERT
  873. DISPLA ,,(INSERT.)
  874. DKB4 LDM KBUF+1
  875. LMN 1R.
  876. NJN DKB7 IF 2ND CHARACTER .NE. *.*
  877. DISPLA ,,(COL. =)
  878. * LDN 0 PRESET DIGITS
  879. STD T3
  880. LDD KI DISPLAY COLUMN NUMBER
  881. SBN 1
  882. DKB5 STD T1
  883. AOD T3
  884. LDD T1 COUNT 10
  885. SBN 10D
  886. PJN DKB5 IF CONVERSION NOT COMPLETE
  887. SOD T3
  888. ZJN DKB6 IF LEADING ZERO
  889. ADN 1R0
  890. DKB6 OAN CH+40
  891. LDD T1
  892. SHN 6
  893. ADC 2R0.
  894. OAN CH+40
  895. DKB7 DFIM (LDD KD)
  896. UJN DKB8 DISPLAY KEYBOARD LINE
  897.  
  898. NJN DKB11 IF KEYBOARD BUFFER DISPLAYED
  899. LDC SLPF
  900. STM DKBA SELECT LEFT SCREEN - PRIORITY OUTPUT
  901. CFNC
  902. DKB8 RJM DKL DISPLAY KEYBOARD LINE
  903. DFIM (SHN 21-11)
  904. UJN DKB10 RETURN
  905.  
  906. PJN DKB10 IF DATA ON LAST LINE
  907. DKB9 RJM ERL ERASE LAST LINE
  908. DKB10 FJM *,CH IF FULL CHANNEL
  909. DCN CH+40
  910. LJM DKBX RETURN
  911.  
  912. DKB11 LDC SLPF CHECK KEYBOARD BUFFER DISPLAY
  913. DKBA EQU *-1
  914. ZJN DKB10 IF PRIORITY LINES CLEAR
  915. CFNC
  916. LDN 0 SET LINES CLEARED
  917. STM DKBA
  918. RJM ERL ERASE *LN50*
  919. LCN YINC
  920. RAD YC
  921. UJN DKB9 CLEAR *LN51*
  922. DLL SPACE 4,20
  923. ** DLL - DISPLAY LAST LINE.
  924. *
  925. * ENTRY (IF) = INSERT FLAG.
  926. *
  927. * EXIT (A) .GT. 0.
  928. *
  929. * CALLS DKL.
  930.  
  931.  
  932. DLL SUBR ENTRY/EXIT
  933. LDD IF CHECK INSERT FLAG
  934. ZJN DLL1 IF NOT SET
  935. LDD IP+1 CHECK INSERT
  936. LMD IN+1
  937. NJN DLL1 IF NOT AT END
  938. LDD IP CHECK INSERT
  939. LMD IN
  940. NJN DLL1 IF NOT AT END
  941. STD IF CLEAR INSERT
  942. AOD DR
  943. DLL1 RJM DIL DISPLAY INSERT LINE
  944. LDD IF
  945. NJN DLLX IF INSERT LINE
  946. RJM DKL DISPLAY KEYBOARD LINE
  947. UJN DLLX RETURN
  948. DISPLAY SPACE 4,10
  949. ** DISPLAY COMMON DECKS.
  950.  
  951.  
  952. *CALL COMDDSP
  953. *CALL COMDSYS
  954. TITLE KEYBOARD INPUT.
  955. KBI SPACE 4,20
  956. *** KEYBOARD INPUT.
  957. *
  958. * ALL ENTRIES ARE DISPLAYED ON THE BOTTOM OF THE LEFT SCREEN
  959. * AS THEY ARE ENTERED.
  960. *
  961. * *CR* MUST FOLLOW ALL ENTRIES BEFORE ACTION IS TAKEN.
  962. * *BKSP* DELETES THE PREVIOUS CHARACTER TYPED.
  963. * *LEFT BLANK* DELETES THE CURRENT LINE BEING ENTERED.
  964. * *RIGHT BLANK* IS THE TAB KEY.
  965. *
  966. * IF THESE CHARACTERS ARE THE FIRST ENTRY, THE FOLLOWING
  967. * APPLIES -
  968. * *0* = SET INSERT AT FIRST LINE.
  969. * *1* = SET INSERT AT 4TH LINE ON SCREEN.
  970. * *2* = SET INSERT AT 8TH LINE ON SCREEN.
  971. * *3* = SET INSERT AT 12TH LINE ON SCREEN.
  972. * *4* = SET INSERT AT 16TH LINE ON SCREEN.
  973. * *5* = SET INSERT AT 20TH LINE ON SCREEN.
  974. * *6* = SET INSERT AT 24TH LINE ON SCREEN.
  975. * *7* = SET INSERT AT 32ND LINE ON SCREEN.
  976. * *8* = SET INSERT *8* AT INSERT LINE.
  977. * *9* = SET INSERT *9* AT INSERT LINE.
  978. * *+* = DISPLAY NEXT PAGE.
  979. * *-* = DISPLAY PREVIOUS 18 LINES.
  980. * (*) = HOLD DISPLAY.
  981. * */* = START OR STOP ROLL.
  982. * *(* = ADVANCE INSERT BY 1.
  983. * *)* = DECREMENT INSERT BY 1.
  984. * *=* = TOGGLE INSERT FLAG.
  985. * *,* = FIND INSERT LINE.
  986. * *.* = DELETE NEXT LINE.
  987. * *CR* = SET */REPEAT ENTRY.*
  988. * * * = SET *P.* INTO BUFFER.
  989. *
  990. * ABOVE THE ENTRY DISPLAY, THE FOLLOWING MESSAGES MAY
  991. * APPEAR -
  992. *
  993. * *DATA OVERFLOW.* = THE LINE TO BE ENTERED IN THE
  994. * BUFFER OR THE BLOCK TO BE MOVED OR COPIED
  995. * DOES NOT FIT INTO THE REMAINING FIELD LENGTH.
  996. * USE *ENFL* COMMAND TO INCREASE BUFFER SPACE.
  997. * *DISK BUSY.* = WAITING FOR *O26* OVERLAY.
  998. * *FILE NOT ON MASS STORAGE.* = FILE NOT VALIDATED
  999. * FOR RANDOM PROCESSING.
  1000. * *FORMAT ERROR.* = A FORMAT ERROR HAS BEEN
  1001. * DETECTED DURING TRANSLATION OF THE ENTRY.
  1002. * *INCORRECT COMMAND.* = USER ACCESS NOT VALID
  1003. * DETECTED.
  1004. * *INDEX NOT FOUND.* = THE FILE DIRECTORY (RANDOM
  1005. * INDEX) WAS NOT FOUND.
  1006. * *INSERT 8 OR 9 NOT SET.* = THE COMMAND ENTERED
  1007. * REQUIRES THAT BOTH THE INSERT 8 MARKER AND
  1008. * THE INSERT 9 MARKER BE SET.
  1009. * *INCORRECT FL REQUEST.* = THE REQUESTED FIELD
  1010. * LENGTH WAS GREATER THAN 131K, OR LESS THAN
  1011. * 10K IF EXTENDED MEMORY ASSIGNED.
  1012. * *LINE NOT FOUND.* = A LINE CONTAINING THE STRING
  1013. * SPECIFIED WAS NOT FOUND.
  1014. * *LINE OVERFLOW.* = THE REPLACE COMMAND INCREASED
  1015. * LINE LENGTH TO GREATER THAN THE MAXIMUM
  1016. * BUFFER SIZE OF 90 CHARACTERS.
  1017. * *LIST.* = *O26* IS GENERATING A LIST OF THE DIRECTORY
  1018. * FOR THE FILE.
  1019. * *NO RANDOM ACCESS.* = THE FILE IS NOT RANDOM ACCESS.
  1020. * *NOT IN LINE.* = CHARACTER STRING NOT FOUND BY THE
  1021. * REPLACE CHARACTER COMMANDS.
  1022. * *OUT OF RANGE.* = EDIT LINE NUMBER NOT IN BUFFER.
  1023. * *PP BUSY.* = REQUEST IGNORED BY SYSTEM.
  1024. * *PRU SIZE MODIFIED.* = A REWRITE IN PLACE CANNOT
  1025. * BE PERFORMED BECAUSE OF THE REASON INDICATED.
  1026. * *RECORD NOT FOUND.* = THE REQUESTED RECORD WAS NOT
  1027. * FOUND ON THE FILE. FOR SEQUENTIAL RECORD
  1028. * SEARCH, THE RECORD WAS NOT FOUND AFTER THE
  1029. * CURRENT FILE POSITION.
  1030. * *RECORD TOO LONG.* = RECORD READ DID NOT FIT
  1031. * INTO BUFFER.
  1032. * *REPEAT ENTRY.* = ENTRY WILL NOT BE CLEARED AFTER
  1033. * EXECUTION.
  1034. * *SEARCH / CCCCCCC.* = *O26* IS SEARCHING SEQUENTIAL
  1035. * RECORD *CCCCCCC*.
  1036. * *SEARCH.* = *O26* IS SEARCHING A RANDOM RECORD.
  1037. * *STORAGE NOT AVAILABLE.* = THE REQUESTED FIELD
  1038. * LENGTH IS CURRENTLY UNAVAILABLE.
  1039. * *WAITING FOR STORAGE.* = *O26* IS WAITING FOR THE
  1040. * REQUESTED FIELD LENGTH TO BE ASSIGNED.
  1041. * *WRITE ON READ-ONLY FILE.* = WRITE IS NOT ALLOWED
  1042. * ON THE EDIT FILE.
  1043. KBI SPACE 4,20
  1044. ** KBI - KEYBOARD INPUT.
  1045. *
  1046. * USES T2, T5, CA, UC, KE, KI.
  1047. *
  1048. * CALLS CFC, RDL.
  1049. *
  1050. * MACROS CFNC, DFIM.
  1051.  
  1052.  
  1053. KBI8 SHN 21-6
  1054. PJN KBI9 IF NOT CONTROLWARE RELOAD REQUEST
  1055. AOD DR
  1056. KBI9 SHN 6-21
  1057. NJN KBI1 IF INPUT CHARACTER PRESENT
  1058. STM KBIB CLEAR CHARACTER
  1059.  
  1060. KBIX LJM O266 ENTRY/EXIT
  1061. KBI EQU *-1
  1062. CFNC SKIF SELECT KEYBOARD INPUT
  1063. IAN CH+40
  1064. DCN CH+40
  1065. STD KE
  1066. LJM KBI8 CHECK KEYBOARD INPUT
  1067. KBIA EQU *-1
  1068. JMP KBIX RETURN
  1069.  
  1070. KBI1 LDC **
  1071. KBIB EQU *-1
  1072. ZJN KBI2 IF NO PREVIOUS CHARACTER
  1073. SOM KBID DECREMENT DELAY
  1074. NJN KBIX IF DELAY NO ELAPSED
  1075. LDN 20 SET REPEAT DELAY
  1076. DFIM (LDN 1)
  1077. KBI2 LMN 24 SET INITIAL DELAY
  1078. STM KBID
  1079. LDD KE
  1080. STM KBIB STORE CURRENT CHARACTER
  1081. LDD KI
  1082. NJN KBI3 IF NOT FIRST CHARACTER
  1083. STM DKLA CLEAR ALTERNATE KEYBOARD
  1084. RJM CFC CHECK FIRST CHARACTER
  1085. KBI3 LDD KE CHECK CHARACTER
  1086. KBIC LMN **
  1087. NJN KBI4 IF NOT UPPER CASE SHIFT
  1088. LDD UC TOGGLE UPPER CASE
  1089. LMN 1
  1090. STD UC
  1091. ZJN KBI6 IF NOT UPPER CASE
  1092. JMP KBIX RETURN
  1093.  
  1094. KBI4 LDD UC
  1095. ZJN KBI6 IF NOT UPPER CASE
  1096. LDN 0 CLEAR UPPER CASE FLAG
  1097. STD UC
  1098. LDC KBIF-1 SET UPPER CASE TABLE
  1099. STD T2
  1100. KBI5 AOD T2 ADVANCE TABLE
  1101. LDI T2
  1102. ZJN KBI6 IF END OF TABLE
  1103. SHN -6
  1104. LMD KE COMPARE ENTRY
  1105. NJN KBI5 IF NO MATCH
  1106. LDI T2 ENTER SPECIAL CHARACTER
  1107. LPN 77
  1108. STD KE
  1109. SBN 1
  1110. ZJN .KBIX IF BKSP
  1111. ADN 1
  1112. UJN KBI7
  1113.  
  1114. KBI6 LDD KE CHECK ENTRY
  1115. SBN 53
  1116. MJN KBC IF .LT. *$*
  1117. SBN KBIEL
  1118. KBI7 PJN KBC IF .GT. * *
  1119. LDM KBIE-53,KE
  1120. STD T5 SET EXECUTE FLAG
  1121. LJM 0,T5 PROCESS ENTRY
  1122.  
  1123.  
  1124. * PROCESS *SPACE*.
  1125.  
  1126. KBS LDN 1R SUBSTITUTE * *
  1127. STD KE
  1128. LDC 0
  1129. KBSA EQU *-1
  1130. NJN KBC IF NOT SKIPPING
  1131. LDM KBUF
  1132. LMN 1RA
  1133. ZJN KBS1 IF *A*
  1134. LMN 1RD&1RA
  1135. ZJN KBS1 IF *D*
  1136. LMN 1RE&1RD
  1137. ZJN KBS1 IF *E*
  1138. LMN 1RL&1RE
  1139. NJN KBC IF NOT *L*
  1140. KBS1 LDM DBUF,KI
  1141. LPN 77
  1142. UJN KBC1
  1143.  
  1144.  
  1145. * PROCESS NORMAL CHARACTER.
  1146.  
  1147. KBC LDD KE CLEAR SKIP FLAG
  1148. NJN KBC0 IF NOT COLON
  1149. LDD HN SUBSTITUTE 100B FOR COLON
  1150. KBC0 STM KBSA TURN OFF SKIP MODE
  1151. KBC1 STM KBUF,KI
  1152. AOD KI
  1153. SBN 62D
  1154. NJN KBC3 IF NOT ADVANCE INTO DOUBLE DISPLAY LINE
  1155. AOD DR
  1156. LDN 0
  1157. KBC3 SBN KBUFL-62D
  1158. PJN KBB IF BUFFER FULL
  1159. LDN 0 CLEAR EXECUTE FLAG
  1160. STD T5
  1161. LJM INT INTERPRET KEYBOARD MESSAGE
  1162.  
  1163. * PROCESS *BKSP*.
  1164.  
  1165. KBB LDN 1R CLEAR PREVIOUS ENTRY
  1166. STM KBUF-1,KI
  1167. SOD KI
  1168. SBN 2
  1169. PJN KBB1 IF NOT BEFORE COLUMN 2
  1170. LDN 0 CLEAR DISPLAY ALTERNATE BUFFER
  1171. STM DKLA
  1172. KBB1 SBN 61D-2
  1173. NJN KBB2 IF NOT BACKSPACE INTO SINGLE DISPLAY LINE
  1174. AOD DR
  1175. KBB2 LDD KM CHECK KEYBOARD MESSAGE
  1176. LMC ERRD
  1177. ZJN KBB3 IF REPEAT ENTRY RETURN
  1178. LDN 0
  1179. STD KM
  1180. KBB3 JMP KBIX RETURN
  1181.  
  1182.  
  1183. * PROCESS *.*.
  1184.  
  1185. KBP LDD KI CHECK COLUMN
  1186. SBN 1
  1187. ZJN KBP1 IF COL. 2
  1188. LJM KBC
  1189.  
  1190. KBP1 STM KBSA SET SKIP FLAG
  1191. LDM KBUF
  1192. LMN 1RA
  1193. ZJN KBP2 IF *A*
  1194. LMN 1RD&1RA
  1195. ZJN KBP3 IF *D*
  1196. LMN 1RE&1RD
  1197. ZJN KBP3 IF *E*
  1198. LMN 1RL&1RE
  1199. ZJN KBP2 IF *L*
  1200. LMN 1RM&1RL
  1201. ZJN KBP2 IF *M*
  1202. LMN 1RN&1RM
  1203. NJN KBP4 IF NOT *N*
  1204. KBP2 LDD IF
  1205. ZJN .KBIX IF NO INSERT
  1206. AOD DR
  1207. LDC BUFM+2 SET CHARACTER ADDRESS
  1208. STD CA
  1209. LDN 0 CLEAR BUFFER
  1210. STI CA
  1211. RJM RDL READ NEXT LINE
  1212. KBP3 LDC DBUF SET ALTERNATE LINE BUFFER
  1213. STM DKLA
  1214. KBP4 LDN 1R.
  1215. JMP KBC1
  1216.  
  1217. DFIM (CON 1)
  1218. KBID DATA 24 DELAY COUNT
  1219.  
  1220. KBIE BSS 0
  1221. LOC 53
  1222. CON PLB 53 *LEFT BLANK*
  1223. CON KBC 54
  1224. CON PRT 55 *RIGHT BLANK*
  1225. CON KBC 56
  1226. CON KBP 57 *.*
  1227. CON INT 60 *CR*
  1228. CON KBB 61 *BKSP*
  1229. CON KBS 62 * *
  1230. LOC *O
  1231. KBIEL EQU *-KBIE
  1232.  
  1233. KBIF BSS 0
  1234. CON 1LS+53
  1235. CON 2R0# 60
  1236. CON 2R1[ 61
  1237. CON 2R2] 62
  1238. CON 1L3+63
  1239. CON 2R4" 64
  1240. CON 1L5+65 65
  1241. CON 2R6! 66
  1242. CON 2R7& 67
  1243.  
  1244. CON 2RQ' 70
  1245. CON 2RW? 71
  1246. CON 2RE< 72
  1247. CON 2RR> 73
  1248. CON 2RT@ 74
  1249. CON 2RY\ 75
  1250. CON 2RU^ 76
  1251. CON 2RI; 77
  1252.  
  1253. CON 2R=" 64
  1254. CON 1L.+65 65
  1255. CON 2RA& 67
  1256. CON 2R(< 72
  1257. CON 2R)> 73
  1258. CON 2R+@ 74
  1259. CON 2R-\ 75
  1260. CON 2R,; 77
  1261.  
  1262. CON 6101 BKSP
  1263. KBIG CON 2RZ0-1R0 00 ( 0, IF 63 CHARACTER SET)
  1264. CON 0 TERMINATOR
  1265. TITLE DISPLAY SUBROUTINES.
  1266. CDA SPACE 4,15
  1267. ** CDA - CHECK DISPLAY ADDRESS.
  1268. *
  1269. * ENTRY (DA - DA+1) = CURRENT DISPLAY ADDRESS.
  1270. *
  1271. * EXIT (A) .LT. 0 IF BUFFER NOT EMPTY.
  1272. * = RESPONSE FROM *DLL* IF EMPTY.
  1273. *
  1274. * CALLS DLL.
  1275.  
  1276.  
  1277. CDA SUBR ENTRY/EXIT
  1278. LDD DA
  1279. SBD IN
  1280. SHN 14
  1281. ADD DA+1
  1282. SBD IN+1
  1283. MJN CDAX IF BUFFER NOT EMPTY
  1284. RJM DLL DISPLAY LAST LINE
  1285. UJN CDAX RETURN
  1286. CFC SPACE 4,20
  1287. ** CFC - CHECK FIRST CHARACTER.
  1288. *
  1289. * ENTRY (KE) = FIRST CHARACTER.
  1290. * (DA - DA+1) = ADDRESS + 1 OF LAST LINE OF DISPLAY.
  1291. *
  1292. * USES T1, T2, KI, IN - IN+1, IP - IP+1, OT - OT+1.
  1293. *
  1294. * CALLS DNL, RID, SDS, SFL, SIL.
  1295.  
  1296.  
  1297. CFC SUBR ENTRY/EXIT
  1298. LDD KE
  1299. SBN 1R0
  1300. MJN CFCX IF .LT. *0*
  1301. SBN CFCAL
  1302. PJN CFCX IF .GT. * *
  1303. LDM CFCA-1R0,KE
  1304. STD T2
  1305. AOD DR ENABLE DISPLAY REFRESH
  1306. LDN 0
  1307. LJM 0,T2
  1308.  
  1309.  
  1310. * *,* - FIND INSERT LINE.
  1311.  
  1312. CFC1 LDD IF
  1313. ZJN CFC4 IF NO INSERT
  1314. LDD IP FIND INSERT LINE
  1315. STD OT
  1316. LDD IP+1
  1317. STD OT+1
  1318. JMP KBIX RETURN
  1319.  
  1320.  
  1321. * *CR* - SET *REPEAT ENTRY.*
  1322.  
  1323. CFC2 LDC ERRD ERROR = *REPEAT ENTRY.*
  1324. STD KM
  1325. JMP KBIX RETURN
  1326.  
  1327.  
  1328. * *+* - INCREMENT DISPLAY BY ONE SCREEN.
  1329.  
  1330. CFC3 LDD DA CHECK NEXT DISPLAY ADDRESS
  1331. LMD IN
  1332. SHN 14
  1333. LMD DA+1
  1334. LMD IN+1
  1335. ZJN CFC4 IF *IN* REACHED RETURN
  1336. LDD DA
  1337. STD OT
  1338. LDD DA+1 SET NEXT LINE ADDRESS
  1339. STD OT+1
  1340. CFC4 JMP KBIX RETURN
  1341.  
  1342.  
  1343. * *-* - DISPLAY PREVIOUS 18 LINES.
  1344.  
  1345. CFC5 LDD OT SET DISPLAY
  1346. STD T2
  1347. LDD OT+1
  1348. STD T3
  1349. LCN 18D
  1350. RJM SFL SEARCH FOR LINE
  1351. LDN T2 SET DISPLAY
  1352. RJM SDS
  1353. JMP KBIX RETURN
  1354.  
  1355.  
  1356. * */* - TOGGLE HOLD FLAG.
  1357.  
  1358. CFC6 LDD HF
  1359. LMN 1
  1360. STD HF
  1361. JMP KBIX RETURN
  1362.  
  1363.  
  1364. * *(* - ADVANCE INSERT.
  1365.  
  1366. CFC7 LDD IF
  1367. ZJN .KBIX IF NO INSERT
  1368. LDN 1 ADVANCE INSERT
  1369. UJN CFC10
  1370.  
  1371.  
  1372. * *)* - DECREMENT INSERT.
  1373.  
  1374. CFC8 LDD IF
  1375. NJN CFC9 IF INSERT
  1376. LDD DA
  1377. STD IP
  1378. LDD DA+1 SET INSERT AT LAST LINE
  1379. STD IP+1
  1380. CFC9 LCN 1 DECREMENT INSERT
  1381. CFC10 RJM SIL
  1382. JMP KBIX RETURN
  1383.  
  1384.  
  1385. * *=* - CLEAR INSERT.
  1386.  
  1387. CFC11 STD IF
  1388. JMP KBIX RETURN
  1389.  
  1390.  
  1391. * * * - SET *P.* IN BUFFER
  1392.  
  1393. CFC12 LDN 2
  1394. STD KI
  1395. LDN 1RP
  1396. STM KBUF
  1397. LDN 1R.
  1398. STM KBUF+1
  1399. JMP KBIX RETURN
  1400.  
  1401. * (*) - HOLD DISPLAY CHANNEL.
  1402.  
  1403. CFC13 RJM RID HOLD DISPLAY
  1404. JMP KBIX RETURN
  1405.  
  1406.  
  1407. * *0 - 7* - SET INSERT AT SCREEN START + 4*N LINES.
  1408.  
  1409. CFC14 LDD OT
  1410. STD IP
  1411. LDD OT+1
  1412. STD IP+1
  1413. LDD KE
  1414. SBN 1R0
  1415. SHN 2
  1416. RJM SIL SET INSERT LINE
  1417. JMP KBIX RETURN
  1418.  
  1419.  
  1420. * *8* - SET INSERT *8*.
  1421.  
  1422. CFC15 LCN 2
  1423. * UJN CFC16 SET INSERT *8*
  1424.  
  1425.  
  1426. * *9* - SET INSERT *9*.
  1427.  
  1428. CFC16 ADC CFCB+2
  1429. STD T1
  1430. LDD IF
  1431. ZJN CFC18 IF NO INSERT
  1432. LDD IP SET INSERT ADDRESS
  1433. STI T1
  1434. LDD IP+1
  1435. CFC17 STM 1,T1
  1436. JMP KBIX RETURN
  1437.  
  1438. CFC18 LDD IN SET INSERT ADDRESS
  1439. STI T1
  1440. LDD IN+1
  1441. UJN CFC17 RETURN
  1442.  
  1443.  
  1444. * *.* - DELETE NEXT LINE.
  1445.  
  1446. CFC19 RJM DNL DELETE NEXT LINE
  1447. JMP KBIX RETURN
  1448.  
  1449.  
  1450. * TABLE OF FIRST CHARACTER FORMATS.
  1451.  
  1452. CFCA BSS 0
  1453. LOC 1R0
  1454.  
  1455. CON CFC14 0
  1456. CON CFC14 1
  1457. CON CFC14 2
  1458. CON CFC14 3
  1459. CON CFC14 4
  1460. CON CFC14 5
  1461. CON CFC14 6
  1462. CON CFC14 7
  1463. CON CFC15 8
  1464. CON CFC16 9
  1465. CON CFC3 +
  1466. CON CFC5 -
  1467. CON CFC13 *
  1468. CON CFC6
  1469. CON CFC7 (
  1470. CON CFC8 )
  1471. CON CFCX LEFT BLANK
  1472. CON CFC11 =
  1473. CON CFCX RIGHT BLANK
  1474. CON CFC1 ,
  1475. CON CFC19 .
  1476. CON CFC2 CR
  1477. CON KBIX BKSP
  1478. CON CFC12 SPACE
  1479.  
  1480. LOC *O
  1481. CFCAL EQU *-CFCA
  1482.  
  1483. CFCB BSS 5 INSERT *8* AND *9* BUFFER
  1484. DIL SPACE 4,20
  1485. ** DIL - DISPLAY INSERT LINE.
  1486. *
  1487. * ENTRY (DA - DA+1) = DISPLAY ADDRESS.
  1488. *
  1489. * CALLS DIM, DKL.
  1490. *
  1491. * MACROS DFIM.
  1492.  
  1493.  
  1494. DIL SUBR ENTRY/EXIT
  1495. LDM CFCB+1
  1496. LMD DA+1
  1497. NJN DIL1 IF NOT AT INSERT *8*
  1498. LDM CFCB
  1499. LMD DA
  1500. NJN DIL1 IF NOT AT INSERT *8*
  1501. LDN 1R8
  1502. RJM DIM DISPLAY INSERT MARK
  1503. DIL1 LDM CFCB+3
  1504. LMD DA+1
  1505. NJN DIL2 IF NOT AT INSERT *9*
  1506. LDM CFCB+2
  1507. LMD DA
  1508. NJN DIL2 IF NOT AT INSERT *9*
  1509. LDN 1R9
  1510. RJM DIM DISPLAY INSERT MARK
  1511. DIL2 LDD IF
  1512. ZJN DILX IF NO INSERT
  1513. LDD IP+1
  1514. LMD DA+1
  1515. NJN DILX IF NOT HERE
  1516. LDD IP
  1517. LMD DA
  1518. NJN DILX IF INSERT NOT HERE
  1519. RJM DKL DISPLAY KEYBOARD LINE
  1520. LJM DILX RETURN
  1521. DIM SPACE 4,15
  1522. ** DIM - DISPLAY INSERT MARK.
  1523. *
  1524. * ENTRY (A) = INSERT MARK.
  1525. *
  1526. * USES T1, T3.
  1527. *
  1528. * MACROS DFIM.
  1529.  
  1530.  
  1531. DFIM (LCN YINC)
  1532. DIM3 LCN 2*YINC DECREMENT Y-COORDINATE
  1533. RAD YC
  1534.  
  1535. DIM SUBR ENTRY/EXIT
  1536. STD T3
  1537. LDM DBFC CHECK BUFFER REFRESH
  1538. DFIM (ZJN DIM3)
  1539. PSN (NO-OP ON CC545)
  1540. LDN 0
  1541. STD T1
  1542. LDD YC OUTPUT Y COORDINATE
  1543. OAN CH+40
  1544. LDC CH04 OUTPUT X-COORDINATE
  1545. OAN CH+40
  1546. DIM1 LDC 2R-- DISPLAY *--*
  1547. OAN CH+40
  1548. AOD T1
  1549. LMN 14
  1550. NJN DIM1 IF NOT COMPLETE LOOP
  1551. LDD T3
  1552. OAN CH+40
  1553. LDN 1R- DISPLAY * -*
  1554. OAN CH+40
  1555. DIM2 LDC 2R-- DISPLAY *--*
  1556. OAN CH+40
  1557. AOD T1
  1558. LMN 27
  1559. NJN DIM2 IF NOT COMPLETE LOOP
  1560. LDC 2R- DISPLAY *- *
  1561. OAN CH+40
  1562. UJP DIM3 DECREMENT Y-COORDINATE
  1563. DKL SPACE 4,15
  1564. ** DKL - DISPLAY KEYBOARD LINE.
  1565. *
  1566. * ENTRY (YC) = Y-COORDINATE.
  1567. * (XC) = *CH01*.
  1568. * (KD) = 0.
  1569. *
  1570. * EXIT (A) = NEW Y-COORDINATE.
  1571. * (KD) = 1.
  1572. * (T1) = NUMBER OF CHARACTERS DISPLAYED.
  1573. * (XC) = *CH01*.
  1574. * (YC) = NEW Y-COORDINATE.
  1575. *
  1576. * USES T2, T5, XC, YC, CM - CM+4.
  1577. *
  1578. * CALLS DKP, DKS.
  1579. *
  1580. * MACROS DFIM.
  1581.  
  1582.  
  1583. DKL3 LDC CH01 RESET X-COORDINATE
  1584. STD XC
  1585. AOD KD SET KEYBOARD LINE DISPLAYED
  1586. DFIM (LCN YINC)
  1587. LCN 2*YINC DECREMENT Y-COORDINATE
  1588. RAD YC
  1589.  
  1590. DKL SUBR ENTRY/EXIT
  1591. LDN CH02-CH01
  1592. RAD XC
  1593. LDN 2 OUTPUT COORDINATES
  1594. OAM XC,CH
  1595. * LDN 0 SET DISPLAY INDEX
  1596. STD T1
  1597. LDC KBUF SET BUFFER ADDRESS
  1598. STD T2
  1599. LDD KI
  1600. RJM DKS DISPLAY KEYBOARD STRING
  1601.  
  1602. * DISPLAY ALTERNATE BUFFER.
  1603.  
  1604. LDC **
  1605. DKLA EQU *-1
  1606. ZJN DKL1 IF NO ALTERNATE BUFFER
  1607. ADD KI
  1608. STD T2
  1609. STD T5
  1610. LDD MA SAVE COORDINATES
  1611. CWD XC
  1612. CRD CM
  1613. LDN 2 RESET COORDINATES
  1614. OAM XC,CH
  1615. LDC ** CHECK LENGTH OF ALTERNATE LINE
  1616. DKLB EQU *-1
  1617. SBD KI
  1618. MJN DKL1 IF ALTERNATE LINE TOO SHORT
  1619. ZJN DKL1 IF ALTERNATE LINE TOO SHORT
  1620. RJM DKS DISPLAY KEYBOARD STRING
  1621. DFIM (LDN 2)
  1622. UJN DKL1 RESET COORDINATES
  1623.  
  1624. OAM CM,CH
  1625. LDD T5 RESET KEYBOARD POINTER
  1626. STD T2
  1627. RJM DKP
  1628. DKL1 LJM DKL3 ADJUST COORDINATES
  1629. DKP SPACE 4,15
  1630. ** DKP - DISPLAY KEYBOARD POINTER.
  1631.  
  1632.  
  1633. DKP DSUB
  1634. DKS SPACE 4,20
  1635. ** DKS - DISPLAY KEYBOARD STRING.
  1636. *
  1637. * ENTRY (A) = CHARACTER COUNT.
  1638. * (T1) = DISPLAY INDEX.
  1639. * (T2) = BUFFER ADDRESS.
  1640. * (XC, YC) = COORDINATES OF DISPLAY.
  1641. *
  1642. * EXIT (XC, YC) = UPDATED.
  1643. *
  1644. * CALLS DKP.
  1645. *
  1646. * MACROS CFNC, DFIM.
  1647.  
  1648.  
  1649. DKS8 NJN DKS2 IF NOT END OF STRING
  1650. DKS9 RJM DKP DISPLAY KEYBOARD POINTER
  1651. LDD T1
  1652. LMN 61D
  1653. ZJN DKSX IF POINTER AT END OF LINE
  1654. CFNC EELF
  1655.  
  1656. DKS SUBR ENTRY/EXIT
  1657. ZJN DKS9 IF NULL STRING
  1658. ADD T2 SET END OF STRING
  1659. STM DKSA
  1660. DKSB LDI T2
  1661. * UJN DKS2 (PRESET IF 63 CHARACTER SET SYSTEM)
  1662. LMN 1RF
  1663. ZJN DKS1 IF *F.*
  1664. LMN 1RS&1RF
  1665. ZJN DKS1 IF *S.*
  1666. LDC ZJNI+DKS3-DKSC-PSNI
  1667. DKS1 ADN PSNI
  1668. STM DKSC
  1669. DKS2 LDI T2 CHECK CHARACTER
  1670. LPN 77
  1671. STD T0
  1672. DKSC ZJN DKS3 IF ZERO CHARACTER
  1673. * PSN (63 CHARACTER SET)
  1674. SBN 53
  1675. ZJN DKS3 IF 53
  1676. SBN 60-53
  1677. MJN DKS5 IF LEGAL CODE
  1678. DKSD DFIM (UJN DKS4)
  1679. * SBN 63-60 (63 CHARACTER SET ON CDC721)
  1680. DFIM (NJN DKS4)
  1681. DFIM (STD T0)
  1682. DKS4 DFIM (CFNC DSCF)
  1683. DFIM (LDD T0)
  1684. DFIM (UJN DKS6)
  1685. DKS3 LDD YC UP Y
  1686. SBN 4
  1687. OAN CH+40
  1688. LDD T0 DISPLAY LOWER DIGIT
  1689. LPN 7
  1690. ADN 1R0
  1691. OAN CH+40
  1692. LDD XC OUTPUT COORDINATES
  1693. OAN CH+40
  1694. LDD YC
  1695. ADN 4
  1696. OAN CH+40
  1697. LDD T0 PREPARE UPPER DIGIT
  1698. SHN -3
  1699. LPN 7
  1700. ADN 1R0
  1701. OAN CH+40 DISPLAY UPPER DIGIT
  1702. LDD YC
  1703. UJN DKS6 RESET Y-COORDINATE
  1704.  
  1705. DKS5 ADN 60 DISPLAY CHARACTER
  1706. DKS6 OAN CH+40
  1707. AOD T1
  1708. LMN 62D
  1709. NJN DKS7 IF NOT END OF FIRST LINE
  1710. LDC CH03
  1711. STD XC
  1712. DFIM (LCN YINC)
  1713. LCN 2*YINC DECREMENT Y-COORDINATE
  1714. RAD YC
  1715. OAN CH+40
  1716. DKS7 LDN XINC ADVANCE X-COORDINATE
  1717. RAD XC
  1718. OAN CH+40
  1719. AOD T2 ADVANCE BUFFER
  1720. LMC **
  1721. DKSA EQU *-1
  1722. LJM DKS8 CHECK END OF STRING
  1723.  
  1724. ERRPL DKS3-DKSC-40
  1725. EDW SPACE 4,10
  1726. ** EDW - EDIT AND DISPLAY WORD.
  1727.  
  1728.  
  1729. EDW DSUB
  1730. RID SPACE 4,10
  1731. ** RID - REQUEST AND INITIALIZE DISPLAY.
  1732. *
  1733. * ENTRY (A) = 0 TO HOLD DISPLAY.
  1734. * = *RDSOS* TO REQUEST DISPLAY.
  1735. *
  1736. * USES T1.
  1737. *
  1738. * CALLS HDC, RDS.
  1739. *
  1740. * MACROS CFNC, DFIM.
  1741.  
  1742.  
  1743. RID1 LDM RIDA,T1 ISSUE FUNCTION
  1744. CFNC
  1745. SOD T1
  1746. PJN RID1 IF MORE FUNCTIONS
  1747. DCN CH+40
  1748.  
  1749. RID SUBR ENTRY/EXIT
  1750. STD T1
  1751. RJM HDC,T1 HOLD / REQUEST DISPLAY
  1752. DFIM (LDN RIDAL-1)
  1753. UJN RIDX RETURN
  1754.  
  1755. STD T1
  1756. UJN RID1 ISSUE CDC721 FUNCTIONS
  1757.  
  1758.  
  1759. RIDA BSS 0 FUNCTION LIST IN REVERSE ORDER
  1760. CON CHSF
  1761. CON RTPF
  1762. CON SRSF
  1763. CON RTPF
  1764. CON SLSF
  1765. RIDAL EQU *-RIDA LENGTH OF LIST
  1766. TITLE MAIN PROGRAM SUBROUTINES.
  1767. PDS SPACE 4,15
  1768. ** PDS - PUSH DOWN I/O STACK.
  1769. *
  1770. * ENTRY (IO) = STACK INDEX.
  1771. *
  1772. * EXIT (A) = 0.
  1773. * (IO) UPDATED.
  1774. *
  1775. * USES T2.
  1776.  
  1777.  
  1778. PDS SUBR ENTRY/EXIT
  1779. LDN 0 MOVE STACK DOWN
  1780. STD T2
  1781. SOD IO
  1782. ZJN PDSX IF LAST ENTRY
  1783. PDS1 LDM TIOB+1,T2
  1784. STM TIOB,T2
  1785. AOD T2
  1786. SBD IO
  1787. MJN PDS1 IF NOT COMPLETE LOOP
  1788. UJN PDSX RETURN
  1789. PRO SPACE 4,15
  1790. ** PRO - PROCESS ROLLOUT FLAG WHILE IN HOLD.
  1791. *
  1792. * USES IR+1, CM - CM+4.
  1793. *
  1794. * CALLS DDS.
  1795. *
  1796. * MACROS MONITOR.
  1797. *
  1798. * NOTE THIS ROUTINE IS CALLED BY *COMDDSP* ROUTINE *ROF*.
  1799.  
  1800.  
  1801. PRO LDD CP
  1802. ADN STSW
  1803. CRD CM
  1804. LDD CM+1
  1805. ZJN PRO1 IF ERROR FLAG NOT SET
  1806. LJM /COMDDSP/ROFX
  1807.  
  1808. PRO1 RJM DDS DROP DISPLAY
  1809. LDD IR+4 SET ROLLOUT FLAG
  1810. LPC 3777
  1811. LMC 4000
  1812. STD IR+4
  1813. LDD MA WRITE REQUEST TO MESSAGE BUFFER
  1814. CWD IR
  1815. LDN ZERL REQUEST DEFAULT RECALL PARAMETERS
  1816. CRD CM
  1817. MONITOR RECM
  1818. LJM PPR EXIT TO PP RESIDENT
  1819. TIO SPACE 4,20
  1820. ** TIO - TRY I/O.
  1821. *
  1822. * ENTRY (IO) = I/O BUSY STATUS.
  1823. * (SFSA) = NONZERO, IF RANDOM ADDRESS MAY BE INCORRECT.
  1824. *
  1825. * USES T1 - T5, AB - AB+4.
  1826. *
  1827. * CALLS MBD, PDS, RRR, SDS, SFR.
  1828.  
  1829.  
  1830. TIO SUBR ENTRY/EXIT
  1831. LDD IO
  1832. ZJN TIOX IF I/O NOT BUSY
  1833. LDD RA READ BUFFER STATUS
  1834. SHN 6
  1835. ADN FET
  1836. CRD AB
  1837. LDD AB+4 SAVE LAST STATUS
  1838. STD T1
  1839. LPN 1
  1840. ZJN TIOX IF BUSY RETURN
  1841. LDM TIOB CHECK CURRENT REQUEST
  1842. STD AB+4
  1843. SHN 17D
  1844. STD T2
  1845. PJN TIO3 IF NOT SPECIAL REQUEST
  1846. LDM TIOA,T2
  1847. STD T2
  1848. LJM 0,T2
  1849.  
  1850. * SKIP TO END OF INFORMATION.
  1851.  
  1852. TIO1 LDC 240 SKIP TO END OF INFORMATION
  1853. STD AB+4
  1854. LCN 0
  1855. UJN TIO4
  1856.  
  1857. * SKIP RECORDS.
  1858.  
  1859. TIO2 LDM TIOD+1 SKIP FUNCTION
  1860. STD AB+4
  1861. LDM TIOD RECORD COUNT
  1862. UJN TIO4
  1863.  
  1864. * CHECK ACCURACY OF RANDOM ADDRESS.
  1865.  
  1866. TIO3 LDM SFSA
  1867. ZJN TIO4.1 IF RANDOM ADDRESS CORRECT
  1868. LDD AB+4
  1869. LMC 600
  1870. ZJN TIO3.1 IF *READEI* FUNCTION
  1871. LMC 240&600
  1872. ZJN TIO4.1 IF *SKIPF*, *SKIPFF*, OR *SKIPEI* FUNCTION
  1873. LDD AB+4
  1874. SBN 40
  1875. MJN TIO3.1 IF SIMPLE READ OR WRITE FUNCTION
  1876. ADN 40 RESTORE FUNCTION CODE
  1877. SHN -6
  1878. SBN 2
  1879. NJN TIO3.2 IF NOT COMPLEX READ OR WRITE FUNCTION
  1880. TIO3.1 LDD HN
  1881. STD AB+4 ISSUE *OPEN/READNR* TO SET RANDOM ADDRESS
  1882.  
  1883. * ISSUE NORMAL REQUEST.
  1884.  
  1885. TIO3.2 LDN 0 SET SKIP COUNT
  1886. TIO4 SHN 14
  1887. TIO4.1 STM TIOC+2
  1888. SHN -6
  1889. SCN 77
  1890. STM TIOC+3
  1891. LDD AB+3 CLEAR LEVEL NUMBER
  1892. SCN 77
  1893. STD AB+3
  1894. LDD AB+4 CHECK IF READ FUNCTION
  1895. LMN 12
  1896. NJN TIO5 IF NOT READ FUNCTION
  1897. LDD RA SAVE RANDOM ADDRESS OF RECORD
  1898. SHN 6
  1899. ADN FET+6
  1900. CRM TIOF,ON
  1901. TIO5 LDD RA STORE BUFFER STATUS
  1902. SHN 6
  1903. ADN FET
  1904. CWD AB
  1905. LDN ZERL
  1906. CRD CM
  1907. LDD MA CALL *CIO*
  1908. CWM TIOC,ON
  1909. CWD CM
  1910. MONITOR RPPM REQUEST PP
  1911. LDD CM+1
  1912. NJN TIO5.1 IF PP ASSIGNED
  1913. LDD T1 RESTORE LAST STATUS
  1914. STD AB+4
  1915. LDD RA
  1916. SHN 6
  1917. ADN FET
  1918. CWD AB
  1919. UJN TIO7 RETURN
  1920.  
  1921. TIO5.1 LDN 0
  1922. STM SFSA CLEAR RANDOM ADDRESS
  1923. LDD AB+4
  1924. LMD HN
  1925. ZJN TIO7 IF *OPEN/READNR* ISSUED
  1926. TIO6 RJM PDS PUSH DOWN STACK
  1927. TIO7 LJM TIOX RETURN
  1928.  
  1929. * READ IN POINTER.
  1930.  
  1931. TIO8 LDD T1 CHECK READ STATUS
  1932. SHN -3
  1933. LMN 1
  1934. STM CRSA SET/CLEAR RECORD READ NOT TOO LONG FLAG
  1935. NJN TIO9 IF NOT BUFFER READ
  1936. LDC ERRE *RECORD TOO LONG.*
  1937. STD KM
  1938. TIO9 LDD RA READ IN
  1939. SHN 6
  1940. ADN FET+2
  1941. CRD CM
  1942. AOD DR
  1943. LDD CM+3 SET IN
  1944. STD IN
  1945. SBD FT
  1946. SHN 14
  1947. LMD CM+4
  1948. STD IN+1
  1949. SBD FT+1
  1950. SHN -6
  1951. STM TIOG STORE RECORD SIZE IN PRU-S
  1952. LDD AB+4
  1953. LMN 11
  1954. ZJN TIO10 IF READ RANDOM RECORD
  1955. LMN 15&11
  1956. NJN TIO13.1 IF NOT LIST INDEX
  1957. LDC LST2&RRR LIST INDEX OF FILE
  1958. TIO10 LMC SFR&RRR READ RANDOM RECORD
  1959. TIO11 LMC SFR SEARCH FOR RECORD
  1960. LJM LOV
  1961.  
  1962. * SEARCH FOR RECORD.
  1963.  
  1964. TIO12 RJM PDS PUSH DOWN STACK
  1965. * LDN 0
  1966. UJN TIO11 LOAD RECORD SEARCH OVERLAY
  1967.  
  1968. * WRITEW REQUEST.
  1969.  
  1970. TIO13 LDD FT SET FIRST
  1971. STD T2
  1972. LDD FT+1
  1973. STD T3
  1974. LDD IP SET INSERT ADDRESS
  1975. STD T4
  1976. LDD IP+1
  1977. STD T5
  1978. RJM MBD MOVE BUFFER DOWN
  1979. LDN FT SET DISPLAY = LINE 0
  1980. RJM SDS
  1981. TIO13.1 LJM TIO6 PUSH DOWN STACK AND RETURN
  1982.  
  1983. * REWIND POINTERS (IN = OUT = FIRST) AFTER WRITE.
  1984.  
  1985. TIO14 LDN ZERL
  1986. CRD CM
  1987. LDC CBUF SET FIRST
  1988. STD CM+4
  1989. LDD RA
  1990. SHN 6
  1991. ADN FET+2 WRITE IN
  1992. CWD CM
  1993. ADN 1 WRITE OUT
  1994. CWD CM
  1995. JMP TIO6 COMPLETE
  1996.  
  1997. * TIO15 - REWRITE RECORD (MASS STORAGE ONLY)
  1998.  
  1999. TIO15 LDD RA CHECK IF RANDOM FILE
  2000. SHN 6
  2001. ADN FET+1
  2002. CRD CM READ FET+1
  2003. LDD CM+1
  2004. LPC 4000
  2005. NJN TIO17 IF RANDOM BIT SET
  2006. * LDN 0 CLEAR IO STACK
  2007. STD IO
  2008. LDC =C*FILE NOT ON MASS STORAGE.*
  2009. TIO16 LJM ERR1 DISPLAY ERROR
  2010.  
  2011. TIO17 LDN ZERL INITIALIZE RANDOM ADDRESS
  2012. CRD CM
  2013. LDM TIOF+2 CHECK IF RANDOM ADDRESS AVAILIABLE
  2014. ADM TIOF+1
  2015. NJN TIO18 IF .NE. 0
  2016. * LDN 0 CLEAR IO STACK
  2017. STD IO
  2018. LDC =C*NO RANDOM ADDRESS.*
  2019. UJN TIO16 DISPLAY ERROR MESSAGE
  2020.  
  2021. TIO18 LDM TIOF+1 SET RANDOM ADDRESS
  2022. SHN 14
  2023. STD CM+3
  2024. LMD CM+3
  2025. ADM TIOF+2
  2026. SHN -6
  2027. STD CM+4
  2028. LDC 224 SET CIO REWRITER FUNCTION
  2029. STD AB+4
  2030. LDD RA
  2031. SHN 6
  2032. ADN FET+6
  2033. CWD CM
  2034. LJM TIO3 CONTINUE NORMAL PROCESSING
  2035.  
  2036. TIOA CON TIO8 1 - READ IN POINTER
  2037. CON TIO1 3 - SKIP TO EOI
  2038. CON TIO2 5 - SKIP RECORDS
  2039. CON TIO12 7 - SEARCH FOR RECORD
  2040. CON TIO8 11 - READ RANDOM RECORD
  2041. CON TIO13 13 - WRITEW REQUEST
  2042. CON TIO8 15 - LIST FILE INDEX
  2043. CON TIO14 17 - SET FIRST = IN = OUT
  2044. CON TIO15 21 - REWRITE RECORD(MASS STORAGE ONLY)
  2045.  
  2046. TIOB BSSZ 10
  2047. TIOC VFD 24/0LCIO,18/0,18/FET
  2048. TIOD CON 0,0 COUNT AND SKIP CODE
  2049. TIOE CON 0 TEXT RECORD FLAG
  2050. TIOF VFD 60/0 FET+6 (RANDOM ADDRESS)
  2051.  
  2052. TIOG CON 0 NUMBER OF PRU,S IN BUFFER
  2053. WIO SPACE 4,15
  2054. ** WIO - WAIT I/O.
  2055. *
  2056. * ENTRY (IO) = I/O BUSY FLAG.
  2057. *
  2058. * CALLS PSS, TIO.
  2059.  
  2060.  
  2061. WIO SUBR ENTRY/EXIT
  2062. WIO1 RJM PSS PAUSE FOR SYSTEM
  2063. LDD IO
  2064. ZJN WIOX IF STACK EMPTY RETURN
  2065. RJM TIO TRY I/O
  2066. UJN WIO1 LOOP
  2067. TITLE KEYBOARD ENTRY PROCESSING.
  2068. INT SPACE 4,15
  2069. ** INT - INTERPRET KEYBOARD BUFFER.
  2070. *
  2071. * ENTRY (T5) = 0 IF INTERPRET ONLY.
  2072. * (T5) .NE. 0 IF EXECUTE REQUESTED.
  2073. * (KI) = END OF BUFFER POINTER.
  2074. *
  2075. * EXIT TO *LOV* TO LOAD SYNTAX OVERLAY IF SYNTAX NOT LOADED.
  2076. *
  2077. * USES T1 - T7.
  2078. *
  2079. * CALLS ENTRY PROCESSOR.
  2080.  
  2081.  
  2082. * LOAD SYNTAX OVERLAY IF NOT ALREADY LOADED.
  2083.  
  2084. INT13 LDC SCT
  2085. LJM LOV LOAD COMMAND TABLE
  2086.  
  2087. INT UJN INT13 LOAD SYNTAX OVERLAY IF NOT LOADED
  2088. * LDN TSFM-1 SET TABLE ADDRESS
  2089. STD T2
  2090. LDN 0 SET TRIAL CHARACTER
  2091. STD T1
  2092. INT1 AOD T2 ADVANCE TABLE
  2093. LDD RA
  2094. SHN 6
  2095. ADD T2
  2096. CRD CM
  2097. LDN CM
  2098. STD T4
  2099. LDI T4
  2100. NJN INT2 IF NOT END OF TABLE
  2101. LJM INT9
  2102.  
  2103. INT2 LDC KBUF SET CHARACTER ADDRESS
  2104. STD CA
  2105. INT3 LDI T4 COMPARE UPPER
  2106. SHN -6
  2107. ZJN INT7 IF COMPARE COMPLETE
  2108. STD T6
  2109. LMI CA
  2110. NJN INT4 IF NO MATCH
  2111. AOD CA
  2112. LDD T4
  2113. LMN CM+3
  2114. ZJN INT7 IF COMPARE COMPLETE
  2115. LDI T4 COMPARE LOWER
  2116. LPN 77
  2117. ZJN INT7 IF COMPARE COMPLETE
  2118. STD T6
  2119. LMI CA
  2120. NJN INT4 IF NO MATCH
  2121. AOD CA
  2122. AOD T4
  2123. UJN INT3 LOOP
  2124.  
  2125. * PROCESS NO HIT.
  2126.  
  2127. INT4 LDD CA CHECK FOR END OF COMPARE
  2128. ADC -KBUF
  2129. LMD KI
  2130. NJN INT5 IF NOT END OF KEYBOARD STRING
  2131. LDD T1
  2132. NJN INT6 IF NOT UNIQUE ENTRY
  2133. LDD T6 SET NEXT CHARACTER
  2134. STD T1
  2135. INT5 LJM INT1 LOOP
  2136.  
  2137. INT6 LMD T6
  2138. ZJN INT5 IF SAME CHARACTER LOOP
  2139. UJN INT10
  2140.  
  2141. * PROCESS UNIQUE CHARACTER.
  2142.  
  2143. INT7 LDD T5
  2144. ZJN INT11 IF NO INTERPRET
  2145. LDD CM+3 PROCESS ENTRY
  2146. LPN 77
  2147. SHN 14
  2148. LMD CM+4
  2149. LJM LOV
  2150.  
  2151. * PROCESS END OF FORMAT SCAN.
  2152.  
  2153. INT9 LDD T1
  2154. NJN INT12 IF UNIQUE CHARACTER
  2155. SOD KI BACKSPACE POINTER
  2156. LDN 1R
  2157. STM KBUF,KI
  2158. INT10 LDD T5
  2159. ZJN INT11 IF EXECUTE FLAG NOT SET
  2160. LDC ERRD *REPEAT ENTRY.*
  2161. STD KM
  2162. INT11 LJM KBIX RETURN
  2163.  
  2164. INT12 SBN 1R
  2165. PJN INT10 IF SPECIAL CHARACTER
  2166. LDD T1 FILL NEXT CHARACTER
  2167. STM KBUF,KI
  2168. AOD KI
  2169. LJM INT LOOP
  2170. CIF SPACE 4,10
  2171. ** CIF - CLEAR INSERT FLAG.
  2172.  
  2173.  
  2174. CIF LDN 0 CLEAR INSERT FLAG
  2175. STD IF
  2176. LDN ZERL
  2177. CRM CFCB,ON CLEAR INSERT *8* AND *9*
  2178. UJN RET
  2179. PLB SPACE 4,15
  2180. ** PLB - PROCESS *LEFT BLANK*.
  2181.  
  2182.  
  2183. PLB LDN 0 CLEAR KEYBOARD MESSAGE
  2184. STD KM
  2185. * UJN RET PROCESS AS NORMAL RETURN
  2186. RET SPACE 4,10
  2187. ** RET - NORMAL RETURN.
  2188.  
  2189.  
  2190. RET LDN 0 CLEAR INDEX
  2191. RET1 STD T1 SET CLEARING INDEX
  2192. AOD DR
  2193. LDD KM
  2194. NJN RET3 IF MESSAGE SET
  2195. LDD T1 SET KEYBOARD INDEX
  2196. STD KI
  2197. RET2 LDN 1R CLEAR BUFFER
  2198. STM KBUF,T1
  2199. AOD T1
  2200. ADC -KBUFL
  2201. MJN RET2 IF NOT AT END OF BUFFER - LOOP
  2202. * LDN 0 CLEAR ALTERNATE DISPLAY BUFFER
  2203. STM DKLA
  2204. STD LC CLEAR LAST CHARACTER POSITION
  2205. RET3 JMP KBIX RETURN
  2206. ABT SPACE 4,10
  2207. ** ABT - ABORT LOAD.
  2208.  
  2209.  
  2210. ABT LDN 0 CLEAR KEYBOARD MESSAGE
  2211. STD KM
  2212. ABT1 LDC KBI8 CLEAR OVERLAY LOAD
  2213. STM KBIA
  2214. JMP KBIX RETURN
  2215. KIC SPACE 4,10
  2216. ** KIC - INCOMPLETE RETURN.
  2217. *
  2218. * ENTRY (A) = MESSAGE ADDRESS.
  2219. *
  2220. * EXIT TO KBIX.
  2221. *
  2222. * USES T1.
  2223.  
  2224.  
  2225. KIC STD T1
  2226. LDD KE
  2227. LMN 53
  2228. ZJN ABT IF *LEFT BLANK*
  2229. LDD KM
  2230. NJN KIC1 IF MESSAGE
  2231. LDD T1
  2232. STD KM
  2233. KIC1 JMP KBIX RETURN
  2234. ERR SPACE 4,7
  2235. ** ERR - FORMAT ERROR RETURN.
  2236.  
  2237.  
  2238. ERR LDC ERRA SET FORMAT ERROR
  2239. ERR1 STD KM
  2240. JMP KBIX RETURN
  2241. ADD SPACE 4,20
  2242. ** ADD - ASSEMBLE DECIMAL DIGITS.
  2243. *
  2244. * ENTRY (A) = CHARACTER ADDRESS.
  2245. *
  2246. * EXIT (A) = SEPARATOR CHARACTER.
  2247. * (AB - AB+4) = ASSEMBLED DIGITS RIGHT ADJUSTED.
  2248. * (T1) = UPDATED CHARACTER ADDRESS.
  2249. *
  2250. * USES T0 - T2.
  2251.  
  2252.  
  2253. ADD SUBR ENTRY/EXIT
  2254. STD T1 SET CHARACTER ADDRESS
  2255. LDN ZERL CLAR ASSMEBLY
  2256. CRD AB
  2257. ADD1 LDI T1 CHECK CHARACTER
  2258. SBN 1R0
  2259. MJN ADD2 IF ALPHA
  2260. SBN 1R+-1R0
  2261. MJN ADD3 IF DIGIT
  2262. SBN 1R -1R+
  2263. ZJN ADD5 IF * *
  2264. ADD2 LDI T1 RETURN WITH CHARACTER
  2265. UJN ADDX
  2266.  
  2267. ADD3 ADN 1R+-1R0 NEW DIGIT = CHARACTER
  2268. STD T0
  2269. LDN AB+4 SET BYTE ADDRESS
  2270. STD T2
  2271. ADD4 LDI T2 BYTE = BYTE * 10D
  2272. SHN 2
  2273. ADI T2
  2274. SHN 1
  2275. ADD T0 ADD NEW DIGIT
  2276. STI T2
  2277. SHN -14 NEW DIGIT = OVERFLOW
  2278. STD T0
  2279. SOD T2 DECREMENT BYTE ADDRESS
  2280. LMN AB-1
  2281. NJN ADD4 IF NOT END OF WORD LOOP
  2282. ADD5 AOD T1 ADVANCE CHARACTER
  2283. UJN ADD1 LOOP
  2284. ASN SPACE 4,20
  2285. ** ASN - ASSEMBLE NAME.
  2286. *
  2287. * ENTRY (A) = CHARACTER ADDRESS.
  2288. *
  2289. * EXIT (A) = SEPARATOR CHARACTER.
  2290. * (T1) = CHARACTER ADDRESS.
  2291. * (AB - AB+4) = LEFT JUSTIFIED ASSEMBLY.
  2292. *
  2293. * USES T1, T2.
  2294.  
  2295.  
  2296. ASN SUBR ENTRY/EXIT
  2297. STD T1 STORE CHARACTER ADDRESS
  2298. LDN ZERL CLEAR ASSEMBLY
  2299. CRD AB
  2300. LDN AB SET BYTE ADDRESS
  2301. STD T2
  2302. ASN1 LDI T1 CHECK UPPER
  2303. SBN 1R+
  2304. PJN ASN2 IF SEPARATOR
  2305. ADN 1R+ STORE CHARACTER
  2306. SHN 6
  2307. STI T2
  2308. AOD T1 CHECK LOWER
  2309. LDI T1
  2310. SBN 1R+
  2311. PJN ASN2 IF SEPARATOR
  2312. ADN 1R+ STORE CHARACTER
  2313. RAI T2
  2314. AOD T1
  2315. AOD T2
  2316. LMN AB+4
  2317. NJN ASN1 IF NOT 7 CHARACTERS LOOP
  2318. ASN2 LDI T1 RETURN
  2319. UJN ASNX
  2320. CIO SPACE 4,10
  2321. ** CIO - CALL CIO.
  2322. *
  2323. * ENTRY (A) = REQUEST.
  2324. *
  2325. * EXIT STACK ENTRY MADE.
  2326.  
  2327.  
  2328. CIO SUBR ENTRY/EXIT
  2329. STM TIOB,IO ENTER REQUEST
  2330. LDC *
  2331. CIOA EQU *-1 TERMINAL TYPE FLAG
  2332. NJN CIO1 IF NOT TERMINAL TYPE
  2333. LDC ERRF
  2334. JMP ERR1 PROCESS ERROR
  2335.  
  2336. CIO1 AOD IO
  2337. LMN 10
  2338. NJN CIOX IF STACK NOT FULL
  2339. SOD IO
  2340. UJN CIOX RETURN
  2341. CRS SPACE 4,10
  2342. ** CRS - CHECK RECORD STATUS.
  2343. *
  2344. * EXIT TO *ERR1*, IF WRITE ATTEMPTED ON READ-ONLY FILE,
  2345. * OR THE RECORD READ WAS TOO LONG.
  2346.  
  2347.  
  2348. CRS SUBR ENTRY/EXIT
  2349. LDC *
  2350. CRSA EQU *-1 (RECORD READ NOT TOO LONG FLAG)
  2351. ZJN CRS1 IF RECORD READ WAS TOO LONG
  2352. LDC **
  2353. CRSB EQU *-1 (WRITE LOCKOUT FLAG)
  2354. ZJN CRSX IF WRITE IS ALLOWED
  2355. LDN ERRF-ERRE *WRITE ON READ-ONLY FILE.*
  2356. CRS1 ADC ERRE *RECORD TOO LONG.*
  2357. JMP ERR1 PROCESS ERROR
  2358. DNL SPACE 4,20
  2359. ** DNL - DELETE NEXT LINE.
  2360. *
  2361. * USES T2 - T5, CM - CM+4.
  2362. *
  2363. * CALLS MBD, SFL.
  2364.  
  2365.  
  2366. DNL3 STD IF CLEAR INSERT FLAG
  2367. LDD IP DELETE LAST LINE
  2368. STD IN
  2369. LDD IP+1
  2370. STD IN+1
  2371.  
  2372. DNL SUBR ENTRY/EXIT
  2373. LDD IF
  2374. ZJN DNLX IF INSERT FLAG NOT SET
  2375. LDD IP SET FIRST ADDRESS
  2376. STD T2
  2377. STD T4
  2378. LDD IP+1
  2379. STD T3
  2380. STD T5
  2381. DNL1 LDD T4 CHECK ADDRESS
  2382. LMD IN
  2383. NJN DNL2 IF *IN* NOT REACHED
  2384. LDD T5
  2385. LMD IN+1
  2386. ZJN DNL3 IF *IN* REACHED RETURN
  2387. DNL2 LDD T4 READ WORD
  2388. SHN 6
  2389. ADD RA
  2390. SHN 6
  2391. ADD T5
  2392. CRD CM
  2393. AOD T5 ADVANCE ADDRESS
  2394. SHN -14
  2395. RAD T4
  2396. LDD CM+4
  2397. NJN DNL1 IF NOT END OF LINE LOOP
  2398. LDN ZERL CLEAR INSERT *8* AND *9*
  2399. CRM CFCB,ON
  2400. RJM MBD MOVE BUFFER DOWN
  2401. LJM DNLX RETURN
  2402. MBD SPACE 4,20
  2403. ** MBD - MOVE BUFFER DOWN.
  2404. *
  2405. * ENTRY (T2 - T3) = TARGET ADDRESS.
  2406. * (T4 - T5) = FWA OF DATA.
  2407. * (IN - IN+1) = LWA+1 OF DATA.
  2408. *
  2409. * USES T1.
  2410. *
  2411. * CALLS SDB, SIP.
  2412.  
  2413.  
  2414. MBD SUBR ENTRY/EXIT
  2415. LDD T2 SET INCREMENT
  2416. SBD T4
  2417. SHN 14
  2418. ADD T3
  2419. SBD T5
  2420. STM MBDA+1
  2421. STM SDBA+1
  2422. SHN -14
  2423. LMC ADCI
  2424. STM MBDA
  2425. STM SDBA
  2426. LDD IN COMPUTE MOVE WORD COUNT
  2427. SBD T4
  2428. SHN 14
  2429. ADD IN+1
  2430. SBD T5
  2431. SHN 13D SET BLOCK COUNT
  2432. STD T1
  2433. SHN -13D SET ODD SIZE
  2434. STD T2
  2435. LDN 0 CLEAR CURRENT BLOCK COUNT
  2436. STD T3
  2437. LDD T1
  2438. ZJN MBD2 IF NO FULL BLOCKS
  2439.  
  2440. * MOVE COMPLETE BLOCKS.
  2441.  
  2442. MBD1 LDN 40
  2443. RJM SDB SHIFT 40 WORDS OF DATA
  2444. AOD T3
  2445. LMD T1
  2446. NJN MBD1 IF ALL BLOCKS NOT COMPLETE LOOP
  2447.  
  2448. * MOVE LAST ODD BLOCK.
  2449.  
  2450. MBD2 LDD T2
  2451. ZJN MBD3 IF NO ODD BLOCK
  2452. RJM SDB SHIFT ODD DATA BLOCK
  2453. MBD3 LDD IN SET NEW IN
  2454. SHN 14
  2455. LMD IN+1
  2456. MBDA ADC -* (DISTANCE DATA IS BEING MOVED)
  2457. STD IN+1
  2458. SHN -14
  2459. STD IN
  2460. RJM SIP SET IN POINTER
  2461. LJM MBDX RETURN
  2462. PKL SPACE 4,20
  2463. ** PKL - PACK LINE INTO BUFFER BUF.
  2464. *
  2465. * ENTRY (CA) = CHARACTER ADDRESS.
  2466. *
  2467. * EXIT (T7) = LENGTH OF LINE IN CM WORDS.
  2468. *
  2469. * USES T1 - T3, T5, BUF - BUF+50.
  2470.  
  2471.  
  2472. PKL SUBR ENTRY/EXIT
  2473. LDN 0 CLEAR WORD COUNT
  2474. STD T7
  2475. LDD CA FORM CHARACTER LWA
  2476. ADC KBUFL/10D*10D ROUND BUFFER TO CM WORD BOUNDARY
  2477. STM PKLA
  2478. LDN ZERL
  2479. CRM CFCB,ON CLEAR INSERT *8* AND *9*
  2480. LDC BUF SET BYTE ADDRESS
  2481. STD T1
  2482. ADN KBUFL/10D*5D FORM LWA OF BUFFER
  2483. STM PKLB
  2484. PKL1 LDN 5 SET BYTE COUNT
  2485. STD T2
  2486. PKL2 LDI CA UPPER CHARACTER
  2487. SHN 6
  2488. STI T1
  2489. AOD CA
  2490. LDI CA LOWER CHARACTER
  2491. LPN 77
  2492. RAI T1
  2493. AOD CA ADVANCE CHARACTER ADDRESS
  2494. AOD T1 ADVANCE BYTE ADDRESS
  2495. SOD T2 DECREMENT BYTE COUNT
  2496. NJN PKL2 IF NOT FULL WORD LOOP
  2497. AOD T7 ADVANCE CM WORD COUNT
  2498. LDD CA CHECK FOR END OF BUFFER
  2499. LMC *
  2500. PKLA EQU *-1 (LWA OF CHARACTER BUFFER)
  2501. NJN PKL1 IF NOT END OF BUFFER
  2502.  
  2503. * DELETE TRAILING BLANK BYTES.
  2504.  
  2505. LDN 5
  2506. PKL3 STD T2 SET BYTE COUNTER
  2507. PKL4 SOD T1 DECREMENT BYTE ADDRESS
  2508. LMC BUF
  2509. ZJN PKL7 IF AT BEGINNING OF BUFFER
  2510. LDI T1 CHECK FOR BLANK BYTES
  2511. LMC 2R
  2512. NJN PKL5 IF NOT BLANK BYTE
  2513. STI T1 CLEAR BYTE
  2514. SOD T2 DECREMENT BYTE COUNTER
  2515. PJN PKL4 IF MORE BYTES IN WORD
  2516. SOD T7 DECREMENT CM WORD COUNT
  2517. LDN 4 RESET BYTE COUNTER
  2518. UJN PKL3 CHECK NEXT BYTE
  2519.  
  2520. PKL5 LPN 77
  2521. NJN PKL6 IF EVEN NUMBER OF BLANKS
  2522. LDI T1 CLEAR ODD-NUMBERED BLANK
  2523. SCN 77
  2524. STI T1
  2525.  
  2526. * CHECK FOR END OF LINE.
  2527.  
  2528. PKL6 AOD T1
  2529. LMM PKLB
  2530. NJN PKL7 IF TRAILING BLANKS ZEROED
  2531. AOD T7 INCREMENT CM WORD COUNT
  2532. LDN ZERL WRITE END OF LINE
  2533. CRM *,ON
  2534. PKLB EQU *-1 (LWA OF BUFFER BUF)
  2535. PKL7 LJM PKLX RETURN
  2536. PRT SPACE 4,20
  2537. ** PRT - PROCESS TAB.
  2538. *
  2539. * USES T1, KI.
  2540.  
  2541.  
  2542. PRT LDM KBUF+1
  2543. LMN 1R.
  2544. ZJN PRT2 IF 2ND CHARACTER = *.*
  2545. LDD SF
  2546. ZJN PRT1 IF NO SCAN NOT REQUESTED RETURN
  2547. AOD SI SET NEXT SCAN
  2548. LDM TSCN-1,SI
  2549. STD SC
  2550. NJN PRT1 IF NOT END OF TABLE RETURN
  2551. STD SI RESET SCAN INDEX
  2552. PRT1 JMP KBIX RETURN
  2553.  
  2554. * PROCESS CHARACTER TAB.
  2555.  
  2556. PRT2 LDN 1R PRESET * *
  2557. STD T1
  2558. LDM KBUF CHECK FIRST CHARACTER
  2559. LMN 1RD
  2560. ZJN PRT3 IF *D*
  2561. LMN 1RE&1RD
  2562. ZJN PRT3 IF *E*
  2563. LMN 1RF&1RE
  2564. ZJN PRT5 IF *F*
  2565. LMN 1RA&1RF
  2566. ZJN PRT3 IF *A*
  2567. LMN 1RN&1RA
  2568. ZJN PRT4 IF *N*
  2569. LMN 1RL&1RN
  2570. NJN PRT6 IF NOT *L*
  2571. PRT3 STM KBSA
  2572. PRT4 LDM DBUF,KI SET TAB CHARACTER
  2573. LPN 77
  2574. PRT5 STD T1 SET TAB CHARACTER
  2575. PRT6 LDD T1 STORE TAB CHARACTER
  2576. STM KBUF,KI
  2577. AOD KI CHECK FOR END OF BUFFER
  2578. ADC -KBUFL
  2579. PJN PRT7 IF BUFFER FULL
  2580. LDM DBUF,KI CHECK FOR TAB COLUMN
  2581. SHN 7
  2582. MJN PRT8 IF TAB COLUMN
  2583. LDD KI CHECK FOR LAST CHARACTER OF ORIGINAL LINE
  2584. SBN 2
  2585. LMD LC
  2586. ZJN PRT8 IF AT LAST COLUMN
  2587. LJM PRT2 LOOP UNTIL TAB COLUMN REACHED
  2588.  
  2589. * BKSP OVER END OF BUFFER.
  2590.  
  2591. PRT7 SOD KI CLEAR ENTRY
  2592. LDN 1R
  2593. STM KBUF,KI
  2594. PRT8 JMP KBIX RETURN
  2595. RDL SPACE 4,20
  2596. ** RDL - READ LINE FROM BUFFER.
  2597. *
  2598. * ENTRY (CA) = CHARACTER ADDRESS.
  2599. *
  2600. * EXIT (T4) = LAST CHARACTER ADDRESS.
  2601. * (LC) = CHARACTER COUNT OF LINE.
  2602. *
  2603. * USES T1 - T3, CM - CM+4.
  2604.  
  2605.  
  2606. RDL SUBR ENTRY/EXIT
  2607. LDD IF
  2608. NJN RDL1 IF INSERT SET
  2609. LJM ERR INCORRECT ENTRY
  2610.  
  2611. RDL1 LDD IP+1 CHECK INSERT
  2612. LMD IN+1
  2613. NJN RDL2 IF IN RANGE
  2614. LDD IP
  2615. LMD IN
  2616. NJN RDL2 IF IN RANGE
  2617. LDC =C*OUT OF RANGE.*
  2618. LJM ERR1
  2619.  
  2620. * READ LINE FROM CM BUFFER.
  2621.  
  2622. RDL2 LDN 19D READ LINE FROM BUFFER
  2623. STD T1
  2624. LDD IP
  2625. SHN 6
  2626. ADD RA
  2627. SHN 6
  2628. ADD IP+1
  2629. CRM BUFR,T1
  2630. LDC BUFR SET BUFFER ADDRESS
  2631. STD T1
  2632. LDD CA SET CHARACTER ADDRESS
  2633. STD T4
  2634. LDI T1
  2635. ADM 1,T1
  2636. ADM 2,T1
  2637. ADM 3,T1
  2638. ADM 4,T1
  2639. NJN RDL3 IF NOT NULL BUFFER
  2640. LDC 2R
  2641. STI T1
  2642.  
  2643. * UNPACK LINE INTO BUFFER.
  2644.  
  2645. RDL3 LDI T1
  2646. NJN RDL4 IF NON-ZERO BYTE
  2647. LDD T1
  2648. ADC -BUFR
  2649.  
  2650. * CHECK FOR MULTIPLE OF 5.
  2651.  
  2652. ADN 1 COMPENSATE FOR 0
  2653. RDL3.1 SBN 5
  2654. ZJN RDL5 IF END OF LINE
  2655. PJN RDL3.1 IF NOT COMPLETE
  2656. RDL4 LDI T1 UNPACK CHARACTER
  2657. SHN -6
  2658. STI T4 UPPER CHARACTER
  2659. AOD T4
  2660. LDI T1 UNPACK LOWER CHARACTER
  2661. LPN 77
  2662. STI T4
  2663. AOD T1
  2664. AOD T4 ADVANCE CHARACTER COUNT
  2665. SBD CA
  2666. ADC -KBUFL CHECK FOR END OF BUFFER
  2667. MJN RDL3 IF BUFFER NOT FULL - LOOP
  2668.  
  2669. * COPY LINE TO DUP BUFFER.
  2670.  
  2671. RDL5 SOD T4 BACK UP IN BUFFER
  2672. LDI T4
  2673. ZJN RDL5 IF *00* CHARACTER
  2674. AOD T4 FIRST *00* CHARACTER ADDRESS
  2675. LDC DBUF+2
  2676. STD T2
  2677. LDD CA SET CHARACTER ADDRESS
  2678. STD T1
  2679. RDL6 LDI T2 REPLACE DUP CHARACTER
  2680. SCN 77
  2681. LMI T1
  2682. STI T2
  2683. AOD T2
  2684. AOD T1 ADVANCE CHARACTER
  2685. LMD T4
  2686. NJN RDL6 IF NOT END OF LINE LOOP
  2687. LDD T2 SET DUP BUFFER LENGTH
  2688. ADC -DBUF
  2689. STM DKLB
  2690.  
  2691. * CLEAR TO END OF BUFFER.
  2692.  
  2693. RDL7 LDI T2 BLANK FILL TO END OF BUFFERS
  2694. SCN 77
  2695. ADN 1R
  2696. STI T2
  2697. LDN 1R KEYBOARD BUFFER
  2698. STI T1
  2699. AOD T2
  2700. AOD T1
  2701. SBD CA
  2702. ADC -KBUFL CHECK FOR END OF BUFFER
  2703. MJN RDL7 IF NOT END OF BUFFER - LOOP
  2704. LDD T4 SET CHARACTER COUNT
  2705. SBD CA
  2706. STD LC
  2707. LJM RDLX RETURN
  2708. SDB SPACE 4,10
  2709. ** SDB - SHIFT DATA BLOCK IN CENTRAL MEMORY.
  2710. *
  2711. * ENTRY (A) = NUMBER OF CM WORDS TO BE SHIFTED.
  2712. * (T3) = COUNT OF DATA BLOCKS SHIFTED.
  2713. * (T4 - T5) = FWA OF DATA TO BE SHIFTED.
  2714. *
  2715. * USES T7, BUFM - BUFM+240.
  2716.  
  2717.  
  2718. SDB SUBR ENTRY/EXIT
  2719. STD T7 SET SHIFT COUNT
  2720. LDD T4 SET CM SHIFT ADDRESS
  2721. SHN 6
  2722. ADD RA
  2723. SHN 1 ADD COUNT OF SHIFTED BLOCKS
  2724. ADD T3
  2725. SHN 5
  2726. ADD T5
  2727. CRM BUFM,T7
  2728. SBD T7 REPLACE BLOCK AT LOWER CM ADDRESS
  2729. SDBA ADC -* (DISTANCE DATA IS BEING MOVED)
  2730. CWM BUFM,T7
  2731. UJN SDBX RETURN
  2732. SDS SPACE 4,20
  2733. ** SDS - SET DISPLAY.
  2734. *
  2735. * ENTRY (A) = ADDRESS OF ADDRESS POINTER.
  2736. * (DL) = LENGTH OF DISPLAY.
  2737. *
  2738. * EXIT (OT - OT+1) = FIRST LINE ADDRESS.
  2739. *
  2740. * USES T1 - T3.
  2741. *
  2742. * CALLS SFL.
  2743.  
  2744.  
  2745. SDS2 LDD IN CHECK END OF DISPLAY
  2746. SBD OT
  2747. SHN 14
  2748. ADD IN+1
  2749. SBD OT+1
  2750. SBD DL
  2751. ZJN SDSX IF LAST LINE ON SCREEN
  2752. LDD OT ADVANCE ONE LINE
  2753. STD T2
  2754. LDD OT+1
  2755. STD T3
  2756. LDN 1
  2757. RJM SFL SEARCH FOR LINE
  2758. LDD T2
  2759. STD OT
  2760. LDD T3
  2761. STD OT+1
  2762.  
  2763. SDS SUBR ENTRY/EXIT
  2764. STD T1 SAVE INDEX
  2765. LDI T1
  2766. SBD OT
  2767. SHN 14
  2768. ADM 1,T1
  2769. SBD OT+1
  2770. MJN SDS1 IF LINE .LT. FIRST LINE
  2771. SBD DL CHECK END OF SCREEN
  2772. ZJN SDS2 IF AT END OF DISPLAY
  2773. MJN SDSX IF LINE ON DISPLAY
  2774. SDS1 LDI T1 SET DISPLAY ADDRESS
  2775. STD OT
  2776. LDM 1,T1
  2777. STD OT+1
  2778. UJN SDSX RETURN
  2779. SFL SPACE 4,20
  2780. ** SFL - SEARCH FOR LINE.
  2781. *
  2782. * ENTRY (A) = NUMBER OF LINES TO ADVANCE/DECREMENT.
  2783. * (T2 - T3) = CURRENT ADDRESS.
  2784. *
  2785. * EXIT (T2 - T3) = LINE ADDRESS.
  2786. *
  2787. * USES T1 - T3, CM - CM+4.
  2788.  
  2789.  
  2790. * SEARCH BACKWARDS FOR LINE.
  2791.  
  2792. SFL2 LDD T2 CHECK FOR START OF BUFFER
  2793. LMD FT
  2794. SHN 14
  2795. LMD T3
  2796. LMD FT+1
  2797. ZJN SFLX IF AT START OF BUFFER
  2798.  
  2799. SFL3 LDD T2 READ PREVIOUS WORD
  2800. SHN 6
  2801. ADD RA
  2802. SHN 6
  2803. ADD T3
  2804. SBN 2
  2805. CRD CM
  2806. SOD T3 DECREMENT ADDRESS
  2807. PJN SFL4 IF NO CARRY
  2808. AOD T3
  2809. SOD T2
  2810. SFL4 LDD CM+4
  2811. NJN SFL3 IF NOT END OF PREVOIUS LINE LOOP
  2812. AOD T1 ADVANCE LINE NUMBER
  2813. ADC 770000
  2814. NJN SFL2 IF NOT COMPLETE
  2815.  
  2816. SFL SUBR ENTRY/EXIT
  2817. STD T1 SAVE LINE NUMBER
  2818. MJN SFL2 IF SEARCH BACKWARDS
  2819.  
  2820. * SEARCH FORWARD FOR LINE.
  2821.  
  2822. SFL1 LDD T2
  2823. LMD IN
  2824. SHN 14
  2825. LMD T3
  2826. LMD IN+1
  2827. ZJN SFLX IF ADDRESS = IN
  2828. LDD T2 READ WORD
  2829. SHN 6
  2830. ADD RA
  2831. SHN 6
  2832. ADD T3
  2833. CRD CM
  2834. AOD T3 ADVANCE ADDRESS
  2835. SHN -14
  2836. RAD T2
  2837. LDD CM+4
  2838. NJN SFL1 IF NOT END OF LINE LOOP
  2839. SOD T1 DECREMENT LINE COUNT
  2840. NJN SFL1 IF ADVANCEMENT/DECREMENT NOT COMPLETE LOOP
  2841. UJN SFLX RETURN
  2842. SFN SPACE 4,20
  2843. ** SFN - SET FILE NAME.
  2844. *
  2845. * ENTRY (CA) = CHARACTER ADDRESS.
  2846. * (SFSA) = NONZERO, TO CHECK RANDOM ADDRESS.
  2847. *
  2848. * EXIT (CA) = UPDATED.
  2849. *
  2850. * USES CM, AB+4.
  2851. *
  2852. * CALLS ASN, SFS.
  2853.  
  2854.  
  2855. SFN SUBR ENTRY/EXIT
  2856. LDD CA CHECK FOR END OF KEYBOARD BUFFER
  2857. ADC -KBUF
  2858. LMD KI
  2859. ZJN SFN2 IF NO FILE NAME
  2860. LDD CA ASSEMBLE NAME
  2861. RJM ASN
  2862. LMN 1R.
  2863. ZJN SFN1 IF *.*
  2864. LJM ERR FORMAT ERROR
  2865.  
  2866. SFN1 LDD T1 UPDATE CHARACTER INDEX
  2867. STD CA
  2868. LDD AB CHECK ASSEMBLY
  2869. ZJN SFN2 IF NO FILE NAME ASSEMBLED RETURN
  2870. LDN 1 SET STATUS
  2871. STD AB+4
  2872. RJM SFS
  2873. SFN2 LDN 0 CLEAR CONSOLE MESSAGE
  2874. STD CM
  2875. LDD CP
  2876. ADN MS1W
  2877. CWD CM
  2878. ADN MS2W-MS1W
  2879. CWD CM
  2880. UJN SFNX RETURN
  2881. SFS SPACE 4,20
  2882. ** SFS - SET FILE STATUS.
  2883. *
  2884. * ENTRY (AB - AB+4) = FILE NAME.
  2885. *
  2886. * EXIT (SFSA) = NONZERO, TO CHECK RANDOM ADDRESS.
  2887. *
  2888. * USES T1, T2, CM - CM+4.
  2889.  
  2890.  
  2891. SFS SUBR ENTRY/EXIT
  2892. LDN 0
  2893. STM CRSB CLEAR WRITE LOCKOUT
  2894. LDN 1
  2895. STM CIOA INITIALIZE TO NON TERMINAL TYPE
  2896. LDD CP READ FIELD LENGTH STATUS WORD
  2897. ADN FLSW
  2898. CRD CM
  2899. LDD CM SET END OF NFL
  2900. SHN 6
  2901. ADN 1
  2902. STD T1
  2903. LDC FNTN START OF FNT
  2904. STD T2
  2905. SFS1 LDN LENF ADVANCE FNT ADDRESS
  2906. RAD T2
  2907. SBD T1
  2908. PJP SFS2 IF END OF FILES
  2909. NFA T2,R READ FNT ENTRY
  2910. CRD CM
  2911. LDD CM
  2912. ZJN SFS1 IF BLANK ENTRY
  2913. LMD AB COMPARE FILE NAMES
  2914. NJN SFS1 IF NO COMPARE ON BYTE 0
  2915. LDD CM+1
  2916. LMD AB+1
  2917. NJN SFS1 IF NO COMPARE ON BYTE 1
  2918. LDD CM+2
  2919. LMD AB+2
  2920. NJN SFS1 IF NO COMPARE ON BYTE 2
  2921. LDD CM+3
  2922. LMD AB+3
  2923. SCN 77
  2924. NJN SFS1 IF NO COMPARE ON BYTE 3
  2925. LDD CM+3
  2926. LPN 1
  2927. STM CRSB SET WRITE LOCKOUT STATUS
  2928. NFA T2,R READ FST INFORMATION
  2929. ADN FSTL READ FST ENTRY
  2930. CRD CM
  2931. LDD CM GET EQUIPMENT TYPE
  2932. SBK TTEQ CHECK FOR TERMINAL TYPE PSEUDO EQUIPMENT
  2933. STM CIOA SET TO 0 IF TERMINAL TYPE
  2934. LDD CM+4 SET LAST BUFFER STATUS
  2935. STD AB+4
  2936. SFS2 LDD RA STORE FILE NAME
  2937. SHN 6
  2938. ADN FET
  2939. CWD AB
  2940. ADN 1 SET RANDOM ACCESS BIT
  2941. CRD CM
  2942. LDD CM+1
  2943. LPC 3777
  2944. LMC 4000
  2945. STD CM+1
  2946. STM SFSA SET RANDOM ADDRESS FLAG
  2947. LDD RA
  2948. SHN 6
  2949. ADN FET+1
  2950. CWD CM
  2951. LJM SFSX RETURN
  2952.  
  2953. SFSA CON 0 RANDOM ADDRESS FLAG
  2954. SIL SPACE 4,20
  2955. ** SIL - SET INSERT LINE.
  2956. *
  2957. * ENTRY (A) = INCREMENT FROM CURRENT POSITION.
  2958. *
  2959. * USES T1, T2, T3.
  2960. *
  2961. * CALLS SDS, SFL.
  2962.  
  2963.  
  2964. SIL SUBR ENTRY/EXIT
  2965. ZJN SIL1 IF NO CHANGE
  2966. ADN 1
  2967. STD T1
  2968. LDD IP SEARCH FOR INSERT
  2969. STD T2
  2970. LDD IP+1
  2971. STD T3
  2972. LDD T1 SEARCH FOR LINE
  2973. SBN 1
  2974. RJM SFL
  2975. LDD T2 SET LINE ADDRESS
  2976. STD IP
  2977. LDD T3
  2978. STD IP+1
  2979. SIL1 LDN 1 SET INSERT FLAG
  2980. STD DR
  2981. STD IF
  2982. LDN IP SET DISPLAY
  2983. RJM SDS
  2984. UJN SILX RETURN
  2985. SIP SPACE 4,15
  2986. ** SIP - SET IN POINTER.
  2987. *
  2988. * USES CM - CM+4.
  2989.  
  2990.  
  2991. SIP SUBR ENTRY/EXIT
  2992. LDN ZERL STORE IN
  2993. CRD CM
  2994. LDD IN
  2995. STD CM+3
  2996. LDD IN+1
  2997. STD CM+4
  2998. LDD RA
  2999. SHN 6
  3000. ADN FET+2
  3001. CWD CM
  3002. UJN SIPX RETURN
  3003. WRW SPACE 4,10
  3004. ** WRW - WRITE AND REWIND FILE.
  3005. *
  3006. * CALLS CIO, CRS, SIP.
  3007.  
  3008.  
  3009. WRW SUBR ENTRY/EXIT
  3010. RJM CRS CHECK RECORD STATUS
  3011. RJM SIP STORE IN POINTER
  3012. LDN 26 WRITE END OF RECORD
  3013. RJM CIO
  3014. LDN 52 REWIND
  3015. RJM CIO
  3016. UJN WRWX RETURN
  3017. TABLE SPACE 4,10
  3018. ** RESIDENT TABLES AND BUFFERS.
  3019.  
  3020.  
  3021. TSCN BSSZ 10 SCAN TABLE
  3022.  
  3023. SFRA DATA H*SEARCH / *
  3024. SFRB BSS 5
  3025. TITLE RESIDENT ENTRY PROCESSORS.
  3026. O26 SPACE 4
  3027. QUAL O26
  3028. DIS. SPACE 4,15
  3029. *** DIS.
  3030. *
  3031. * WRITE AND REWIND FILE AND CALL DIS TO CONTROL POINT.
  3032.  
  3033.  
  3034. DIS ENTRY
  3035. RJM WRW WRITE AND REWIND FILE
  3036. DIS1 LDN DSEQ SET EST ORDINAL IN INPUT REGISTER
  3037. LMC 4000 FORCE DIRECT CALL
  3038. STD IR+4
  3039. RJM DDS DROP DISPLAY
  3040. RJM WIO WAIT I/O
  3041. DIS2 LDC 2RDI SET *DIS* IN INPUT REGISTER
  3042. STD IR
  3043. LCN 1R6-1RS
  3044. SHN 6
  3045. RAD IR+1
  3046. LDD IA WRITE INPUT REGISTER FOR *DIS*
  3047. CWD IR
  3048. LJM PPR EXIT TO PP RESIDENT
  3049. DROP. SPACE 4,10
  3050. *** DROP.
  3051. *
  3052. * WRITE AND REWIND FILE AND DROP DISPLAY.
  3053.  
  3054.  
  3055. DRP ENTRY
  3056. RJM WRW WRITE AND REWIND FILE
  3057. DRP1 RJM DDS DROP DISPLAY
  3058. RJM WIO WAIT I/O
  3059. LJM DPP DROP PP
  3060. XDIS. SPACE 4,8
  3061. *** XDIS.
  3062. *
  3063. * CALL DIS TO CONTROL POINT ONLY. (NO WRITE)
  3064.  
  3065.  
  3066. XDS ENTRY DIS1
  3067. XDROP. SPACE 4,8
  3068. *** XDROP.
  3069. *
  3070. * DROP DISPLAY ONLY. (NO WRITE)
  3071.  
  3072.  
  3073. XDD ENTRY DRP1
  3074. TER SPACE 4,20
  3075. * TERMINATE RESIDENT ROUTINES.
  3076.  
  3077.  
  3078. QUAL
  3079. HERE
  3080. DIS HERE
  3081. USE END
  3082. OVL SPACE 4
  3083. ** OVERLAY AREA.
  3084.  
  3085.  
  3086. OVL EQU *+5
  3087. TITLE PRESET PROGRAM.
  3088. PRS SPACE 4
  3089. ** TTAB - TAB TABLE.
  3090. * ENTRY = COLUMN NUMBER.
  3091.  
  3092.  
  3093. TTAB BSS 0
  3094. DATA 11D
  3095. DATA 18D
  3096. DATA 30D
  3097. CON 40D
  3098. CON 50D
  3099. CON 60D
  3100. CON 73D
  3101. DATA 80D
  3102. DATA 0 END OF TABLE
  3103. PRS SPACE 4,20
  3104. ** PRS - PRESET PROGRAM.
  3105. *
  3106. * EXIT (NC) = NUMBER OF CP-S.
  3107.  
  3108.  
  3109. PRS5 LDN 0 CLEAR KEYBOARD AND TAB BUFFERS
  3110. STD T1
  3111. PRS6 LDN 1R BLANK FILL BUFFERS
  3112. STM DBUF,T1
  3113. STM BUFM,T1
  3114. STM BUF,T1
  3115. AOD T1
  3116. LMC KBUFL
  3117. NJN PRS6 IF NOT COMPLETLY FILLED
  3118. STD T1
  3119. LDC TTAB SET TAB TABLE ADDRESS
  3120. STD T2
  3121. PRS7 LDI T2
  3122. ZJN PRS8 IF END OF TABLE
  3123. STD T3
  3124. LDC 6000 STORE TAB
  3125. RAM DBUF+1,T3
  3126. AOD T2
  3127. UJN PRS7 CHECK FOR END OF TABLE
  3128.  
  3129. PRS8 LDN ZERL CLEAR (RA - RA+FET-1)
  3130. CRD CM
  3131. PRS9 LDD RA
  3132. SHN 6
  3133. ADD T1
  3134. CWD CM
  3135. AOD T1
  3136. LMN FET
  3137. NJN PRS9 IF NOT COMPLETE
  3138. LDC SCT
  3139. LJM LOV LOAD COMMAND TABLE
  3140.  
  3141. USE PRS
  3142. PRS LDN 10
  3143. STD CM+4
  3144. LDN CCTS CLEAR *DIS* FLAG
  3145. STD CM+1
  3146. MONITOR SJCM
  3147. LDD IR+4
  3148. SHN 21-13
  3149. MJN PRS0 IF DIRECT CALL
  3150. CATD VU CHECK ACCESS TO DISPLAY CONSOLE
  3151. PRS0 LDN 0
  3152. STD CM+1
  3153. MONITOR DCPM DROP CPU
  3154. * LDN 0
  3155. STD T7
  3156. LDD FL CHECK FIELD LENGTH
  3157. SBN 2
  3158. PJN PRS1 IF FIELD LENGTH \ 200
  3159. LJM /O26/DIS2 LOAD *DIS*
  3160.  
  3161. PRS1 LDC PRO SET ROLLOUT PROCESSOR ADDRESS
  3162. STM /COMDDSP/ROFA
  3163. LDC CH01 SET X-COORDINATE
  3164. STD XC
  3165. LDN DSEQ
  3166. SFA EST
  3167. ADK EQAE
  3168. CRD AB
  3169. LDD AB+2
  3170. ZJN PRS2 IF CC545
  3171. MDIN
  3172. PRS2 LDM PRSA,T7 MOVE SUBROUTINES TO DRIVER AREA
  3173. STM MSFW,T7
  3174. AOD T7
  3175. LMC PRSAL
  3176. NJN PRS2 IF PROGRAM NOT COMPLETLY MOVED
  3177. STD CM+1
  3178. STD KM CLEAR DIRECT CELLS
  3179. STD KI
  3180. STM MSD CLEAR MS DRIVER PRESENT
  3181. STD IO
  3182. LDD CP CLEAR CONTROL POINT MESSAGES
  3183. ADN MS1W
  3184. CWD CM
  3185. ADN MS2W-MS1W
  3186. CWD CM
  3187. ADN DBAW-MS2W CLEAR K-DISPLAY ADDRESS POINTERS
  3188. CWD CM
  3189. LDN 10 SET MASK FOR *JCIW*
  3190. STD CM+4
  3191. LDN SCTS SET *DIS* FLAG IN CPA
  3192. STD CM+1
  3193. MONITOR SJCM
  3194. * LDN 0 CLEAR UPPER CASE
  3195. STD UC
  3196. STD IF CLEAR INSERT FLAG
  3197. STD HF CLEAR HOLD FLAG
  3198. STD SF CLEAR SCAN FLAG
  3199. STD SI CLEAR SCAN INDEX
  3200. STD SC CLEAR SCAN NUMBER
  3201. STD T1 CLEAR FET
  3202. LDD IR+2 STORE UPPER CASE CHARACTER
  3203. SHN 14
  3204. RAM KBIC
  3205. LDN ZERL CLEAR RA - CBUF
  3206. CRD CM
  3207. PRS3 LDD RA CLEAR RA - CBUF
  3208. SHN 6
  3209. ADN FET
  3210. ADD T1
  3211. CWD CM
  3212. AOD T1
  3213. LMC CBUF
  3214. NJN PRS3 IF NOT COMPLETE
  3215. STD FT SET IN = OUT = FIRST
  3216. STD IN
  3217. STD OT
  3218. LDC CBUF
  3219. STD FT+1
  3220. STD IN+1
  3221. STD OT+1
  3222. LDD FL SET LIMIT
  3223. SHN 6
  3224. STD CM+4
  3225. STD LM+1
  3226. SHN -14
  3227. STD CM+3
  3228. STD LM
  3229. LDD RA STORE BUFFER STATUS
  3230. SHN 6
  3231. ADN FET
  3232. CWM PRSB,TR
  3233. CWM PRSC,ON
  3234. CWD CM
  3235.  
  3236. * COMMON ENTRY.
  3237.  
  3238. LDN IPRL CHECK SYSTEM CHARACTER SET
  3239. CRD CM
  3240. LDD CM+2
  3241. LPN 1
  3242. NJN PRS4 IF 64 CHARACTER SET
  3243. STM KBIG DISABLE ENTRY OF ZERO CHARACTER
  3244. LDN PSNI
  3245. STM DKSC
  3246. LDC *
  3247. ORG *-1
  3248. LOC DKSB
  3249. UJN DKS2 63 CHARACTER SET SYSTEM
  3250. LOC *O
  3251. STM DKSB
  3252. LDD AB+2
  3253. ZJN PRS4 IF CC545 SYSTEM CONSOLE
  3254. LDC SBNI+63-60
  3255. STM DKSD
  3256. PRS4 LDD RA
  3257. SHN 6
  3258. ADN FET
  3259. CRD AB
  3260. RJM SFS SET FILE STATUS
  3261. LDK RDSOS REQUEST DISPLAY
  3262. RJM RID
  3263. LJM PRS5 COMPLETE
  3264.  
  3265. PRSB VFD 42/0LINPUT,18/1
  3266.  
  3267. VFD 12/0,12/4000,12/,6/FETL-5,18/CBUF
  3268.  
  3269. PRSC VFD 60/CBUF
  3270. SPACE 4,10
  3271. *CALL COMPCUA
  3272. SPACE 4,10
  3273. ** DUMP INSTRUCTION MODIFICATION BLOCK.
  3274.  
  3275.  
  3276. USE LOV
  3277. DIMB
  3278. OVERFLOW
  3279. COMMAND (COMMAND TABLE.)
  3280. SCT SPACE 4,10
  3281. ** SCT - STORE COMMAND TABLE.
  3282. *
  3283. * USES T1.
  3284.  
  3285.  
  3286. SCT ENTRY
  3287. ISTORE INT,(LDN TSFM-1) SET TABLE ADDRESS
  3288. LDC TCMDL/5
  3289. STD T1
  3290. LDD RA STORE COMMAND TABLE
  3291. SHN 6
  3292. ADN SBUF
  3293. CWM TCMD,T1
  3294. JMP RET RETURN
  3295. TSFM SPACE 4,10
  3296. ** TSFM - TABLE OF SPECIAL FORMATS.
  3297.  
  3298.  
  3299. QUAL
  3300. TCMD BSS 0
  3301. LOC SBUF
  3302. TSFM BSS 0
  3303. AMG ENTER (A.)
  3304. BKS ENTER (BKSP.)
  3305. BKP ENTER (BKSPRU.)
  3306. BKN ENTER (BKSPRU,)
  3307. CEL ENTER (C.)
  3308. MVE ENTER (COPY.)
  3309. DEL ENTER (D,*)
  3310. DMC ENTER (D.)
  3311. DLE ENTER (DEL.)
  3312. DIS ENTER (DIS.)
  3313. DSF ENTER (DFL.)
  3314. DSL ENTER (DLL.)
  3315. DRP ENTER (DROP.)
  3316. DSC ENTER (DS,)
  3317. EFL ENTER (ENFL.)
  3318. EFN ENTER (ENFL,)
  3319. SEF ENTER (ERR.)
  3320. MRL ENTER (E.)
  3321. SFM ENTER (F.)
  3322. FIL ENTER (FILE.)
  3323. GTR ENTER (GETR,)
  3324. GTR1 ENTER (GETR.)
  3325. GET ENTER (GET,)
  3326. GET1 ENTER (GET.)
  3327. GGO ENTER (GO.)
  3328. GTR ENTER (GTR,)
  3329. GTR1 ENTER (GTR.)
  3330. HOL ENTER (HOLD.)
  3331. IGN ENTER (IGNORE.)
  3332. MRL ENTER (L.)
  3333. LST ENTER (LIST,)
  3334. LST1 ENTER (LIST.)
  3335. MVE ENTER (MOVE.)
  3336. MRG ENTER (M.)
  3337. MRN ENTER (N.)
  3338. ELN ENTER (P.)
  3339. RPC ENTER (RC,)
  3340. REC ENTER (RC.)
  3341. RPS ENTER (RM)
  3342. RPS ENTER (RS)
  3343. RDI ENTER (READI.)
  3344. RDN ENTER (READN.)
  3345. RNS ENTER (READNS.)
  3346. RDF ENTER (READ.)
  3347. RTN ENTER (RETURN.)
  3348. REW ENTER (REWIND.)
  3349. RFR ENTER (RFR.)
  3350. RIC ENTER (RI.)
  3351. RLR ENTER (RLR.)
  3352. RNR ENTER (RNR.)
  3353. ROC ENTER (RO.)
  3354. RPR ENTER (RPR.)
  3355. RPN ENTER (R,)
  3356. RWR ENTER (RWRITE.)
  3357. SCN ENTER (SCAN,)
  3358. SML ENTER (S.)
  3359. SKP ENTER (SKIPEI.)
  3360. TAB ENTER (TAB,)
  3361. UCC ENTER (UCC=)
  3362. UNL ENTER (UNLOAD.)
  3363. WRT ENTER (WRITE.)
  3364. WRF ENTER (WRITEF.)
  3365. WTW ENTER (WRITEW.)
  3366. XDS ENTER (XDIS.)
  3367. XDD ENTER (XDROP.)
  3368. VFD 60/ END OF TABLE
  3369.  
  3370. LOC *O
  3371. ECMDO EQU * END OF COMMAND OVERLAY
  3372. TCMDL EQU *-TCMD
  3373. .1 SET TCMDL/5+SBUF+37
  3374. CBUF EQU .1/40*40
  3375. COMMAND (FILE COMMANDS.)
  3376. BKSP. SPACE 4,10
  3377. *** BKSP.CCCCCCC.
  3378. *
  3379. * BACKSPACE FILE *CCCCCCC*. IF *CCCCCCC* IS MISSING,
  3380. * PREVIOUS FILE NAME WILL BE USED.
  3381.  
  3382.  
  3383. BKS ENTRY
  3384. LDN 42 BACKSPACE
  3385. * UJN IOF ISSUE FUNCTION
  3386. IOF SPACE 4,10
  3387. ** IOF - I/O FUNCTION PROCESSOR.
  3388. *
  3389. * ENTRY (A) - CIO FUNCTION TO ISSUE.
  3390. *
  3391. * EXIT TO *RET*.
  3392. *
  3393. * CALLS CIO.
  3394.  
  3395.  
  3396. IOF STD T6
  3397. RJM SFN SET FILE NAME
  3398. LDD T6
  3399. RJM CIO
  3400. JMP RET RETURN
  3401. BKSPRU, SPACE 4,10
  3402. *** BKSPRU,X.
  3403. *
  3404. * BACKSPACE CURRENT FILE *X* PHYSICAL RECORDS.
  3405.  
  3406.  
  3407. BKN ENTRY
  3408. RJM ADD ASSEMBLE DECIMAL DIGITS
  3409. LMN 1R.
  3410. ZJN BKN1 IF *.* NO ERROR
  3411. LJM ERR FORMAT ERROR
  3412.  
  3413. BKN1 LDD AB+4 STORE PRU COUNT
  3414. STM TIOD
  3415. LDN 46 BACKSPACE PRU
  3416. STM TIOD+1
  3417. LDN 5 SKIP RECORDS
  3418. RJM CIO
  3419. JMP RET RETURN
  3420. BKSPRU. SPACE 4,10
  3421. *** BKSPRU.CCCCCCC.
  3422. *
  3423. * BACKSPACE FILE *CCCCCCC* ONE PRU. IF *CCCCCCC*
  3424. * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
  3425.  
  3426.  
  3427. BKP ENTRY
  3428. LDN 46 BACKSPACE
  3429. JMP IOF RETURN
  3430. FILE. SPACE 4,10
  3431. *** FILE.CCCCCCC.
  3432. *
  3433. * SET FILE NAME = *CCCCCCC*.
  3434.  
  3435.  
  3436. FIL ENTRY
  3437. RJM SFN SET FILE NAME
  3438. JMP RET RETURN
  3439. RC. SPACE 4,15
  3440. *** RC.CCCCCCC.
  3441. *
  3442. * REWIND, READ, AND REWIND FILE *CCCCCCC*. IF
  3443. * *CCCCCCC* IS MISSING, FILE *COMPILE* WILL BE
  3444. * READ.
  3445.  
  3446.  
  3447. REC ENTRY
  3448. LDN 6 SET SCAN INDEX
  3449. STM TSCN
  3450. LDN 1 SET SCAN FLAG
  3451. STD SF
  3452. LDN 0 CLEAR SCAN INDEX
  3453. STD SI
  3454. STM TSCN+1
  3455. LDC =C*COMPILE* SET FILE NAME
  3456. LJM ROC1
  3457. READ. SPACE 4,15
  3458. *** READ.CCCCCCC.
  3459. *
  3460. * REWIND, READ, AND REWIND FILE *CCCCCCC*. IF
  3461. * *CCCCCCC* IS MISSING, PREVIOUS FILE NAME WILL
  3462. * BE USED.
  3463.  
  3464.  
  3465. RDF ENTRY
  3466. RJM SFN SET FILE NAME
  3467. RDF1 LDN 50 REWIND
  3468. RJM CIO
  3469. LDN 12 READ
  3470. RJM CIO
  3471. LDN 1 DUMMY REQUEST
  3472. RJM CIO
  3473. LDN 50 REWIND
  3474. RJM CIO
  3475. LJM RNR3
  3476. READI. SPACE 4,15
  3477. *** READI.CCCCCCC.
  3478. *
  3479. * SKIP TO END OF INFORMATION, BKSP, BKSP, AND READ
  3480. * FILE *CCCCCCC*. IF *CCCCCCC* IS MISSING,
  3481. * PREVIOUS FILE NAME WILL BE USED.
  3482.  
  3483.  
  3484. RDI ENTRY
  3485. RJM SFN SET FILE NAME
  3486. LDN 3 SKIP TO END OF INFORMATION
  3487. RJM CIO
  3488.  
  3489. * ENTRY FROM *RPR*.
  3490.  
  3491. RDI1 LDC 20640 SKIP BACKWARDS 2 RECORDS
  3492.  
  3493. * ENTRY FROM *RLR*.
  3494.  
  3495. RDI2 STM TIOD+1
  3496. SHN -14
  3497. STM TIOD
  3498. LDN 5 SKIP RECORDS
  3499. RJM CIO
  3500. LJM RNR1
  3501. READN. SPACE 4,15
  3502. *** READN.CCCCCCC.
  3503. *
  3504. * READ FILE *CCCCCCC*. NO REWIND. IF *CCCCCCC*
  3505. * IS MISSING, PREVIOUS FILE WILL BE READ. STOPS ON
  3506. * BUFFER FULL OR EOR.
  3507.  
  3508.  
  3509. RDN ENTRY
  3510. RJM SFN SET FILE NAME
  3511. RJM SIP STORE IN POINTER
  3512. LDN 12 READ
  3513. RJM CIO
  3514. LDN 1 DUMMY
  3515. RJM CIO
  3516. LJM RNR4
  3517. READNS. SPACE 4,15
  3518. *** READNS.CCCCCCC.
  3519. *
  3520. * READ FILE *CCCCCCC* NON-STOP. NO REWIND. IF
  3521. * *CCCCCCC* IS MISSING, PREVIOUS FILE WILL BE READ.
  3522. * STOPS ON BUFFER FULL OR EOF.
  3523.  
  3524.  
  3525. RNS ENTRY
  3526. RJM SFN SET FILE NAME
  3527. RJM SIP STORE IN POINTER
  3528. LDC 250 READ NON-STOP
  3529. RJM CIO
  3530. LDN 1 DUMMY
  3531. RJM CIO
  3532. LJM RNR4
  3533. RETURN. SPACE 4,10
  3534. *** RETURN.CCCCCCC.
  3535. *
  3536. * RETURN FILE CCCCCC. IF *CCCCCCC* IS MISSING,
  3537. * PREVIOUS FILE NAME WILL BE USED.
  3538.  
  3539.  
  3540. RTN ENTRY
  3541. LDN 0 CLEAR WRITE LOCKOUT STATUS
  3542. STM CRSB
  3543. LDN 70 RETURN
  3544. JMP IOF RETURN
  3545. REWIND. SPACE 4,10
  3546. *** REWIND.CCCCCCC.
  3547. *
  3548. * REWIND FILE CCCCCC. IF *CCCCCCC* IS MISSING,
  3549. * PREVIOUS FILE NAME WILL BE USED.
  3550.  
  3551.  
  3552. REW ENTRY
  3553. LDN 50 REWIND
  3554. JMP IOF RETURN
  3555. RFR. SPACE 4,10
  3556. *** RFR.CCCCCCC.
  3557. *
  3558. * REWIND AND READ FILE *CCCCCCC*. IF *CCCCCCC*
  3559. * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
  3560.  
  3561.  
  3562. RFR ENTRY
  3563. RJM SFN SET FILE NAME
  3564. LDN 50 REWIND
  3565. RJM CIO
  3566. UJN RNR2
  3567. RI. SPACE 4,10
  3568. *** RI.CCCCCCC.
  3569. *
  3570. * REWIND, READ, AND REWIND FILE *CCCCCCC*. IF
  3571. * *CCCCCCC* IS MISSING, FILE *INPUT* WILL BE
  3572. * READ.
  3573.  
  3574.  
  3575. RIC ENTRY
  3576. LDC =C*INPUT* SET FILE NAME
  3577. LJM ROC1
  3578. RLR. SPACE 4,10
  3579. *** RLR.CCCCCCC.
  3580. *
  3581. * READ LAST RECORD ON FILE *CCCCCCC*. IF *CCCCCCC*
  3582. * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
  3583.  
  3584.  
  3585. RLR ENTRY
  3586. RJM SFN SET FILE NAME
  3587. LDN 3 SKIP TO END OF INFORMATION
  3588. RJM CIO
  3589. LDC 10640 SKIP BACKWARDS 1 RECORD
  3590. LJM RDI2 CAUSE RECORD SKIP
  3591. RNR. SPACE 4,20
  3592. *** RNR.CCCCCCC.
  3593. *
  3594. * READ NEXT RECORD ON FILE *CCCCCCC*. IF *CCCCCCC*
  3595. * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
  3596.  
  3597.  
  3598. RNR ENTRY
  3599. RJM SFN SET FILE NAME
  3600.  
  3601. * ENTRY FROM *RDI*.
  3602.  
  3603. RNR1 LDD RA SET IN = OUT
  3604. SHN 6
  3605. ADN FET+3
  3606. CRD CM
  3607. SBN 1
  3608. CWD CM
  3609.  
  3610. * ENTRY FROM *RFR*.
  3611.  
  3612. RNR2 LDN 12 READ
  3613. RJM CIO
  3614. LDN 1 DUMMY
  3615. RJM CIO
  3616.  
  3617. * ENTRY FROM *RDF*.
  3618.  
  3619. RNR3 LDN 1 SET HOLD FLAG
  3620. STD HF
  3621. LDN FT SET DISPLAY = LINE 0
  3622. RJM SDS
  3623.  
  3624. * ENTRY FROM *RDN* AND *RNS*.
  3625.  
  3626. RNR4 LDN 0 CLEAR SCAN
  3627. STD SC
  3628. STD SI
  3629. JMP CIF CLEAR INSERT FLAG
  3630. RO. SPACE 4,15
  3631. *** RO.CCCCCCC.
  3632. *
  3633. * REWIND, READ, AND REWIND FILE *CCCCCCC*. IF
  3634. * *CCCCCCC* IS MISSING, FILE *OUTPUT* WILL BE
  3635. * READ.
  3636.  
  3637.  
  3638. ROC ENTRY
  3639. LDN 4 SET SCAN INDEX
  3640. STM TSCN
  3641. LDN 10D
  3642. STM TSCN+1
  3643. LDN 0
  3644. STM TSCN+2
  3645. STD SI CLEAR SCAN INDEX
  3646. LDN 1 SET SCAN FLAG
  3647. STD SF
  3648. LDC =C*OUTPUT* SET FILE NAME
  3649.  
  3650. * ENTRY FROM *RIC* AND *REC*.
  3651.  
  3652. ROC1 RJM SDF
  3653. LDD CA SET FILE NAME
  3654. RJM SFN
  3655. LJM RDF1
  3656. RPR. SPACE 4,10
  3657. *** RPR.CCCCCCC.
  3658. *
  3659. * READ PREVIOUS RECORD ON FILE *CCCCCCC*. IF
  3660. * *CCCCCCC* IS MISSING, PREVIOUS FILE NAME WILL BE
  3661. * USED.
  3662.  
  3663.  
  3664. RPR ENTRY
  3665. RJM SFN SET FILE NAME
  3666. LJM RDI1 SKIP BACK 2 RECORDS
  3667. SKIPEI. SPACE 4,10
  3668. *** SKIPEI.CCCCCCC.
  3669. *
  3670. * SKIP TO END OF INFORMATION ON FILE . IF
  3671. * *CCCCCCC* IS MISSING, PREVIOUS FILE NAME
  3672. * WILL BE USED.
  3673.  
  3674.  
  3675. SKP ENTRY
  3676. LDN 3 SKIPEI
  3677. JMP IOF RETURN
  3678. UNLOAD. SPACE 4,10
  3679. *** UNLOAD.CCCCCCC.
  3680. *
  3681. * UNLOAD FILE *CCCCCCC*. IF *CCCCCCC* IS MISSING,
  3682. * PREVIOUS FILE NAME WILL BE USED.
  3683.  
  3684.  
  3685. UNL ENTRY
  3686. LDN 0 CLEAR WRITE LOCKOUT STATUS
  3687. STM CRSB
  3688. LDN 60 UNLOAD
  3689. JMP IOF RETURN
  3690. WRITE. SPACE 4,15
  3691. *** WRITE.CCCCCCC.
  3692. *
  3693. * WRITE BUFFER TO FILE *CCCCCCC*. IF *CCCCCCC*
  3694. * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
  3695.  
  3696.  
  3697. WRT ENTRY
  3698. RJM SFN SET FILE NAME
  3699. RJM CRS CHECK RECORD STATUS
  3700. RJM SIP STORE IN POINTER
  3701. LDN 26 WRITE END OF RECORD
  3702. RJM CIO
  3703. LDN 17 SET PSEUDO REQUEST TO REWIND POINTERS
  3704. RJM CIO
  3705. JMP CIF CLEAR INSERT FLAG
  3706. WRITEF. SPACE 4,10
  3707. *** WRITEF.CCCCCCC.
  3708. *
  3709. * WRITE BUFFER TO FILE *CCCCCCC* WITH AN EOF MARK.
  3710. * IF *CCCCCCC* IS MISSING, PREVIOUS FILE NAME WILL
  3711. * BE USED.
  3712.  
  3713.  
  3714. WRF ENTRY
  3715. RJM SFN SET FILE NAME
  3716. RJM CRS CHECK RECORD STATUS
  3717. RJM SIP STORE IN POINTER
  3718. LDN 36 WRITE END OF FILE
  3719. RJM CIO
  3720. LDN 17 SET PSEUDO REQUEST TO REWIND POINTERS
  3721. RJM CIO
  3722. JMP CIF CLEAR INSERT FLAG
  3723. WRITEW. SPACE 4,20
  3724. *** WRITEW.CCCCCCC.
  3725. *
  3726. * WRITE FROM START OF BUFFER UP TO INSERT LINE TO
  3727. * FILE *CCCCCCC*. IF *CCCCCCC* IS MISSING,
  3728. * PREVIOUS FILE NAME WILL BE USED.
  3729.  
  3730.  
  3731. WTW ENTRY
  3732. LDD IF
  3733. NJN WTW1 IF INSERT
  3734. JMP ERR
  3735.  
  3736. WTW1 RJM SFN SET FILE NAME
  3737. RJM CRS CHECK RECORD STATUS
  3738. LDN ZERL SET INSERT ADDRESS
  3739. CRD CM
  3740. CRD AB
  3741. LDD IP
  3742. STD CM+3
  3743. LDD IP+1
  3744. STD CM+4
  3745. LDC CBUF
  3746. STD AB+4
  3747. LDD RA WRITE IN
  3748. SHN 6
  3749. ADN FET+2
  3750. CWD CM
  3751. ADN 1
  3752. CWD AB SET OUT = FIRST
  3753. LDN 26 WRITE END OF RECORD
  3754. RJM CIO
  3755. LDN 13 DUMMY
  3756. RJM CIO
  3757. JMP CIF CLEAR INSERT FLAG
  3758. SDF SPACE 4,15
  3759. ** SDF - SET DEFINED FILE.
  3760. *
  3761. * ENTRY (A) = ADDRESS OF FILE NAME.
  3762. * (CA) = CHARACTER ADDRESS.
  3763. *
  3764. * USES AB - AB+4.
  3765. *
  3766. * CALLS SFS.
  3767.  
  3768.  
  3769. SDF SUBR ENTRY/EXIT
  3770. STM SDFA
  3771. LDD CA CHECK BUFFER
  3772. ADC -KBUF
  3773. LMD KI
  3774. NJN SDFX IF FILE SPECIFIED
  3775. LDD MA
  3776. CWM **,ON MOVE FILE NAME
  3777. SDFA EQU *-1
  3778. SBN 1
  3779. CRD AB
  3780. LDN 1 SET STATUS
  3781. STD AB+4
  3782. RJM SFS SET FILE STATUS
  3783. UJN SDFX RETURN
  3784. COMMAND (LINE ENTRY AND DATA MOVE.)
  3785. A. SPACE 4,10
  3786. *** A.CCC-CCC
  3787. *
  3788. * MERGE CHARACTERS *CCC-CCC* WITH FOLLOWING LINE
  3789. * EXCEPT TABBED OR SPACED AREA UP TO CARRAGE RETURN.
  3790. C. SPACE 4,20
  3791. *** C.CCC-CCC
  3792. *
  3793. * ENTER CHARACTERS *CCC-CCC* IN BUFFER. *CCC-CCC*
  3794. * MAY CONSIST OF UP TO 90 CHARACTERS.
  3795.  
  3796.  
  3797. CEL ENTRY
  3798. LDD CA CHECK FOR COPY NEXT LINE
  3799. ADC -KBUF
  3800. LMD KI
  3801. NJN CEL3 IF NOT COPY NEXT LINE
  3802. LDD IF
  3803. NJN CEL1 IF INSERT SET
  3804. JMP ERR MESSAGE = *FORMAT ERROR.*
  3805.  
  3806. CEL1 RJM RDL READ LINE
  3807. LDD LC SET KEYBOARD INDEX
  3808. ADN 2
  3809. STD KI
  3810. ADC -KBUFL
  3811. MJN CEL2 IF WITHIN BUFFER
  3812. LDC KBUFL-1 SET LAST CHARACTER ADDRESS
  3813. STD KI
  3814. CEL2 JMP KBIX RETURN
  3815.  
  3816. * ENTRY FROM *MRL*.
  3817.  
  3818. AMG ENTRY
  3819. CEL3 RJM ELB ENTER LINE IN BUFFER
  3820. JMP RET RETURN
  3821. COPY SPACE 4,8
  3822. *** COPY.
  3823. *
  3824. * COPY DATA FROM BLOCK STARTING AT INSERT *8* AND
  3825. * ENDING AT INSERT *9* INTO BLOCK AT INSERT MARKER.
  3826.  
  3827.  
  3828. *MVE ENTRY
  3829. DEL. SPACE 4,15
  3830. *** DEL.
  3831. *
  3832. * DELETE LINES AFTER INSERT MARK.
  3833.  
  3834.  
  3835. DLE ENTRY
  3836. LDD IF
  3837. ZJN DLE1 IF NO INSERT
  3838. LDD IP RESET IN
  3839. STD IN
  3840. LDD IP+1
  3841. STD IN+1
  3842. UJN DLE2
  3843.  
  3844. DLE1 LDD FT CLEAR BUFFER
  3845. STD IN
  3846. LDD FT+1
  3847. STD IN+1
  3848. DLE2 RJM SIP STORE IN POINTER
  3849. LDN IN
  3850.  
  3851. * ENTRY FROM *DEL*.
  3852.  
  3853. DLE3 RJM SDS SET DISPLAY
  3854. JMP CIF CLEAR INSERT FLAG
  3855. D,* SPACE 4,15
  3856. *** D,*
  3857. *
  3858. * DELETE FROM INSERT *8* THROUGH INSERT *9*.
  3859.  
  3860.  
  3861. DEL ENTRY
  3862. LDD MA MOVE INSERT PARAMETERS
  3863. CWM CFCB,ON
  3864. LDD MA
  3865. CRD T2 (SET T2 - T6)
  3866. LDD T2
  3867. ADD T3
  3868. ZJN DEL1 IF NO INSERT *8*
  3869. LDD T2
  3870. SBD T4
  3871. SHN 14
  3872. ADD T3
  3873. SBD T5
  3874. PJN DEL1 IF *I8* .GT. *I9*
  3875. RJM MBD MOVE BUFFER DOWN
  3876. LDC CFCB
  3877. JMP DLE3 SET DISPLAY
  3878.  
  3879. DEL1 JMP ERR FORMAT ERROR
  3880. D. SPACE 4,10
  3881. *** D.CCC-CCC
  3882. *
  3883. * MERGE *CCC-CCC* WITH REMAINDER OF CHARACTERS
  3884. * CHARACTERS IN DUP BUFFER EXCEPT TABBED AREA OR
  3885. * SPACED AREA UP TO CARRIAGE RETURN.
  3886.  
  3887.  
  3888. DMC ENTRY AMG
  3889. E. SPACE 4,8
  3890. *** E.CCC-CCC
  3891. *
  3892. * MERGE *CCC-CCC* WITH REMAINDER OF CHARACTERS
  3893. * CHARACTERS IN DUP BUFFER EXCEPT TABBED OR SPACED
  3894. * AREA.
  3895. L. SPACE 4,20
  3896. *** L.CCC-CCC
  3897. *
  3898. * MERGE CHARACTERS *CCC-CCC* WITH REMAINDER OF
  3899. * FOLLOWING LINE EXCEPT TABBED OR SPACED AREA.
  3900.  
  3901.  
  3902. MRL ENTRY
  3903. LDD KI COPY REMAINDER OF LINE
  3904. MRL1 ADC -KBUFL CHECK FOR END OF BUFFER
  3905. PJN MRL2 IF END OF BUFFER
  3906. LDM DBUF,KI COPY CHARACTER FROM DUP BUFFER
  3907. LPN 77 CLEAR TAB IF SET
  3908. STM KBUF,KI ENTER INTO KEYBOARD BUFFER
  3909. AOD KI ADVANCE
  3910. UJN MRL1 LOOP FOR NEXT CHARACTER
  3911.  
  3912. MRL2 LDC KBUF+2 SET CHARACTER ADDRESS
  3913. STD CA
  3914. LJM CEL3 ENTER LINE AND RETURN
  3915. MOVE. SPACE 4,20
  3916. *** MOVE.
  3917. *
  3918. * MOVE DATA FROM BLOCK STARTING AT INSERT *8* AND
  3919. * ENDING AT INSERT *9* INTO BLOCK AT INSERT MARKER.
  3920.  
  3921.  
  3922. MVE ENTRY
  3923. LDD MA SET MOVE PARAMETERS
  3924. CWM CFCB,ON
  3925. LDD MA
  3926. CRD AB
  3927. LDD AB
  3928. SHN 14
  3929. LMD AB+1
  3930. ZJN MVE1 IF INSERT *8* NOT SET
  3931. LDD AB+2
  3932. SHN 14
  3933. LMD AB+3
  3934. NJN MVE2 IF INSERT *9* SET
  3935. MVE1 LDC =C*INSERT 8 OR 9 NOT SET.*
  3936. JMP ERR1
  3937.  
  3938. MVE2 LDD AB+2 CALCULATE BLOCK SIZE
  3939. SBD AB
  3940. SHN 14
  3941. ADD AB+3
  3942. SBD AB+1
  3943. STD T7
  3944. SHN -14
  3945. ZJN MVE4 IF BLOCK .LT. 10000
  3946. LDC MVEB *DATA OVERFLOW.*
  3947. JMP ERR1
  3948.  
  3949. MVE4 RJM CRB CHECK ROOM IN BUFFER
  3950. LDD IF
  3951. ZJN MVE5 IF INSERT NOT SET
  3952. LCN IN-IP
  3953. MVE5 ADN IN
  3954. STD T3
  3955. LDI T3 SET INSERT ADDRESS
  3956. STD OT
  3957. STD T2
  3958. LDM 1,T3
  3959. STD OT+1
  3960. STD T3
  3961. LDD T2 CHECK DATA BLOCK LIMITS
  3962. SBD AB
  3963. SHN 14
  3964. ADD T3
  3965. SBD AB+1
  3966. PJN MVE6 IF - 8 - BEFORE INSERT
  3967. LDD T7 SET INSERT INCREMENT
  3968. STD AB+4
  3969. MVE6 LDD T2
  3970. SBD AB+2
  3971. SHN 14
  3972. ADD T3
  3973. SBD AB+3
  3974. PJN MVE7 IF - 9 - BEFORE OR AT INSERT
  3975. LDD AB+4
  3976. NJN MVE7 IF - 8 - AFTER INSERT
  3977. LJM ERR MESSAGE = *FORMAT ERROR.*
  3978.  
  3979. MVE7 RJM MBU MOVE BUFFER UP
  3980. LDD AB+4 SET FWA
  3981. RAD AB+1
  3982. STD T5
  3983. SHN -14
  3984. RAD AB
  3985. STD T4
  3986. LDD IN+1 SAVE IN ADDRESS
  3987. ADD T7
  3988. STM MVEA+1
  3989. SHN -14
  3990. ADD IN
  3991. ADC LDCI
  3992. STM MVEA
  3993. LDD AB+4 SET LWA
  3994. RAD AB+3
  3995. STD IN+1
  3996. SHN -14
  3997. RAD AB+2
  3998. STD IN
  3999. RJM MBD MOVE BUFFER DOWN
  4000. MVEA LDC ** RESET IN
  4001. STD IN+1
  4002. SHN -14
  4003. STD IN
  4004. LDM KBUF
  4005. LMN 1RC
  4006. ZJN MVE8 IF *COPY*
  4007. LDD MA
  4008. CWD AB SET MOVE AND FIRST ADDRESSES
  4009. CRD T2
  4010. RJM MBD MOVE BUFFER DOWN
  4011. MVE8 LDN ZERL CLEAR INSERT *8* AND *9*
  4012. CRM CFCB,ON
  4013. RJM SIP STORE IN POINTER
  4014. JMP RET RETURN
  4015.  
  4016. MVEB DATA C*DATA OVERFLOW.*
  4017. M. SPACE 4,8
  4018. *** M.CCC-CCC
  4019. *
  4020. * MERGE CHARACTERS *CCC-CCC* WITH
  4021. * REMAINDER OF FOLLOWING LINE.
  4022.  
  4023.  
  4024. MRG ENTRY MRL
  4025. N. SPACE 4,8
  4026. *** N.CCC-CCC
  4027. *
  4028. * MERGE CHARACTERS EXCEPT TABBED AREA.
  4029.  
  4030.  
  4031. MRN ENTRY MRL
  4032. P. SPACE 4,10
  4033. *** P.CCC-CCC
  4034. *
  4035. * ENTER CHARACTERS *CCC-CCC* IN BUFFER. *CCC-CCC*
  4036. * MAY CONSIST OF UP TO 96 CHARACTERS.
  4037.  
  4038.  
  4039. ELN ENTRY
  4040. RJM ELB ENTER LINE IN BUFFER
  4041. LDM DBFB
  4042. LMC SRSF
  4043. ADD LL
  4044. NJN ELN1 IF NOT END OF BUFFER ON RIGHT SCREEN
  4045. LDD IF
  4046. ADD HF
  4047. NJN ELN1 IF NOT ROLLING W/O INSERT POINTER
  4048. STM DBFD
  4049. AOD KD INHIBIT PRIORITY LINE USAGE
  4050. ELN1 LDN 2
  4051. LJM RET1 RETURN TO SAVE *P.*
  4052. ELB SPACE 4,20
  4053. ** ELB - ENTER LINE IN BUFFER.
  4054. *
  4055. * ENTRY (CA) = CHARACTER ADDRESS.
  4056. * (IF) = INSERT FLAG.
  4057. * (IP - IP+1) = INSERT ADDRESS.
  4058. *
  4059. * USES T1 - T7, CM - CM+4, BUF - BUF+50.
  4060. *
  4061. * CALLS MBU.
  4062.  
  4063.  
  4064. ELB SUBR ENTRY/EXIT
  4065. RJM PKL PACK LINE INTO BUF
  4066. LDD IN SET INPUT ADDRESS
  4067. STD T2
  4068. LDD IN+1
  4069. STD T3
  4070. RJM CRB CHECK ROOM IN BUFFER
  4071. LDD IF
  4072. ZJN ELB1 IF NO INSERT
  4073.  
  4074. * PROCESS INSERTED LINE.
  4075.  
  4076. LDD IP SET INSERT ADDRESS
  4077. STD T2
  4078. LDD IP+1
  4079. STD T3
  4080. RJM MBU MOVE BUFFER UP
  4081. LDD T7 ADVANCE INSERT ADDRESS
  4082. RAD IP+1
  4083. SHN -14
  4084. RAD IP
  4085.  
  4086. * STORE LINE IN CM.
  4087.  
  4088. ELB1 LDD T2 STORE LINE
  4089. SHN 6
  4090. ADD RA
  4091. SHN 6
  4092. ADD T3
  4093. CWM BUF,T7
  4094. LDD T7 ADVANCE IN
  4095. RAD IN+1
  4096. SHN -14
  4097. RAD IN
  4098. RJM SIP SET IN POINTER
  4099. LJM ELBX RETURN
  4100. CRB SPACE 4,10
  4101. ** CRB - CHECK ROOM IN BUFFER.
  4102. *
  4103. * ENTRY (IN - IN+1) = LWA+1 OF DATA IN BUFFER.
  4104. * (LM - LM+1) = LIMIT ADDRESS.
  4105. * (T7) = LENGTH OF NEW LINE OR BLOCK.
  4106. *
  4107. * ERROR TO *ERR1* IF INSUFFICIENT ROOM IN BUFFER.
  4108.  
  4109.  
  4110. CRB SUBR ENTRY/EXIT
  4111. LDD IN
  4112. SBD LM
  4113. SHN 14
  4114. ADD IN+1
  4115. SBD LM+1 COMPLEMENT OF WORDS AVAILABLE
  4116. ADD T7 WORDS NEEDED
  4117. MJN CRBX IF ROOM FOR DATA
  4118. LDC MVEB *DATA OVERFLOW.*
  4119. JMP ERR1 ERROR EXIT
  4120. MBU SPACE 4,10
  4121. ** MBU - MOVE BUFFER UP.
  4122. *
  4123. * ENTRY (T2 - T3) = FWA TO MOVE.
  4124. * (IN - IN+1) = LWA+1 TO MOVE.
  4125. * (T7) = DISTANCE TO MOVE.
  4126. *
  4127. * USES T1, T4, BUFM - BUFM+240.
  4128.  
  4129.  
  4130. MBU SUBR ENTRY/EXIT
  4131. RJM CRB CHECK ROOM IN BUFFER
  4132. LDD IN COMPUTE MOVE WORD COUNT
  4133. SBD T2
  4134. SHN 14
  4135. ADD IN+1
  4136. SBD T3
  4137. SHN 13D SET BLOCK COUNT
  4138. STD T1
  4139. SHN -13D SET ODD SIZE
  4140. STD T4
  4141. ZJN MBU2 IF NO ODD BLOCK
  4142.  
  4143. * MOVE SHORT BLOCK.
  4144.  
  4145. LDD IN READ SHORT BLOCK
  4146. SHN 6
  4147. ADD RA
  4148. SHN 6
  4149. ADD IN+1
  4150. SBD T4
  4151. MBU1 CRM BUFM,T4
  4152. SBD T4 STORE ODD BLOCK
  4153. ADD T7
  4154. CWM BUFM,T4
  4155. MBU2 SOD T1
  4156. MJN MBUX IF NO FULL BLOCKS
  4157. LDN 40
  4158. STD T4 SET FULL BLOCK SIZE
  4159.  
  4160. * MOVE FULL BLOCKS.
  4161.  
  4162. LDD T2 READ BLOCK
  4163. SHN 6
  4164. ADD RA
  4165. SHN 1
  4166. ADD T1
  4167. SHN 5
  4168. ADD T3
  4169. UJN MBU1 MOVE BLOCK
  4170. COMMAND (DISPLAY, TAB, DUP AND SCAN CONTROL.)
  4171. DFL. SPACE 4,10
  4172. *** DFL.
  4173. *
  4174. * START DISPLAY AT FIRST LINE OF FILE AND HOLD.
  4175.  
  4176.  
  4177. DSF ENTRY
  4178. LDN FT SET DISPLAY ADDRESS
  4179. RJM SDS
  4180. LDN 1 SET HOLD FLAG
  4181. STD HF
  4182. JMP RET RETURN
  4183. DLL. SPACE 4,15
  4184. *** DLL.
  4185. *
  4186. * DISPLAY LAST PART OF FILE.
  4187.  
  4188.  
  4189. DSL ENTRY
  4190. LDD IN SET END OF FILE ADDRESS
  4191. STD T2
  4192. LDD IN+1
  4193. STD T3
  4194. LCN 18D SEARCH FILE BACKWARDS
  4195. RJM SFL
  4196. LDD T2 SET DISPLAY
  4197. STD OT
  4198. LDD T3
  4199. STD OT+1
  4200. JMP RET RETURN
  4201. DS,. SPACE 4,25
  4202. *** DS,NNNNNN.
  4203. *
  4204. * START DISPLAY AT LINE *NNNNNN* OF FILE.
  4205. DS, SPACE 4,20
  4206. *** DS,
  4207. *
  4208. * COUNT THE NUMBER OF LINES FROM THE START OF THE
  4209. * DISPLAY UP TO THE INSERT MARK OR END OF FILE.
  4210. * ENTER RESULT OF COUNT AFTER THE *DS,* IN THE
  4211. * KEYBOARD BUFFER.
  4212.  
  4213.  
  4214. DSC ENTRY
  4215. LDN ZERL SET COUNT TO ZERO
  4216. CRD AB
  4217. LDN IP SET END OF BUFFER
  4218. STD T7
  4219. LDD IF CHECK INSERT FLAG
  4220. NJN DSC1 IF INSERT SET
  4221. LDN IN SET END OF BUFFER
  4222. STD T7
  4223. DSC1 LDD CA CHECK KEYBOARD ENTRY
  4224. ADC -KBUF
  4225. LMD KI
  4226. ZJN DSC3 IF COUNT TO CURRENT LINE
  4227. LDN IN
  4228. STD T7
  4229. LDD CA
  4230. RJM ADD ASSEMBLE DIGITS
  4231. STD AB
  4232. SBN 1R.
  4233. ZJN DSC2 IF *.*
  4234. JMP ERR FORMAT ERROR
  4235.  
  4236. DSC2 LDD AB+3 CHECK COUNT
  4237. ADD AB+4
  4238. NJN DSC3 IF NOT FIRST LINE
  4239. LJM DSF DISPLAY FIRST LINE
  4240.  
  4241. DSC3 LDN 0 CLEAR COUNT
  4242. STD T4
  4243. STD T5
  4244. LDD FT SET START OF BUFFER
  4245. STD T2
  4246. LDD FT+1
  4247. STD T3
  4248. LDI T7 STORE BUFFER CHECK
  4249. SHN 6
  4250. ADD RA
  4251. SHN 6
  4252. ADM 1,T7
  4253. STM DSCA+1
  4254. SHN -14
  4255. LMC LMCI
  4256. STM DSCA
  4257.  
  4258. * SEARCH BUFFER AND COUNT LINES.
  4259.  
  4260. DSC4 LDD T2 READ BUFFER
  4261. SHN 6
  4262. ADD RA
  4263. SHN 6
  4264. ADD T3
  4265. CRD CM
  4266. DSCA LMC **
  4267. ZJN DSC5 IF END OF BUFFER
  4268. AOD T3 ADVANCE INDEX
  4269. SHN -14
  4270. RAD T2
  4271. LDD CM+4
  4272. NJN DSC4 IF NOT END OF LINE
  4273.  
  4274. * PROCESS END OF LINE.
  4275.  
  4276. AOD T5 ADVANCE LINE COUNT
  4277. SHN -14
  4278. RAD T4
  4279. LMD AB+3
  4280. NJN DSC4 IF NOT END OF COUNT
  4281. LDD T5
  4282. LMD AB+4
  4283. NJN DSC4 IF NOT END OF COUNT
  4284.  
  4285. * PROCESS END OF COUNT OR END OF BUFFER.
  4286.  
  4287. DSC5 LDN 0 CONVERT COUNT TO DECIMAL
  4288. STD T1
  4289. DSC6 LDN 0 CLEAR BUFFER
  4290. STM BUFM,T1
  4291. AOD T1
  4292. LMN 6
  4293. NJN DSC6 IF BUFFER NOT COMPLETELY CLEARED
  4294. STD T1
  4295. DSC7 LDD T4
  4296. SBM DSCB,T1
  4297. SHN 14
  4298. ADD T5
  4299. SBM DSCC,T1
  4300. MJN DSC8 IF NO POWER OF TEN THIS DIGIT
  4301. STD T5
  4302. SHN -14
  4303. STD T4
  4304. AOM BUFM,T1 ADVANCE TEN-S COUNT
  4305. UJN DSC7 LOOP
  4306.  
  4307. DSC8 AOD T1 ADVANCE INDEX
  4308. LMN 6
  4309. NJN DSC7 IF NOT 6 DIGITS LOOP
  4310. STD T1
  4311.  
  4312. * ASSEMBLE COUNT.
  4313.  
  4314. LDD AB CHECK TYPE OF CALL
  4315. ZJN DSC9 IF COUNT TO LINE
  4316. LDD T2 SET DISPLAY
  4317. STD OT
  4318. LDD T3
  4319. STD OT+1
  4320. JMP RET RETURN
  4321.  
  4322. DSC9 LDM BUFM,T1 SUPPRESS LEADING ZEROS
  4323. NJN DSC10 IF NOT LEADING ZERO
  4324. AOD T1
  4325. LMN 5
  4326. NJN DSC9 IF WORD NOT COMPLETE LOOP
  4327. DSC10 LDM BUFM,T1 CONVERT TO DISPLAY CODE
  4328. ADN 1R0
  4329. STM KBUF,KI
  4330. AOD KI
  4331. AOD T1
  4332. LMN 6
  4333. NJN DSC10 IF NOT END OF NUMBER LOOP
  4334. LDN 1R.
  4335. STM KBUF,KI
  4336. AOD KI
  4337. JMP KBIX RETURN
  4338.  
  4339. DSCB CON 100000D/1S12
  4340. CON 10000D/1S12
  4341. CON 1000D/1S12
  4342. CON 100D/1S12
  4343. CON 10D/1S12
  4344. CON 1D/1S12
  4345.  
  4346. DSCC CON 100000D-100000D/1S12*1S12
  4347. CON 10000D-10000D/1S12*1S12
  4348. CON 1000D
  4349. CON 100D
  4350. CON 10D
  4351. CON 1D
  4352. TAB SPACE 4,20
  4353. *** TAB,X,Y,...,Z.
  4354. *
  4355. * SET TABS TO COLUMNS X, Y, Z. IF X = 0, CLEAR TABS.
  4356. *
  4357. * DEFAULT TABS ARE - 11, 18, 30, 40, 50, 60, 73, 80.
  4358.  
  4359.  
  4360. TAB ENTRY
  4361. LDC 5777 SET TAB BUFFER
  4362. STM TABA
  4363. LMC 7777
  4364. STM TABB
  4365. LDD CA
  4366. TAB1 RJM ADD ASSEMBLE DIGITS
  4367. SBN 1R,
  4368. ZJN TAB3 IF *,*
  4369. SBN 1R.-1R,
  4370. ZJN TAB3 IF *.*
  4371. TAB2 JMP ERR FORMAT ERROR
  4372.  
  4373. TAB3 LDD AB+4 CHECK NUMBER
  4374. NJN TAB5 IF NON-ZERO
  4375. STD T2 CLEAR TABS
  4376. TAB4 LDM DBUF,T2
  4377. LPC 5777
  4378. TABA EQU *-1
  4379. STM DBUF,T2
  4380. AOD T2 CHECK FOR END OF KEYBOARD BUFFER
  4381. ADC -KBUFL
  4382. MJN TAB4 IF NOT END OF KEYBOARD BUFFER
  4383. UJN TAB6 CHECK SEPARATOR
  4384.  
  4385. TAB5 ADC -KBUFL CHECK FOR LEGAL COLUMN
  4386. PJN TAB2 IF BEYOND LAST CHARACTER ADDRESS
  4387. AOD AB+4 SET TAB
  4388. LDM DBUF,AB+4
  4389. LMC 2000
  4390. TABB EQU *-1
  4391. STM DBUF,AB+4
  4392. TAB6 LDI T1 CHECK SEPARATOR
  4393. LMN 1R.
  4394. ZJN TAB7 IF *.*
  4395. LMN 1R,&1R. CHECK FOR COMMA
  4396. NJN TAB2 IF NOT VALID SEPARATOR
  4397. AOD T1 ADVANCE
  4398. LJM TAB1 LOOP
  4399.  
  4400. TAB7 JMP RET RETURN
  4401. SCAN, SPACE 4,20
  4402. *** SCAN,X,Y,...,Z.
  4403. *
  4404. * SET WORD SCAN TO X, Y, Z. IF X = 0, CLEAR SCAN.
  4405.  
  4406.  
  4407. SCN ENTRY
  4408. LDN 0 CLEAR TABLE INDEX
  4409. STD T6
  4410. STD SF CLEAR SCAN FLAG
  4411. STD SC CLEAR SCAN NUMBER
  4412. LDD CA
  4413. SCN1 RJM ADD ASSEMBLE DIGITS
  4414. SBN 1R,
  4415. ZJN SCN3 IF *,*
  4416. SBN 1R.-1R,
  4417. ZJN SCN3 IF *.*
  4418. SCN2 LJM ERR FORMAT ERROR
  4419.  
  4420. SCN3 LDD AB+4 CHECK NUMBER
  4421. NJN SCN5 IF NON-ZERO
  4422. STD T2
  4423. SCN4 LDN 0 CLEAR ALL SCANS
  4424. STM TSCN,T2
  4425. AOD T2
  4426. LMN 10
  4427. NJN SCN4 IF ALL SCANS NOT CLEARED
  4428. UJN SCN6 CHECK SEPARATOR
  4429.  
  4430. SCN5 STM TSCN,T6 SET SCAN NUMBER
  4431. AOD T6 ADVANCE SCAN TABLE
  4432. LMN 7
  4433. ZJN SCN2 IF TOO MANY SCANS
  4434. LDN 1 SET SCAN FLAG
  4435. STD SF
  4436. SCN6 LDI T1 CHECK SEPARATOR
  4437. LMN 1R.
  4438. ZJN SCN7 IF *.*
  4439. AOD T1 ADVANCE
  4440. LJM SCN1 LOOP
  4441.  
  4442. SCN7 STM TSCN,T6 SET END OF TABLE
  4443. STD SI CLEAR SCAN INDEX
  4444. JMP RET RETURN
  4445. COMMAND (LINE SEARCH COMMANDS.)
  4446. F. SPACE 4,8
  4447. *** F.CCC-CCC
  4448. *
  4449. * SEARCH FOR MATCHING FIELD IN LINE. SEARCH IS END AROUND.
  4450.  
  4451. SFM ENTRY SML
  4452. S. SPACE 4,8
  4453. *** S.CCC-CCC
  4454. *
  4455. * STARTING WITH THE FIRST LINE DISPLAYED, SEARCH
  4456. * FOR A LINE BEGINNING WITH THE CHARACTERS *CCC-CCC*.
  4457. *
  4458. * SEARCH IS END AROUND.
  4459.  
  4460.  
  4461. SML ENTRY
  4462. LDD OT+1 SET LINE ADDRESS
  4463. STD T7
  4464. STD AB+1
  4465. LDD OT
  4466. STD T6
  4467. STD AB
  4468. LCN 0 SET NO SEARCH
  4469. STD T4
  4470. LDN 2 SET CHARACTER INDEX
  4471. STD T3
  4472. LDD T7 CHECK ADDRESS
  4473. LMD IN+1
  4474. NJN SML3 IF NOT END OF BUFFER
  4475. LDD T6
  4476. LMD IN
  4477. NJN SML3 IF NOT END OF BUFFER
  4478. LJM ERR MESSAGE = *FORMAT ERROR.*
  4479.  
  4480. SML1 LDD T7 CHECK ADDRESS
  4481. LMD IN+1
  4482. NJN SML2 IF NOT END OF BUFFER
  4483. LDD T6
  4484. LMD IN
  4485. NJN SML2 IF NOT END OF BUFFER
  4486. LDD FT RESET ADDRESS
  4487. STD T6
  4488. STD AB
  4489. LDD FT+1
  4490. STD T7
  4491. STD AB+1
  4492. SML2 LDD T7
  4493. LMD OT+1
  4494. NJN SML3 IF NOT BEGINNING OF BUFFER
  4495. LDD T6
  4496. LMD OT
  4497. NJN SML3 IF NOT BEGINNING OF BUFFER
  4498. LDC =C*LINE NOT FOUND.*
  4499. LJM ERR1 RETURN
  4500.  
  4501. SML3 LDD T6 READ WORD
  4502. SHN 6
  4503. ADD RA
  4504. SHN 6
  4505. ADD T7
  4506. CRD CM
  4507. AOD T7 ADVANCE ADDRESS
  4508. SHN -14
  4509. RAD T6
  4510. LDD T4
  4511. ZJN SML6 IF SEARCH IN PROGRESS
  4512. SML4 SOD T4 COUNT WORD
  4513. LDD CM+4
  4514. NJN SML5 IF NOT END OF LINE
  4515. LDD SC SET SEARCH FLAG
  4516. STD T4
  4517. LDN 2 RESET CHARACTER ADDRESS
  4518. STD T3
  4519. LDD T6 SET NEXT LINE ADDRESS
  4520. STD AB
  4521. LDD T7
  4522. STD AB+1
  4523. SML5 LJM SML1 LOOP
  4524.  
  4525. SML6 LDN CM SET BYTE ADDRESS
  4526. STD T2
  4527. SML7 LDM KBUF,T3 CHECK UPPER
  4528. ZJN SML8 IF NO COMPARISON NEEDED
  4529. SHN 6
  4530. LMI T2
  4531. SCN 77
  4532. NJN SML4 IF NO MATCH
  4533. SML8 AOD T3 ADVANCE CHARACTER
  4534. LMD KI
  4535. ZJN SML10 IF COMPARE COMPLETE
  4536. LDM KBUF,T3 CHECK LOWER
  4537. ZJN SML9 IF NO COMPARISON NEEDED
  4538. LMI T2
  4539. LPN 77
  4540. NJN SML4 IF NO MATCH
  4541. SML9 AOD T3 ADVANCE CHARACTER
  4542. LMD KI
  4543. ZJN SML10 IF COMPARE COMPLETE
  4544. AOD T2 ADVANCE BYTE
  4545. LMN CM+5
  4546. NJN SML7 IF NOT AT END OF WORD LOOP
  4547. LDD CM+4
  4548. NJN SML5 IF NOT END OF LINE
  4549. LJM SML4 PROCESS NEXT LINE
  4550.  
  4551. SML10 LDD AB SET LINE ADDRESS
  4552. STD OT
  4553. LDD AB+1
  4554. STD OT+1
  4555. LDN 0 CLEAR ERROR FLAG
  4556. STD KM
  4557. LDN 1 SET HOLD
  4558. STD HF
  4559. JMP KBIX RETURN
  4560. SFR SPACE 4,20
  4561. ** SFR - SEARCH FOR RECORD.
  4562. *
  4563. * USES IN, IN+1, KM, AB - AB+4, CM - CM+4, T1 - T1+4.
  4564. *
  4565. * CALLS CIO, SPN.
  4566.  
  4567.  
  4568. SFR ENTRY
  4569. LDD RA READ FET
  4570. SHN 6
  4571. ADN FET
  4572. CRD T1
  4573. ADN 2 READ IN
  4574. CRD AB
  4575. ADN 1 SET IN = OUT
  4576. CRD CM
  4577. SBN 1
  4578. CWD CM
  4579. ADC CBUF-FET-2 READ RECORD NAME
  4580. CRD CM
  4581. LDD AB+3 SET IN POINTER
  4582. STD IN
  4583. LDD AB+4
  4584. STD IN+1
  4585. LDD T1+4 CHECK STATUS
  4586. LPN 30
  4587. LMN 30
  4588. NJN SFR1 IF NOT EOF
  4589. LDC =C*RECORD NOT FOUND.*
  4590. STD KM
  4591. LJM TIOX RETURN
  4592.  
  4593. SFR1 LDD CM
  4594. LMC 2R.P
  4595. NJN SFR1.1 IF NOT *.PROC,*.
  4596. LDD CM+1
  4597. LMC 2RRO
  4598. NJN SFR1.1 IF NOT *.PROC,*
  4599. LDD CM+2
  4600. LMC 2RC,
  4601. NJN SFR1.1 IF NOT *.PROC,*
  4602. RJM SPN SET PROCEDURE NAME AS RECORD NAME
  4603. SFR1.1 LDD CM
  4604. LMC 7700
  4605. NJN SFR2 IF NO 7700 TABLE
  4606. LDD RA READ RECORD NAME
  4607. SHN 6
  4608. ADC CBUF+1
  4609. CRD CM
  4610. SFR2 LDN CM+4 CLEAR TRAILING SPACE
  4611. STD T1
  4612. SFR2.1 LDI T1
  4613. LPN 77
  4614. LMN 1R
  4615. NJN SFR2.2 IF NOT A SPACE
  4616. LDI T1
  4617. SCN 77
  4618. STI T1
  4619. SFR2.2 SOD T1
  4620. LMN CM-1
  4621. NJN SFR2.1 IF MORE BYTES
  4622. AOD T1 RESTART AT CM
  4623. SFR2.3 LDI T1 CHECK THE RECORD NAME
  4624. LMM SFRB-CM,T1
  4625. ZJN SFR4 IF MATCH
  4626. LDD KM CHECK MESSAGE
  4627. ZJN SFR3 IF GET ABORTED
  4628. LDN 12 READ NEXT RECORD
  4629. RJM CIO
  4630. LDN 7 SEARCHING FOR RECORD
  4631. RJM CIO
  4632. SFR3 LJM TIOX RETURN
  4633.  
  4634. SFR4 AOD T1
  4635. LMN CM+5
  4636. NJN SFR2.3 IF NOT THE LAST BYTE
  4637. LDD RA CHECK RECORD LENGTH
  4638. SHN 6
  4639. ADN FET
  4640. CRD CM
  4641. LDD CM+4
  4642. SHN -3
  4643. LMN 1
  4644. STM CRSA SET/CLEAR RECORD READ NOT TOO LONG FLAG
  4645. ZJN SFR5 IF RECORD TOO LONG
  4646. LJM PLB CLEAR KEYBOARD
  4647.  
  4648. SFR5 LDC ERRE *RECORD TOO LONG*
  4649. STD KM
  4650. JMP RET RETURN
  4651. SPN SPACE 4,10
  4652. ** SPN - SET PROCEDURE NAME AS RECORD NAME.
  4653. *
  4654. * *SPN* EXTRACTS THE PROCEDURE NAME FROM THE *.PROC,*
  4655. * HEADER AND RETURNS IT AS THE RECORD NAME.
  4656. *
  4657. * ENTRY (CM - CM+4) = FIRST WORD OF PROC HEADER.
  4658. *
  4659. * EXIT (CM - CM+4) = RECORD NAME (ZERO FILLED).
  4660. *
  4661. * USES T1, AB - AB+4, CM - CM+4.
  4662.  
  4663.  
  4664. SPN SUBR
  4665.  
  4666. * READ *.PROC,* STATEMENT FOR PROCEDURE NAME.
  4667.  
  4668. LDD RA
  4669. SHN 6
  4670. ADC CBUF+1 SECOND HALF OF PROCEDURE NAME
  4671. CRD AB
  4672. LDD CM+3
  4673. STD CM+0
  4674. LDD CM+4
  4675. STD CM+1
  4676. LDD AB+0
  4677. STD CM+2
  4678. LDD AB+1
  4679. STD CM+3
  4680.  
  4681. * TERMINATE RECORD NAME AT FIRST DELIMITER.
  4682.  
  4683. LDN CM
  4684. STD T1
  4685. SPN1 LDI T1
  4686. SHN -6
  4687. ZJN SPN3 IF DELIMITER IN UPPER
  4688. SBN 1R9+1
  4689. PJN SPN2 IF DELIMITER IN UPPER
  4690. LDI T1
  4691. LPN 77
  4692. ZJN SPN4 IF DELIMITER IN LOWER
  4693. SBN 1R9+1
  4694. PJN SPN4 IF DELIMITER IN LOWER
  4695. AOD T1
  4696. LMN CM+4
  4697. NJN SPN1 IF DELIMITER SEARCH NOT COMPLETE
  4698. SPN2 LDN 0
  4699. SPN3 STI T1
  4700. AOD T1 ZERO FILL RECORD NAME TO WORD BOUNDARY
  4701. LMN CM+4+1
  4702. NJN SPN2 IF ZERO FILL NOT COMPLETE
  4703. UJP SPNX RETURN
  4704.  
  4705. SPN4 LDI T1 CLEAR DELIMITER IN LOWER
  4706. SCN 77
  4707. UJN SPN3 CLEAR DELIMITER, ZERO FILL RECORD NAME
  4708. COMMAND (SEQUENTIAL RECORD SEARCH COMMANDS.)
  4709. GET, SPACE 4,20
  4710. *** GET,FFFFFFF.CCCCCCC.
  4711. *
  4712. * GET.CCCCCCC.
  4713. *
  4714. * SEARCH FILE *FFFFFFF* FOR RECORD *CCCCCCC*. IF
  4715. * *FFFFFFF* IS MISSING, PREVIOUS FILE NAME WILL BE
  4716. * USED.
  4717.  
  4718.  
  4719. GET ENTRY
  4720. RJM SFN SET FILE NAME
  4721. AOD CA ADVANCE CHARACTER
  4722.  
  4723. GET1 ENTRY
  4724. RJM ASN ASSEMBLE RECORD NAME
  4725. LMN 1R.
  4726. ZJN GET3 IF *.*
  4727. GET2 JMP ERR FORMAT ERROR
  4728.  
  4729. GET3 LDD AB
  4730. ZJN GET2 IF NO RECORD NAME
  4731. LDN 12 READ
  4732. RJM CIO
  4733. LDN 7 DUMMY
  4734. RJM CIO
  4735. LDC SFRA MESSAGE = *SEARCH / *CCCCCCC* *
  4736. STD KM
  4737. LDD MA SET RECORD NAME
  4738. CWD AB
  4739. CRM SFRB,ON
  4740. LDD RA SET IN = OUT
  4741. SHN 6
  4742. ADN FET+3
  4743. CRD CM
  4744. SBN 1
  4745. CWD CM
  4746. LDN 1 SET HOLD FLAG
  4747. STD HF
  4748. LDN FT SET DISPLAY = LINE 0
  4749. RJM SDS
  4750. LDN 0 CLEAR SCAN
  4751. STD SC
  4752. STD SI
  4753. JMP CIF CLEAR INSERT FLAG
  4754. COMMAND (RANDOM RECORD SEARCH COMMANDS.)
  4755. GETR, SPACE 4,20
  4756. *** GETR,FFFFFFF.CCCCCCC.
  4757. *
  4758. * GETR.CCCCCCC.
  4759. *
  4760. * READ RANDOM FILE *FFFFFFF* FOR TEXT OR .PROC RECORD
  4761. * *CCCCCCC*. IF *FFFFFFF* IS MISSING, PREVIOUS
  4762. * FILE NAME WILL BE USED.
  4763. GTR, SPACE 4
  4764. *** GTR,FFFFFFF.CCCCCCC.
  4765. * GTR.CCCCCCC.
  4766. * READ RANDOM FILE *FFFFFFF* FOR RECORD *CCCCCCC*.
  4767. * IF *FFFFFFF* IS MISSING, PREVIOUS FILE NAME WILL
  4768. * BE USED.
  4769.  
  4770.  
  4771. GTR ENTRY
  4772. RJM SFN SET FILE NAME
  4773. AOD CA ADVANCE CHARACTER
  4774.  
  4775. GTR1 ENTRY
  4776. RJM ASN ASSEMBLE RECORD NAME
  4777. LMN 1R.
  4778. ZJN GTR3 IF *.*
  4779. GTR2 JMP ERR FORMAT ERROR
  4780.  
  4781. GTR3 LDD AB
  4782. ZJN GTR2 IF NO RECORD NAME
  4783. RJM RRI READ RANDOM INDEX
  4784. LDN 11 READ RANDOM RECORD
  4785. RJM CIO
  4786. LDM KBUF+1 SET TEXT RECORD ONLY FLAG
  4787. LMN 1RT
  4788. STM TIOE
  4789. LDC =C*SEARCH.*
  4790.  
  4791. * ENTRY FROM *LST*.
  4792.  
  4793. GTR4 STD KM SET KEYBOARD MESSAGE
  4794. LDD MA SET RECORD NAME
  4795. CWD AB
  4796. CRM SFRB,ON
  4797. LDD RA SET IN = OUT
  4798. SHN 6
  4799. ADN FET+3
  4800. CRD CM
  4801. SBN 1
  4802. CWD CM
  4803. LDN 1 SET HOLD FLAG
  4804. STD HF
  4805. LDN FT SET DISPLAY = LINE 0
  4806. RJM SDS SET DISPLAY
  4807. LDN 0 CLEAR SCAN
  4808. STD SC
  4809. STD SI
  4810. JMP CIF CLEAR INSERT FLAG
  4811. LIST. SPACE 4,20
  4812. *** LIST,FFFFFFF.
  4813. *
  4814. * LIST.
  4815. *
  4816. * LIST THE DIRECTORY OF FILE NAME *FFFFFFF*. IF
  4817. * *FFFFFFF* IS MISSING, PREVIOUS FILE NAME WILL
  4818. * BE USED.
  4819.  
  4820.  
  4821. LST ENTRY
  4822. RJM SFN SET FILE NAME
  4823. AOD CA ADVANCE CHARACTER
  4824.  
  4825. LST1 ENTRY
  4826. RJM RRI READ RANDOM INDEX
  4827. LDN 15 READ RANDOM RECORD
  4828. RJM CIO
  4829. LDC =C*LIST.*
  4830. JMP GTR4 RETURN
  4831.  
  4832. * LIST FILE INDEX.
  4833.  
  4834. LST2 ENTRY
  4835. RJM CIR CHECK INDEX RECORD
  4836. LDC 2R
  4837. STD AB
  4838. STD AB+3
  4839. STD AB+4
  4840. LST3 LDD RA READ ENTRY
  4841. SHN 6
  4842. ADD T5
  4843. ADD T7
  4844. SBN 1
  4845. CRD CM READ ENTRY
  4846. LDD CM+4
  4847. RAD CM+4
  4848. LDM LSTA,CM+4 SET RECORD TYPE
  4849. STD AB+1
  4850. LDM LSTA+1,CM+4
  4851. STD AB+2
  4852. LDN 0
  4853. STD CM+4
  4854. LDD CM+3
  4855. SCN 77
  4856. STD CM+3
  4857. ADD CM CHECK FOR ZERO RECORD NAME
  4858. ADD CM+1
  4859. ADD CM+2
  4860. ZJN LST6 IF ZERO RECORD NAME
  4861. LST4 LDD RA STORE NAME
  4862. SHN 6
  4863. ADD T5
  4864. ADD T7
  4865. CWD CM
  4866. SBN 1 STORE RECORD TYPE
  4867. CWD AB
  4868. LCN 2 DECREMENT INDEX
  4869. RAD T7
  4870. MJN LST5 IF END OF OPLD
  4871. LJM LST3 CONTINUE PROCESSING ENTRIES
  4872.  
  4873. * END OF LIST.
  4874.  
  4875. LST5 LDC CBUF SET MOVE ADDRESS
  4876. STD T3
  4877. SHN -14
  4878. STD T2
  4879. RJM MBD MOVE BUFFER DOWN
  4880. LJM PLB RETURN
  4881.  
  4882. LST6 LDC 3R(0) SUBSTITUTE FOR ZERO RECORD NAME
  4883. STD CM+1
  4884. SHN -6
  4885. STD CM
  4886. UJN LST4 STORE NAME
  4887.  
  4888. LSTA BSS 0
  4889. DATA 4HTEXT 0
  4890. DATA 4HPP 1
  4891. DATA 4HCOS 2
  4892. DATA 4HREL 3
  4893. DATA 4HOVL 4
  4894. DATA 4HULIB 5
  4895. DATA 4HOPL 6
  4896. DATA 4HOPLC 7
  4897. DATA 4HOPLD 8
  4898. DATA 4HABS 9
  4899. DATA 4HPPU 10
  4900. DATA 4H 11 (UNDEFINED RECORD TYPE)
  4901. DATA 4H 12 (UNDEFINED RECORD TYPE)
  4902. DATA 4H 13 (UNDEFINED RECORD TYPE)
  4903. DATA 4HCAP 14 CAPSULE
  4904. DATA 4H 15 (UNDEFINED RECORD TYPE)
  4905. DATA 4HPROC 16 PROCEDURE
  4906. CIR SPACE 4,20
  4907. ** CIR - CHECK INDEX RECORD.
  4908. *
  4909. * EXIT (CM - CM+4) = 7700 TABLE WORD.
  4910. * (AB - AB+4) = 7000 TABLE WORD.
  4911. * (T4 - T5) = ADDRESS OF FIRST ENTRY.
  4912. * (T7) = INDEX OF LAST ENTRY (2ND WORD).
  4913. * EXIT TO TIOX IF RECORD NOT FOUND.
  4914.  
  4915.  
  4916. CIR SUBR ENTRY/EXIT
  4917. RJM PDS PUSH DOWN STACK
  4918. LDD RA READ 7700 TABLE
  4919. SHN 6
  4920. ADC CBUF
  4921. CRD CM
  4922. ADD CM+1 READ 7000 TABLE
  4923. ADN 1
  4924. CRD AB
  4925. LDD CM
  4926. LMC 7700
  4927. ZJN CIR2 IF 7700 TABLE
  4928. CIR1 LDC =C*INDEX NOT FOUND.*
  4929. STD KM
  4930. LJM TIOX RETURN
  4931.  
  4932. CIR2 LDD AB
  4933. LMC 7000
  4934. NJN CIR1 IF NOT 7000 TABLE
  4935. LDD AB+3 CHECK LENGTH
  4936. NJN CIR1 IF INDEX TOO LONG
  4937. STD T4 SET START OF DISPLAY
  4938. LDC CBUF+2
  4939. ADD CM+1
  4940. STD T5
  4941. LDD IN CHECK LENGTH
  4942. SHN 14
  4943. LMD IN+1
  4944. SBD T5
  4945. SBD AB+4
  4946. MJN CIR1 IF INDEX TOO LONG
  4947. LDD AB+4 SET INDEX OF LAST ENTRY
  4948. SBN 1
  4949. STD T7
  4950. SBN 1
  4951. MJN CIR1 IF INDEX TOO SHORT
  4952. LJM CIRX RETURN
  4953. RRI SPACE 4,15
  4954. ** RRI - READ RANDOM INDEX.
  4955. *
  4956. * ENTRY (A) = CHACRACTER ADDRESS.
  4957. *
  4958. * EXIT TO *ERR* ON FILE NAME ERROR.
  4959. *
  4960. * CALLS CIO.
  4961.  
  4962.  
  4963. RRI SUBR ENTRY/EXIT
  4964. LDD FT SET IN = OUT = FIRST
  4965. STD IN
  4966. STD OT
  4967. LDD FT+1
  4968. STD IN+1
  4969. STD OT+1
  4970. LDN 3 SKIP TO END OF INFORMATION
  4971. RJM CIO
  4972. LDC 20640 SKIP BACKWARDS 2 RECORDS
  4973. STM TIOD+1
  4974. SHN -14
  4975. STM TIOD
  4976. LDN 5 SKIP BACKWARDS
  4977. RJM CIO
  4978. LDN 12 READ
  4979. RJM CIO
  4980. UJN RRIX RETURN
  4981. RRR SPACE 4,20
  4982. ** RRR - READ RANDOM RECORD.
  4983. *
  4984. * ENTRY (CM BUFFER) = RANDOM INDEX.
  4985. * (SFRB - SFRB+4) = NAME OF RECORD.
  4986. *
  4987. * USES T1 - T4, CM - CM+4, AB - AB+4.
  4988. *
  4989. * CALLS CIO, CIR, PDS.
  4990.  
  4991.  
  4992. RRR ENTRY
  4993. RJM CIR CHECK INDEX RECORD
  4994.  
  4995. * SEARCH BUFFER FOR RECORD.
  4996.  
  4997. RRR1 LDD RA READ ENTRY
  4998. SHN 6
  4999. ADD T5
  5000. ADD T7
  5001. SBN 1
  5002. CRD CM READ ENTRY
  5003. LDN CM COMPARE ENTRY
  5004. STD T1
  5005. RRR2 LDI T1
  5006. LMM SFRB-CM,T1
  5007. NJN RRR3 IF NO MATCH
  5008. AOD T1
  5009. LMN CM+4
  5010. NJN RRR2 IF NO MATCH LOOP
  5011. LDD T7 SET RECORD FOUND FLAG
  5012. STD T4
  5013. LDD CM+4
  5014. LMK TXRT
  5015. ZJN RRR5 IF TEXT RECORD
  5016. LMK PRRT&TXRT
  5017. ZJN RRR5 IF .PROC RECORD
  5018. RRR3 LCN 2
  5019. RAD T7
  5020. PJN RRR1 IF COMPARE NOT COMPLETE
  5021.  
  5022. * END OF SEARCH.
  5023.  
  5024. LDM TIOE CHECK IF NON-TEXT RECORD ALLOWED
  5025. NJN RRR4 IF ONLY TEXT ALLOWED
  5026. LDD T4
  5027. NJN RRR5 IF RECORD FOUND
  5028. RRR4 LDC =C*RECORD NOT FOUND.*
  5029. STD KM
  5030. LJM TIOX RETURN
  5031.  
  5032. * RECORD FOUND.
  5033.  
  5034. RRR5 LDD RA READ RANDOM ADDRESS
  5035. SHN 6
  5036. ADD T5
  5037. ADD T4
  5038. CRD CM
  5039. LDD RA SET RANDOM ADDRESS
  5040. SHN 6
  5041. ADN FET+6
  5042. CWD CM
  5043. SBN 3 SET IN = OUT
  5044. CRD CM
  5045. SBN 1
  5046. CWD CM
  5047. LDD FT SET IN = FIRST
  5048. STD IN
  5049. LDD FT+1
  5050. STD IN+1
  5051. LDN 12 READ RECORD
  5052. RJM CIO
  5053. LDN 1 DUMMY
  5054. RJM CIO
  5055. LJM PLB RETURN
  5056. COMMAND (REPLACE COMMANDS.)
  5057. RC, SPACE 4,20
  5058. *** RC,X,C.
  5059. *
  5060. * REPLACE CHARACTER *X* OF FOLLOWING LINE
  5061. * WITH CHARACTER *C*.
  5062.  
  5063.  
  5064. RPC ENTRY
  5065. RJM ADD ASSEMBLE CHARACTER NUMBER
  5066. LMN 1R,
  5067. ZJN RPC2 IF *,*
  5068. RPC1 JMP ERR FORMAT ERROR
  5069.  
  5070. RPC2 SOD AB+4 SAVE CHARACTER NUMBER
  5071. MJN RPC1 IF CHARACTER NUMBER ZERO
  5072. STD T7
  5073. ADC -KBUFL+2
  5074. PJN RPC1 IF OUT OF RANGE
  5075. AOD T1 SAVE CHARACTER ADDRESS
  5076. STD T6
  5077. LDD IF
  5078. ZJN RPC1 IF NO INSERT
  5079. LDC BUFM SET CHARACTER ADDRESS
  5080. STD CA
  5081. RJM RDL READ NEXT LINE
  5082. LDI T6 REPLACE CHARACTER
  5083. STM BUFM,T7
  5084. RJM RLB REPLACE LINE IN BUFFER
  5085. LDN 1 ADVANCE INSERT
  5086. RJM SIL
  5087. JMP KBIX RETURN
  5088. RM SPACE 4,25
  5089. *** RM/AAA-AAA/BBB-BBB/
  5090. *
  5091. * REPLACE CHARACTER STRING *AAA-AAA* FROM THE
  5092. * FOLLOWING LINE WITH CHARACTER STRING *BBB-BBB*.
  5093. * */* MAY BE ANY CHARACTER. DO NOT ADVANCE INSERT
  5094. * MARK.
  5095. RS SPACE 4,20
  5096. *** RS/AAA-AAA/BBB-BBB/
  5097. *
  5098. * REPLACE CHARACTER STRING *AAA-AAA* FROM THE
  5099. * FOLLOWING LINE WITH CHARACTER STRING *BBB-BBB*.
  5100. * */* MAY BE ANY CHARACTER.
  5101.  
  5102.  
  5103. RPS ENTRY
  5104. RJM CIL CHECK INSERT LINE
  5105. LDM KBUF+2 SET DELIMITER
  5106. STD T7
  5107. LDN 3 SET STARTING COLUMN
  5108. STD T2
  5109. LDN 0
  5110.  
  5111. * ENTRY FROM *RPN*.
  5112.  
  5113. RPS1 STD T3
  5114. STD T6
  5115.  
  5116. * SEARCH FOR MATCHING STRING.
  5117.  
  5118. RPS2 LDD T2 RESET INDEX
  5119. STD T1
  5120. RPS3 LMD KI
  5121. ZJN RPS4 IF END OF KEYBOARD STRING
  5122. LDM KBUF,T1
  5123. LMD T7
  5124. ZJN RPS5 IF DELIMITER FOUND
  5125. LDD T3
  5126. LMD LC
  5127. ZJN RPS4 IF END OF ORIGINAL LINE
  5128. LDM BUF+2,T3
  5129. LMM KBUF,T1
  5130. NJN RPS4 IF NO HIT
  5131. AOD T3
  5132. AOD T1
  5133. UJN RPS3 LOOP FOR NEXT CHARACTER
  5134.  
  5135. * COPY ONE CHARACTER ON NO HIT.
  5136.  
  5137. RPS4 LDD T6 CHECK FOR END OF LINE
  5138. LMD LC
  5139. ZJN RPS7 IF END OF LINE
  5140. LDM BUF+2,T6
  5141. STM BUFM+2,T6 COPY CHARACTER
  5142. AOD T6
  5143. STD T3
  5144. UJP RPS2 LOOP
  5145.  
  5146. * REPLACE CHARACTER STRING.
  5147.  
  5148. RPS5 AOD T1 CHECK FOR END OF KEYBOARD STRING
  5149. SBD KI
  5150. PJN RPS7 IF END OF STRING
  5151. LDM KBUF,T1
  5152. LMD T7
  5153. ZJN RPS10 IF DELIMITER FOUND
  5154. LMD T7
  5155. STM BUFM+2,T6 SET CHARACTER
  5156. AOD T6
  5157. ADC 2-KBUFL
  5158. MJN RPS5 IF NOT END OF BUFFER
  5159. LDM KBUF+1,T1
  5160. LMD T7
  5161. ZJN RPS12 IF END OF STRING
  5162. RPS6 LDC =C*LINE OVERFLOW.*
  5163. UJN RPS9 PROCESS ERROR
  5164.  
  5165. * PROCESS STRING NOT IN LINE.
  5166.  
  5167. RPS7 LDD KM CHECK MESSAGE
  5168. LMC ERRD
  5169. NJN RPS8 IF NOT *REPEAT ENTRY.*
  5170. LJM RPS15 ADVANCE INSERT
  5171.  
  5172. RPS8 LDC =C*NOT IN LINE.*
  5173. RPS9 LJM ERR1 PROCESS ERROR
  5174.  
  5175. * COPY REMAINDER OF FOLLOWING LINE.
  5176.  
  5177. RPS10 LDD T3 CHECK FOR END OF LINE
  5178. RPS11 LMD LC
  5179. RPS12 ZJN RPS14 IF END OF LINE
  5180. LDD T6
  5181. ADC 2-KBUFL
  5182. ZJN RPS6 IF PAST END OF BUFFER
  5183. LDM BUF+2,T3
  5184. STM BUFM+2,T6 SET NEXT CHARACTER
  5185. AOD T6
  5186. AOD T3
  5187. UJN RPS11 CONTINUE COPY
  5188.  
  5189. * BLANK FILL BUFFER.
  5190.  
  5191. RPS13 LDN 1R BLANK FILL *BUFM*
  5192. STM BUFM+1,T6
  5193. RPS14 AOD T6 ADVANCE INDEX
  5194. ADC 1-KBUFL
  5195. MJN RPS13 IF NOT END OF BUFFER
  5196.  
  5197. * ENTER LINE IN BUFFER.
  5198.  
  5199. LDC BUFM+2 SET CHARACTER ADDRESS
  5200. STD CA
  5201. RJM RLB REPLACE LINE IN BUFFER
  5202. LDM KBUF+1 CHECK FOR RM COMMAND
  5203. LMN 1RM
  5204. ZJN RPS16 IF *RM*
  5205. RPS15 LDN 1 ADVANCE INSERT
  5206. RJM SIL
  5207. RPS16 JMP RET RETURN
  5208. R, SPACE 4,20
  5209. *** R,X./AAA-AAA/BBB-BBB/
  5210. *
  5211. * REPLACE CHARACTER STRING AAA-AAA FROM THE
  5212. * FOLLOWING LINE STARTING WITH CHARACTER POSITION
  5213. * *X* WITH CHARACTER STRING BBB-BBB. */* MAY BE
  5214. * ANY CHARACTER.
  5215.  
  5216.  
  5217. RPN ENTRY
  5218. RJM CIL CHECK INSERT LINE
  5219. LDC KBUF+2 ASSEMBLE DIGITS
  5220. RJM ASD
  5221. STD T5
  5222. LDM 1,T1 SET DELIMITER
  5223. STD T7
  5224. LDD T1 SET STRING ADDRESS
  5225. ADC -KBUF+2
  5226. STD T2
  5227. SOD AB+4
  5228. MJN RPN1 IF NULL CHARACTER POSITION
  5229. ZJN RPN4 IF FIRST CHARACTER POSITION
  5230. ADC 1-KBUFL
  5231. MJN RPN2 IF POSITION WITHIN BUFFER
  5232. RPN1 JMP ERR FORMAT ERROR
  5233.  
  5234. RPN2 LDD AB+4 CHECK CHARACTER POSITION
  5235. SBD LC
  5236. MJN RPN3 IF WITHIN INSERT LINE
  5237. LJM RPS7 PROCESS AS *NOT IN LINE.*
  5238.  
  5239. RPN3 LDM BUF+2,T5 COPY LINE TO START OF SCAN
  5240. STM BUFM+2,T5
  5241. AOD T5 ADVANCE INDEX
  5242. LMD AB+4
  5243. NJN RPN3 IF NOT END OF COPY
  5244. LDD AB+4
  5245. RPN4 LJM RPS1 PROCESS STRING REPLACEMENT
  5246. ASD SPACE 4,10
  5247. ** ASD - ASSEMBLE DIGITS.
  5248. *
  5249. * ENTRY (A) = CHARACTER ADDRESS.
  5250. *
  5251. * EXIT (A) = 0.
  5252. * (AB - AB+4) = RIGHT JUSTIFIED ASSEMBLY.
  5253. *
  5254. * CALLS ADD.
  5255.  
  5256.  
  5257. ASD SUBR ENTRY/EXIT
  5258. RJM ADD ASSEMBLE DECIMAL DIGITS
  5259. LMN 1R.
  5260. ZJN ASDX IF *.* RETURN
  5261. JMP ERR FORMAT ERROR
  5262. CIL SPACE 4,10
  5263. ** CIL - CHECK INSERT LINE.
  5264. *
  5265. * ENTRY (IF) = INSERT FLAG.
  5266. *
  5267. * EXIT (BUF+2) = INSERT LINE.
  5268. *
  5269. * USES CA.
  5270. *
  5271. * CALLS RDL.
  5272.  
  5273.  
  5274. CIL1 LDC BUF+2 SET BUFFER ADDRESS
  5275. STD CA
  5276. RJM RDL READ INSERT LINE
  5277.  
  5278. CIL SUBR ENTRY/EXIT
  5279. LDD IF
  5280. NJN CIL1 IF INSERT FLAG SET
  5281. JMP ERR FORMAT ERROR
  5282. MBU SPACE 4,10
  5283. ** MBU - MOVE BUFFER UP.
  5284. *
  5285. * ENTRY (T2 - T3) = FWA TO MOVE.
  5286. * (IN - IN+1) = LWA+1 TO MOVE.
  5287. * (T7) = DISTANCE TO MOVE.
  5288. *
  5289. * USES T1, T4, BUFM - BUFM+240.
  5290.  
  5291.  
  5292. MBU SUBR ENTRY/EXIT
  5293. LDD IN COMPUTE MOVE WORD COUNT
  5294. SBD T2
  5295. SHN 14
  5296. ADD IN+1
  5297. SBD T3
  5298. SHN 13D SET BLOCK COUNT
  5299. STD T1
  5300. SHN -13D SET ODD SIZE
  5301. STD T4
  5302. ZJN MBU2 IF NO ODD BLOCK
  5303.  
  5304. * MOVE SHORT BLOCK.
  5305.  
  5306. LDD IN READ SHORT BLOCK
  5307. SHN 6
  5308. ADD RA
  5309. SHN 6
  5310. ADD IN+1
  5311. SBD T4
  5312. MBU1 CRM BUFM,T4
  5313. SBD T4 STORE ODD BLOCK
  5314. ADD T7
  5315. CWM BUFM,T4
  5316. MBU2 SOD T1
  5317. MJN MBUX IF NO FULL BLOCKS
  5318. LDN 40
  5319. STD T4 SET FULL BLOCK SIZE
  5320.  
  5321. * MOVE FULL BLOCKS.
  5322.  
  5323. LDD T2 READ BLOCK
  5324. SHN 6
  5325. ADD RA
  5326. SHN 1
  5327. ADD T1
  5328. SHN 5
  5329. ADD T3
  5330. UJN MBU1 MOVE BLOCK
  5331. RLB SPACE 4,20
  5332. ** RLB - REPLACE LINE IN CM BUFFER.
  5333. *
  5334. * ENTRY (CA) = CHARACTER ADDRESS.
  5335. * (IF) = INSERT FLAG.
  5336. * (IP - IP+1) = INSERT ADDRESS.
  5337. *
  5338. * USES T2 - T7, CM - CM+4, BUF - BUF+50.
  5339. *
  5340. * CALLS MBD, MBU, PKL, SFL, SIP.
  5341.  
  5342.  
  5343. RLB SUBR ENTRY/EXIT
  5344. RJM PKL PACK LINE INTO BUF
  5345. LDD T7 SET BUFFER LENGTH
  5346. STD T6
  5347. LDD IP SEARCH FOR END OF LINE
  5348. STD T2
  5349. LDD IP+1
  5350. STD T3
  5351. LDN 1
  5352. RJM SFL SEARCH FOR LINE
  5353. LDD T3 CALCULATE CURRENT LENGTH
  5354. STD T5
  5355. LDD T2
  5356. STD T4
  5357. SBD IP
  5358. SHN 14
  5359. ADD T3
  5360. SBD IP+1
  5361. SBD T6
  5362. MJN RLB1 IF LENGTH INCREASE
  5363. ZJN RLB2 IF SAME LENGTH
  5364.  
  5365. * MOVE BUFFER DOWN.
  5366.  
  5367. LDD IP+1 SET MOVE ADDRESS
  5368. ADD T6
  5369. STD T3
  5370. SHN -14
  5371. ADD IP
  5372. STD T2
  5373. RJM MBD MOVE BUFFER DOWN
  5374. UJN RLB2
  5375.  
  5376. * MOVE BUFFER UP.
  5377.  
  5378. RLB1 LMC 7777 SET WORD COUNT
  5379. STD T7
  5380. RJM MBU MOVE BUFFER UP
  5381. LDD T7 ADVANCE IN
  5382. RAD IN+1
  5383. SHN -14
  5384. RAD IN
  5385. LDD T7 ADVANCE DISPLAY LENGTH
  5386. RAD DL
  5387.  
  5388. * COPY LINE INTO CM BUFFER.
  5389.  
  5390. RLB2 LDD IP
  5391. SHN 6
  5392. ADD RA
  5393. SHN 6
  5394. ADD IP+1
  5395. CWM BUF,T6
  5396. RJM SIP SET IN POINTER
  5397. LJM RLBX RETURN
  5398. COMMAND (REWRITE RECORD IN PLACE.)
  5399. RWRITE SPACE 4
  5400. *** RWRITE.
  5401. *
  5402. * REWRITE RECORD ( MASS STORAGE ONLY )
  5403. *
  5404. *
  5405. * NOTES AND CAUTIONS.
  5406. *
  5407. * 1) NUMBER OF PRU,S MAY NOT CHANGE.
  5408. * REWRITE NOT ALLOWED IF CONDITION EXISTS.
  5409. *
  5410. * 2) AN ** WILL APPEAR TO THE RIGHT OF THE *RS=*
  5411. * FIELD WHEN A NO-REWRITE CONDITION EXISTS.
  5412. *
  5413. * 3) REWRITE TO ANOTHER FILE MAY CAUSE UNPREDICTABLE
  5414. * RESULTS.
  5415.  
  5416.  
  5417. RWR ENTRY
  5418. RJM CRS CHECK RECORD STATUS
  5419. RJM SIP STORE IN POINTER
  5420. LDD IN
  5421. SBD FT
  5422. SHN 14 CALCULATE PRU COUNT
  5423. LMD IN+1
  5424. SBD FT+1
  5425. SHN -6
  5426. LMM TIOG COMPARE WITH RECORD READ
  5427. ZJN RWR1 IF IN RANGE
  5428. LDC =C*PRU SIZE MODIFIED.*
  5429. JMP ERR1
  5430.  
  5431. * REWRITE RECORD.
  5432.  
  5433. RWR1 LDN 21 REWRITE RECORD
  5434. RJM CIO
  5435. LDN 17 RESET FET POINTERS
  5436. RJM CIO
  5437. JMP CIF
  5438. COMMAND (MISCELANEOUS COMMANDS.)
  5439. ENFL. SPACE 4,20
  5440. *** ENFL.
  5441. *
  5442. * SET FIELD LENGTH TO BUFFER SIZE+1000.
  5443.  
  5444.  
  5445. EFL ENTRY
  5446. LDD RA READ LIMIT
  5447. SHN 6
  5448. ADN FET+4
  5449. CRD AB
  5450. LDD CP GET NFL SIZE
  5451. ADN FLSW
  5452. CRD CM
  5453. LDD IN SET FIELD LENGTH
  5454. SHN 6
  5455. ADD CM INCLUDE NFL IN VALIDATION
  5456. SHN 6
  5457. ADD IN+1
  5458. ADC 1077
  5459. MJN EFL2 IF REQUEST .GE. 131K
  5460. SHN -6
  5461. SBD CM
  5462. STD T1
  5463. EFL1 LDD CP CHECK FOR *EXTENDED MEMORY* ASSIGNMENT
  5464. ADN ECSW
  5465. CRD AB
  5466. LDD AB+4
  5467. ZJN EFL3 IF *EXTENDED MEMORY* NOT ASSIGNED
  5468. LDD T1 ENSURE *FL* .GE. 10000B
  5469. ADC -MCMX/100
  5470. PJN EFL3 IF *FL* .GE. 10000
  5471. EFL2 LDC =C*INCORRECT FL REQUEST.*
  5472. UJN EFL7 ISSUE MESSAGE
  5473.  
  5474. EFL3 LDD T1 SET FL REQUEST
  5475. STM EFLA
  5476. EFL4 LDC * REQUEST STORAGE INCREASE
  5477. EFLA EQU *-1
  5478. EFL5 RJM RSI REQUEST STORAGE
  5479. ZJN EFL7 IF STORAGE ASSIGNED
  5480. MJN EFL6 IF NOT AVAILABLE
  5481. LDC =C*WAITING FOR STORAGE.*
  5482. STD KM
  5483. RJM KBIA
  5484. LDD KE CHECK KEYBOARD ENTRY
  5485. LMN 53
  5486. NJN EFL4 IF NOT LEFT BLANK
  5487. LDD FL
  5488. UJN EFL5 CLEAR STORAGE REQUEST TO *1SJ*
  5489.  
  5490. EFL6 LDC =C*STORAGE NOT AVAILABLE.*
  5491. EFL7 STD KM
  5492. LDC KBI8 RESET KEYBOARD
  5493. STM KBIA
  5494. LDD RA READ LIMIT
  5495. SHN 6
  5496. ADN FET+4
  5497. CRD AB
  5498. LDD FL RESET LIMIT
  5499. SHN 6
  5500. STD LM+1
  5501. STD AB+4
  5502. SHN -14
  5503. STD LM
  5504. STD AB+3
  5505. LDD RA
  5506. SHN 6
  5507. ADN FET+4
  5508. CWD AB
  5509. JMP RET RETURN
  5510. ENFL, SPACE 4,15
  5511. *** ENFL,X.
  5512. *
  5513. * SET FIELD LENGTH TO X.
  5514.  
  5515.  
  5516. EFN ENTRY
  5517. RJM AOD ASSEMBLE OCTAL DIGITS
  5518. LDD CP GET NFL SIZE
  5519. ADN FLSW
  5520. CRD CM
  5521. LDD AB+3
  5522. SHN 6
  5523. ADD CM INCLUDE NFL IN VALIDATION
  5524. SHN 6
  5525. ADD AB+4
  5526. ADN 77
  5527. PJN EFN1 IF REQUEST .LT. 131K
  5528. LJM EFL2 REQUEST .GE. 131K
  5529.  
  5530. EFN1 SHN -6 FL = FL/100
  5531. SBD CM
  5532. STD T1
  5533. SBD FL
  5534. NJN EFN3 IF FL .NE. 0
  5535. EFN2 LJM ERR MESSAGE = *FORMAT ERROR.*
  5536.  
  5537. EFN3 PJN EFN4 IF NEW FL .GT. OLD FL
  5538. LDD IN CHECK FOR DATA TRUNCATION
  5539. SHN 6
  5540. SBD T1
  5541. SHN 6
  5542. ADD IN+1
  5543. PJN EFN2 IF NEW FL TOO SMALL
  5544. EFN4 LJM EFL1 ISSUE FL REQUEST
  5545. ERR. SPACE 4,10
  5546. *** ERR.
  5547. *
  5548. * SET ERROR FLAG.
  5549.  
  5550.  
  5551. SEF ENTRY
  5552. LDN ZERL
  5553. CRD CM
  5554. LDN PPET SET ERROR FLAG = PP ABORT
  5555. STD CM+1
  5556. MONITOR CEFM
  5557. JMP RET RETURN
  5558. HOLD. SPACE 4,10
  5559. *** HOLD.
  5560. *
  5561. * DROP DISPLAY AND WAIT FOR OPERATOR ASSIGNMENT.
  5562.  
  5563.  
  5564. HOL ENTRY
  5565. RJM DDS DROP DISPLAY
  5566. LDK RDSOS REQUEST DISPLAY
  5567. RJM RID
  5568. JMP RET RETURN
  5569. IGN SPACE 4,10
  5570. *** IGNORE.
  5571. *
  5572. * IGNORE RECORD TOO LONG CONDITION. THE RECORD MAY NOW BE
  5573. * WRITTEN, BUT WILL BE TRUNCATED.
  5574.  
  5575.  
  5576. IGN ENTRY
  5577. AOM CRSA SET RECORD READ NOT TOO LONG FLAG
  5578. JMP RET RETURN
  5579. GO. SPACE 4,10
  5580. *** GO.
  5581. *
  5582. * CLEAR PAUSE FLAG.
  5583.  
  5584.  
  5585. GGO ENTRY
  5586. LDD CP READ SENSE SWITCH WORD
  5587. ADN SNSW
  5588. CRD CM
  5589. LDD CM+3 CLEAR PAUSE BIT
  5590. SCN 1
  5591. STD CM+3
  5592. LDD CP STORE SENSE SWITCH WORD
  5593. ADN SNSW
  5594. CWD CM
  5595. JMP RET RETURN
  5596. UCC SPACE 4,15
  5597. *** UCC=C
  5598. *
  5599. * SET UPPER CASE CONTROL CHARACTER TO C.
  5600. *
  5601. * TO ENTER ANY CHARACTER NOT ON KEYBOARD, HIT UCC AND
  5602. * ENTER 2 OCTAL DIGIT DISPLAY CODE BY DEPRESSING AN
  5603. * APPROPRIATE KEY.
  5604. *
  5605. * 0 THRU 7 = 60 THRU 67, QWERTYU = 70 THRU 77, AND S = 53.
  5606. *
  5607. * EXAMPLE UCC=*. TO ENTER " IN LINE DEPRESS * AND THEN 4.
  5608.  
  5609.  
  5610. UCC ENTRY
  5611. LDD CA CHECK FOR CLEAR/SET UCC
  5612. ADC -KBUF
  5613. LMD KI
  5614. ZJN UCC1 IF END OF KEYBOARD BUFER
  5615. LDI CA
  5616. UCC1 STM UCCA SET UPPER CASE CONTROL
  5617. LDM KBIC CLEAR/SET UPPER CASE CONTROL
  5618. SCN 77
  5619. LMC ** UPPER CASE CONTROL CHARACTER
  5620. UCCA EQU *-1
  5621. STM KBIC
  5622. SHN 6
  5623. LMD IR+2
  5624. SCN 77
  5625. LMD IR+2
  5626. STD IR+2
  5627. JMP RET RETURN
  5628. AOD SPACE 4,20
  5629. ** AOD - ASSEMBLE OCTAL DIGITS.
  5630. *
  5631. * ENTRY (A) = CHARACTER ADDRESS.
  5632. *
  5633. * EXIT (A) = SEPARATOR CHARACTER.
  5634. * (AB - AB+4) = ASSEMBLED DIGITS RIGHT JUSTIFIED.
  5635. * (T1) = UPDATED CHARACTER ADDRESS.
  5636. *
  5637. * USES T0 - T2.
  5638.  
  5639.  
  5640. AOD SUBR ENTRY/EXIT
  5641. STD T1 SET CHARACTER AODRESS
  5642. LDN ZERL CLEAR ASSEMBLY
  5643. CRD AB
  5644. AOD1 LDI T1 CHECK CHARACTER
  5645. SBN 1R0
  5646. MJN AOD2 IF ALPHA
  5647. SBN 1R8-1R0
  5648. MJN AOD3 IF OCTAL DIGIT
  5649. SBN 1R -1R8
  5650. ZJN AOD5 IF * *
  5651. AOD2 LDI T1 RETURN WITH CHARACTER
  5652. UJN AODX
  5653.  
  5654. AOD3 ADN 1R8-1R0 NEW DIGIT = CHARACTER
  5655. STD T0
  5656. LDN AB+4 SET BYTE AODRESS
  5657. STD T2
  5658. AOD4 LDI T2 BYTE = BYTE * 10B
  5659. SHN 3
  5660. ADD T0
  5661. STI T2
  5662. SHN -14 NEW DIGIT = OVERFLOW
  5663. STD T0
  5664. SOD T2 DECREMENT BYTE ADDRESS
  5665. LMN AB-1
  5666. NJN AOD4 IF NOT AT END OF WORD LOOP
  5667. AOD5 AOD T1 ADVANCE CHARACTER
  5668. UJN AOD1 LOOP
  5669. COMMON SPACE 4
  5670. ** COMMON DECKS.
  5671.  
  5672.  
  5673. *CALL COMPRSI
  5674. TITLE BUFFERS.
  5675. BUFFERS SPACE 4
  5676. * TERMINATE COMMAND OVERLAYS.
  5677.  
  5678.  
  5679. QUAL
  5680. HERE
  5681. USE END FORCE LITERALS
  5682. BUFFERS SPACE 4,10
  5683. ** BUFFER DEFINITIONS.
  5684.  
  5685.  
  5686. BUFM EQU 7774-240 MOVE BUFFER
  5687. BUFR EQU 7774-19D*5 READ BUFFER
  5688. KBUFL EQU 92D KEYBOARD BUFFER LENGTH
  5689.  
  5690. * ENSURE ROOM FOR END OF LINE FOR EACH BUFFER.
  5691.  
  5692. BUF EQU BUFM-KBUFL-7 LINE BUFFER
  5693. DBUF EQU BUF-KBUFL-7 TAB AND DUP BUFFER
  5694. KBUF EQU DBUF-KBUFL-7 KEYBOARD BUFFER
  5695. OVL SPACE 4,10
  5696. * OVERLAY CONTROL.
  5697. *
  5698. * AN ADDITIONAL BYTE HAS TO BE ADDED TO OVERLAY LENGTH
  5699. * COMPUTATIONS TO ACCOUNT FOR THE FACT THAT THE BYTE AFTER
  5700. * THE LAST BYTE TRANSFERRED BY AN *IAM* INSTRUCTION IS ZEROED
  5701. * WHEN THE CHANNEL DISCONNECTS.
  5702.  
  5703.  
  5704. .L MAX *,.L ADD LAST OVERLAY TO OVERFLOW CHECK
  5705. .L SET .L+4-OVL
  5706. .L SET .L/5*5+OVL+1
  5707. ERRNG KBUF-.L PP MEMORY OVERFLOW
  5708. .L SET ECMDO+4-OVL
  5709. .L SET .L/5*5+OVL+1
  5710. ERRNG DBUF-.L PP MEMORY OVERFLOW
  5711. TTL O26 - CONSOLE TEXT EDITOR.
  5712. O26 SPACE 4
  5713. END O26 CONSOLE TEXT EDITOR