cdc:nos2.source:opl871:o26
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
- IDENT O26,O26
- PERIPH
- BASE MIXED
- SST MDC,RDS
- *COMMENT O26 - CONSOLE TEXT EDITOR.
- COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
- TITLE O26 - CONSOLE TEXT EDITOR.
- O26 SPACE 4,10
- *** O26 - CONSOLE TEXT EDITOR.
- * D. A. CAHLANDER. 70/05/05.
- * G. R. MANSFIELD. 70/10/25.
- * D. A. CAHLANDER. 71/06/05.
- * A. D. FORET. 74/12/05.
- * P. D. HAAS. 84/02/08.
- DOC SPACE 4,10
- *** O26 PROVIDES THE CAPABILITY TO CREATE AND EDIT A FILE
- * FROM THE 6612 CONSOLE. A CM BUFFER IS USED TO STORE AND
- * EDIT THE BCD LINES BEFORE WRITING THE FILE. THE CM
- * BUFFER SIZE = FL - 140, AND ALL LINES OF A FILE MUST FIT
- * IN THE BUFFER.
- OPERATOR SPACE 4,10
- *** OPERATOR MESSAGES.
- *
- *
- * *REQUEST DISPLAY. (O26)* = O26 IS WAITING FOR THE DISPLAY
- * TO BE ASSIGNED.
- TITLE DIRECT CELL ALLOCATIONS AND ASSEMBLY CONSTANTS.
- DIRECT SPACE 4,20
- **** DIRECT LOCATION ASSIGNMENTS.
- LL EQU 15 LAST LINE POSITION STATUS
- DA EQU 16 - 17 DISPLAY ADDRESS
- AB EQU 20 - 24 ASSEMBLY BUFFER (5 LOCATIONS)
- CA EQU 25 CHARACTER ADDRESS
- XC EQU 26 X-COORDINATE
- YC EQU 27 Y-COORDINATE
- KE EQU 30 KEYBOARD ENTRY
- KI EQU 31 KEYBOARD INDEX
- KM EQU 32 KEYBOARD MESSAGE
- KP EQU 33 KEYBOARD PREVIOUS STATUS
- DR EQU 34 DISPLAY REFRESH STATUS
- LC EQU 35 CHARACTER COUNT OF LINE
- * MAINTAIN FOLLOWING ORDER.
- SI EQU 36 SCAN INDEX
- UC EQU 37 UPPER CASE FLAG
- IP EQU 40 - 41 INSERT POSITION (2 LOCATIONS)
- HF EQU 42 HOLD FLAG
- IF EQU 43 INSERT FLAG
- DL EQU 44 DISPLAY LENGTH
- KD EQU 45 KEYBOARD BUFFER DISPLAY STATUS
- SF EQU 46 SCAN FLAG
- SC EQU 47 SCAN NUMBER
- IO EQU 57 I/O BUSY FLAG
- FT EQU 60 - 61 FIRST ADDRESS OF BUFFER (2 LOCATIONS)
- IN EQU 62 - 63 NEXT INPUT ADDRESS (2 LOCATIONS)
- OT EQU 64 - 65 NEXT OUTPUT ADDRESS (2 LOCATIONS)
- LM EQU 66 - 67 LIMIT ADDRESS OF BUFFER (2 LOCATIONS)
- ****
- ASSEMBLY SPACE 4,10
- ** ASSEMBLY CONSTANTS.
- CH EQU CHDS DISPLAY CHANNEL
- FET EQU 10 ADDRESS OF FILE FET
- FETL EQU 10 FET LENGTH
- SBUF EQU FET+FETL ADDRESS OF CM SYNTAX BUFFER
- TITLE OVERLAY CONTROL AND MACRO DEFNITIONS.
- OVL SPACE 4,20
- ** OVERLAY CONTROL.
- NAME MICRO 1,, O26
- OVNG MICRO 1,, OP OVERLAY NUMBER GENERATOR
- OVNB MICRO 1,1, "OVNG" OVERLAY NAME BIAS MICRO
- OVNB EQU 1R"OVNB" OVERLAY NAME BIAS
- NOREF .L,.N
- .N SET 0 OVERLAY NUMBER
- .N MICRO 1,,
- .L SET *
- COMCMAC SPACE 4,15
- * MACRO DEFINITIONS AND INSTRUCTION CONSTANTS.
- *CALL COMPMAC
- *CALL COMDMAC
- SPACE 4,10
- ** COMMON DECKS.
- *CALL COMSCPS
- *CALL COMSPIM
- *CALL COMSSRT
- COMMAND SPACE 4,20
- ** COMMAND - GENERATE COMMAND OVERLAY.
- *
- *
- * COMMAND (SUBTITLE)
- * ENTRY *SUBTITLE* = COMMAND SUBTITLE.
- PURGMAC COMMAND
- COMMAND MACRO TXT
- LOCAL A
- QUAL
- .M OVLN .N
- QUAL O26".M"
- TTL O26/9".M" - TXT
- TITLE
- HERE
- QUAL
- USE END FORCE LITERALS*/
- A EQU *
- .N SET .N+1
- .N MICRO 1,, ".M"
- QUAL O26".N"
- IDENT 9".N",OVL TXT
- ORG OVL
- *COMMENT O26 - TXT
- COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
- QUAL
- IFC NE,*".N"*OB*,1
- .L MAX A,.L
- QUAL *
- COMMAND ENDM
- DKP SPACE 4,10
- ** DKP - DISPLAY KEYBOARD POINTER.
- *
- * ENTRY (XC) = X-COORDINATE.
- * (YC) = Y-COORDINATE.
- * (T2) = ADDRESS OF NEXT CHARACTER.
- *
- * MACROS CFNC.
- PURGMAC DKPM545,DKPM721
- DKPM545 MACRO *** CC545 CODE ***
- LDD UC
- ZJN DKP1
- LCN 4
- DKP1 SBN YINC
- ADD YC
- OAN CH+40
- LDN 1RA
- OAN CH+40
- LDD XC
- OAN CH+40
- LDN 1RI
- OAN CH+40
- UJN DKPX
- DKPM545 ENDM
- DKPM721 MACRO *** CDC721 CODE ***
- CFNC BIVF
- CFNC DSCF
- LDI T2
- LPN 77
- OAN CH+40
- CFNC EIVF
- UJN DKPX
- DKPM721 ENDM
- EDW SPACE 4,10
- ** EDW - EDIT AND DISPLAY WORD.
- *
- * ENTRY (CM - CM+4) = WORD TO BE PROCESSED.
- *
- * USES T1.
- *
- * MACROS CFNC.
- PURGMAC EDWM545,EDWM721
- EDWM545 MACRO *** CC545 CODE ***
- LDD CM
- SBD XC
- MJN EDW1
- LPN 77
- STD CM
- EDW1 LDD CM+1
- SBD XC
- MJN EDW2
- LPN 77
- STD CM+1
- EDW2 LDD CM+2
- SBD XC
- MJN EDW3
- LPN 77
- STD CM+2
- EDW3 LDD CM+3
- SBD XC
- MJN EDW4
- LPN 77
- STD CM+3
- EDW4 LDD CM+4
- SBD XC
- MJN EDW6
- LPN 77
- NJN EDW5
- LDN 1R
- EDW5 STD CM+4
- EDW6 LDN 5
- OAM CM,CH
- UJP EDWX
- EDWM545 ENDM
- EDWM721 MACRO *** CDC721 CODE ***
- LDN CM
- STD T1
- EDW10 LDI T1
- SBD XC
- MJN EDW11
- LPN 77
- LMC 2L
- STI T1
- EDW11 AOD T1
- LMN CM+5
- NJN EDW10
- EDW12 SOD T1
- LMN CM-1
- ZJN EDW13
- LDI T1
- ZJN EDW12
- LDD T1
- SBN CM-1
- OAM CM,CH
- LDD CM+4
- NJN EDWX
- EDW13 CFNC EELF
- UJP EDWX
- EDWM721 ENDM
- ENTER SPACE 4,15
- ** ENTER - ENTER SPECIAL SYNTAX.
- *
- *
- *ADDR ENTER (SYNTAX)
- * ENTRY *ADDR* = OVERLAY ENTRY ADDRESS.
- * *SYNTAX* = SYNTAX OF COMMAND.
- PURGMAC ENTER
- MACRO ENTER,ADDR,SYNTAX
- LOCAL A
- A SET *
- CON ADDR/10000+100*OVNB,ADDR-ADDR/10000*10000
- ORG *O-2
- ENTER MICRO 1,, SYNTAX
- ESS MICCNT ENTER
- ESS DECMIC ESS
- LOC A
- VFD 42/"ESS"L_SYNTAX,18/ADDR
- LOC A+1
- ENTER ENDM
- ENTRY SPACE 4,15
- ** ENTRY - DEFINE OVERLAY ENTRY POINT.
- *
- *
- *NAME ENTRY ADDR
- * ENTRY *NAME* = ENTRY POINT NAME.
- * *ADDR* = ADDRESS OF ENTRY POINT.
- * IF *ADDR* IS NOT PRESENT, ADDRESS OF ENTRY
- * POINT IS THE CURRENT VALUE OF THE ORIGIN COUNTER.
- PURGMAC ENTRY
- MACRO ENTRY,NAME,ADDR
- IFC NE,*ADDR**
- RMT
- QUAL
- NAME EQU .N*10000B+/O26".N"/ADDR
- QUAL *
- RMT
- ELSE 4
- NAME BSS 0
- QUAL
- NAME EQU .N*10000B+/O26".N"/NAME
- QUAL *
- ENTRY ENDM
- JMP SPACE 4,10
- ** JMP - THREADED JUMP.
- *
- *
- * JMP ADDR
- * ENTRY *ADDR* = JUMP ADDRESS.
- PURGMAC JMP
- JMP MACRO ADDR
- IF -DEF,.ADDR,2
- NOREF .ADDR
- .ADDR MAX ADDR,*-40
- IFGT .ADDR,*-40
- UJN .ADDR
- .ADDR SET *-1
- ELSE 2
- .ADDR SET *
- LJM ADDR
- JMP ENDM
- OVLN SPACE 4,15
- ** OVLN - GENERATE OVERLAY NUMBER.
- *
- *
- *A OVLN B
- * ENTRY *B* = OVERLAY NUMBER.
- * EXIT *A* = MICRO OF OVERLAY NAME.
- PURGMAC OVLN
- MACRO OVLN,A,B
- LOCAL C
- C SET B/1R4
- C MICRO C+1,1, "OVNG"
- A MICRO B-C*1R4+1,1, ABCDEFGHIJKLMNOPQRSTUVWXYZ01234
- A MICRO 1,, "C""A"
- OVLN ENDM
- TITLE OVERLAY LOADER.
- TITLE SUBROUTINES / MESSAGES.
- LOV SPACE 4,20
- ** LOV - LOAD OVERLAY.
- *
- * ENTRY (A) = BITS 17-12 OVERLAY INDEX.
- * BITS 11-00 ENTRY ADDRESS.
- *
- * USES T0, AB - AB+4.
- *
- * CALLS LPP.
- QUAL
- USE END
- USE PRS
- USE LOV
- PRSA BSS 0
- LOC MSFW
- LOV STM LOVA SET ENTRY
- SHN -14
- ZJN LOV1 IF RESIDENT
- STD T0
- SHN 1
- SCN 77
- LMD T0
- SCN 40
- ADC 3R9OA-1
- STM LOVB+4
- SHN -14
- STM LOVB+3
- SHN 6
- LMM OVL-5
- SHN 6
- LMM LOVB+4
- SHN 6
- LMM OVL-4
- ZJN LOV1 IF PROGRAM IN CORE
- RJM LPP LOAD PP PROGRAM
- LOV1 LDN ZERL CLEAR ASSEMBLY BUFFER
- CRD AB
- LDC KBI8 CLEAR OVERLAY LOAD
- STM KBIA
- AOD DR
- LDD CA (A) = CHARACTER ADDRESS
- LJM *
- LOVA EQU *-1
- LOVB VFD 24/3L1DL,12/CH,24/0
- LPP SPACE 4,20
- ** LPP - LOAD PP PROGRAM.
- *
- * ENTRY (LOVB+3 - LOVB+4) = PP PROGRAM NAME.
- *
- * EXIT TO *KIC* IF WAITING FOR OVERLAY TO BE LOADED.
- * TO *ABT* IF CHANNEL TIMEOUT.
- * TO *ABT1* IF NO PP AVAILABLE FOR *1DL*.
- *
- * USES T1, CM - CM+4, KM.
- *
- * MACROS CFNC, DFIM, EXECUTE, MONITOR.
- LPP SUBR ENTRY/EXIT
- EXECUTE 1DL,=
- LDD MA
- CWM LOVB,ON
- LDN 1 DISABLE QUEUING OF PP REQUEST
- STD CM+1
- MONITOR RPPM REQUEST 1DL
- LDD CM+1 CHECK CALL
- STM LPPA
- NJN LPP1 IF PP AVAILABLE
- LDC ERRC MESSAGE = *SYSTEM BUSY - PPU.*
- STD KM
- LJM ABT1
- * WAIT FOR 1DL.
- LPP1 RJM KBIA SET RE-ENTRY
- DFIM (CON SDCF),*+1
- LDC DDCF DESELECT DISPLAY
- CFNC
- LDC ** READ PP INPUT REGISTER
- LPPA EQU *-1
- CRD CM
- LDD CM+1 CHECK INPUT REGISTER
- SCN 37
- SHN 6
- LMD CM
- LMC 3RL1D
- ZJN LPP2 IF *1DL*
- SHN 14
- LMN 1R1
- NJN LPP5 IF *1DL* NOT LOADING
- LPP2 LDD CM+2
- LMC 7777
- ZJN LPP3 IF TRANSMISSION READY
- DCN CH+40
- CCF *+2,CH
- LDC ERRB MESSAGE = *SYSTEM BUSY - DISK.*
- LJM KIC INCOMPLETE ENTRY
- * INPUT OVERLAY.
- LPP3 LDD TH DELAY
- SBN 1
- NJN *-1 IF DELAY NOT ELAPSED
- DCN CH+40
- * LDN 0 SET READY RECEIVE
- STD CM+2
- LDM LPPA
- CWD CM
- ACN CH
- LCN 0 SET TIMER
- STD T1
- LPP4 FJM LPP6,CH IF CHANNEL FULL
- SOD T1
- NJN LPP4 IF CHANNEL NOT TIMED OUT
- LPP5 DCN CH+40
- CCF *+2,CH
- LJM ABT ABORT
- LPP6 LCN 0 INPUT OVERLAY
- IAM OVL-5,CH
- LDD KM CHECK MESSAGE
- LMC ERRB
- CCF *+2,CH
- NJN LPP7 IF NOT *DISK BUSY.*
- * LDN 0 CLEAR KEYBOARD MESSAGE
- STD KM
- LPP7 LJM LPPX RETURN
- CDL SPACE 4,15
- ** CDL - CLEAR DISPLAY LINES.
- *
- * ENTRY (DR) = DISPLAY REFRESH STATUS.
- * (IO) = I/O BUSY STATUS.
- *
- * EXIT (A) = (DR) = 0.
- *
- * USES T1, YC.
- *
- * CALLS ERL.
- *
- * MACROS CFNC, DFIM.
- CDL3 CFNC CHSF CLEAR HIDDEN SCREEN
- LDN 0
- STD DR DISABLE REFRESH NEXT PASS
- CDL SUBR ENTRY/EXIT
- LDM DBFD
- NJN CDL1 IF DISPLAY NOT ROLLING
- AOD DR
- CDL1 CFNC SLSF SELECT LEFT SCREEN - SMALL CHARACTERS
- LDD DR
- ADD IO SET REFRESH STATUS
- STM DBFC
- NJN CDL3 IF DISPLAY REFRESH ENABLED
- STD T1
- CDL2 LDM CDLA,T1
- ZJN CDLX IF ALL LINES CLEARED
- STD YC
- RJM ERL ERASE LINE
- AOD T1
- UJN CDL2 LOOP
- CDLA CON HL01
- CON HL02
- CON HL04
- CON 0
- ERL SPACE 4,10
- ** ERL - ERASE LINE.
- *
- * ENTRY (XC) = X-COORDINATE.
- * (YC) = Y-COORDINATE.
- *
- * MACROS CFNC.
- ERL SUBR ENTRY/EXIT
- LDN 2
- OAM XC,CH OUTPUT COORDINATES
- CFNC EELF
- UJN ERLX RETURN
- ERR SPACE 4,15
- ** ERR - ERROR MESSAGES.
- ERRA DATA C*FORMAT ERROR.*
- ERRB DATA C*DISK BUSY.*
- ERRC DATA C*PP BUSY.*
- ERRD DATA C*REPEAT ENTRY.*
- DFIM (CON LN27)
- ERRE CON LN45,CH03
- DATA C*RECORD TOO LONG.*
- ERREL EQU *-ERRE
- ERRF DATA C*CANNOT PERFORM I/O ON FILE.*
- ERRNG PPFW-* IF PP RESIDENT MEMORY OVERFLOW
- LOC *O
- PRSAL EQU *-PRSA
- TITLE MAIN PROGRAM.
- O26 SPACE 4,20
- ** O26 - MAIN PROGRAM.
- ORG PPFW
- O26 LJM PRS PRESET PROGRAM
- O261 RJM CDL CLEAR DISPLAY LINES
- O262 RJM SYS DISPLAY SYSTEM STATUS
- DCN CH+40
- DFIM (CON LDMI)
- UJN O263 DISPLAY BUFFER
- CON DBFC
- NJN O263 IF SCREENS BEING REPAINTED
- LDD KI
- LMD KP
- ZJN O264 IF NO KEYBOARD INPUT
- O263 RJM DBF DISPLAY BUFFER
- DCN CH+40
- RJM DKB DISPLAY KEYBOARD BUFFER
- DFIM (LDD KI)
- UJN O265 DISPLAY BUFFER STATUS
- STD KP SET PREVIOUS INDEX = CURRENT
- LDN 0
- STD KD
- O264 RJM KBI CHECK KEYBOARD INPUT
- O265 RJM DBS DISPLAY BUFFER STATUS
- CFNC THVF TRANSFER HIDDEN SCREEN TO VISIBLE
- DCN CH+40
- RJM KBI KEYBOARD INPUT
- RJM TIO TRY I/O
- O266 RJM PSS PAUSE FOR SYSTEM
- DFIM (CON O261),*+1
- LJM O262 LOOP
- DPP SPACE 4,10
- ** DPP - CLEAR *DIS* FLAG AND DROP PP.
- *
- * EXIT TO PPR.
- *
- * USES CM - CM+4.
- *
- * MACROS MONITOR.
- *
- * NOTE THIS ROUTINE IS CALLED FROM *COMDDSP* ROUTINE *PSS*.
- DPP BSS 0 ENTRY
- LDN ZERL
- CRD CM
- LDN 10 SET MASK FOR *JCIW*
- STD CM+4
- LDN CCTS CLEAR *DIS* FLAG
- STD CM+1
- MONITOR SJCM
- MONITOR DPPM DROP PP
- LJM PPR EXIT TO PP RESIDENT
- DBF SPACE 4,20
- ** DBF - DISPLAY BUFFER.
- *
- * ENTRY (OT - OT+1) = DISPLAY ADDRESS.
- *
- * EXIT (DL) = DISPLAY LENGTH.
- * (LL) = 0 IF EXIT ON LAST LINE OF SCREEN.
- * (DA - DA+1) = ADDRESS OF LAST LINE + 1.
- *
- * USES T1 - T7, CM - CM+4.
- *
- * CALLS CDA, DIL, EDW.
- *
- * MACROS CFNC, DFIM.
- DBF SUBR ENTRY/EXIT
- LDD OT SET DISPLAY ADDRESS
- STD DA
- LDD OT+1
- STD DA+1
- LDN 0 SET DISPLAY LENGTH
- STD DL
- LDC SLSF SET LEFT SCREEN
- STM DBFB
- LDC LN06 SET FIRST LINE
- DBFA EQU *-1
- STD YC
- DFIM (UJN DBF1)
- LMC LN06
- ZJN DBF1 IF TOP OF SCREEN
- AOM DBFA ADVANCE Y
- STM DBFD
- DBF1 LDC SLSF
- DBFB EQU *-1
- CFNC SELECT SCREEN - SMALL CHARACTERS
- DBF2 RJM CDA CHECK DISPLAY ADDRESS
- PJN DBFX IF BUFFER EMPTY
- RJM DIL DISPLAY INSERT LINE
- LDN 0
- STD T3 CLEAR WORD COUNTS
- STD T4
- LDM DBFC
- ZJN DBF3 IF DISPLAY REFRESH DISABLED
- LDN 2
- OAM XC,CH
- OAN CH+40
- LDC 2R .
- OAN CH+40
- * DISPLAY LINE.
- DBF3 LDD DA READ WORD
- SHN 6
- ADD RA
- SHN 6
- ADD DA+1
- CRD CM
- AOD DL ADVANCE DISPLAY LENGTH
- LDD SF
- ZJN DBF7 IF SCAN NOT SET
- * DISPLAY SCAN LINE.
- AOD T3 COUNT WORD READ
- SBD SC
- SBN 1
- PJN DBF5 IF WORD REACHED
- DBF4 LJM DBF9 PROCESS END OF WORD
- DBF5 SBN 6
- MJN DBF7 IF SIX WORDS NOT DISPLAYED
- SBN 10
- MJN DBF4 IF EIGHT WORDS NOT SKIPPED
- DBF6 LJM DBF10 PROCESS AS END OF LINE
- * DISPLAY NORMAL LINE.
- DBF7 AOD T4 COUNT WORD DISPLAYED
- LMN 7
- NJN DBF8 IF NOT 7TH WORD
- STD T4
- LDC CH05 RESET X-COORDINATE
- OAN CH+40
- LCN YINC
- RAD YC
- OAN CH+40
- DFIM (ADC -LN25)
- ADC -LN42
- MJN DBF6 IF SCREEN OVERFLOW
- RJM CDA CHECK DISPLAY ADDRESS
- MJN DBF8 IF BUFFER NOT EMPTY
- LJM DBFX RETURN
- DBF8 LDC 1
- DBFC EQU *-1
- ZJN DBF9 IF REFRESH DISABLED
- RJM EDW DISPLAY WORD
- * PROCESS END-OF-WORD.
- DBF9 AOD DA+1 ADVANCE WORD ADDRESS
- SHN -14
- RAD DA
- LDD CM+4
- ZJN DBF10 IF END OF LINE
- LDD DA
- SBD IN
- SHN 14
- ADD DA+1
- SBD IN+1
- PJN DBF10 IF ADDRESS .GE. *IN*
- LJM DBF3 LOOP
- * PROCESS END-OF-LINE.
- DBF10 LDC 1 ADVANCE LINE NUMBER
- DBFD EQU *-1
- NJN DBF12 IF ROLL NOT NEEDED
- AOD DR
- LDD DA
- STD OT
- LDD DA+1 SET FIRST LINE ADDRESS
- STD OT+1
- LDD YC SET NEW Y-COORDINATE
- DFIM (UJN DBF11)
- SBN 2*YINC
- STM DBFA
- DBF11 STM DBFD SET ROLL NOT NEEDED
- DFIM (LCN YINC)
- DBF12 LCN 2*YINC
- RAD YC
- DFIM (ADC -LN25)
- ADC -LN41
- MJN DBF13 IF BOTTOM OF SCREEN
- STD LL
- LJM DBF2 LOOP
- DBF13 LDD HN SET NEXT SCREEN
- RAM DBFB
- ERRNZ SLSF+100-SRSF CODE DEPENDS ON VALUE
- SHN 21-6
- PJN DBF14 IF RIGHT SCREEN DISPLAYED
- FJM *,CH
- DCN CH+40
- DFIM (CON LN06),*+1
- LDC LN06-LN41+YINC RESET LINE NUMBER
- DFIM (STD YC)
- RAD YC
- LJM DBF1 LOOP
- DBF14 LDD HF SET ROLL FLAG
- STM DBFD
- RJM DIL DISPLAY INSERT LINE
- LJM DBFX RETURN
- DBS SPACE 4,20
- ** DBS - DISPLAY BUFFER STATUS.
- *
- * USES T1, CM - CM+4.
- *
- * CALLS D6S, DOL.
- *
- * MACROS CFNC, DISPLA, MONITOR.
- DBS SUBR ENTRY/EXIT
- CFNC SLSF
- LDD IO
- ZJN DBS1 IF I/O NOT BUSY
- DISPLA CH04,HL02,(CIO BUSY.)
- DBS1 DISPLA CH01,HL01,(O26. FILE = )
- LDD RA READ FILE NAME
- SHN 6
- ADN FET
- CRD CM
- LDN 4 DISPLAY FILE NAME
- OAM CM,CH
- LDM CRSB CHECK WRITE LOCKOUT
- ZJN DBS2 IF WRITE ALLOWED
- LDN 1R*
- DBS2 OAN CH+40
- LDD CM+4 DISPLAY STATUS
- RJM D6S
- DISPLA ,,(RS=) DISPLAY CURRENT RECORD SIZE
- LDD IN
- SBD FT
- SHN 14
- ADD IN+1
- SBD FT+1
- SHN 14 PRESERVE PRU COUNT
- STD CM
- SHN 6 DISPLAY WORD COUNT IN BUFFER
- RJM D6S
- LDD CM COMPARE WITH ORIGINAL BUFFER SIZE
- LMM TIOG
- ZJN DBS3 IF SAME FILE PRU SIZE
- DISPLA ,,(**.) SET WARNING IF FILE CHANGED PRU SIZE
- DBS3 DISPLA ,,(CM=)
- LDD LM COMPUTE STORAGE
- SBD IN
- SHN 14
- ADD LM+1
- SBD IN+1
- RJM D6S DISPLAY STORAGE
- LDD CP READ MESSAGE 2
- ADN MS2W
- STD T1
- CRD CM
- LDD CM
- NJN DBS4 IF SET
- LDD CP READ MESSAGE 1
- ADN MS1W
- CRD CM
- STD T1
- DBS4 LDN 2 OUTPUT COORDINATES
- OAM DBSA,CH
- LDD T1 DISPLAY MESSAGE
- RJM DOL
- LDD CP READ JOB CONTROL
- ADN STSW
- CRD CM
- LDD CM+2 CHECK ROLLOUT FLAG
- LPN 1
- ZJN DBS5 IF NOT SET
- DISPLA CH25,HL02,(ROLLOUT.),H
- DBS5 LDD CM+1
- ZJN DBS8 IF ERROR FLAG NOT SET
- SOD CM
- LPN 37
- NJN DBS8 IF .GT. 1 PP ASSIGNED
- STD IO
- LDN ZERL
- CRD CM CLEAR RANDOM ACCESS
- LDD RA
- SHN 6
- ADN FET+6
- CWD CM
- MONITOR CEFM CLEAR ERROR FLAG
- DBS8 LJM DBSX RETURN
- DBSA CON CH01,HL04
- DKB SPACE 4,20
- ** DKB - DISPLAY KEYBOARD BUFFER.
- *
- * ENTRY (KM) = ADDRESS OF KEYBOARD MESSAGE. (IF (KM) = 0,
- * NO MESSAGE.)
- * (KI) = KEYBOARD INDEX.
- * (KD) = 0 IF KEYBOARD BUFFER NOT DISPLAYED.
- *
- * USES T1, T3, YC.
- *
- * CALLS DKL, ERL, HIL.
- *
- * MACROS CFNC, DFIM, DISPLA.
- DKB SUBR ENTRY/EXIT
- CFNC SLSF
- DFIM (CON LN50),*+1
- LDC LN48 SET Y-COORDINATE
- STD YC
- LDN 2 OUTPUT MESSAGE COORDINATES
- OAM ERRE,CH
- LDD KM
- ZJN DKB3 IF NO MESSAGE
- STD T1 DISPLAY MESSAGE
- LMC ERRE
- ZJN DKB2 IF *RECORD TOO LONG*
- DKB1 LDI T1
- OAN CH+40
- ZJN DKB3 IF END OF MESSAGE
- AOD T1
- UJN DKB1
- DKB2 LDC ERREL*10000+ERRE
- RJM HIL
- DKB3 LDD IF
- ZJN DKB4 IF NO INSERT
- DISPLA ,,(INSERT.)
- DKB4 LDM KBUF+1
- LMN 1R.
- NJN DKB7 IF 2ND CHARACTER .NE. *.*
- DISPLA ,,(COL. =)
- * LDN 0 PRESET DIGITS
- STD T3
- LDD KI DISPLAY COLUMN NUMBER
- SBN 1
- DKB5 STD T1
- AOD T3
- LDD T1 COUNT 10
- SBN 10D
- PJN DKB5 IF CONVERSION NOT COMPLETE
- SOD T3
- ZJN DKB6 IF LEADING ZERO
- ADN 1R0
- DKB6 OAN CH+40
- LDD T1
- SHN 6
- ADC 2R0.
- OAN CH+40
- DKB7 DFIM (LDD KD)
- UJN DKB8 DISPLAY KEYBOARD LINE
- NJN DKB11 IF KEYBOARD BUFFER DISPLAYED
- LDC SLPF
- STM DKBA SELECT LEFT SCREEN - PRIORITY OUTPUT
- CFNC
- DKB8 RJM DKL DISPLAY KEYBOARD LINE
- DFIM (SHN 21-11)
- UJN DKB10 RETURN
- PJN DKB10 IF DATA ON LAST LINE
- DKB9 RJM ERL ERASE LAST LINE
- DKB10 FJM *,CH IF FULL CHANNEL
- DCN CH+40
- LJM DKBX RETURN
- DKB11 LDC SLPF CHECK KEYBOARD BUFFER DISPLAY
- DKBA EQU *-1
- ZJN DKB10 IF PRIORITY LINES CLEAR
- CFNC
- LDN 0 SET LINES CLEARED
- STM DKBA
- RJM ERL ERASE *LN50*
- LCN YINC
- RAD YC
- UJN DKB9 CLEAR *LN51*
- DLL SPACE 4,20
- ** DLL - DISPLAY LAST LINE.
- *
- * ENTRY (IF) = INSERT FLAG.
- *
- * EXIT (A) .GT. 0.
- *
- * CALLS DKL.
- DLL SUBR ENTRY/EXIT
- LDD IF CHECK INSERT FLAG
- ZJN DLL1 IF NOT SET
- LDD IP+1 CHECK INSERT
- LMD IN+1
- NJN DLL1 IF NOT AT END
- LDD IP CHECK INSERT
- LMD IN
- NJN DLL1 IF NOT AT END
- STD IF CLEAR INSERT
- AOD DR
- DLL1 RJM DIL DISPLAY INSERT LINE
- LDD IF
- NJN DLLX IF INSERT LINE
- RJM DKL DISPLAY KEYBOARD LINE
- UJN DLLX RETURN
- DISPLAY SPACE 4,10
- ** DISPLAY COMMON DECKS.
- *CALL COMDDSP
- *CALL COMDSYS
- TITLE KEYBOARD INPUT.
- KBI SPACE 4,20
- *** KEYBOARD INPUT.
- *
- * ALL ENTRIES ARE DISPLAYED ON THE BOTTOM OF THE LEFT SCREEN
- * AS THEY ARE ENTERED.
- *
- * *CR* MUST FOLLOW ALL ENTRIES BEFORE ACTION IS TAKEN.
- * *BKSP* DELETES THE PREVIOUS CHARACTER TYPED.
- * *LEFT BLANK* DELETES THE CURRENT LINE BEING ENTERED.
- * *RIGHT BLANK* IS THE TAB KEY.
- *
- * IF THESE CHARACTERS ARE THE FIRST ENTRY, THE FOLLOWING
- * APPLIES -
- * *0* = SET INSERT AT FIRST LINE.
- * *1* = SET INSERT AT 4TH LINE ON SCREEN.
- * *2* = SET INSERT AT 8TH LINE ON SCREEN.
- * *3* = SET INSERT AT 12TH LINE ON SCREEN.
- * *4* = SET INSERT AT 16TH LINE ON SCREEN.
- * *5* = SET INSERT AT 20TH LINE ON SCREEN.
- * *6* = SET INSERT AT 24TH LINE ON SCREEN.
- * *7* = SET INSERT AT 32ND LINE ON SCREEN.
- * *8* = SET INSERT *8* AT INSERT LINE.
- * *9* = SET INSERT *9* AT INSERT LINE.
- * *+* = DISPLAY NEXT PAGE.
- * *-* = DISPLAY PREVIOUS 18 LINES.
- * (*) = HOLD DISPLAY.
- * */* = START OR STOP ROLL.
- * *(* = ADVANCE INSERT BY 1.
- * *)* = DECREMENT INSERT BY 1.
- * *=* = TOGGLE INSERT FLAG.
- * *,* = FIND INSERT LINE.
- * *.* = DELETE NEXT LINE.
- * *CR* = SET */REPEAT ENTRY.*
- * * * = SET *P.* INTO BUFFER.
- *
- * ABOVE THE ENTRY DISPLAY, THE FOLLOWING MESSAGES MAY
- * APPEAR -
- *
- * *DATA OVERFLOW.* = THE LINE TO BE ENTERED IN THE
- * BUFFER OR THE BLOCK TO BE MOVED OR COPIED
- * DOES NOT FIT INTO THE REMAINING FIELD LENGTH.
- * USE *ENFL* COMMAND TO INCREASE BUFFER SPACE.
- * *DISK BUSY.* = WAITING FOR *O26* OVERLAY.
- * *FILE NOT ON MASS STORAGE.* = FILE NOT VALIDATED
- * FOR RANDOM PROCESSING.
- * *FORMAT ERROR.* = A FORMAT ERROR HAS BEEN
- * DETECTED DURING TRANSLATION OF THE ENTRY.
- * *INCORRECT COMMAND.* = USER ACCESS NOT VALID
- * DETECTED.
- * *INDEX NOT FOUND.* = THE FILE DIRECTORY (RANDOM
- * INDEX) WAS NOT FOUND.
- * *INSERT 8 OR 9 NOT SET.* = THE COMMAND ENTERED
- * REQUIRES THAT BOTH THE INSERT 8 MARKER AND
- * THE INSERT 9 MARKER BE SET.
- * *INCORRECT FL REQUEST.* = THE REQUESTED FIELD
- * LENGTH WAS GREATER THAN 131K, OR LESS THAN
- * 10K IF EXTENDED MEMORY ASSIGNED.
- * *LINE NOT FOUND.* = A LINE CONTAINING THE STRING
- * SPECIFIED WAS NOT FOUND.
- * *LINE OVERFLOW.* = THE REPLACE COMMAND INCREASED
- * LINE LENGTH TO GREATER THAN THE MAXIMUM
- * BUFFER SIZE OF 90 CHARACTERS.
- * *LIST.* = *O26* IS GENERATING A LIST OF THE DIRECTORY
- * FOR THE FILE.
- * *NO RANDOM ACCESS.* = THE FILE IS NOT RANDOM ACCESS.
- * *NOT IN LINE.* = CHARACTER STRING NOT FOUND BY THE
- * REPLACE CHARACTER COMMANDS.
- * *OUT OF RANGE.* = EDIT LINE NUMBER NOT IN BUFFER.
- * *PP BUSY.* = REQUEST IGNORED BY SYSTEM.
- * *PRU SIZE MODIFIED.* = A REWRITE IN PLACE CANNOT
- * BE PERFORMED BECAUSE OF THE REASON INDICATED.
- * *RECORD NOT FOUND.* = THE REQUESTED RECORD WAS NOT
- * FOUND ON THE FILE. FOR SEQUENTIAL RECORD
- * SEARCH, THE RECORD WAS NOT FOUND AFTER THE
- * CURRENT FILE POSITION.
- * *RECORD TOO LONG.* = RECORD READ DID NOT FIT
- * INTO BUFFER.
- * *REPEAT ENTRY.* = ENTRY WILL NOT BE CLEARED AFTER
- * EXECUTION.
- * *SEARCH / CCCCCCC.* = *O26* IS SEARCHING SEQUENTIAL
- * RECORD *CCCCCCC*.
- * *SEARCH.* = *O26* IS SEARCHING A RANDOM RECORD.
- * *STORAGE NOT AVAILABLE.* = THE REQUESTED FIELD
- * LENGTH IS CURRENTLY UNAVAILABLE.
- * *WAITING FOR STORAGE.* = *O26* IS WAITING FOR THE
- * REQUESTED FIELD LENGTH TO BE ASSIGNED.
- * *WRITE ON READ-ONLY FILE.* = WRITE IS NOT ALLOWED
- * ON THE EDIT FILE.
- KBI SPACE 4,20
- ** KBI - KEYBOARD INPUT.
- *
- * USES T2, T5, CA, UC, KE, KI.
- *
- * CALLS CFC, RDL.
- *
- * MACROS CFNC, DFIM.
- KBI8 SHN 21-6
- PJN KBI9 IF NOT CONTROLWARE RELOAD REQUEST
- AOD DR
- KBI9 SHN 6-21
- NJN KBI1 IF INPUT CHARACTER PRESENT
- STM KBIB CLEAR CHARACTER
- KBIX LJM O266 ENTRY/EXIT
- KBI EQU *-1
- CFNC SKIF SELECT KEYBOARD INPUT
- IAN CH+40
- DCN CH+40
- STD KE
- LJM KBI8 CHECK KEYBOARD INPUT
- KBIA EQU *-1
- JMP KBIX RETURN
- KBI1 LDC **
- KBIB EQU *-1
- ZJN KBI2 IF NO PREVIOUS CHARACTER
- SOM KBID DECREMENT DELAY
- NJN KBIX IF DELAY NO ELAPSED
- LDN 20 SET REPEAT DELAY
- DFIM (LDN 1)
- KBI2 LMN 24 SET INITIAL DELAY
- STM KBID
- LDD KE
- STM KBIB STORE CURRENT CHARACTER
- LDD KI
- NJN KBI3 IF NOT FIRST CHARACTER
- STM DKLA CLEAR ALTERNATE KEYBOARD
- RJM CFC CHECK FIRST CHARACTER
- KBI3 LDD KE CHECK CHARACTER
- KBIC LMN **
- NJN KBI4 IF NOT UPPER CASE SHIFT
- LDD UC TOGGLE UPPER CASE
- LMN 1
- STD UC
- ZJN KBI6 IF NOT UPPER CASE
- JMP KBIX RETURN
- KBI4 LDD UC
- ZJN KBI6 IF NOT UPPER CASE
- LDN 0 CLEAR UPPER CASE FLAG
- STD UC
- LDC KBIF-1 SET UPPER CASE TABLE
- STD T2
- KBI5 AOD T2 ADVANCE TABLE
- LDI T2
- ZJN KBI6 IF END OF TABLE
- SHN -6
- LMD KE COMPARE ENTRY
- NJN KBI5 IF NO MATCH
- LDI T2 ENTER SPECIAL CHARACTER
- LPN 77
- STD KE
- SBN 1
- ZJN .KBIX IF BKSP
- ADN 1
- UJN KBI7
- KBI6 LDD KE CHECK ENTRY
- SBN 53
- MJN KBC IF .LT. *$*
- SBN KBIEL
- KBI7 PJN KBC IF .GT. * *
- LDM KBIE-53,KE
- STD T5 SET EXECUTE FLAG
- LJM 0,T5 PROCESS ENTRY
- * PROCESS *SPACE*.
- KBS LDN 1R SUBSTITUTE * *
- STD KE
- LDC 0
- KBSA EQU *-1
- NJN KBC IF NOT SKIPPING
- LDM KBUF
- LMN 1RA
- ZJN KBS1 IF *A*
- LMN 1RD&1RA
- ZJN KBS1 IF *D*
- LMN 1RE&1RD
- ZJN KBS1 IF *E*
- LMN 1RL&1RE
- NJN KBC IF NOT *L*
- KBS1 LDM DBUF,KI
- LPN 77
- UJN KBC1
- * PROCESS NORMAL CHARACTER.
- KBC LDD KE CLEAR SKIP FLAG
- NJN KBC0 IF NOT COLON
- LDD HN SUBSTITUTE 100B FOR COLON
- KBC0 STM KBSA TURN OFF SKIP MODE
- KBC1 STM KBUF,KI
- AOD KI
- SBN 62D
- NJN KBC3 IF NOT ADVANCE INTO DOUBLE DISPLAY LINE
- AOD DR
- LDN 0
- KBC3 SBN KBUFL-62D
- PJN KBB IF BUFFER FULL
- LDN 0 CLEAR EXECUTE FLAG
- STD T5
- LJM INT INTERPRET KEYBOARD MESSAGE
- * PROCESS *BKSP*.
- KBB LDN 1R CLEAR PREVIOUS ENTRY
- STM KBUF-1,KI
- SOD KI
- SBN 2
- PJN KBB1 IF NOT BEFORE COLUMN 2
- LDN 0 CLEAR DISPLAY ALTERNATE BUFFER
- STM DKLA
- KBB1 SBN 61D-2
- NJN KBB2 IF NOT BACKSPACE INTO SINGLE DISPLAY LINE
- AOD DR
- KBB2 LDD KM CHECK KEYBOARD MESSAGE
- LMC ERRD
- ZJN KBB3 IF REPEAT ENTRY RETURN
- LDN 0
- STD KM
- KBB3 JMP KBIX RETURN
- * PROCESS *.*.
- KBP LDD KI CHECK COLUMN
- SBN 1
- ZJN KBP1 IF COL. 2
- LJM KBC
- KBP1 STM KBSA SET SKIP FLAG
- LDM KBUF
- LMN 1RA
- ZJN KBP2 IF *A*
- LMN 1RD&1RA
- ZJN KBP3 IF *D*
- LMN 1RE&1RD
- ZJN KBP3 IF *E*
- LMN 1RL&1RE
- ZJN KBP2 IF *L*
- LMN 1RM&1RL
- ZJN KBP2 IF *M*
- LMN 1RN&1RM
- NJN KBP4 IF NOT *N*
- KBP2 LDD IF
- ZJN .KBIX IF NO INSERT
- AOD DR
- LDC BUFM+2 SET CHARACTER ADDRESS
- STD CA
- LDN 0 CLEAR BUFFER
- STI CA
- RJM RDL READ NEXT LINE
- KBP3 LDC DBUF SET ALTERNATE LINE BUFFER
- STM DKLA
- KBP4 LDN 1R.
- JMP KBC1
- DFIM (CON 1)
- KBID DATA 24 DELAY COUNT
- KBIE BSS 0
- LOC 53
- CON PLB 53 *LEFT BLANK*
- CON KBC 54
- CON PRT 55 *RIGHT BLANK*
- CON KBC 56
- CON KBP 57 *.*
- CON INT 60 *CR*
- CON KBB 61 *BKSP*
- CON KBS 62 * *
- LOC *O
- KBIEL EQU *-KBIE
- KBIF BSS 0
- CON 1LS+53
- CON 2R0# 60
- CON 2R1[ 61
- CON 2R2] 62
- CON 1L3+63
- CON 2R4" 64
- CON 1L5+65 65
- CON 2R6! 66
- CON 2R7& 67
- CON 2RQ' 70
- CON 2RW? 71
- CON 2RE< 72
- CON 2RR> 73
- CON 2RT@ 74
- CON 2RY\ 75
- CON 2RU^ 76
- CON 2RI; 77
- CON 2R=" 64
- CON 1L.+65 65
- CON 2RA& 67
- CON 2R(< 72
- CON 2R)> 73
- CON 2R+@ 74
- CON 2R-\ 75
- CON 2R,; 77
- CON 6101 BKSP
- KBIG CON 2RZ0-1R0 00 ( 0, IF 63 CHARACTER SET)
- CON 0 TERMINATOR
- TITLE DISPLAY SUBROUTINES.
- CDA SPACE 4,15
- ** CDA - CHECK DISPLAY ADDRESS.
- *
- * ENTRY (DA - DA+1) = CURRENT DISPLAY ADDRESS.
- *
- * EXIT (A) .LT. 0 IF BUFFER NOT EMPTY.
- * = RESPONSE FROM *DLL* IF EMPTY.
- *
- * CALLS DLL.
- CDA SUBR ENTRY/EXIT
- LDD DA
- SBD IN
- SHN 14
- ADD DA+1
- SBD IN+1
- MJN CDAX IF BUFFER NOT EMPTY
- RJM DLL DISPLAY LAST LINE
- UJN CDAX RETURN
- CFC SPACE 4,20
- ** CFC - CHECK FIRST CHARACTER.
- *
- * ENTRY (KE) = FIRST CHARACTER.
- * (DA - DA+1) = ADDRESS + 1 OF LAST LINE OF DISPLAY.
- *
- * USES T1, T2, KI, IN - IN+1, IP - IP+1, OT - OT+1.
- *
- * CALLS DNL, RID, SDS, SFL, SIL.
- CFC SUBR ENTRY/EXIT
- LDD KE
- SBN 1R0
- MJN CFCX IF .LT. *0*
- SBN CFCAL
- PJN CFCX IF .GT. * *
- LDM CFCA-1R0,KE
- STD T2
- AOD DR ENABLE DISPLAY REFRESH
- LDN 0
- LJM 0,T2
- * *,* - FIND INSERT LINE.
- CFC1 LDD IF
- ZJN CFC4 IF NO INSERT
- LDD IP FIND INSERT LINE
- STD OT
- LDD IP+1
- STD OT+1
- JMP KBIX RETURN
- * *CR* - SET *REPEAT ENTRY.*
- CFC2 LDC ERRD ERROR = *REPEAT ENTRY.*
- STD KM
- JMP KBIX RETURN
- * *+* - INCREMENT DISPLAY BY ONE SCREEN.
- CFC3 LDD DA CHECK NEXT DISPLAY ADDRESS
- LMD IN
- SHN 14
- LMD DA+1
- LMD IN+1
- ZJN CFC4 IF *IN* REACHED RETURN
- LDD DA
- STD OT
- LDD DA+1 SET NEXT LINE ADDRESS
- STD OT+1
- CFC4 JMP KBIX RETURN
- * *-* - DISPLAY PREVIOUS 18 LINES.
- CFC5 LDD OT SET DISPLAY
- STD T2
- LDD OT+1
- STD T3
- LCN 18D
- RJM SFL SEARCH FOR LINE
- LDN T2 SET DISPLAY
- RJM SDS
- JMP KBIX RETURN
- * */* - TOGGLE HOLD FLAG.
- CFC6 LDD HF
- LMN 1
- STD HF
- JMP KBIX RETURN
- * *(* - ADVANCE INSERT.
- CFC7 LDD IF
- ZJN .KBIX IF NO INSERT
- LDN 1 ADVANCE INSERT
- UJN CFC10
- * *)* - DECREMENT INSERT.
- CFC8 LDD IF
- NJN CFC9 IF INSERT
- LDD DA
- STD IP
- LDD DA+1 SET INSERT AT LAST LINE
- STD IP+1
- CFC9 LCN 1 DECREMENT INSERT
- CFC10 RJM SIL
- JMP KBIX RETURN
- * *=* - CLEAR INSERT.
- CFC11 STD IF
- JMP KBIX RETURN
- * * * - SET *P.* IN BUFFER
- CFC12 LDN 2
- STD KI
- LDN 1RP
- STM KBUF
- LDN 1R.
- STM KBUF+1
- JMP KBIX RETURN
- * (*) - HOLD DISPLAY CHANNEL.
- CFC13 RJM RID HOLD DISPLAY
- JMP KBIX RETURN
- * *0 - 7* - SET INSERT AT SCREEN START + 4*N LINES.
- CFC14 LDD OT
- STD IP
- LDD OT+1
- STD IP+1
- LDD KE
- SBN 1R0
- SHN 2
- RJM SIL SET INSERT LINE
- JMP KBIX RETURN
- * *8* - SET INSERT *8*.
- CFC15 LCN 2
- * UJN CFC16 SET INSERT *8*
- * *9* - SET INSERT *9*.
- CFC16 ADC CFCB+2
- STD T1
- LDD IF
- ZJN CFC18 IF NO INSERT
- LDD IP SET INSERT ADDRESS
- STI T1
- LDD IP+1
- CFC17 STM 1,T1
- JMP KBIX RETURN
- CFC18 LDD IN SET INSERT ADDRESS
- STI T1
- LDD IN+1
- UJN CFC17 RETURN
- * *.* - DELETE NEXT LINE.
- CFC19 RJM DNL DELETE NEXT LINE
- JMP KBIX RETURN
- * TABLE OF FIRST CHARACTER FORMATS.
- CFCA BSS 0
- LOC 1R0
- CON CFC14 0
- CON CFC14 1
- CON CFC14 2
- CON CFC14 3
- CON CFC14 4
- CON CFC14 5
- CON CFC14 6
- CON CFC14 7
- CON CFC15 8
- CON CFC16 9
- CON CFC3 +
- CON CFC5 -
- CON CFC13 *
- CON CFC6
- CON CFC7 (
- CON CFC8 )
- CON CFCX LEFT BLANK
- CON CFC11 =
- CON CFCX RIGHT BLANK
- CON CFC1 ,
- CON CFC19 .
- CON CFC2 CR
- CON KBIX BKSP
- CON CFC12 SPACE
- LOC *O
- CFCAL EQU *-CFCA
- CFCB BSS 5 INSERT *8* AND *9* BUFFER
- DIL SPACE 4,20
- ** DIL - DISPLAY INSERT LINE.
- *
- * ENTRY (DA - DA+1) = DISPLAY ADDRESS.
- *
- * CALLS DIM, DKL.
- *
- * MACROS DFIM.
- DIL SUBR ENTRY/EXIT
- LDM CFCB+1
- LMD DA+1
- NJN DIL1 IF NOT AT INSERT *8*
- LDM CFCB
- LMD DA
- NJN DIL1 IF NOT AT INSERT *8*
- LDN 1R8
- RJM DIM DISPLAY INSERT MARK
- DIL1 LDM CFCB+3
- LMD DA+1
- NJN DIL2 IF NOT AT INSERT *9*
- LDM CFCB+2
- LMD DA
- NJN DIL2 IF NOT AT INSERT *9*
- LDN 1R9
- RJM DIM DISPLAY INSERT MARK
- DIL2 LDD IF
- ZJN DILX IF NO INSERT
- LDD IP+1
- LMD DA+1
- NJN DILX IF NOT HERE
- LDD IP
- LMD DA
- NJN DILX IF INSERT NOT HERE
- RJM DKL DISPLAY KEYBOARD LINE
- LJM DILX RETURN
- DIM SPACE 4,15
- ** DIM - DISPLAY INSERT MARK.
- *
- * ENTRY (A) = INSERT MARK.
- *
- * USES T1, T3.
- *
- * MACROS DFIM.
- DFIM (LCN YINC)
- DIM3 LCN 2*YINC DECREMENT Y-COORDINATE
- RAD YC
- DIM SUBR ENTRY/EXIT
- STD T3
- LDM DBFC CHECK BUFFER REFRESH
- DFIM (ZJN DIM3)
- PSN (NO-OP ON CC545)
- LDN 0
- STD T1
- LDD YC OUTPUT Y COORDINATE
- OAN CH+40
- LDC CH04 OUTPUT X-COORDINATE
- OAN CH+40
- DIM1 LDC 2R-- DISPLAY *--*
- OAN CH+40
- AOD T1
- LMN 14
- NJN DIM1 IF NOT COMPLETE LOOP
- LDD T3
- OAN CH+40
- LDN 1R- DISPLAY * -*
- OAN CH+40
- DIM2 LDC 2R-- DISPLAY *--*
- OAN CH+40
- AOD T1
- LMN 27
- NJN DIM2 IF NOT COMPLETE LOOP
- LDC 2R- DISPLAY *- *
- OAN CH+40
- UJP DIM3 DECREMENT Y-COORDINATE
- DKL SPACE 4,15
- ** DKL - DISPLAY KEYBOARD LINE.
- *
- * ENTRY (YC) = Y-COORDINATE.
- * (XC) = *CH01*.
- * (KD) = 0.
- *
- * EXIT (A) = NEW Y-COORDINATE.
- * (KD) = 1.
- * (T1) = NUMBER OF CHARACTERS DISPLAYED.
- * (XC) = *CH01*.
- * (YC) = NEW Y-COORDINATE.
- *
- * USES T2, T5, XC, YC, CM - CM+4.
- *
- * CALLS DKP, DKS.
- *
- * MACROS DFIM.
- DKL3 LDC CH01 RESET X-COORDINATE
- STD XC
- AOD KD SET KEYBOARD LINE DISPLAYED
- DFIM (LCN YINC)
- LCN 2*YINC DECREMENT Y-COORDINATE
- RAD YC
- DKL SUBR ENTRY/EXIT
- LDN CH02-CH01
- RAD XC
- LDN 2 OUTPUT COORDINATES
- OAM XC,CH
- * LDN 0 SET DISPLAY INDEX
- STD T1
- LDC KBUF SET BUFFER ADDRESS
- STD T2
- LDD KI
- RJM DKS DISPLAY KEYBOARD STRING
- * DISPLAY ALTERNATE BUFFER.
- LDC **
- DKLA EQU *-1
- ZJN DKL1 IF NO ALTERNATE BUFFER
- ADD KI
- STD T2
- STD T5
- LDD MA SAVE COORDINATES
- CWD XC
- CRD CM
- LDN 2 RESET COORDINATES
- OAM XC,CH
- LDC ** CHECK LENGTH OF ALTERNATE LINE
- DKLB EQU *-1
- SBD KI
- MJN DKL1 IF ALTERNATE LINE TOO SHORT
- ZJN DKL1 IF ALTERNATE LINE TOO SHORT
- RJM DKS DISPLAY KEYBOARD STRING
- DFIM (LDN 2)
- UJN DKL1 RESET COORDINATES
- OAM CM,CH
- LDD T5 RESET KEYBOARD POINTER
- STD T2
- RJM DKP
- DKL1 LJM DKL3 ADJUST COORDINATES
- DKP SPACE 4,15
- ** DKP - DISPLAY KEYBOARD POINTER.
- DKP DSUB
- DKS SPACE 4,20
- ** DKS - DISPLAY KEYBOARD STRING.
- *
- * ENTRY (A) = CHARACTER COUNT.
- * (T1) = DISPLAY INDEX.
- * (T2) = BUFFER ADDRESS.
- * (XC, YC) = COORDINATES OF DISPLAY.
- *
- * EXIT (XC, YC) = UPDATED.
- *
- * CALLS DKP.
- *
- * MACROS CFNC, DFIM.
- DKS8 NJN DKS2 IF NOT END OF STRING
- DKS9 RJM DKP DISPLAY KEYBOARD POINTER
- LDD T1
- LMN 61D
- ZJN DKSX IF POINTER AT END OF LINE
- CFNC EELF
- DKS SUBR ENTRY/EXIT
- ZJN DKS9 IF NULL STRING
- ADD T2 SET END OF STRING
- STM DKSA
- DKSB LDI T2
- * UJN DKS2 (PRESET IF 63 CHARACTER SET SYSTEM)
- LMN 1RF
- ZJN DKS1 IF *F.*
- LMN 1RS&1RF
- ZJN DKS1 IF *S.*
- LDC ZJNI+DKS3-DKSC-PSNI
- DKS1 ADN PSNI
- STM DKSC
- DKS2 LDI T2 CHECK CHARACTER
- LPN 77
- STD T0
- DKSC ZJN DKS3 IF ZERO CHARACTER
- * PSN (63 CHARACTER SET)
- SBN 53
- ZJN DKS3 IF 53
- SBN 60-53
- MJN DKS5 IF LEGAL CODE
- DKSD DFIM (UJN DKS4)
- * SBN 63-60 (63 CHARACTER SET ON CDC721)
- DFIM (NJN DKS4)
- DFIM (STD T0)
- DKS4 DFIM (CFNC DSCF)
- DFIM (LDD T0)
- DFIM (UJN DKS6)
- DKS3 LDD YC UP Y
- SBN 4
- OAN CH+40
- LDD T0 DISPLAY LOWER DIGIT
- LPN 7
- ADN 1R0
- OAN CH+40
- LDD XC OUTPUT COORDINATES
- OAN CH+40
- LDD YC
- ADN 4
- OAN CH+40
- LDD T0 PREPARE UPPER DIGIT
- SHN -3
- LPN 7
- ADN 1R0
- OAN CH+40 DISPLAY UPPER DIGIT
- LDD YC
- UJN DKS6 RESET Y-COORDINATE
- DKS5 ADN 60 DISPLAY CHARACTER
- DKS6 OAN CH+40
- AOD T1
- LMN 62D
- NJN DKS7 IF NOT END OF FIRST LINE
- LDC CH03
- STD XC
- DFIM (LCN YINC)
- LCN 2*YINC DECREMENT Y-COORDINATE
- RAD YC
- OAN CH+40
- DKS7 LDN XINC ADVANCE X-COORDINATE
- RAD XC
- OAN CH+40
- AOD T2 ADVANCE BUFFER
- LMC **
- DKSA EQU *-1
- LJM DKS8 CHECK END OF STRING
- ERRPL DKS3-DKSC-40
- EDW SPACE 4,10
- ** EDW - EDIT AND DISPLAY WORD.
- EDW DSUB
- RID SPACE 4,10
- ** RID - REQUEST AND INITIALIZE DISPLAY.
- *
- * ENTRY (A) = 0 TO HOLD DISPLAY.
- * = *RDSOS* TO REQUEST DISPLAY.
- *
- * USES T1.
- *
- * CALLS HDC, RDS.
- *
- * MACROS CFNC, DFIM.
- RID1 LDM RIDA,T1 ISSUE FUNCTION
- CFNC
- SOD T1
- PJN RID1 IF MORE FUNCTIONS
- DCN CH+40
- RID SUBR ENTRY/EXIT
- STD T1
- RJM HDC,T1 HOLD / REQUEST DISPLAY
- DFIM (LDN RIDAL-1)
- UJN RIDX RETURN
- STD T1
- UJN RID1 ISSUE CDC721 FUNCTIONS
- RIDA BSS 0 FUNCTION LIST IN REVERSE ORDER
- CON CHSF
- CON RTPF
- CON SRSF
- CON RTPF
- CON SLSF
- RIDAL EQU *-RIDA LENGTH OF LIST
- TITLE MAIN PROGRAM SUBROUTINES.
- PDS SPACE 4,15
- ** PDS - PUSH DOWN I/O STACK.
- *
- * ENTRY (IO) = STACK INDEX.
- *
- * EXIT (A) = 0.
- * (IO) UPDATED.
- *
- * USES T2.
- PDS SUBR ENTRY/EXIT
- LDN 0 MOVE STACK DOWN
- STD T2
- SOD IO
- ZJN PDSX IF LAST ENTRY
- PDS1 LDM TIOB+1,T2
- STM TIOB,T2
- AOD T2
- SBD IO
- MJN PDS1 IF NOT COMPLETE LOOP
- UJN PDSX RETURN
- PRO SPACE 4,15
- ** PRO - PROCESS ROLLOUT FLAG WHILE IN HOLD.
- *
- * USES IR+1, CM - CM+4.
- *
- * CALLS DDS.
- *
- * MACROS MONITOR.
- *
- * NOTE THIS ROUTINE IS CALLED BY *COMDDSP* ROUTINE *ROF*.
- PRO LDD CP
- ADN STSW
- CRD CM
- LDD CM+1
- ZJN PRO1 IF ERROR FLAG NOT SET
- LJM /COMDDSP/ROFX
- PRO1 RJM DDS DROP DISPLAY
- LDD IR+4 SET ROLLOUT FLAG
- LPC 3777
- LMC 4000
- STD IR+4
- LDD MA WRITE REQUEST TO MESSAGE BUFFER
- CWD IR
- LDN ZERL REQUEST DEFAULT RECALL PARAMETERS
- CRD CM
- MONITOR RECM
- LJM PPR EXIT TO PP RESIDENT
- TIO SPACE 4,20
- ** TIO - TRY I/O.
- *
- * ENTRY (IO) = I/O BUSY STATUS.
- * (SFSA) = NONZERO, IF RANDOM ADDRESS MAY BE INCORRECT.
- *
- * USES T1 - T5, AB - AB+4.
- *
- * CALLS MBD, PDS, RRR, SDS, SFR.
- TIO SUBR ENTRY/EXIT
- LDD IO
- ZJN TIOX IF I/O NOT BUSY
- LDD RA READ BUFFER STATUS
- SHN 6
- ADN FET
- CRD AB
- LDD AB+4 SAVE LAST STATUS
- STD T1
- LPN 1
- ZJN TIOX IF BUSY RETURN
- LDM TIOB CHECK CURRENT REQUEST
- STD AB+4
- SHN 17D
- STD T2
- PJN TIO3 IF NOT SPECIAL REQUEST
- LDM TIOA,T2
- STD T2
- LJM 0,T2
- * SKIP TO END OF INFORMATION.
- TIO1 LDC 240 SKIP TO END OF INFORMATION
- STD AB+4
- LCN 0
- UJN TIO4
- * SKIP RECORDS.
- TIO2 LDM TIOD+1 SKIP FUNCTION
- STD AB+4
- LDM TIOD RECORD COUNT
- UJN TIO4
- * CHECK ACCURACY OF RANDOM ADDRESS.
- TIO3 LDM SFSA
- ZJN TIO4.1 IF RANDOM ADDRESS CORRECT
- LDD AB+4
- LMC 600
- ZJN TIO3.1 IF *READEI* FUNCTION
- LMC 240&600
- ZJN TIO4.1 IF *SKIPF*, *SKIPFF*, OR *SKIPEI* FUNCTION
- LDD AB+4
- SBN 40
- MJN TIO3.1 IF SIMPLE READ OR WRITE FUNCTION
- ADN 40 RESTORE FUNCTION CODE
- SHN -6
- SBN 2
- NJN TIO3.2 IF NOT COMPLEX READ OR WRITE FUNCTION
- TIO3.1 LDD HN
- STD AB+4 ISSUE *OPEN/READNR* TO SET RANDOM ADDRESS
- * ISSUE NORMAL REQUEST.
- TIO3.2 LDN 0 SET SKIP COUNT
- TIO4 SHN 14
- TIO4.1 STM TIOC+2
- SHN -6
- SCN 77
- STM TIOC+3
- LDD AB+3 CLEAR LEVEL NUMBER
- SCN 77
- STD AB+3
- LDD AB+4 CHECK IF READ FUNCTION
- LMN 12
- NJN TIO5 IF NOT READ FUNCTION
- LDD RA SAVE RANDOM ADDRESS OF RECORD
- SHN 6
- ADN FET+6
- CRM TIOF,ON
- TIO5 LDD RA STORE BUFFER STATUS
- SHN 6
- ADN FET
- CWD AB
- LDN ZERL
- CRD CM
- LDD MA CALL *CIO*
- CWM TIOC,ON
- CWD CM
- MONITOR RPPM REQUEST PP
- LDD CM+1
- NJN TIO5.1 IF PP ASSIGNED
- LDD T1 RESTORE LAST STATUS
- STD AB+4
- LDD RA
- SHN 6
- ADN FET
- CWD AB
- UJN TIO7 RETURN
- TIO5.1 LDN 0
- STM SFSA CLEAR RANDOM ADDRESS
- LDD AB+4
- LMD HN
- ZJN TIO7 IF *OPEN/READNR* ISSUED
- TIO6 RJM PDS PUSH DOWN STACK
- TIO7 LJM TIOX RETURN
- * READ IN POINTER.
- TIO8 LDD T1 CHECK READ STATUS
- SHN -3
- LMN 1
- STM CRSA SET/CLEAR RECORD READ NOT TOO LONG FLAG
- NJN TIO9 IF NOT BUFFER READ
- LDC ERRE *RECORD TOO LONG.*
- STD KM
- TIO9 LDD RA READ IN
- SHN 6
- ADN FET+2
- CRD CM
- AOD DR
- LDD CM+3 SET IN
- STD IN
- SBD FT
- SHN 14
- LMD CM+4
- STD IN+1
- SBD FT+1
- SHN -6
- STM TIOG STORE RECORD SIZE IN PRU-S
- LDD AB+4
- LMN 11
- ZJN TIO10 IF READ RANDOM RECORD
- LMN 15&11
- NJN TIO13.1 IF NOT LIST INDEX
- LDC LST2&RRR LIST INDEX OF FILE
- TIO10 LMC SFR&RRR READ RANDOM RECORD
- TIO11 LMC SFR SEARCH FOR RECORD
- LJM LOV
- * SEARCH FOR RECORD.
- TIO12 RJM PDS PUSH DOWN STACK
- * LDN 0
- UJN TIO11 LOAD RECORD SEARCH OVERLAY
- * WRITEW REQUEST.
- TIO13 LDD FT SET FIRST
- STD T2
- LDD FT+1
- STD T3
- LDD IP SET INSERT ADDRESS
- STD T4
- LDD IP+1
- STD T5
- RJM MBD MOVE BUFFER DOWN
- LDN FT SET DISPLAY = LINE 0
- RJM SDS
- TIO13.1 LJM TIO6 PUSH DOWN STACK AND RETURN
- * REWIND POINTERS (IN = OUT = FIRST) AFTER WRITE.
- TIO14 LDN ZERL
- CRD CM
- LDC CBUF SET FIRST
- STD CM+4
- LDD RA
- SHN 6
- ADN FET+2 WRITE IN
- CWD CM
- ADN 1 WRITE OUT
- CWD CM
- JMP TIO6 COMPLETE
- * TIO15 - REWRITE RECORD (MASS STORAGE ONLY)
- TIO15 LDD RA CHECK IF RANDOM FILE
- SHN 6
- ADN FET+1
- CRD CM READ FET+1
- LDD CM+1
- LPC 4000
- NJN TIO17 IF RANDOM BIT SET
- * LDN 0 CLEAR IO STACK
- STD IO
- LDC =C*FILE NOT ON MASS STORAGE.*
- TIO16 LJM ERR1 DISPLAY ERROR
- TIO17 LDN ZERL INITIALIZE RANDOM ADDRESS
- CRD CM
- LDM TIOF+2 CHECK IF RANDOM ADDRESS AVAILIABLE
- ADM TIOF+1
- NJN TIO18 IF .NE. 0
- * LDN 0 CLEAR IO STACK
- STD IO
- LDC =C*NO RANDOM ADDRESS.*
- UJN TIO16 DISPLAY ERROR MESSAGE
- TIO18 LDM TIOF+1 SET RANDOM ADDRESS
- SHN 14
- STD CM+3
- LMD CM+3
- ADM TIOF+2
- SHN -6
- STD CM+4
- LDC 224 SET CIO REWRITER FUNCTION
- STD AB+4
- LDD RA
- SHN 6
- ADN FET+6
- CWD CM
- LJM TIO3 CONTINUE NORMAL PROCESSING
- TIOA CON TIO8 1 - READ IN POINTER
- CON TIO1 3 - SKIP TO EOI
- CON TIO2 5 - SKIP RECORDS
- CON TIO12 7 - SEARCH FOR RECORD
- CON TIO8 11 - READ RANDOM RECORD
- CON TIO13 13 - WRITEW REQUEST
- CON TIO8 15 - LIST FILE INDEX
- CON TIO14 17 - SET FIRST = IN = OUT
- CON TIO15 21 - REWRITE RECORD(MASS STORAGE ONLY)
- TIOB BSSZ 10
- TIOC VFD 24/0LCIO,18/0,18/FET
- TIOD CON 0,0 COUNT AND SKIP CODE
- TIOE CON 0 TEXT RECORD FLAG
- TIOF VFD 60/0 FET+6 (RANDOM ADDRESS)
- TIOG CON 0 NUMBER OF PRU,S IN BUFFER
- WIO SPACE 4,15
- ** WIO - WAIT I/O.
- *
- * ENTRY (IO) = I/O BUSY FLAG.
- *
- * CALLS PSS, TIO.
- WIO SUBR ENTRY/EXIT
- WIO1 RJM PSS PAUSE FOR SYSTEM
- LDD IO
- ZJN WIOX IF STACK EMPTY RETURN
- RJM TIO TRY I/O
- UJN WIO1 LOOP
- TITLE KEYBOARD ENTRY PROCESSING.
- INT SPACE 4,15
- ** INT - INTERPRET KEYBOARD BUFFER.
- *
- * ENTRY (T5) = 0 IF INTERPRET ONLY.
- * (T5) .NE. 0 IF EXECUTE REQUESTED.
- * (KI) = END OF BUFFER POINTER.
- *
- * EXIT TO *LOV* TO LOAD SYNTAX OVERLAY IF SYNTAX NOT LOADED.
- *
- * USES T1 - T7.
- *
- * CALLS ENTRY PROCESSOR.
- * LOAD SYNTAX OVERLAY IF NOT ALREADY LOADED.
- INT13 LDC SCT
- LJM LOV LOAD COMMAND TABLE
- INT UJN INT13 LOAD SYNTAX OVERLAY IF NOT LOADED
- * LDN TSFM-1 SET TABLE ADDRESS
- STD T2
- LDN 0 SET TRIAL CHARACTER
- STD T1
- INT1 AOD T2 ADVANCE TABLE
- LDD RA
- SHN 6
- ADD T2
- CRD CM
- LDN CM
- STD T4
- LDI T4
- NJN INT2 IF NOT END OF TABLE
- LJM INT9
- INT2 LDC KBUF SET CHARACTER ADDRESS
- STD CA
- INT3 LDI T4 COMPARE UPPER
- SHN -6
- ZJN INT7 IF COMPARE COMPLETE
- STD T6
- LMI CA
- NJN INT4 IF NO MATCH
- AOD CA
- LDD T4
- LMN CM+3
- ZJN INT7 IF COMPARE COMPLETE
- LDI T4 COMPARE LOWER
- LPN 77
- ZJN INT7 IF COMPARE COMPLETE
- STD T6
- LMI CA
- NJN INT4 IF NO MATCH
- AOD CA
- AOD T4
- UJN INT3 LOOP
- * PROCESS NO HIT.
- INT4 LDD CA CHECK FOR END OF COMPARE
- ADC -KBUF
- LMD KI
- NJN INT5 IF NOT END OF KEYBOARD STRING
- LDD T1
- NJN INT6 IF NOT UNIQUE ENTRY
- LDD T6 SET NEXT CHARACTER
- STD T1
- INT5 LJM INT1 LOOP
- INT6 LMD T6
- ZJN INT5 IF SAME CHARACTER LOOP
- UJN INT10
- * PROCESS UNIQUE CHARACTER.
- INT7 LDD T5
- ZJN INT11 IF NO INTERPRET
- LDD CM+3 PROCESS ENTRY
- LPN 77
- SHN 14
- LMD CM+4
- LJM LOV
- * PROCESS END OF FORMAT SCAN.
- INT9 LDD T1
- NJN INT12 IF UNIQUE CHARACTER
- SOD KI BACKSPACE POINTER
- LDN 1R
- STM KBUF,KI
- INT10 LDD T5
- ZJN INT11 IF EXECUTE FLAG NOT SET
- LDC ERRD *REPEAT ENTRY.*
- STD KM
- INT11 LJM KBIX RETURN
- INT12 SBN 1R
- PJN INT10 IF SPECIAL CHARACTER
- LDD T1 FILL NEXT CHARACTER
- STM KBUF,KI
- AOD KI
- LJM INT LOOP
- CIF SPACE 4,10
- ** CIF - CLEAR INSERT FLAG.
- CIF LDN 0 CLEAR INSERT FLAG
- STD IF
- LDN ZERL
- CRM CFCB,ON CLEAR INSERT *8* AND *9*
- UJN RET
- PLB SPACE 4,15
- ** PLB - PROCESS *LEFT BLANK*.
- PLB LDN 0 CLEAR KEYBOARD MESSAGE
- STD KM
- * UJN RET PROCESS AS NORMAL RETURN
- RET SPACE 4,10
- ** RET - NORMAL RETURN.
- RET LDN 0 CLEAR INDEX
- RET1 STD T1 SET CLEARING INDEX
- AOD DR
- LDD KM
- NJN RET3 IF MESSAGE SET
- LDD T1 SET KEYBOARD INDEX
- STD KI
- RET2 LDN 1R CLEAR BUFFER
- STM KBUF,T1
- AOD T1
- ADC -KBUFL
- MJN RET2 IF NOT AT END OF BUFFER - LOOP
- * LDN 0 CLEAR ALTERNATE DISPLAY BUFFER
- STM DKLA
- STD LC CLEAR LAST CHARACTER POSITION
- RET3 JMP KBIX RETURN
- ABT SPACE 4,10
- ** ABT - ABORT LOAD.
- ABT LDN 0 CLEAR KEYBOARD MESSAGE
- STD KM
- ABT1 LDC KBI8 CLEAR OVERLAY LOAD
- STM KBIA
- JMP KBIX RETURN
- KIC SPACE 4,10
- ** KIC - INCOMPLETE RETURN.
- *
- * ENTRY (A) = MESSAGE ADDRESS.
- *
- * EXIT TO KBIX.
- *
- * USES T1.
- KIC STD T1
- LDD KE
- LMN 53
- ZJN ABT IF *LEFT BLANK*
- LDD KM
- NJN KIC1 IF MESSAGE
- LDD T1
- STD KM
- KIC1 JMP KBIX RETURN
- ERR SPACE 4,7
- ** ERR - FORMAT ERROR RETURN.
- ERR LDC ERRA SET FORMAT ERROR
- ERR1 STD KM
- JMP KBIX RETURN
- ADD SPACE 4,20
- ** ADD - ASSEMBLE DECIMAL DIGITS.
- *
- * ENTRY (A) = CHARACTER ADDRESS.
- *
- * EXIT (A) = SEPARATOR CHARACTER.
- * (AB - AB+4) = ASSEMBLED DIGITS RIGHT ADJUSTED.
- * (T1) = UPDATED CHARACTER ADDRESS.
- *
- * USES T0 - T2.
- ADD SUBR ENTRY/EXIT
- STD T1 SET CHARACTER ADDRESS
- LDN ZERL CLAR ASSMEBLY
- CRD AB
- ADD1 LDI T1 CHECK CHARACTER
- SBN 1R0
- MJN ADD2 IF ALPHA
- SBN 1R+-1R0
- MJN ADD3 IF DIGIT
- SBN 1R -1R+
- ZJN ADD5 IF * *
- ADD2 LDI T1 RETURN WITH CHARACTER
- UJN ADDX
- ADD3 ADN 1R+-1R0 NEW DIGIT = CHARACTER
- STD T0
- LDN AB+4 SET BYTE ADDRESS
- STD T2
- ADD4 LDI T2 BYTE = BYTE * 10D
- SHN 2
- ADI T2
- SHN 1
- ADD T0 ADD NEW DIGIT
- STI T2
- SHN -14 NEW DIGIT = OVERFLOW
- STD T0
- SOD T2 DECREMENT BYTE ADDRESS
- LMN AB-1
- NJN ADD4 IF NOT END OF WORD LOOP
- ADD5 AOD T1 ADVANCE CHARACTER
- UJN ADD1 LOOP
- ASN SPACE 4,20
- ** ASN - ASSEMBLE NAME.
- *
- * ENTRY (A) = CHARACTER ADDRESS.
- *
- * EXIT (A) = SEPARATOR CHARACTER.
- * (T1) = CHARACTER ADDRESS.
- * (AB - AB+4) = LEFT JUSTIFIED ASSEMBLY.
- *
- * USES T1, T2.
- ASN SUBR ENTRY/EXIT
- STD T1 STORE CHARACTER ADDRESS
- LDN ZERL CLEAR ASSEMBLY
- CRD AB
- LDN AB SET BYTE ADDRESS
- STD T2
- ASN1 LDI T1 CHECK UPPER
- SBN 1R+
- PJN ASN2 IF SEPARATOR
- ADN 1R+ STORE CHARACTER
- SHN 6
- STI T2
- AOD T1 CHECK LOWER
- LDI T1
- SBN 1R+
- PJN ASN2 IF SEPARATOR
- ADN 1R+ STORE CHARACTER
- RAI T2
- AOD T1
- AOD T2
- LMN AB+4
- NJN ASN1 IF NOT 7 CHARACTERS LOOP
- ASN2 LDI T1 RETURN
- UJN ASNX
- CIO SPACE 4,10
- ** CIO - CALL CIO.
- *
- * ENTRY (A) = REQUEST.
- *
- * EXIT STACK ENTRY MADE.
- CIO SUBR ENTRY/EXIT
- STM TIOB,IO ENTER REQUEST
- LDC *
- CIOA EQU *-1 TERMINAL TYPE FLAG
- NJN CIO1 IF NOT TERMINAL TYPE
- LDC ERRF
- JMP ERR1 PROCESS ERROR
- CIO1 AOD IO
- LMN 10
- NJN CIOX IF STACK NOT FULL
- SOD IO
- UJN CIOX RETURN
- CRS SPACE 4,10
- ** CRS - CHECK RECORD STATUS.
- *
- * EXIT TO *ERR1*, IF WRITE ATTEMPTED ON READ-ONLY FILE,
- * OR THE RECORD READ WAS TOO LONG.
- CRS SUBR ENTRY/EXIT
- LDC *
- CRSA EQU *-1 (RECORD READ NOT TOO LONG FLAG)
- ZJN CRS1 IF RECORD READ WAS TOO LONG
- LDC **
- CRSB EQU *-1 (WRITE LOCKOUT FLAG)
- ZJN CRSX IF WRITE IS ALLOWED
- LDN ERRF-ERRE *WRITE ON READ-ONLY FILE.*
- CRS1 ADC ERRE *RECORD TOO LONG.*
- JMP ERR1 PROCESS ERROR
- DNL SPACE 4,20
- ** DNL - DELETE NEXT LINE.
- *
- * USES T2 - T5, CM - CM+4.
- *
- * CALLS MBD, SFL.
- DNL3 STD IF CLEAR INSERT FLAG
- LDD IP DELETE LAST LINE
- STD IN
- LDD IP+1
- STD IN+1
- DNL SUBR ENTRY/EXIT
- LDD IF
- ZJN DNLX IF INSERT FLAG NOT SET
- LDD IP SET FIRST ADDRESS
- STD T2
- STD T4
- LDD IP+1
- STD T3
- STD T5
- DNL1 LDD T4 CHECK ADDRESS
- LMD IN
- NJN DNL2 IF *IN* NOT REACHED
- LDD T5
- LMD IN+1
- ZJN DNL3 IF *IN* REACHED RETURN
- DNL2 LDD T4 READ WORD
- SHN 6
- ADD RA
- SHN 6
- ADD T5
- CRD CM
- AOD T5 ADVANCE ADDRESS
- SHN -14
- RAD T4
- LDD CM+4
- NJN DNL1 IF NOT END OF LINE LOOP
- LDN ZERL CLEAR INSERT *8* AND *9*
- CRM CFCB,ON
- RJM MBD MOVE BUFFER DOWN
- LJM DNLX RETURN
- MBD SPACE 4,20
- ** MBD - MOVE BUFFER DOWN.
- *
- * ENTRY (T2 - T3) = TARGET ADDRESS.
- * (T4 - T5) = FWA OF DATA.
- * (IN - IN+1) = LWA+1 OF DATA.
- *
- * USES T1.
- *
- * CALLS SDB, SIP.
- MBD SUBR ENTRY/EXIT
- LDD T2 SET INCREMENT
- SBD T4
- SHN 14
- ADD T3
- SBD T5
- STM MBDA+1
- STM SDBA+1
- SHN -14
- LMC ADCI
- STM MBDA
- STM SDBA
- LDD IN COMPUTE MOVE WORD COUNT
- SBD T4
- SHN 14
- ADD IN+1
- SBD T5
- SHN 13D SET BLOCK COUNT
- STD T1
- SHN -13D SET ODD SIZE
- STD T2
- LDN 0 CLEAR CURRENT BLOCK COUNT
- STD T3
- LDD T1
- ZJN MBD2 IF NO FULL BLOCKS
- * MOVE COMPLETE BLOCKS.
- MBD1 LDN 40
- RJM SDB SHIFT 40 WORDS OF DATA
- AOD T3
- LMD T1
- NJN MBD1 IF ALL BLOCKS NOT COMPLETE LOOP
- * MOVE LAST ODD BLOCK.
- MBD2 LDD T2
- ZJN MBD3 IF NO ODD BLOCK
- RJM SDB SHIFT ODD DATA BLOCK
- MBD3 LDD IN SET NEW IN
- SHN 14
- LMD IN+1
- MBDA ADC -* (DISTANCE DATA IS BEING MOVED)
- STD IN+1
- SHN -14
- STD IN
- RJM SIP SET IN POINTER
- LJM MBDX RETURN
- PKL SPACE 4,20
- ** PKL - PACK LINE INTO BUFFER BUF.
- *
- * ENTRY (CA) = CHARACTER ADDRESS.
- *
- * EXIT (T7) = LENGTH OF LINE IN CM WORDS.
- *
- * USES T1 - T3, T5, BUF - BUF+50.
- PKL SUBR ENTRY/EXIT
- LDN 0 CLEAR WORD COUNT
- STD T7
- LDD CA FORM CHARACTER LWA
- ADC KBUFL/10D*10D ROUND BUFFER TO CM WORD BOUNDARY
- STM PKLA
- LDN ZERL
- CRM CFCB,ON CLEAR INSERT *8* AND *9*
- LDC BUF SET BYTE ADDRESS
- STD T1
- ADN KBUFL/10D*5D FORM LWA OF BUFFER
- STM PKLB
- PKL1 LDN 5 SET BYTE COUNT
- STD T2
- PKL2 LDI CA UPPER CHARACTER
- SHN 6
- STI T1
- AOD CA
- LDI CA LOWER CHARACTER
- LPN 77
- RAI T1
- AOD CA ADVANCE CHARACTER ADDRESS
- AOD T1 ADVANCE BYTE ADDRESS
- SOD T2 DECREMENT BYTE COUNT
- NJN PKL2 IF NOT FULL WORD LOOP
- AOD T7 ADVANCE CM WORD COUNT
- LDD CA CHECK FOR END OF BUFFER
- LMC *
- PKLA EQU *-1 (LWA OF CHARACTER BUFFER)
- NJN PKL1 IF NOT END OF BUFFER
- * DELETE TRAILING BLANK BYTES.
- LDN 5
- PKL3 STD T2 SET BYTE COUNTER
- PKL4 SOD T1 DECREMENT BYTE ADDRESS
- LMC BUF
- ZJN PKL7 IF AT BEGINNING OF BUFFER
- LDI T1 CHECK FOR BLANK BYTES
- LMC 2R
- NJN PKL5 IF NOT BLANK BYTE
- STI T1 CLEAR BYTE
- SOD T2 DECREMENT BYTE COUNTER
- PJN PKL4 IF MORE BYTES IN WORD
- SOD T7 DECREMENT CM WORD COUNT
- LDN 4 RESET BYTE COUNTER
- UJN PKL3 CHECK NEXT BYTE
- PKL5 LPN 77
- NJN PKL6 IF EVEN NUMBER OF BLANKS
- LDI T1 CLEAR ODD-NUMBERED BLANK
- SCN 77
- STI T1
- * CHECK FOR END OF LINE.
- PKL6 AOD T1
- LMM PKLB
- NJN PKL7 IF TRAILING BLANKS ZEROED
- AOD T7 INCREMENT CM WORD COUNT
- LDN ZERL WRITE END OF LINE
- CRM *,ON
- PKLB EQU *-1 (LWA OF BUFFER BUF)
- PKL7 LJM PKLX RETURN
- PRT SPACE 4,20
- ** PRT - PROCESS TAB.
- *
- * USES T1, KI.
- PRT LDM KBUF+1
- LMN 1R.
- ZJN PRT2 IF 2ND CHARACTER = *.*
- LDD SF
- ZJN PRT1 IF NO SCAN NOT REQUESTED RETURN
- AOD SI SET NEXT SCAN
- LDM TSCN-1,SI
- STD SC
- NJN PRT1 IF NOT END OF TABLE RETURN
- STD SI RESET SCAN INDEX
- PRT1 JMP KBIX RETURN
- * PROCESS CHARACTER TAB.
- PRT2 LDN 1R PRESET * *
- STD T1
- LDM KBUF CHECK FIRST CHARACTER
- LMN 1RD
- ZJN PRT3 IF *D*
- LMN 1RE&1RD
- ZJN PRT3 IF *E*
- LMN 1RF&1RE
- ZJN PRT5 IF *F*
- LMN 1RA&1RF
- ZJN PRT3 IF *A*
- LMN 1RN&1RA
- ZJN PRT4 IF *N*
- LMN 1RL&1RN
- NJN PRT6 IF NOT *L*
- PRT3 STM KBSA
- PRT4 LDM DBUF,KI SET TAB CHARACTER
- LPN 77
- PRT5 STD T1 SET TAB CHARACTER
- PRT6 LDD T1 STORE TAB CHARACTER
- STM KBUF,KI
- AOD KI CHECK FOR END OF BUFFER
- ADC -KBUFL
- PJN PRT7 IF BUFFER FULL
- LDM DBUF,KI CHECK FOR TAB COLUMN
- SHN 7
- MJN PRT8 IF TAB COLUMN
- LDD KI CHECK FOR LAST CHARACTER OF ORIGINAL LINE
- SBN 2
- LMD LC
- ZJN PRT8 IF AT LAST COLUMN
- LJM PRT2 LOOP UNTIL TAB COLUMN REACHED
- * BKSP OVER END OF BUFFER.
- PRT7 SOD KI CLEAR ENTRY
- LDN 1R
- STM KBUF,KI
- PRT8 JMP KBIX RETURN
- RDL SPACE 4,20
- ** RDL - READ LINE FROM BUFFER.
- *
- * ENTRY (CA) = CHARACTER ADDRESS.
- *
- * EXIT (T4) = LAST CHARACTER ADDRESS.
- * (LC) = CHARACTER COUNT OF LINE.
- *
- * USES T1 - T3, CM - CM+4.
- RDL SUBR ENTRY/EXIT
- LDD IF
- NJN RDL1 IF INSERT SET
- LJM ERR INCORRECT ENTRY
- RDL1 LDD IP+1 CHECK INSERT
- LMD IN+1
- NJN RDL2 IF IN RANGE
- LDD IP
- LMD IN
- NJN RDL2 IF IN RANGE
- LDC =C*OUT OF RANGE.*
- LJM ERR1
- * READ LINE FROM CM BUFFER.
- RDL2 LDN 19D READ LINE FROM BUFFER
- STD T1
- LDD IP
- SHN 6
- ADD RA
- SHN 6
- ADD IP+1
- CRM BUFR,T1
- LDC BUFR SET BUFFER ADDRESS
- STD T1
- LDD CA SET CHARACTER ADDRESS
- STD T4
- LDI T1
- ADM 1,T1
- ADM 2,T1
- ADM 3,T1
- ADM 4,T1
- NJN RDL3 IF NOT NULL BUFFER
- LDC 2R
- STI T1
- * UNPACK LINE INTO BUFFER.
- RDL3 LDI T1
- NJN RDL4 IF NON-ZERO BYTE
- LDD T1
- ADC -BUFR
- * CHECK FOR MULTIPLE OF 5.
- ADN 1 COMPENSATE FOR 0
- RDL3.1 SBN 5
- ZJN RDL5 IF END OF LINE
- PJN RDL3.1 IF NOT COMPLETE
- RDL4 LDI T1 UNPACK CHARACTER
- SHN -6
- STI T4 UPPER CHARACTER
- AOD T4
- LDI T1 UNPACK LOWER CHARACTER
- LPN 77
- STI T4
- AOD T1
- AOD T4 ADVANCE CHARACTER COUNT
- SBD CA
- ADC -KBUFL CHECK FOR END OF BUFFER
- MJN RDL3 IF BUFFER NOT FULL - LOOP
- * COPY LINE TO DUP BUFFER.
- RDL5 SOD T4 BACK UP IN BUFFER
- LDI T4
- ZJN RDL5 IF *00* CHARACTER
- AOD T4 FIRST *00* CHARACTER ADDRESS
- LDC DBUF+2
- STD T2
- LDD CA SET CHARACTER ADDRESS
- STD T1
- RDL6 LDI T2 REPLACE DUP CHARACTER
- SCN 77
- LMI T1
- STI T2
- AOD T2
- AOD T1 ADVANCE CHARACTER
- LMD T4
- NJN RDL6 IF NOT END OF LINE LOOP
- LDD T2 SET DUP BUFFER LENGTH
- ADC -DBUF
- STM DKLB
- * CLEAR TO END OF BUFFER.
- RDL7 LDI T2 BLANK FILL TO END OF BUFFERS
- SCN 77
- ADN 1R
- STI T2
- LDN 1R KEYBOARD BUFFER
- STI T1
- AOD T2
- AOD T1
- SBD CA
- ADC -KBUFL CHECK FOR END OF BUFFER
- MJN RDL7 IF NOT END OF BUFFER - LOOP
- LDD T4 SET CHARACTER COUNT
- SBD CA
- STD LC
- LJM RDLX RETURN
- SDB SPACE 4,10
- ** SDB - SHIFT DATA BLOCK IN CENTRAL MEMORY.
- *
- * ENTRY (A) = NUMBER OF CM WORDS TO BE SHIFTED.
- * (T3) = COUNT OF DATA BLOCKS SHIFTED.
- * (T4 - T5) = FWA OF DATA TO BE SHIFTED.
- *
- * USES T7, BUFM - BUFM+240.
- SDB SUBR ENTRY/EXIT
- STD T7 SET SHIFT COUNT
- LDD T4 SET CM SHIFT ADDRESS
- SHN 6
- ADD RA
- SHN 1 ADD COUNT OF SHIFTED BLOCKS
- ADD T3
- SHN 5
- ADD T5
- CRM BUFM,T7
- SBD T7 REPLACE BLOCK AT LOWER CM ADDRESS
- SDBA ADC -* (DISTANCE DATA IS BEING MOVED)
- CWM BUFM,T7
- UJN SDBX RETURN
- SDS SPACE 4,20
- ** SDS - SET DISPLAY.
- *
- * ENTRY (A) = ADDRESS OF ADDRESS POINTER.
- * (DL) = LENGTH OF DISPLAY.
- *
- * EXIT (OT - OT+1) = FIRST LINE ADDRESS.
- *
- * USES T1 - T3.
- *
- * CALLS SFL.
- SDS2 LDD IN CHECK END OF DISPLAY
- SBD OT
- SHN 14
- ADD IN+1
- SBD OT+1
- SBD DL
- ZJN SDSX IF LAST LINE ON SCREEN
- LDD OT ADVANCE ONE LINE
- STD T2
- LDD OT+1
- STD T3
- LDN 1
- RJM SFL SEARCH FOR LINE
- LDD T2
- STD OT
- LDD T3
- STD OT+1
- SDS SUBR ENTRY/EXIT
- STD T1 SAVE INDEX
- LDI T1
- SBD OT
- SHN 14
- ADM 1,T1
- SBD OT+1
- MJN SDS1 IF LINE .LT. FIRST LINE
- SBD DL CHECK END OF SCREEN
- ZJN SDS2 IF AT END OF DISPLAY
- MJN SDSX IF LINE ON DISPLAY
- SDS1 LDI T1 SET DISPLAY ADDRESS
- STD OT
- LDM 1,T1
- STD OT+1
- UJN SDSX RETURN
- SFL SPACE 4,20
- ** SFL - SEARCH FOR LINE.
- *
- * ENTRY (A) = NUMBER OF LINES TO ADVANCE/DECREMENT.
- * (T2 - T3) = CURRENT ADDRESS.
- *
- * EXIT (T2 - T3) = LINE ADDRESS.
- *
- * USES T1 - T3, CM - CM+4.
- * SEARCH BACKWARDS FOR LINE.
- SFL2 LDD T2 CHECK FOR START OF BUFFER
- LMD FT
- SHN 14
- LMD T3
- LMD FT+1
- ZJN SFLX IF AT START OF BUFFER
- SFL3 LDD T2 READ PREVIOUS WORD
- SHN 6
- ADD RA
- SHN 6
- ADD T3
- SBN 2
- CRD CM
- SOD T3 DECREMENT ADDRESS
- PJN SFL4 IF NO CARRY
- AOD T3
- SOD T2
- SFL4 LDD CM+4
- NJN SFL3 IF NOT END OF PREVOIUS LINE LOOP
- AOD T1 ADVANCE LINE NUMBER
- ADC 770000
- NJN SFL2 IF NOT COMPLETE
- SFL SUBR ENTRY/EXIT
- STD T1 SAVE LINE NUMBER
- MJN SFL2 IF SEARCH BACKWARDS
- * SEARCH FORWARD FOR LINE.
- SFL1 LDD T2
- LMD IN
- SHN 14
- LMD T3
- LMD IN+1
- ZJN SFLX IF ADDRESS = IN
- LDD T2 READ WORD
- SHN 6
- ADD RA
- SHN 6
- ADD T3
- CRD CM
- AOD T3 ADVANCE ADDRESS
- SHN -14
- RAD T2
- LDD CM+4
- NJN SFL1 IF NOT END OF LINE LOOP
- SOD T1 DECREMENT LINE COUNT
- NJN SFL1 IF ADVANCEMENT/DECREMENT NOT COMPLETE LOOP
- UJN SFLX RETURN
- SFN SPACE 4,20
- ** SFN - SET FILE NAME.
- *
- * ENTRY (CA) = CHARACTER ADDRESS.
- * (SFSA) = NONZERO, TO CHECK RANDOM ADDRESS.
- *
- * EXIT (CA) = UPDATED.
- *
- * USES CM, AB+4.
- *
- * CALLS ASN, SFS.
- SFN SUBR ENTRY/EXIT
- LDD CA CHECK FOR END OF KEYBOARD BUFFER
- ADC -KBUF
- LMD KI
- ZJN SFN2 IF NO FILE NAME
- LDD CA ASSEMBLE NAME
- RJM ASN
- LMN 1R.
- ZJN SFN1 IF *.*
- LJM ERR FORMAT ERROR
- SFN1 LDD T1 UPDATE CHARACTER INDEX
- STD CA
- LDD AB CHECK ASSEMBLY
- ZJN SFN2 IF NO FILE NAME ASSEMBLED RETURN
- LDN 1 SET STATUS
- STD AB+4
- RJM SFS
- SFN2 LDN 0 CLEAR CONSOLE MESSAGE
- STD CM
- LDD CP
- ADN MS1W
- CWD CM
- ADN MS2W-MS1W
- CWD CM
- UJN SFNX RETURN
- SFS SPACE 4,20
- ** SFS - SET FILE STATUS.
- *
- * ENTRY (AB - AB+4) = FILE NAME.
- *
- * EXIT (SFSA) = NONZERO, TO CHECK RANDOM ADDRESS.
- *
- * USES T1, T2, CM - CM+4.
- SFS SUBR ENTRY/EXIT
- LDN 0
- STM CRSB CLEAR WRITE LOCKOUT
- LDN 1
- STM CIOA INITIALIZE TO NON TERMINAL TYPE
- LDD CP READ FIELD LENGTH STATUS WORD
- ADN FLSW
- CRD CM
- LDD CM SET END OF NFL
- SHN 6
- ADN 1
- STD T1
- LDC FNTN START OF FNT
- STD T2
- SFS1 LDN LENF ADVANCE FNT ADDRESS
- RAD T2
- SBD T1
- PJP SFS2 IF END OF FILES
- NFA T2,R READ FNT ENTRY
- CRD CM
- LDD CM
- ZJN SFS1 IF BLANK ENTRY
- LMD AB COMPARE FILE NAMES
- NJN SFS1 IF NO COMPARE ON BYTE 0
- LDD CM+1
- LMD AB+1
- NJN SFS1 IF NO COMPARE ON BYTE 1
- LDD CM+2
- LMD AB+2
- NJN SFS1 IF NO COMPARE ON BYTE 2
- LDD CM+3
- LMD AB+3
- SCN 77
- NJN SFS1 IF NO COMPARE ON BYTE 3
- LDD CM+3
- LPN 1
- STM CRSB SET WRITE LOCKOUT STATUS
- NFA T2,R READ FST INFORMATION
- ADN FSTL READ FST ENTRY
- CRD CM
- LDD CM GET EQUIPMENT TYPE
- SBK TTEQ CHECK FOR TERMINAL TYPE PSEUDO EQUIPMENT
- STM CIOA SET TO 0 IF TERMINAL TYPE
- LDD CM+4 SET LAST BUFFER STATUS
- STD AB+4
- SFS2 LDD RA STORE FILE NAME
- SHN 6
- ADN FET
- CWD AB
- ADN 1 SET RANDOM ACCESS BIT
- CRD CM
- LDD CM+1
- LPC 3777
- LMC 4000
- STD CM+1
- STM SFSA SET RANDOM ADDRESS FLAG
- LDD RA
- SHN 6
- ADN FET+1
- CWD CM
- LJM SFSX RETURN
- SFSA CON 0 RANDOM ADDRESS FLAG
- SIL SPACE 4,20
- ** SIL - SET INSERT LINE.
- *
- * ENTRY (A) = INCREMENT FROM CURRENT POSITION.
- *
- * USES T1, T2, T3.
- *
- * CALLS SDS, SFL.
- SIL SUBR ENTRY/EXIT
- ZJN SIL1 IF NO CHANGE
- ADN 1
- STD T1
- LDD IP SEARCH FOR INSERT
- STD T2
- LDD IP+1
- STD T3
- LDD T1 SEARCH FOR LINE
- SBN 1
- RJM SFL
- LDD T2 SET LINE ADDRESS
- STD IP
- LDD T3
- STD IP+1
- SIL1 LDN 1 SET INSERT FLAG
- STD DR
- STD IF
- LDN IP SET DISPLAY
- RJM SDS
- UJN SILX RETURN
- SIP SPACE 4,15
- ** SIP - SET IN POINTER.
- *
- * USES CM - CM+4.
- SIP SUBR ENTRY/EXIT
- LDN ZERL STORE IN
- CRD CM
- LDD IN
- STD CM+3
- LDD IN+1
- STD CM+4
- LDD RA
- SHN 6
- ADN FET+2
- CWD CM
- UJN SIPX RETURN
- WRW SPACE 4,10
- ** WRW - WRITE AND REWIND FILE.
- *
- * CALLS CIO, CRS, SIP.
- WRW SUBR ENTRY/EXIT
- RJM CRS CHECK RECORD STATUS
- RJM SIP STORE IN POINTER
- LDN 26 WRITE END OF RECORD
- RJM CIO
- LDN 52 REWIND
- RJM CIO
- UJN WRWX RETURN
- TABLE SPACE 4,10
- ** RESIDENT TABLES AND BUFFERS.
- TSCN BSSZ 10 SCAN TABLE
- SFRA DATA H*SEARCH / *
- SFRB BSS 5
- TITLE RESIDENT ENTRY PROCESSORS.
- O26 SPACE 4
- QUAL O26
- DIS. SPACE 4,15
- *** DIS.
- *
- * WRITE AND REWIND FILE AND CALL DIS TO CONTROL POINT.
- DIS ENTRY
- RJM WRW WRITE AND REWIND FILE
- DIS1 LDN DSEQ SET EST ORDINAL IN INPUT REGISTER
- LMC 4000 FORCE DIRECT CALL
- STD IR+4
- RJM DDS DROP DISPLAY
- RJM WIO WAIT I/O
- DIS2 LDC 2RDI SET *DIS* IN INPUT REGISTER
- STD IR
- LCN 1R6-1RS
- SHN 6
- RAD IR+1
- LDD IA WRITE INPUT REGISTER FOR *DIS*
- CWD IR
- LJM PPR EXIT TO PP RESIDENT
- DROP. SPACE 4,10
- *** DROP.
- *
- * WRITE AND REWIND FILE AND DROP DISPLAY.
- DRP ENTRY
- RJM WRW WRITE AND REWIND FILE
- DRP1 RJM DDS DROP DISPLAY
- RJM WIO WAIT I/O
- LJM DPP DROP PP
- XDIS. SPACE 4,8
- *** XDIS.
- *
- * CALL DIS TO CONTROL POINT ONLY. (NO WRITE)
- XDS ENTRY DIS1
- XDROP. SPACE 4,8
- *** XDROP.
- *
- * DROP DISPLAY ONLY. (NO WRITE)
- XDD ENTRY DRP1
- TER SPACE 4,20
- * TERMINATE RESIDENT ROUTINES.
- QUAL
- HERE
- DIS HERE
- USE END
- OVL SPACE 4
- ** OVERLAY AREA.
- OVL EQU *+5
- TITLE PRESET PROGRAM.
- PRS SPACE 4
- ** TTAB - TAB TABLE.
- * ENTRY = COLUMN NUMBER.
- TTAB BSS 0
- DATA 11D
- DATA 18D
- DATA 30D
- CON 40D
- CON 50D
- CON 60D
- CON 73D
- DATA 80D
- DATA 0 END OF TABLE
- PRS SPACE 4,20
- ** PRS - PRESET PROGRAM.
- *
- * EXIT (NC) = NUMBER OF CP-S.
- PRS5 LDN 0 CLEAR KEYBOARD AND TAB BUFFERS
- STD T1
- PRS6 LDN 1R BLANK FILL BUFFERS
- STM DBUF,T1
- STM BUFM,T1
- STM BUF,T1
- AOD T1
- LMC KBUFL
- NJN PRS6 IF NOT COMPLETLY FILLED
- STD T1
- LDC TTAB SET TAB TABLE ADDRESS
- STD T2
- PRS7 LDI T2
- ZJN PRS8 IF END OF TABLE
- STD T3
- LDC 6000 STORE TAB
- RAM DBUF+1,T3
- AOD T2
- UJN PRS7 CHECK FOR END OF TABLE
- PRS8 LDN ZERL CLEAR (RA - RA+FET-1)
- CRD CM
- PRS9 LDD RA
- SHN 6
- ADD T1
- CWD CM
- AOD T1
- LMN FET
- NJN PRS9 IF NOT COMPLETE
- LDC SCT
- LJM LOV LOAD COMMAND TABLE
- USE PRS
- PRS LDN 10
- STD CM+4
- LDN CCTS CLEAR *DIS* FLAG
- STD CM+1
- MONITOR SJCM
- LDD IR+4
- SHN 21-13
- MJN PRS0 IF DIRECT CALL
- CATD VU CHECK ACCESS TO DISPLAY CONSOLE
- PRS0 LDN 0
- STD CM+1
- MONITOR DCPM DROP CPU
- * LDN 0
- STD T7
- LDD FL CHECK FIELD LENGTH
- SBN 2
- PJN PRS1 IF FIELD LENGTH \ 200
- LJM /O26/DIS2 LOAD *DIS*
- PRS1 LDC PRO SET ROLLOUT PROCESSOR ADDRESS
- STM /COMDDSP/ROFA
- LDC CH01 SET X-COORDINATE
- STD XC
- LDN DSEQ
- SFA EST
- ADK EQAE
- CRD AB
- LDD AB+2
- ZJN PRS2 IF CC545
- MDIN
- PRS2 LDM PRSA,T7 MOVE SUBROUTINES TO DRIVER AREA
- STM MSFW,T7
- AOD T7
- LMC PRSAL
- NJN PRS2 IF PROGRAM NOT COMPLETLY MOVED
- STD CM+1
- STD KM CLEAR DIRECT CELLS
- STD KI
- STM MSD CLEAR MS DRIVER PRESENT
- STD IO
- LDD CP CLEAR CONTROL POINT MESSAGES
- ADN MS1W
- CWD CM
- ADN MS2W-MS1W
- CWD CM
- ADN DBAW-MS2W CLEAR K-DISPLAY ADDRESS POINTERS
- CWD CM
- LDN 10 SET MASK FOR *JCIW*
- STD CM+4
- LDN SCTS SET *DIS* FLAG IN CPA
- STD CM+1
- MONITOR SJCM
- * LDN 0 CLEAR UPPER CASE
- STD UC
- STD IF CLEAR INSERT FLAG
- STD HF CLEAR HOLD FLAG
- STD SF CLEAR SCAN FLAG
- STD SI CLEAR SCAN INDEX
- STD SC CLEAR SCAN NUMBER
- STD T1 CLEAR FET
- LDD IR+2 STORE UPPER CASE CHARACTER
- SHN 14
- RAM KBIC
- LDN ZERL CLEAR RA - CBUF
- CRD CM
- PRS3 LDD RA CLEAR RA - CBUF
- SHN 6
- ADN FET
- ADD T1
- CWD CM
- AOD T1
- LMC CBUF
- NJN PRS3 IF NOT COMPLETE
- STD FT SET IN = OUT = FIRST
- STD IN
- STD OT
- LDC CBUF
- STD FT+1
- STD IN+1
- STD OT+1
- LDD FL SET LIMIT
- SHN 6
- STD CM+4
- STD LM+1
- SHN -14
- STD CM+3
- STD LM
- LDD RA STORE BUFFER STATUS
- SHN 6
- ADN FET
- CWM PRSB,TR
- CWM PRSC,ON
- CWD CM
- * COMMON ENTRY.
- LDN IPRL CHECK SYSTEM CHARACTER SET
- CRD CM
- LDD CM+2
- LPN 1
- NJN PRS4 IF 64 CHARACTER SET
- STM KBIG DISABLE ENTRY OF ZERO CHARACTER
- LDN PSNI
- STM DKSC
- LDC *
- ORG *-1
- LOC DKSB
- UJN DKS2 63 CHARACTER SET SYSTEM
- LOC *O
- STM DKSB
- LDD AB+2
- ZJN PRS4 IF CC545 SYSTEM CONSOLE
- LDC SBNI+63-60
- STM DKSD
- PRS4 LDD RA
- SHN 6
- ADN FET
- CRD AB
- RJM SFS SET FILE STATUS
- LDK RDSOS REQUEST DISPLAY
- RJM RID
- LJM PRS5 COMPLETE
- PRSB VFD 42/0LINPUT,18/1
- VFD 12/0,12/4000,12/,6/FETL-5,18/CBUF
- PRSC VFD 60/CBUF
- SPACE 4,10
- *CALL COMPCUA
- SPACE 4,10
- ** DUMP INSTRUCTION MODIFICATION BLOCK.
- USE LOV
- DIMB
- OVERFLOW
- COMMAND (COMMAND TABLE.)
- SCT SPACE 4,10
- ** SCT - STORE COMMAND TABLE.
- *
- * USES T1.
- SCT ENTRY
- ISTORE INT,(LDN TSFM-1) SET TABLE ADDRESS
- LDC TCMDL/5
- STD T1
- LDD RA STORE COMMAND TABLE
- SHN 6
- ADN SBUF
- CWM TCMD,T1
- JMP RET RETURN
- TSFM SPACE 4,10
- ** TSFM - TABLE OF SPECIAL FORMATS.
- QUAL
- TCMD BSS 0
- LOC SBUF
- TSFM BSS 0
- AMG ENTER (A.)
- BKS ENTER (BKSP.)
- BKP ENTER (BKSPRU.)
- BKN ENTER (BKSPRU,)
- CEL ENTER (C.)
- MVE ENTER (COPY.)
- DEL ENTER (D,*)
- DMC ENTER (D.)
- DLE ENTER (DEL.)
- DIS ENTER (DIS.)
- DSF ENTER (DFL.)
- DSL ENTER (DLL.)
- DRP ENTER (DROP.)
- DSC ENTER (DS,)
- EFL ENTER (ENFL.)
- EFN ENTER (ENFL,)
- SEF ENTER (ERR.)
- MRL ENTER (E.)
- SFM ENTER (F.)
- FIL ENTER (FILE.)
- GTR ENTER (GETR,)
- GTR1 ENTER (GETR.)
- GET ENTER (GET,)
- GET1 ENTER (GET.)
- GGO ENTER (GO.)
- GTR ENTER (GTR,)
- GTR1 ENTER (GTR.)
- HOL ENTER (HOLD.)
- IGN ENTER (IGNORE.)
- MRL ENTER (L.)
- LST ENTER (LIST,)
- LST1 ENTER (LIST.)
- MVE ENTER (MOVE.)
- MRG ENTER (M.)
- MRN ENTER (N.)
- ELN ENTER (P.)
- RPC ENTER (RC,)
- REC ENTER (RC.)
- RPS ENTER (RM)
- RPS ENTER (RS)
- RDI ENTER (READI.)
- RDN ENTER (READN.)
- RNS ENTER (READNS.)
- RDF ENTER (READ.)
- RTN ENTER (RETURN.)
- REW ENTER (REWIND.)
- RFR ENTER (RFR.)
- RIC ENTER (RI.)
- RLR ENTER (RLR.)
- RNR ENTER (RNR.)
- ROC ENTER (RO.)
- RPR ENTER (RPR.)
- RPN ENTER (R,)
- RWR ENTER (RWRITE.)
- SCN ENTER (SCAN,)
- SML ENTER (S.)
- SKP ENTER (SKIPEI.)
- TAB ENTER (TAB,)
- UCC ENTER (UCC=)
- UNL ENTER (UNLOAD.)
- WRT ENTER (WRITE.)
- WRF ENTER (WRITEF.)
- WTW ENTER (WRITEW.)
- XDS ENTER (XDIS.)
- XDD ENTER (XDROP.)
- VFD 60/ END OF TABLE
- LOC *O
- ECMDO EQU * END OF COMMAND OVERLAY
- TCMDL EQU *-TCMD
- .1 SET TCMDL/5+SBUF+37
- CBUF EQU .1/40*40
- COMMAND (FILE COMMANDS.)
- BKSP. SPACE 4,10
- *** BKSP.CCCCCCC.
- *
- * BACKSPACE FILE *CCCCCCC*. IF *CCCCCCC* IS MISSING,
- * PREVIOUS FILE NAME WILL BE USED.
- BKS ENTRY
- LDN 42 BACKSPACE
- * UJN IOF ISSUE FUNCTION
- IOF SPACE 4,10
- ** IOF - I/O FUNCTION PROCESSOR.
- *
- * ENTRY (A) - CIO FUNCTION TO ISSUE.
- *
- * EXIT TO *RET*.
- *
- * CALLS CIO.
- IOF STD T6
- RJM SFN SET FILE NAME
- LDD T6
- RJM CIO
- JMP RET RETURN
- BKSPRU, SPACE 4,10
- *** BKSPRU,X.
- *
- * BACKSPACE CURRENT FILE *X* PHYSICAL RECORDS.
- BKN ENTRY
- RJM ADD ASSEMBLE DECIMAL DIGITS
- LMN 1R.
- ZJN BKN1 IF *.* NO ERROR
- LJM ERR FORMAT ERROR
- BKN1 LDD AB+4 STORE PRU COUNT
- STM TIOD
- LDN 46 BACKSPACE PRU
- STM TIOD+1
- LDN 5 SKIP RECORDS
- RJM CIO
- JMP RET RETURN
- BKSPRU. SPACE 4,10
- *** BKSPRU.CCCCCCC.
- *
- * BACKSPACE FILE *CCCCCCC* ONE PRU. IF *CCCCCCC*
- * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
- BKP ENTRY
- LDN 46 BACKSPACE
- JMP IOF RETURN
- FILE. SPACE 4,10
- *** FILE.CCCCCCC.
- *
- * SET FILE NAME = *CCCCCCC*.
- FIL ENTRY
- RJM SFN SET FILE NAME
- JMP RET RETURN
- RC. SPACE 4,15
- *** RC.CCCCCCC.
- *
- * REWIND, READ, AND REWIND FILE *CCCCCCC*. IF
- * *CCCCCCC* IS MISSING, FILE *COMPILE* WILL BE
- * READ.
- REC ENTRY
- LDN 6 SET SCAN INDEX
- STM TSCN
- LDN 1 SET SCAN FLAG
- STD SF
- LDN 0 CLEAR SCAN INDEX
- STD SI
- STM TSCN+1
- LDC =C*COMPILE* SET FILE NAME
- LJM ROC1
- READ. SPACE 4,15
- *** READ.CCCCCCC.
- *
- * REWIND, READ, AND REWIND FILE *CCCCCCC*. IF
- * *CCCCCCC* IS MISSING, PREVIOUS FILE NAME WILL
- * BE USED.
- RDF ENTRY
- RJM SFN SET FILE NAME
- RDF1 LDN 50 REWIND
- RJM CIO
- LDN 12 READ
- RJM CIO
- LDN 1 DUMMY REQUEST
- RJM CIO
- LDN 50 REWIND
- RJM CIO
- LJM RNR3
- READI. SPACE 4,15
- *** READI.CCCCCCC.
- *
- * SKIP TO END OF INFORMATION, BKSP, BKSP, AND READ
- * FILE *CCCCCCC*. IF *CCCCCCC* IS MISSING,
- * PREVIOUS FILE NAME WILL BE USED.
- RDI ENTRY
- RJM SFN SET FILE NAME
- LDN 3 SKIP TO END OF INFORMATION
- RJM CIO
- * ENTRY FROM *RPR*.
- RDI1 LDC 20640 SKIP BACKWARDS 2 RECORDS
- * ENTRY FROM *RLR*.
- RDI2 STM TIOD+1
- SHN -14
- STM TIOD
- LDN 5 SKIP RECORDS
- RJM CIO
- LJM RNR1
- READN. SPACE 4,15
- *** READN.CCCCCCC.
- *
- * READ FILE *CCCCCCC*. NO REWIND. IF *CCCCCCC*
- * IS MISSING, PREVIOUS FILE WILL BE READ. STOPS ON
- * BUFFER FULL OR EOR.
- RDN ENTRY
- RJM SFN SET FILE NAME
- RJM SIP STORE IN POINTER
- LDN 12 READ
- RJM CIO
- LDN 1 DUMMY
- RJM CIO
- LJM RNR4
- READNS. SPACE 4,15
- *** READNS.CCCCCCC.
- *
- * READ FILE *CCCCCCC* NON-STOP. NO REWIND. IF
- * *CCCCCCC* IS MISSING, PREVIOUS FILE WILL BE READ.
- * STOPS ON BUFFER FULL OR EOF.
- RNS ENTRY
- RJM SFN SET FILE NAME
- RJM SIP STORE IN POINTER
- LDC 250 READ NON-STOP
- RJM CIO
- LDN 1 DUMMY
- RJM CIO
- LJM RNR4
- RETURN. SPACE 4,10
- *** RETURN.CCCCCCC.
- *
- * RETURN FILE CCCCCC. IF *CCCCCCC* IS MISSING,
- * PREVIOUS FILE NAME WILL BE USED.
- RTN ENTRY
- LDN 0 CLEAR WRITE LOCKOUT STATUS
- STM CRSB
- LDN 70 RETURN
- JMP IOF RETURN
- REWIND. SPACE 4,10
- *** REWIND.CCCCCCC.
- *
- * REWIND FILE CCCCCC. IF *CCCCCCC* IS MISSING,
- * PREVIOUS FILE NAME WILL BE USED.
- REW ENTRY
- LDN 50 REWIND
- JMP IOF RETURN
- RFR. SPACE 4,10
- *** RFR.CCCCCCC.
- *
- * REWIND AND READ FILE *CCCCCCC*. IF *CCCCCCC*
- * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
- RFR ENTRY
- RJM SFN SET FILE NAME
- LDN 50 REWIND
- RJM CIO
- UJN RNR2
- RI. SPACE 4,10
- *** RI.CCCCCCC.
- *
- * REWIND, READ, AND REWIND FILE *CCCCCCC*. IF
- * *CCCCCCC* IS MISSING, FILE *INPUT* WILL BE
- * READ.
- RIC ENTRY
- LDC =C*INPUT* SET FILE NAME
- LJM ROC1
- RLR. SPACE 4,10
- *** RLR.CCCCCCC.
- *
- * READ LAST RECORD ON FILE *CCCCCCC*. IF *CCCCCCC*
- * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
- RLR ENTRY
- RJM SFN SET FILE NAME
- LDN 3 SKIP TO END OF INFORMATION
- RJM CIO
- LDC 10640 SKIP BACKWARDS 1 RECORD
- LJM RDI2 CAUSE RECORD SKIP
- RNR. SPACE 4,20
- *** RNR.CCCCCCC.
- *
- * READ NEXT RECORD ON FILE *CCCCCCC*. IF *CCCCCCC*
- * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
- RNR ENTRY
- RJM SFN SET FILE NAME
- * ENTRY FROM *RDI*.
- RNR1 LDD RA SET IN = OUT
- SHN 6
- ADN FET+3
- CRD CM
- SBN 1
- CWD CM
- * ENTRY FROM *RFR*.
- RNR2 LDN 12 READ
- RJM CIO
- LDN 1 DUMMY
- RJM CIO
- * ENTRY FROM *RDF*.
- RNR3 LDN 1 SET HOLD FLAG
- STD HF
- LDN FT SET DISPLAY = LINE 0
- RJM SDS
- * ENTRY FROM *RDN* AND *RNS*.
- RNR4 LDN 0 CLEAR SCAN
- STD SC
- STD SI
- JMP CIF CLEAR INSERT FLAG
- RO. SPACE 4,15
- *** RO.CCCCCCC.
- *
- * REWIND, READ, AND REWIND FILE *CCCCCCC*. IF
- * *CCCCCCC* IS MISSING, FILE *OUTPUT* WILL BE
- * READ.
- ROC ENTRY
- LDN 4 SET SCAN INDEX
- STM TSCN
- LDN 10D
- STM TSCN+1
- LDN 0
- STM TSCN+2
- STD SI CLEAR SCAN INDEX
- LDN 1 SET SCAN FLAG
- STD SF
- LDC =C*OUTPUT* SET FILE NAME
- * ENTRY FROM *RIC* AND *REC*.
- ROC1 RJM SDF
- LDD CA SET FILE NAME
- RJM SFN
- LJM RDF1
- RPR. SPACE 4,10
- *** RPR.CCCCCCC.
- *
- * READ PREVIOUS RECORD ON FILE *CCCCCCC*. IF
- * *CCCCCCC* IS MISSING, PREVIOUS FILE NAME WILL BE
- * USED.
- RPR ENTRY
- RJM SFN SET FILE NAME
- LJM RDI1 SKIP BACK 2 RECORDS
- SKIPEI. SPACE 4,10
- *** SKIPEI.CCCCCCC.
- *
- * SKIP TO END OF INFORMATION ON FILE . IF
- * *CCCCCCC* IS MISSING, PREVIOUS FILE NAME
- * WILL BE USED.
- SKP ENTRY
- LDN 3 SKIPEI
- JMP IOF RETURN
- UNLOAD. SPACE 4,10
- *** UNLOAD.CCCCCCC.
- *
- * UNLOAD FILE *CCCCCCC*. IF *CCCCCCC* IS MISSING,
- * PREVIOUS FILE NAME WILL BE USED.
- UNL ENTRY
- LDN 0 CLEAR WRITE LOCKOUT STATUS
- STM CRSB
- LDN 60 UNLOAD
- JMP IOF RETURN
- WRITE. SPACE 4,15
- *** WRITE.CCCCCCC.
- *
- * WRITE BUFFER TO FILE *CCCCCCC*. IF *CCCCCCC*
- * IS MISSING, PREVIOUS FILE NAME WILL BE USED.
- WRT ENTRY
- RJM SFN SET FILE NAME
- RJM CRS CHECK RECORD STATUS
- RJM SIP STORE IN POINTER
- LDN 26 WRITE END OF RECORD
- RJM CIO
- LDN 17 SET PSEUDO REQUEST TO REWIND POINTERS
- RJM CIO
- JMP CIF CLEAR INSERT FLAG
- WRITEF. SPACE 4,10
- *** WRITEF.CCCCCCC.
- *
- * WRITE BUFFER TO FILE *CCCCCCC* WITH AN EOF MARK.
- * IF *CCCCCCC* IS MISSING, PREVIOUS FILE NAME WILL
- * BE USED.
- WRF ENTRY
- RJM SFN SET FILE NAME
- RJM CRS CHECK RECORD STATUS
- RJM SIP STORE IN POINTER
- LDN 36 WRITE END OF FILE
- RJM CIO
- LDN 17 SET PSEUDO REQUEST TO REWIND POINTERS
- RJM CIO
- JMP CIF CLEAR INSERT FLAG
- WRITEW. SPACE 4,20
- *** WRITEW.CCCCCCC.
- *
- * WRITE FROM START OF BUFFER UP TO INSERT LINE TO
- * FILE *CCCCCCC*. IF *CCCCCCC* IS MISSING,
- * PREVIOUS FILE NAME WILL BE USED.
- WTW ENTRY
- LDD IF
- NJN WTW1 IF INSERT
- JMP ERR
- WTW1 RJM SFN SET FILE NAME
- RJM CRS CHECK RECORD STATUS
- LDN ZERL SET INSERT ADDRESS
- CRD CM
- CRD AB
- LDD IP
- STD CM+3
- LDD IP+1
- STD CM+4
- LDC CBUF
- STD AB+4
- LDD RA WRITE IN
- SHN 6
- ADN FET+2
- CWD CM
- ADN 1
- CWD AB SET OUT = FIRST
- LDN 26 WRITE END OF RECORD
- RJM CIO
- LDN 13 DUMMY
- RJM CIO
- JMP CIF CLEAR INSERT FLAG
- SDF SPACE 4,15
- ** SDF - SET DEFINED FILE.
- *
- * ENTRY (A) = ADDRESS OF FILE NAME.
- * (CA) = CHARACTER ADDRESS.
- *
- * USES AB - AB+4.
- *
- * CALLS SFS.
- SDF SUBR ENTRY/EXIT
- STM SDFA
- LDD CA CHECK BUFFER
- ADC -KBUF
- LMD KI
- NJN SDFX IF FILE SPECIFIED
- LDD MA
- CWM **,ON MOVE FILE NAME
- SDFA EQU *-1
- SBN 1
- CRD AB
- LDN 1 SET STATUS
- STD AB+4
- RJM SFS SET FILE STATUS
- UJN SDFX RETURN
- COMMAND (LINE ENTRY AND DATA MOVE.)
- A. SPACE 4,10
- *** A.CCC-CCC
- *
- * MERGE CHARACTERS *CCC-CCC* WITH FOLLOWING LINE
- * EXCEPT TABBED OR SPACED AREA UP TO CARRAGE RETURN.
- C. SPACE 4,20
- *** C.CCC-CCC
- *
- * ENTER CHARACTERS *CCC-CCC* IN BUFFER. *CCC-CCC*
- * MAY CONSIST OF UP TO 90 CHARACTERS.
- CEL ENTRY
- LDD CA CHECK FOR COPY NEXT LINE
- ADC -KBUF
- LMD KI
- NJN CEL3 IF NOT COPY NEXT LINE
- LDD IF
- NJN CEL1 IF INSERT SET
- JMP ERR MESSAGE = *FORMAT ERROR.*
- CEL1 RJM RDL READ LINE
- LDD LC SET KEYBOARD INDEX
- ADN 2
- STD KI
- ADC -KBUFL
- MJN CEL2 IF WITHIN BUFFER
- LDC KBUFL-1 SET LAST CHARACTER ADDRESS
- STD KI
- CEL2 JMP KBIX RETURN
- * ENTRY FROM *MRL*.
- AMG ENTRY
- CEL3 RJM ELB ENTER LINE IN BUFFER
- JMP RET RETURN
- COPY SPACE 4,8
- *** COPY.
- *
- * COPY DATA FROM BLOCK STARTING AT INSERT *8* AND
- * ENDING AT INSERT *9* INTO BLOCK AT INSERT MARKER.
- *MVE ENTRY
- DEL. SPACE 4,15
- *** DEL.
- *
- * DELETE LINES AFTER INSERT MARK.
- DLE ENTRY
- LDD IF
- ZJN DLE1 IF NO INSERT
- LDD IP RESET IN
- STD IN
- LDD IP+1
- STD IN+1
- UJN DLE2
- DLE1 LDD FT CLEAR BUFFER
- STD IN
- LDD FT+1
- STD IN+1
- DLE2 RJM SIP STORE IN POINTER
- LDN IN
- * ENTRY FROM *DEL*.
- DLE3 RJM SDS SET DISPLAY
- JMP CIF CLEAR INSERT FLAG
- D,* SPACE 4,15
- *** D,*
- *
- * DELETE FROM INSERT *8* THROUGH INSERT *9*.
- DEL ENTRY
- LDD MA MOVE INSERT PARAMETERS
- CWM CFCB,ON
- LDD MA
- CRD T2 (SET T2 - T6)
- LDD T2
- ADD T3
- ZJN DEL1 IF NO INSERT *8*
- LDD T2
- SBD T4
- SHN 14
- ADD T3
- SBD T5
- PJN DEL1 IF *I8* .GT. *I9*
- RJM MBD MOVE BUFFER DOWN
- LDC CFCB
- JMP DLE3 SET DISPLAY
- DEL1 JMP ERR FORMAT ERROR
- D. SPACE 4,10
- *** D.CCC-CCC
- *
- * MERGE *CCC-CCC* WITH REMAINDER OF CHARACTERS
- * CHARACTERS IN DUP BUFFER EXCEPT TABBED AREA OR
- * SPACED AREA UP TO CARRIAGE RETURN.
- DMC ENTRY AMG
- E. SPACE 4,8
- *** E.CCC-CCC
- *
- * MERGE *CCC-CCC* WITH REMAINDER OF CHARACTERS
- * CHARACTERS IN DUP BUFFER EXCEPT TABBED OR SPACED
- * AREA.
- L. SPACE 4,20
- *** L.CCC-CCC
- *
- * MERGE CHARACTERS *CCC-CCC* WITH REMAINDER OF
- * FOLLOWING LINE EXCEPT TABBED OR SPACED AREA.
- MRL ENTRY
- LDD KI COPY REMAINDER OF LINE
- MRL1 ADC -KBUFL CHECK FOR END OF BUFFER
- PJN MRL2 IF END OF BUFFER
- LDM DBUF,KI COPY CHARACTER FROM DUP BUFFER
- LPN 77 CLEAR TAB IF SET
- STM KBUF,KI ENTER INTO KEYBOARD BUFFER
- AOD KI ADVANCE
- UJN MRL1 LOOP FOR NEXT CHARACTER
- MRL2 LDC KBUF+2 SET CHARACTER ADDRESS
- STD CA
- LJM CEL3 ENTER LINE AND RETURN
- MOVE. SPACE 4,20
- *** MOVE.
- *
- * MOVE DATA FROM BLOCK STARTING AT INSERT *8* AND
- * ENDING AT INSERT *9* INTO BLOCK AT INSERT MARKER.
- MVE ENTRY
- LDD MA SET MOVE PARAMETERS
- CWM CFCB,ON
- LDD MA
- CRD AB
- LDD AB
- SHN 14
- LMD AB+1
- ZJN MVE1 IF INSERT *8* NOT SET
- LDD AB+2
- SHN 14
- LMD AB+3
- NJN MVE2 IF INSERT *9* SET
- MVE1 LDC =C*INSERT 8 OR 9 NOT SET.*
- JMP ERR1
- MVE2 LDD AB+2 CALCULATE BLOCK SIZE
- SBD AB
- SHN 14
- ADD AB+3
- SBD AB+1
- STD T7
- SHN -14
- ZJN MVE4 IF BLOCK .LT. 10000
- LDC MVEB *DATA OVERFLOW.*
- JMP ERR1
- MVE4 RJM CRB CHECK ROOM IN BUFFER
- LDD IF
- ZJN MVE5 IF INSERT NOT SET
- LCN IN-IP
- MVE5 ADN IN
- STD T3
- LDI T3 SET INSERT ADDRESS
- STD OT
- STD T2
- LDM 1,T3
- STD OT+1
- STD T3
- LDD T2 CHECK DATA BLOCK LIMITS
- SBD AB
- SHN 14
- ADD T3
- SBD AB+1
- PJN MVE6 IF - 8 - BEFORE INSERT
- LDD T7 SET INSERT INCREMENT
- STD AB+4
- MVE6 LDD T2
- SBD AB+2
- SHN 14
- ADD T3
- SBD AB+3
- PJN MVE7 IF - 9 - BEFORE OR AT INSERT
- LDD AB+4
- NJN MVE7 IF - 8 - AFTER INSERT
- LJM ERR MESSAGE = *FORMAT ERROR.*
- MVE7 RJM MBU MOVE BUFFER UP
- LDD AB+4 SET FWA
- RAD AB+1
- STD T5
- SHN -14
- RAD AB
- STD T4
- LDD IN+1 SAVE IN ADDRESS
- ADD T7
- STM MVEA+1
- SHN -14
- ADD IN
- ADC LDCI
- STM MVEA
- LDD AB+4 SET LWA
- RAD AB+3
- STD IN+1
- SHN -14
- RAD AB+2
- STD IN
- RJM MBD MOVE BUFFER DOWN
- MVEA LDC ** RESET IN
- STD IN+1
- SHN -14
- STD IN
- LDM KBUF
- LMN 1RC
- ZJN MVE8 IF *COPY*
- LDD MA
- CWD AB SET MOVE AND FIRST ADDRESSES
- CRD T2
- RJM MBD MOVE BUFFER DOWN
- MVE8 LDN ZERL CLEAR INSERT *8* AND *9*
- CRM CFCB,ON
- RJM SIP STORE IN POINTER
- JMP RET RETURN
- MVEB DATA C*DATA OVERFLOW.*
- M. SPACE 4,8
- *** M.CCC-CCC
- *
- * MERGE CHARACTERS *CCC-CCC* WITH
- * REMAINDER OF FOLLOWING LINE.
- MRG ENTRY MRL
- N. SPACE 4,8
- *** N.CCC-CCC
- *
- * MERGE CHARACTERS EXCEPT TABBED AREA.
- MRN ENTRY MRL
- P. SPACE 4,10
- *** P.CCC-CCC
- *
- * ENTER CHARACTERS *CCC-CCC* IN BUFFER. *CCC-CCC*
- * MAY CONSIST OF UP TO 96 CHARACTERS.
- ELN ENTRY
- RJM ELB ENTER LINE IN BUFFER
- LDM DBFB
- LMC SRSF
- ADD LL
- NJN ELN1 IF NOT END OF BUFFER ON RIGHT SCREEN
- LDD IF
- ADD HF
- NJN ELN1 IF NOT ROLLING W/O INSERT POINTER
- STM DBFD
- AOD KD INHIBIT PRIORITY LINE USAGE
- ELN1 LDN 2
- LJM RET1 RETURN TO SAVE *P.*
- ELB SPACE 4,20
- ** ELB - ENTER LINE IN BUFFER.
- *
- * ENTRY (CA) = CHARACTER ADDRESS.
- * (IF) = INSERT FLAG.
- * (IP - IP+1) = INSERT ADDRESS.
- *
- * USES T1 - T7, CM - CM+4, BUF - BUF+50.
- *
- * CALLS MBU.
- ELB SUBR ENTRY/EXIT
- RJM PKL PACK LINE INTO BUF
- LDD IN SET INPUT ADDRESS
- STD T2
- LDD IN+1
- STD T3
- RJM CRB CHECK ROOM IN BUFFER
- LDD IF
- ZJN ELB1 IF NO INSERT
- * PROCESS INSERTED LINE.
- LDD IP SET INSERT ADDRESS
- STD T2
- LDD IP+1
- STD T3
- RJM MBU MOVE BUFFER UP
- LDD T7 ADVANCE INSERT ADDRESS
- RAD IP+1
- SHN -14
- RAD IP
- * STORE LINE IN CM.
- ELB1 LDD T2 STORE LINE
- SHN 6
- ADD RA
- SHN 6
- ADD T3
- CWM BUF,T7
- LDD T7 ADVANCE IN
- RAD IN+1
- SHN -14
- RAD IN
- RJM SIP SET IN POINTER
- LJM ELBX RETURN
- CRB SPACE 4,10
- ** CRB - CHECK ROOM IN BUFFER.
- *
- * ENTRY (IN - IN+1) = LWA+1 OF DATA IN BUFFER.
- * (LM - LM+1) = LIMIT ADDRESS.
- * (T7) = LENGTH OF NEW LINE OR BLOCK.
- *
- * ERROR TO *ERR1* IF INSUFFICIENT ROOM IN BUFFER.
- CRB SUBR ENTRY/EXIT
- LDD IN
- SBD LM
- SHN 14
- ADD IN+1
- SBD LM+1 COMPLEMENT OF WORDS AVAILABLE
- ADD T7 WORDS NEEDED
- MJN CRBX IF ROOM FOR DATA
- LDC MVEB *DATA OVERFLOW.*
- JMP ERR1 ERROR EXIT
- MBU SPACE 4,10
- ** MBU - MOVE BUFFER UP.
- *
- * ENTRY (T2 - T3) = FWA TO MOVE.
- * (IN - IN+1) = LWA+1 TO MOVE.
- * (T7) = DISTANCE TO MOVE.
- *
- * USES T1, T4, BUFM - BUFM+240.
- MBU SUBR ENTRY/EXIT
- RJM CRB CHECK ROOM IN BUFFER
- LDD IN COMPUTE MOVE WORD COUNT
- SBD T2
- SHN 14
- ADD IN+1
- SBD T3
- SHN 13D SET BLOCK COUNT
- STD T1
- SHN -13D SET ODD SIZE
- STD T4
- ZJN MBU2 IF NO ODD BLOCK
- * MOVE SHORT BLOCK.
- LDD IN READ SHORT BLOCK
- SHN 6
- ADD RA
- SHN 6
- ADD IN+1
- SBD T4
- MBU1 CRM BUFM,T4
- SBD T4 STORE ODD BLOCK
- ADD T7
- CWM BUFM,T4
- MBU2 SOD T1
- MJN MBUX IF NO FULL BLOCKS
- LDN 40
- STD T4 SET FULL BLOCK SIZE
- * MOVE FULL BLOCKS.
- LDD T2 READ BLOCK
- SHN 6
- ADD RA
- SHN 1
- ADD T1
- SHN 5
- ADD T3
- UJN MBU1 MOVE BLOCK
- COMMAND (DISPLAY, TAB, DUP AND SCAN CONTROL.)
- DFL. SPACE 4,10
- *** DFL.
- *
- * START DISPLAY AT FIRST LINE OF FILE AND HOLD.
- DSF ENTRY
- LDN FT SET DISPLAY ADDRESS
- RJM SDS
- LDN 1 SET HOLD FLAG
- STD HF
- JMP RET RETURN
- DLL. SPACE 4,15
- *** DLL.
- *
- * DISPLAY LAST PART OF FILE.
- DSL ENTRY
- LDD IN SET END OF FILE ADDRESS
- STD T2
- LDD IN+1
- STD T3
- LCN 18D SEARCH FILE BACKWARDS
- RJM SFL
- LDD T2 SET DISPLAY
- STD OT
- LDD T3
- STD OT+1
- JMP RET RETURN
- DS,. SPACE 4,25
- *** DS,NNNNNN.
- *
- * START DISPLAY AT LINE *NNNNNN* OF FILE.
- DS, SPACE 4,20
- *** DS,
- *
- * COUNT THE NUMBER OF LINES FROM THE START OF THE
- * DISPLAY UP TO THE INSERT MARK OR END OF FILE.
- * ENTER RESULT OF COUNT AFTER THE *DS,* IN THE
- * KEYBOARD BUFFER.
- DSC ENTRY
- LDN ZERL SET COUNT TO ZERO
- CRD AB
- LDN IP SET END OF BUFFER
- STD T7
- LDD IF CHECK INSERT FLAG
- NJN DSC1 IF INSERT SET
- LDN IN SET END OF BUFFER
- STD T7
- DSC1 LDD CA CHECK KEYBOARD ENTRY
- ADC -KBUF
- LMD KI
- ZJN DSC3 IF COUNT TO CURRENT LINE
- LDN IN
- STD T7
- LDD CA
- RJM ADD ASSEMBLE DIGITS
- STD AB
- SBN 1R.
- ZJN DSC2 IF *.*
- JMP ERR FORMAT ERROR
- DSC2 LDD AB+3 CHECK COUNT
- ADD AB+4
- NJN DSC3 IF NOT FIRST LINE
- LJM DSF DISPLAY FIRST LINE
- DSC3 LDN 0 CLEAR COUNT
- STD T4
- STD T5
- LDD FT SET START OF BUFFER
- STD T2
- LDD FT+1
- STD T3
- LDI T7 STORE BUFFER CHECK
- SHN 6
- ADD RA
- SHN 6
- ADM 1,T7
- STM DSCA+1
- SHN -14
- LMC LMCI
- STM DSCA
- * SEARCH BUFFER AND COUNT LINES.
- DSC4 LDD T2 READ BUFFER
- SHN 6
- ADD RA
- SHN 6
- ADD T3
- CRD CM
- DSCA LMC **
- ZJN DSC5 IF END OF BUFFER
- AOD T3 ADVANCE INDEX
- SHN -14
- RAD T2
- LDD CM+4
- NJN DSC4 IF NOT END OF LINE
- * PROCESS END OF LINE.
- AOD T5 ADVANCE LINE COUNT
- SHN -14
- RAD T4
- LMD AB+3
- NJN DSC4 IF NOT END OF COUNT
- LDD T5
- LMD AB+4
- NJN DSC4 IF NOT END OF COUNT
- * PROCESS END OF COUNT OR END OF BUFFER.
- DSC5 LDN 0 CONVERT COUNT TO DECIMAL
- STD T1
- DSC6 LDN 0 CLEAR BUFFER
- STM BUFM,T1
- AOD T1
- LMN 6
- NJN DSC6 IF BUFFER NOT COMPLETELY CLEARED
- STD T1
- DSC7 LDD T4
- SBM DSCB,T1
- SHN 14
- ADD T5
- SBM DSCC,T1
- MJN DSC8 IF NO POWER OF TEN THIS DIGIT
- STD T5
- SHN -14
- STD T4
- AOM BUFM,T1 ADVANCE TEN-S COUNT
- UJN DSC7 LOOP
- DSC8 AOD T1 ADVANCE INDEX
- LMN 6
- NJN DSC7 IF NOT 6 DIGITS LOOP
- STD T1
- * ASSEMBLE COUNT.
- LDD AB CHECK TYPE OF CALL
- ZJN DSC9 IF COUNT TO LINE
- LDD T2 SET DISPLAY
- STD OT
- LDD T3
- STD OT+1
- JMP RET RETURN
- DSC9 LDM BUFM,T1 SUPPRESS LEADING ZEROS
- NJN DSC10 IF NOT LEADING ZERO
- AOD T1
- LMN 5
- NJN DSC9 IF WORD NOT COMPLETE LOOP
- DSC10 LDM BUFM,T1 CONVERT TO DISPLAY CODE
- ADN 1R0
- STM KBUF,KI
- AOD KI
- AOD T1
- LMN 6
- NJN DSC10 IF NOT END OF NUMBER LOOP
- LDN 1R.
- STM KBUF,KI
- AOD KI
- JMP KBIX RETURN
- DSCB CON 100000D/1S12
- CON 10000D/1S12
- CON 1000D/1S12
- CON 100D/1S12
- CON 10D/1S12
- CON 1D/1S12
- DSCC CON 100000D-100000D/1S12*1S12
- CON 10000D-10000D/1S12*1S12
- CON 1000D
- CON 100D
- CON 10D
- CON 1D
- TAB SPACE 4,20
- *** TAB,X,Y,...,Z.
- *
- * SET TABS TO COLUMNS X, Y, Z. IF X = 0, CLEAR TABS.
- *
- * DEFAULT TABS ARE - 11, 18, 30, 40, 50, 60, 73, 80.
- TAB ENTRY
- LDC 5777 SET TAB BUFFER
- STM TABA
- LMC 7777
- STM TABB
- LDD CA
- TAB1 RJM ADD ASSEMBLE DIGITS
- SBN 1R,
- ZJN TAB3 IF *,*
- SBN 1R.-1R,
- ZJN TAB3 IF *.*
- TAB2 JMP ERR FORMAT ERROR
- TAB3 LDD AB+4 CHECK NUMBER
- NJN TAB5 IF NON-ZERO
- STD T2 CLEAR TABS
- TAB4 LDM DBUF,T2
- LPC 5777
- TABA EQU *-1
- STM DBUF,T2
- AOD T2 CHECK FOR END OF KEYBOARD BUFFER
- ADC -KBUFL
- MJN TAB4 IF NOT END OF KEYBOARD BUFFER
- UJN TAB6 CHECK SEPARATOR
- TAB5 ADC -KBUFL CHECK FOR LEGAL COLUMN
- PJN TAB2 IF BEYOND LAST CHARACTER ADDRESS
- AOD AB+4 SET TAB
- LDM DBUF,AB+4
- LMC 2000
- TABB EQU *-1
- STM DBUF,AB+4
- TAB6 LDI T1 CHECK SEPARATOR
- LMN 1R.
- ZJN TAB7 IF *.*
- LMN 1R,&1R. CHECK FOR COMMA
- NJN TAB2 IF NOT VALID SEPARATOR
- AOD T1 ADVANCE
- LJM TAB1 LOOP
- TAB7 JMP RET RETURN
- SCAN, SPACE 4,20
- *** SCAN,X,Y,...,Z.
- *
- * SET WORD SCAN TO X, Y, Z. IF X = 0, CLEAR SCAN.
- SCN ENTRY
- LDN 0 CLEAR TABLE INDEX
- STD T6
- STD SF CLEAR SCAN FLAG
- STD SC CLEAR SCAN NUMBER
- LDD CA
- SCN1 RJM ADD ASSEMBLE DIGITS
- SBN 1R,
- ZJN SCN3 IF *,*
- SBN 1R.-1R,
- ZJN SCN3 IF *.*
- SCN2 LJM ERR FORMAT ERROR
- SCN3 LDD AB+4 CHECK NUMBER
- NJN SCN5 IF NON-ZERO
- STD T2
- SCN4 LDN 0 CLEAR ALL SCANS
- STM TSCN,T2
- AOD T2
- LMN 10
- NJN SCN4 IF ALL SCANS NOT CLEARED
- UJN SCN6 CHECK SEPARATOR
- SCN5 STM TSCN,T6 SET SCAN NUMBER
- AOD T6 ADVANCE SCAN TABLE
- LMN 7
- ZJN SCN2 IF TOO MANY SCANS
- LDN 1 SET SCAN FLAG
- STD SF
- SCN6 LDI T1 CHECK SEPARATOR
- LMN 1R.
- ZJN SCN7 IF *.*
- AOD T1 ADVANCE
- LJM SCN1 LOOP
- SCN7 STM TSCN,T6 SET END OF TABLE
- STD SI CLEAR SCAN INDEX
- JMP RET RETURN
- COMMAND (LINE SEARCH COMMANDS.)
- F. SPACE 4,8
- *** F.CCC-CCC
- *
- * SEARCH FOR MATCHING FIELD IN LINE. SEARCH IS END AROUND.
- SFM ENTRY SML
- S. SPACE 4,8
- *** S.CCC-CCC
- *
- * STARTING WITH THE FIRST LINE DISPLAYED, SEARCH
- * FOR A LINE BEGINNING WITH THE CHARACTERS *CCC-CCC*.
- *
- * SEARCH IS END AROUND.
- SML ENTRY
- LDD OT+1 SET LINE ADDRESS
- STD T7
- STD AB+1
- LDD OT
- STD T6
- STD AB
- LCN 0 SET NO SEARCH
- STD T4
- LDN 2 SET CHARACTER INDEX
- STD T3
- LDD T7 CHECK ADDRESS
- LMD IN+1
- NJN SML3 IF NOT END OF BUFFER
- LDD T6
- LMD IN
- NJN SML3 IF NOT END OF BUFFER
- LJM ERR MESSAGE = *FORMAT ERROR.*
- SML1 LDD T7 CHECK ADDRESS
- LMD IN+1
- NJN SML2 IF NOT END OF BUFFER
- LDD T6
- LMD IN
- NJN SML2 IF NOT END OF BUFFER
- LDD FT RESET ADDRESS
- STD T6
- STD AB
- LDD FT+1
- STD T7
- STD AB+1
- SML2 LDD T7
- LMD OT+1
- NJN SML3 IF NOT BEGINNING OF BUFFER
- LDD T6
- LMD OT
- NJN SML3 IF NOT BEGINNING OF BUFFER
- LDC =C*LINE NOT FOUND.*
- LJM ERR1 RETURN
- SML3 LDD T6 READ WORD
- SHN 6
- ADD RA
- SHN 6
- ADD T7
- CRD CM
- AOD T7 ADVANCE ADDRESS
- SHN -14
- RAD T6
- LDD T4
- ZJN SML6 IF SEARCH IN PROGRESS
- SML4 SOD T4 COUNT WORD
- LDD CM+4
- NJN SML5 IF NOT END OF LINE
- LDD SC SET SEARCH FLAG
- STD T4
- LDN 2 RESET CHARACTER ADDRESS
- STD T3
- LDD T6 SET NEXT LINE ADDRESS
- STD AB
- LDD T7
- STD AB+1
- SML5 LJM SML1 LOOP
- SML6 LDN CM SET BYTE ADDRESS
- STD T2
- SML7 LDM KBUF,T3 CHECK UPPER
- ZJN SML8 IF NO COMPARISON NEEDED
- SHN 6
- LMI T2
- SCN 77
- NJN SML4 IF NO MATCH
- SML8 AOD T3 ADVANCE CHARACTER
- LMD KI
- ZJN SML10 IF COMPARE COMPLETE
- LDM KBUF,T3 CHECK LOWER
- ZJN SML9 IF NO COMPARISON NEEDED
- LMI T2
- LPN 77
- NJN SML4 IF NO MATCH
- SML9 AOD T3 ADVANCE CHARACTER
- LMD KI
- ZJN SML10 IF COMPARE COMPLETE
- AOD T2 ADVANCE BYTE
- LMN CM+5
- NJN SML7 IF NOT AT END OF WORD LOOP
- LDD CM+4
- NJN SML5 IF NOT END OF LINE
- LJM SML4 PROCESS NEXT LINE
- SML10 LDD AB SET LINE ADDRESS
- STD OT
- LDD AB+1
- STD OT+1
- LDN 0 CLEAR ERROR FLAG
- STD KM
- LDN 1 SET HOLD
- STD HF
- JMP KBIX RETURN
- SFR SPACE 4,20
- ** SFR - SEARCH FOR RECORD.
- *
- * USES IN, IN+1, KM, AB - AB+4, CM - CM+4, T1 - T1+4.
- *
- * CALLS CIO, SPN.
- SFR ENTRY
- LDD RA READ FET
- SHN 6
- ADN FET
- CRD T1
- ADN 2 READ IN
- CRD AB
- ADN 1 SET IN = OUT
- CRD CM
- SBN 1
- CWD CM
- ADC CBUF-FET-2 READ RECORD NAME
- CRD CM
- LDD AB+3 SET IN POINTER
- STD IN
- LDD AB+4
- STD IN+1
- LDD T1+4 CHECK STATUS
- LPN 30
- LMN 30
- NJN SFR1 IF NOT EOF
- LDC =C*RECORD NOT FOUND.*
- STD KM
- LJM TIOX RETURN
- SFR1 LDD CM
- LMC 2R.P
- NJN SFR1.1 IF NOT *.PROC,*.
- LDD CM+1
- LMC 2RRO
- NJN SFR1.1 IF NOT *.PROC,*
- LDD CM+2
- LMC 2RC,
- NJN SFR1.1 IF NOT *.PROC,*
- RJM SPN SET PROCEDURE NAME AS RECORD NAME
- SFR1.1 LDD CM
- LMC 7700
- NJN SFR2 IF NO 7700 TABLE
- LDD RA READ RECORD NAME
- SHN 6
- ADC CBUF+1
- CRD CM
- SFR2 LDN CM+4 CLEAR TRAILING SPACE
- STD T1
- SFR2.1 LDI T1
- LPN 77
- LMN 1R
- NJN SFR2.2 IF NOT A SPACE
- LDI T1
- SCN 77
- STI T1
- SFR2.2 SOD T1
- LMN CM-1
- NJN SFR2.1 IF MORE BYTES
- AOD T1 RESTART AT CM
- SFR2.3 LDI T1 CHECK THE RECORD NAME
- LMM SFRB-CM,T1
- ZJN SFR4 IF MATCH
- LDD KM CHECK MESSAGE
- ZJN SFR3 IF GET ABORTED
- LDN 12 READ NEXT RECORD
- RJM CIO
- LDN 7 SEARCHING FOR RECORD
- RJM CIO
- SFR3 LJM TIOX RETURN
- SFR4 AOD T1
- LMN CM+5
- NJN SFR2.3 IF NOT THE LAST BYTE
- LDD RA CHECK RECORD LENGTH
- SHN 6
- ADN FET
- CRD CM
- LDD CM+4
- SHN -3
- LMN 1
- STM CRSA SET/CLEAR RECORD READ NOT TOO LONG FLAG
- ZJN SFR5 IF RECORD TOO LONG
- LJM PLB CLEAR KEYBOARD
- SFR5 LDC ERRE *RECORD TOO LONG*
- STD KM
- JMP RET RETURN
- SPN SPACE 4,10
- ** SPN - SET PROCEDURE NAME AS RECORD NAME.
- *
- * *SPN* EXTRACTS THE PROCEDURE NAME FROM THE *.PROC,*
- * HEADER AND RETURNS IT AS THE RECORD NAME.
- *
- * ENTRY (CM - CM+4) = FIRST WORD OF PROC HEADER.
- *
- * EXIT (CM - CM+4) = RECORD NAME (ZERO FILLED).
- *
- * USES T1, AB - AB+4, CM - CM+4.
- SPN SUBR
- * READ *.PROC,* STATEMENT FOR PROCEDURE NAME.
- LDD RA
- SHN 6
- ADC CBUF+1 SECOND HALF OF PROCEDURE NAME
- CRD AB
- LDD CM+3
- STD CM+0
- LDD CM+4
- STD CM+1
- LDD AB+0
- STD CM+2
- LDD AB+1
- STD CM+3
- * TERMINATE RECORD NAME AT FIRST DELIMITER.
- LDN CM
- STD T1
- SPN1 LDI T1
- SHN -6
- ZJN SPN3 IF DELIMITER IN UPPER
- SBN 1R9+1
- PJN SPN2 IF DELIMITER IN UPPER
- LDI T1
- LPN 77
- ZJN SPN4 IF DELIMITER IN LOWER
- SBN 1R9+1
- PJN SPN4 IF DELIMITER IN LOWER
- AOD T1
- LMN CM+4
- NJN SPN1 IF DELIMITER SEARCH NOT COMPLETE
- SPN2 LDN 0
- SPN3 STI T1
- AOD T1 ZERO FILL RECORD NAME TO WORD BOUNDARY
- LMN CM+4+1
- NJN SPN2 IF ZERO FILL NOT COMPLETE
- UJP SPNX RETURN
- SPN4 LDI T1 CLEAR DELIMITER IN LOWER
- SCN 77
- UJN SPN3 CLEAR DELIMITER, ZERO FILL RECORD NAME
- COMMAND (SEQUENTIAL RECORD SEARCH COMMANDS.)
- GET, SPACE 4,20
- *** GET,FFFFFFF.CCCCCCC.
- *
- * GET.CCCCCCC.
- *
- * SEARCH FILE *FFFFFFF* FOR RECORD *CCCCCCC*. IF
- * *FFFFFFF* IS MISSING, PREVIOUS FILE NAME WILL BE
- * USED.
- GET ENTRY
- RJM SFN SET FILE NAME
- AOD CA ADVANCE CHARACTER
- GET1 ENTRY
- RJM ASN ASSEMBLE RECORD NAME
- LMN 1R.
- ZJN GET3 IF *.*
- GET2 JMP ERR FORMAT ERROR
- GET3 LDD AB
- ZJN GET2 IF NO RECORD NAME
- LDN 12 READ
- RJM CIO
- LDN 7 DUMMY
- RJM CIO
- LDC SFRA MESSAGE = *SEARCH / *CCCCCCC* *
- STD KM
- LDD MA SET RECORD NAME
- CWD AB
- CRM SFRB,ON
- LDD RA SET IN = OUT
- SHN 6
- ADN FET+3
- CRD CM
- SBN 1
- CWD CM
- LDN 1 SET HOLD FLAG
- STD HF
- LDN FT SET DISPLAY = LINE 0
- RJM SDS
- LDN 0 CLEAR SCAN
- STD SC
- STD SI
- JMP CIF CLEAR INSERT FLAG
- COMMAND (RANDOM RECORD SEARCH COMMANDS.)
- GETR, SPACE 4,20
- *** GETR,FFFFFFF.CCCCCCC.
- *
- * GETR.CCCCCCC.
- *
- * READ RANDOM FILE *FFFFFFF* FOR TEXT OR .PROC RECORD
- * *CCCCCCC*. IF *FFFFFFF* IS MISSING, PREVIOUS
- * FILE NAME WILL BE USED.
- GTR, SPACE 4
- *** GTR,FFFFFFF.CCCCCCC.
- * GTR.CCCCCCC.
- * READ RANDOM FILE *FFFFFFF* FOR RECORD *CCCCCCC*.
- * IF *FFFFFFF* IS MISSING, PREVIOUS FILE NAME WILL
- * BE USED.
- GTR ENTRY
- RJM SFN SET FILE NAME
- AOD CA ADVANCE CHARACTER
- GTR1 ENTRY
- RJM ASN ASSEMBLE RECORD NAME
- LMN 1R.
- ZJN GTR3 IF *.*
- GTR2 JMP ERR FORMAT ERROR
- GTR3 LDD AB
- ZJN GTR2 IF NO RECORD NAME
- RJM RRI READ RANDOM INDEX
- LDN 11 READ RANDOM RECORD
- RJM CIO
- LDM KBUF+1 SET TEXT RECORD ONLY FLAG
- LMN 1RT
- STM TIOE
- LDC =C*SEARCH.*
- * ENTRY FROM *LST*.
- GTR4 STD KM SET KEYBOARD MESSAGE
- LDD MA SET RECORD NAME
- CWD AB
- CRM SFRB,ON
- LDD RA SET IN = OUT
- SHN 6
- ADN FET+3
- CRD CM
- SBN 1
- CWD CM
- LDN 1 SET HOLD FLAG
- STD HF
- LDN FT SET DISPLAY = LINE 0
- RJM SDS SET DISPLAY
- LDN 0 CLEAR SCAN
- STD SC
- STD SI
- JMP CIF CLEAR INSERT FLAG
- LIST. SPACE 4,20
- *** LIST,FFFFFFF.
- *
- * LIST.
- *
- * LIST THE DIRECTORY OF FILE NAME *FFFFFFF*. IF
- * *FFFFFFF* IS MISSING, PREVIOUS FILE NAME WILL
- * BE USED.
- LST ENTRY
- RJM SFN SET FILE NAME
- AOD CA ADVANCE CHARACTER
- LST1 ENTRY
- RJM RRI READ RANDOM INDEX
- LDN 15 READ RANDOM RECORD
- RJM CIO
- LDC =C*LIST.*
- JMP GTR4 RETURN
- * LIST FILE INDEX.
- LST2 ENTRY
- RJM CIR CHECK INDEX RECORD
- LDC 2R
- STD AB
- STD AB+3
- STD AB+4
- LST3 LDD RA READ ENTRY
- SHN 6
- ADD T5
- ADD T7
- SBN 1
- CRD CM READ ENTRY
- LDD CM+4
- RAD CM+4
- LDM LSTA,CM+4 SET RECORD TYPE
- STD AB+1
- LDM LSTA+1,CM+4
- STD AB+2
- LDN 0
- STD CM+4
- LDD CM+3
- SCN 77
- STD CM+3
- ADD CM CHECK FOR ZERO RECORD NAME
- ADD CM+1
- ADD CM+2
- ZJN LST6 IF ZERO RECORD NAME
- LST4 LDD RA STORE NAME
- SHN 6
- ADD T5
- ADD T7
- CWD CM
- SBN 1 STORE RECORD TYPE
- CWD AB
- LCN 2 DECREMENT INDEX
- RAD T7
- MJN LST5 IF END OF OPLD
- LJM LST3 CONTINUE PROCESSING ENTRIES
- * END OF LIST.
- LST5 LDC CBUF SET MOVE ADDRESS
- STD T3
- SHN -14
- STD T2
- RJM MBD MOVE BUFFER DOWN
- LJM PLB RETURN
- LST6 LDC 3R(0) SUBSTITUTE FOR ZERO RECORD NAME
- STD CM+1
- SHN -6
- STD CM
- UJN LST4 STORE NAME
- LSTA BSS 0
- DATA 4HTEXT 0
- DATA 4HPP 1
- DATA 4HCOS 2
- DATA 4HREL 3
- DATA 4HOVL 4
- DATA 4HULIB 5
- DATA 4HOPL 6
- DATA 4HOPLC 7
- DATA 4HOPLD 8
- DATA 4HABS 9
- DATA 4HPPU 10
- DATA 4H 11 (UNDEFINED RECORD TYPE)
- DATA 4H 12 (UNDEFINED RECORD TYPE)
- DATA 4H 13 (UNDEFINED RECORD TYPE)
- DATA 4HCAP 14 CAPSULE
- DATA 4H 15 (UNDEFINED RECORD TYPE)
- DATA 4HPROC 16 PROCEDURE
- CIR SPACE 4,20
- ** CIR - CHECK INDEX RECORD.
- *
- * EXIT (CM - CM+4) = 7700 TABLE WORD.
- * (AB - AB+4) = 7000 TABLE WORD.
- * (T4 - T5) = ADDRESS OF FIRST ENTRY.
- * (T7) = INDEX OF LAST ENTRY (2ND WORD).
- * EXIT TO TIOX IF RECORD NOT FOUND.
- CIR SUBR ENTRY/EXIT
- RJM PDS PUSH DOWN STACK
- LDD RA READ 7700 TABLE
- SHN 6
- ADC CBUF
- CRD CM
- ADD CM+1 READ 7000 TABLE
- ADN 1
- CRD AB
- LDD CM
- LMC 7700
- ZJN CIR2 IF 7700 TABLE
- CIR1 LDC =C*INDEX NOT FOUND.*
- STD KM
- LJM TIOX RETURN
- CIR2 LDD AB
- LMC 7000
- NJN CIR1 IF NOT 7000 TABLE
- LDD AB+3 CHECK LENGTH
- NJN CIR1 IF INDEX TOO LONG
- STD T4 SET START OF DISPLAY
- LDC CBUF+2
- ADD CM+1
- STD T5
- LDD IN CHECK LENGTH
- SHN 14
- LMD IN+1
- SBD T5
- SBD AB+4
- MJN CIR1 IF INDEX TOO LONG
- LDD AB+4 SET INDEX OF LAST ENTRY
- SBN 1
- STD T7
- SBN 1
- MJN CIR1 IF INDEX TOO SHORT
- LJM CIRX RETURN
- RRI SPACE 4,15
- ** RRI - READ RANDOM INDEX.
- *
- * ENTRY (A) = CHACRACTER ADDRESS.
- *
- * EXIT TO *ERR* ON FILE NAME ERROR.
- *
- * CALLS CIO.
- RRI SUBR ENTRY/EXIT
- LDD FT SET IN = OUT = FIRST
- STD IN
- STD OT
- LDD FT+1
- STD IN+1
- STD OT+1
- LDN 3 SKIP TO END OF INFORMATION
- RJM CIO
- LDC 20640 SKIP BACKWARDS 2 RECORDS
- STM TIOD+1
- SHN -14
- STM TIOD
- LDN 5 SKIP BACKWARDS
- RJM CIO
- LDN 12 READ
- RJM CIO
- UJN RRIX RETURN
- RRR SPACE 4,20
- ** RRR - READ RANDOM RECORD.
- *
- * ENTRY (CM BUFFER) = RANDOM INDEX.
- * (SFRB - SFRB+4) = NAME OF RECORD.
- *
- * USES T1 - T4, CM - CM+4, AB - AB+4.
- *
- * CALLS CIO, CIR, PDS.
- RRR ENTRY
- RJM CIR CHECK INDEX RECORD
- * SEARCH BUFFER FOR RECORD.
- RRR1 LDD RA READ ENTRY
- SHN 6
- ADD T5
- ADD T7
- SBN 1
- CRD CM READ ENTRY
- LDN CM COMPARE ENTRY
- STD T1
- RRR2 LDI T1
- LMM SFRB-CM,T1
- NJN RRR3 IF NO MATCH
- AOD T1
- LMN CM+4
- NJN RRR2 IF NO MATCH LOOP
- LDD T7 SET RECORD FOUND FLAG
- STD T4
- LDD CM+4
- LMK TXRT
- ZJN RRR5 IF TEXT RECORD
- LMK PRRT&TXRT
- ZJN RRR5 IF .PROC RECORD
- RRR3 LCN 2
- RAD T7
- PJN RRR1 IF COMPARE NOT COMPLETE
- * END OF SEARCH.
- LDM TIOE CHECK IF NON-TEXT RECORD ALLOWED
- NJN RRR4 IF ONLY TEXT ALLOWED
- LDD T4
- NJN RRR5 IF RECORD FOUND
- RRR4 LDC =C*RECORD NOT FOUND.*
- STD KM
- LJM TIOX RETURN
- * RECORD FOUND.
- RRR5 LDD RA READ RANDOM ADDRESS
- SHN 6
- ADD T5
- ADD T4
- CRD CM
- LDD RA SET RANDOM ADDRESS
- SHN 6
- ADN FET+6
- CWD CM
- SBN 3 SET IN = OUT
- CRD CM
- SBN 1
- CWD CM
- LDD FT SET IN = FIRST
- STD IN
- LDD FT+1
- STD IN+1
- LDN 12 READ RECORD
- RJM CIO
- LDN 1 DUMMY
- RJM CIO
- LJM PLB RETURN
- COMMAND (REPLACE COMMANDS.)
- RC, SPACE 4,20
- *** RC,X,C.
- *
- * REPLACE CHARACTER *X* OF FOLLOWING LINE
- * WITH CHARACTER *C*.
- RPC ENTRY
- RJM ADD ASSEMBLE CHARACTER NUMBER
- LMN 1R,
- ZJN RPC2 IF *,*
- RPC1 JMP ERR FORMAT ERROR
- RPC2 SOD AB+4 SAVE CHARACTER NUMBER
- MJN RPC1 IF CHARACTER NUMBER ZERO
- STD T7
- ADC -KBUFL+2
- PJN RPC1 IF OUT OF RANGE
- AOD T1 SAVE CHARACTER ADDRESS
- STD T6
- LDD IF
- ZJN RPC1 IF NO INSERT
- LDC BUFM SET CHARACTER ADDRESS
- STD CA
- RJM RDL READ NEXT LINE
- LDI T6 REPLACE CHARACTER
- STM BUFM,T7
- RJM RLB REPLACE LINE IN BUFFER
- LDN 1 ADVANCE INSERT
- RJM SIL
- JMP KBIX RETURN
- RM SPACE 4,25
- *** RM/AAA-AAA/BBB-BBB/
- *
- * REPLACE CHARACTER STRING *AAA-AAA* FROM THE
- * FOLLOWING LINE WITH CHARACTER STRING *BBB-BBB*.
- * */* MAY BE ANY CHARACTER. DO NOT ADVANCE INSERT
- * MARK.
- RS SPACE 4,20
- *** RS/AAA-AAA/BBB-BBB/
- *
- * REPLACE CHARACTER STRING *AAA-AAA* FROM THE
- * FOLLOWING LINE WITH CHARACTER STRING *BBB-BBB*.
- * */* MAY BE ANY CHARACTER.
- RPS ENTRY
- RJM CIL CHECK INSERT LINE
- LDM KBUF+2 SET DELIMITER
- STD T7
- LDN 3 SET STARTING COLUMN
- STD T2
- LDN 0
- * ENTRY FROM *RPN*.
- RPS1 STD T3
- STD T6
- * SEARCH FOR MATCHING STRING.
- RPS2 LDD T2 RESET INDEX
- STD T1
- RPS3 LMD KI
- ZJN RPS4 IF END OF KEYBOARD STRING
- LDM KBUF,T1
- LMD T7
- ZJN RPS5 IF DELIMITER FOUND
- LDD T3
- LMD LC
- ZJN RPS4 IF END OF ORIGINAL LINE
- LDM BUF+2,T3
- LMM KBUF,T1
- NJN RPS4 IF NO HIT
- AOD T3
- AOD T1
- UJN RPS3 LOOP FOR NEXT CHARACTER
- * COPY ONE CHARACTER ON NO HIT.
- RPS4 LDD T6 CHECK FOR END OF LINE
- LMD LC
- ZJN RPS7 IF END OF LINE
- LDM BUF+2,T6
- STM BUFM+2,T6 COPY CHARACTER
- AOD T6
- STD T3
- UJP RPS2 LOOP
- * REPLACE CHARACTER STRING.
- RPS5 AOD T1 CHECK FOR END OF KEYBOARD STRING
- SBD KI
- PJN RPS7 IF END OF STRING
- LDM KBUF,T1
- LMD T7
- ZJN RPS10 IF DELIMITER FOUND
- LMD T7
- STM BUFM+2,T6 SET CHARACTER
- AOD T6
- ADC 2-KBUFL
- MJN RPS5 IF NOT END OF BUFFER
- LDM KBUF+1,T1
- LMD T7
- ZJN RPS12 IF END OF STRING
- RPS6 LDC =C*LINE OVERFLOW.*
- UJN RPS9 PROCESS ERROR
- * PROCESS STRING NOT IN LINE.
- RPS7 LDD KM CHECK MESSAGE
- LMC ERRD
- NJN RPS8 IF NOT *REPEAT ENTRY.*
- LJM RPS15 ADVANCE INSERT
- RPS8 LDC =C*NOT IN LINE.*
- RPS9 LJM ERR1 PROCESS ERROR
- * COPY REMAINDER OF FOLLOWING LINE.
- RPS10 LDD T3 CHECK FOR END OF LINE
- RPS11 LMD LC
- RPS12 ZJN RPS14 IF END OF LINE
- LDD T6
- ADC 2-KBUFL
- ZJN RPS6 IF PAST END OF BUFFER
- LDM BUF+2,T3
- STM BUFM+2,T6 SET NEXT CHARACTER
- AOD T6
- AOD T3
- UJN RPS11 CONTINUE COPY
- * BLANK FILL BUFFER.
- RPS13 LDN 1R BLANK FILL *BUFM*
- STM BUFM+1,T6
- RPS14 AOD T6 ADVANCE INDEX
- ADC 1-KBUFL
- MJN RPS13 IF NOT END OF BUFFER
- * ENTER LINE IN BUFFER.
- LDC BUFM+2 SET CHARACTER ADDRESS
- STD CA
- RJM RLB REPLACE LINE IN BUFFER
- LDM KBUF+1 CHECK FOR RM COMMAND
- LMN 1RM
- ZJN RPS16 IF *RM*
- RPS15 LDN 1 ADVANCE INSERT
- RJM SIL
- RPS16 JMP RET RETURN
- R, SPACE 4,20
- *** R,X./AAA-AAA/BBB-BBB/
- *
- * REPLACE CHARACTER STRING AAA-AAA FROM THE
- * FOLLOWING LINE STARTING WITH CHARACTER POSITION
- * *X* WITH CHARACTER STRING BBB-BBB. */* MAY BE
- * ANY CHARACTER.
- RPN ENTRY
- RJM CIL CHECK INSERT LINE
- LDC KBUF+2 ASSEMBLE DIGITS
- RJM ASD
- STD T5
- LDM 1,T1 SET DELIMITER
- STD T7
- LDD T1 SET STRING ADDRESS
- ADC -KBUF+2
- STD T2
- SOD AB+4
- MJN RPN1 IF NULL CHARACTER POSITION
- ZJN RPN4 IF FIRST CHARACTER POSITION
- ADC 1-KBUFL
- MJN RPN2 IF POSITION WITHIN BUFFER
- RPN1 JMP ERR FORMAT ERROR
- RPN2 LDD AB+4 CHECK CHARACTER POSITION
- SBD LC
- MJN RPN3 IF WITHIN INSERT LINE
- LJM RPS7 PROCESS AS *NOT IN LINE.*
- RPN3 LDM BUF+2,T5 COPY LINE TO START OF SCAN
- STM BUFM+2,T5
- AOD T5 ADVANCE INDEX
- LMD AB+4
- NJN RPN3 IF NOT END OF COPY
- LDD AB+4
- RPN4 LJM RPS1 PROCESS STRING REPLACEMENT
- ASD SPACE 4,10
- ** ASD - ASSEMBLE DIGITS.
- *
- * ENTRY (A) = CHARACTER ADDRESS.
- *
- * EXIT (A) = 0.
- * (AB - AB+4) = RIGHT JUSTIFIED ASSEMBLY.
- *
- * CALLS ADD.
- ASD SUBR ENTRY/EXIT
- RJM ADD ASSEMBLE DECIMAL DIGITS
- LMN 1R.
- ZJN ASDX IF *.* RETURN
- JMP ERR FORMAT ERROR
- CIL SPACE 4,10
- ** CIL - CHECK INSERT LINE.
- *
- * ENTRY (IF) = INSERT FLAG.
- *
- * EXIT (BUF+2) = INSERT LINE.
- *
- * USES CA.
- *
- * CALLS RDL.
- CIL1 LDC BUF+2 SET BUFFER ADDRESS
- STD CA
- RJM RDL READ INSERT LINE
- CIL SUBR ENTRY/EXIT
- LDD IF
- NJN CIL1 IF INSERT FLAG SET
- JMP ERR FORMAT ERROR
- MBU SPACE 4,10
- ** MBU - MOVE BUFFER UP.
- *
- * ENTRY (T2 - T3) = FWA TO MOVE.
- * (IN - IN+1) = LWA+1 TO MOVE.
- * (T7) = DISTANCE TO MOVE.
- *
- * USES T1, T4, BUFM - BUFM+240.
- MBU SUBR ENTRY/EXIT
- LDD IN COMPUTE MOVE WORD COUNT
- SBD T2
- SHN 14
- ADD IN+1
- SBD T3
- SHN 13D SET BLOCK COUNT
- STD T1
- SHN -13D SET ODD SIZE
- STD T4
- ZJN MBU2 IF NO ODD BLOCK
- * MOVE SHORT BLOCK.
- LDD IN READ SHORT BLOCK
- SHN 6
- ADD RA
- SHN 6
- ADD IN+1
- SBD T4
- MBU1 CRM BUFM,T4
- SBD T4 STORE ODD BLOCK
- ADD T7
- CWM BUFM,T4
- MBU2 SOD T1
- MJN MBUX IF NO FULL BLOCKS
- LDN 40
- STD T4 SET FULL BLOCK SIZE
- * MOVE FULL BLOCKS.
- LDD T2 READ BLOCK
- SHN 6
- ADD RA
- SHN 1
- ADD T1
- SHN 5
- ADD T3
- UJN MBU1 MOVE BLOCK
- RLB SPACE 4,20
- ** RLB - REPLACE LINE IN CM BUFFER.
- *
- * ENTRY (CA) = CHARACTER ADDRESS.
- * (IF) = INSERT FLAG.
- * (IP - IP+1) = INSERT ADDRESS.
- *
- * USES T2 - T7, CM - CM+4, BUF - BUF+50.
- *
- * CALLS MBD, MBU, PKL, SFL, SIP.
- RLB SUBR ENTRY/EXIT
- RJM PKL PACK LINE INTO BUF
- LDD T7 SET BUFFER LENGTH
- STD T6
- LDD IP SEARCH FOR END OF LINE
- STD T2
- LDD IP+1
- STD T3
- LDN 1
- RJM SFL SEARCH FOR LINE
- LDD T3 CALCULATE CURRENT LENGTH
- STD T5
- LDD T2
- STD T4
- SBD IP
- SHN 14
- ADD T3
- SBD IP+1
- SBD T6
- MJN RLB1 IF LENGTH INCREASE
- ZJN RLB2 IF SAME LENGTH
- * MOVE BUFFER DOWN.
- LDD IP+1 SET MOVE ADDRESS
- ADD T6
- STD T3
- SHN -14
- ADD IP
- STD T2
- RJM MBD MOVE BUFFER DOWN
- UJN RLB2
- * MOVE BUFFER UP.
- RLB1 LMC 7777 SET WORD COUNT
- STD T7
- RJM MBU MOVE BUFFER UP
- LDD T7 ADVANCE IN
- RAD IN+1
- SHN -14
- RAD IN
- LDD T7 ADVANCE DISPLAY LENGTH
- RAD DL
- * COPY LINE INTO CM BUFFER.
- RLB2 LDD IP
- SHN 6
- ADD RA
- SHN 6
- ADD IP+1
- CWM BUF,T6
- RJM SIP SET IN POINTER
- LJM RLBX RETURN
- COMMAND (REWRITE RECORD IN PLACE.)
- RWRITE SPACE 4
- *** RWRITE.
- *
- * REWRITE RECORD ( MASS STORAGE ONLY )
- *
- *
- * NOTES AND CAUTIONS.
- *
- * 1) NUMBER OF PRU,S MAY NOT CHANGE.
- * REWRITE NOT ALLOWED IF CONDITION EXISTS.
- *
- * 2) AN ** WILL APPEAR TO THE RIGHT OF THE *RS=*
- * FIELD WHEN A NO-REWRITE CONDITION EXISTS.
- *
- * 3) REWRITE TO ANOTHER FILE MAY CAUSE UNPREDICTABLE
- * RESULTS.
- RWR ENTRY
- RJM CRS CHECK RECORD STATUS
- RJM SIP STORE IN POINTER
- LDD IN
- SBD FT
- SHN 14 CALCULATE PRU COUNT
- LMD IN+1
- SBD FT+1
- SHN -6
- LMM TIOG COMPARE WITH RECORD READ
- ZJN RWR1 IF IN RANGE
- LDC =C*PRU SIZE MODIFIED.*
- JMP ERR1
- * REWRITE RECORD.
- RWR1 LDN 21 REWRITE RECORD
- RJM CIO
- LDN 17 RESET FET POINTERS
- RJM CIO
- JMP CIF
- COMMAND (MISCELANEOUS COMMANDS.)
- ENFL. SPACE 4,20
- *** ENFL.
- *
- * SET FIELD LENGTH TO BUFFER SIZE+1000.
- EFL ENTRY
- LDD RA READ LIMIT
- SHN 6
- ADN FET+4
- CRD AB
- LDD CP GET NFL SIZE
- ADN FLSW
- CRD CM
- LDD IN SET FIELD LENGTH
- SHN 6
- ADD CM INCLUDE NFL IN VALIDATION
- SHN 6
- ADD IN+1
- ADC 1077
- MJN EFL2 IF REQUEST .GE. 131K
- SHN -6
- SBD CM
- STD T1
- EFL1 LDD CP CHECK FOR *EXTENDED MEMORY* ASSIGNMENT
- ADN ECSW
- CRD AB
- LDD AB+4
- ZJN EFL3 IF *EXTENDED MEMORY* NOT ASSIGNED
- LDD T1 ENSURE *FL* .GE. 10000B
- ADC -MCMX/100
- PJN EFL3 IF *FL* .GE. 10000
- EFL2 LDC =C*INCORRECT FL REQUEST.*
- UJN EFL7 ISSUE MESSAGE
- EFL3 LDD T1 SET FL REQUEST
- STM EFLA
- EFL4 LDC * REQUEST STORAGE INCREASE
- EFLA EQU *-1
- EFL5 RJM RSI REQUEST STORAGE
- ZJN EFL7 IF STORAGE ASSIGNED
- MJN EFL6 IF NOT AVAILABLE
- LDC =C*WAITING FOR STORAGE.*
- STD KM
- RJM KBIA
- LDD KE CHECK KEYBOARD ENTRY
- LMN 53
- NJN EFL4 IF NOT LEFT BLANK
- LDD FL
- UJN EFL5 CLEAR STORAGE REQUEST TO *1SJ*
- EFL6 LDC =C*STORAGE NOT AVAILABLE.*
- EFL7 STD KM
- LDC KBI8 RESET KEYBOARD
- STM KBIA
- LDD RA READ LIMIT
- SHN 6
- ADN FET+4
- CRD AB
- LDD FL RESET LIMIT
- SHN 6
- STD LM+1
- STD AB+4
- SHN -14
- STD LM
- STD AB+3
- LDD RA
- SHN 6
- ADN FET+4
- CWD AB
- JMP RET RETURN
- ENFL, SPACE 4,15
- *** ENFL,X.
- *
- * SET FIELD LENGTH TO X.
- EFN ENTRY
- RJM AOD ASSEMBLE OCTAL DIGITS
- LDD CP GET NFL SIZE
- ADN FLSW
- CRD CM
- LDD AB+3
- SHN 6
- ADD CM INCLUDE NFL IN VALIDATION
- SHN 6
- ADD AB+4
- ADN 77
- PJN EFN1 IF REQUEST .LT. 131K
- LJM EFL2 REQUEST .GE. 131K
- EFN1 SHN -6 FL = FL/100
- SBD CM
- STD T1
- SBD FL
- NJN EFN3 IF FL .NE. 0
- EFN2 LJM ERR MESSAGE = *FORMAT ERROR.*
- EFN3 PJN EFN4 IF NEW FL .GT. OLD FL
- LDD IN CHECK FOR DATA TRUNCATION
- SHN 6
- SBD T1
- SHN 6
- ADD IN+1
- PJN EFN2 IF NEW FL TOO SMALL
- EFN4 LJM EFL1 ISSUE FL REQUEST
- ERR. SPACE 4,10
- *** ERR.
- *
- * SET ERROR FLAG.
- SEF ENTRY
- LDN ZERL
- CRD CM
- LDN PPET SET ERROR FLAG = PP ABORT
- STD CM+1
- MONITOR CEFM
- JMP RET RETURN
- HOLD. SPACE 4,10
- *** HOLD.
- *
- * DROP DISPLAY AND WAIT FOR OPERATOR ASSIGNMENT.
- HOL ENTRY
- RJM DDS DROP DISPLAY
- LDK RDSOS REQUEST DISPLAY
- RJM RID
- JMP RET RETURN
- IGN SPACE 4,10
- *** IGNORE.
- *
- * IGNORE RECORD TOO LONG CONDITION. THE RECORD MAY NOW BE
- * WRITTEN, BUT WILL BE TRUNCATED.
- IGN ENTRY
- AOM CRSA SET RECORD READ NOT TOO LONG FLAG
- JMP RET RETURN
- GO. SPACE 4,10
- *** GO.
- *
- * CLEAR PAUSE FLAG.
- GGO ENTRY
- LDD CP READ SENSE SWITCH WORD
- ADN SNSW
- CRD CM
- LDD CM+3 CLEAR PAUSE BIT
- SCN 1
- STD CM+3
- LDD CP STORE SENSE SWITCH WORD
- ADN SNSW
- CWD CM
- JMP RET RETURN
- UCC SPACE 4,15
- *** UCC=C
- *
- * SET UPPER CASE CONTROL CHARACTER TO C.
- *
- * TO ENTER ANY CHARACTER NOT ON KEYBOARD, HIT UCC AND
- * ENTER 2 OCTAL DIGIT DISPLAY CODE BY DEPRESSING AN
- * APPROPRIATE KEY.
- *
- * 0 THRU 7 = 60 THRU 67, QWERTYU = 70 THRU 77, AND S = 53.
- *
- * EXAMPLE UCC=*. TO ENTER " IN LINE DEPRESS * AND THEN 4.
- UCC ENTRY
- LDD CA CHECK FOR CLEAR/SET UCC
- ADC -KBUF
- LMD KI
- ZJN UCC1 IF END OF KEYBOARD BUFER
- LDI CA
- UCC1 STM UCCA SET UPPER CASE CONTROL
- LDM KBIC CLEAR/SET UPPER CASE CONTROL
- SCN 77
- LMC ** UPPER CASE CONTROL CHARACTER
- UCCA EQU *-1
- STM KBIC
- SHN 6
- LMD IR+2
- SCN 77
- LMD IR+2
- STD IR+2
- JMP RET RETURN
- AOD SPACE 4,20
- ** AOD - ASSEMBLE OCTAL DIGITS.
- *
- * ENTRY (A) = CHARACTER ADDRESS.
- *
- * EXIT (A) = SEPARATOR CHARACTER.
- * (AB - AB+4) = ASSEMBLED DIGITS RIGHT JUSTIFIED.
- * (T1) = UPDATED CHARACTER ADDRESS.
- *
- * USES T0 - T2.
- AOD SUBR ENTRY/EXIT
- STD T1 SET CHARACTER AODRESS
- LDN ZERL CLEAR ASSEMBLY
- CRD AB
- AOD1 LDI T1 CHECK CHARACTER
- SBN 1R0
- MJN AOD2 IF ALPHA
- SBN 1R8-1R0
- MJN AOD3 IF OCTAL DIGIT
- SBN 1R -1R8
- ZJN AOD5 IF * *
- AOD2 LDI T1 RETURN WITH CHARACTER
- UJN AODX
- AOD3 ADN 1R8-1R0 NEW DIGIT = CHARACTER
- STD T0
- LDN AB+4 SET BYTE AODRESS
- STD T2
- AOD4 LDI T2 BYTE = BYTE * 10B
- SHN 3
- ADD T0
- STI T2
- SHN -14 NEW DIGIT = OVERFLOW
- STD T0
- SOD T2 DECREMENT BYTE ADDRESS
- LMN AB-1
- NJN AOD4 IF NOT AT END OF WORD LOOP
- AOD5 AOD T1 ADVANCE CHARACTER
- UJN AOD1 LOOP
- COMMON SPACE 4
- ** COMMON DECKS.
- *CALL COMPRSI
- TITLE BUFFERS.
- BUFFERS SPACE 4
- * TERMINATE COMMAND OVERLAYS.
- QUAL
- HERE
- USE END FORCE LITERALS
- BUFFERS SPACE 4,10
- ** BUFFER DEFINITIONS.
- BUFM EQU 7774-240 MOVE BUFFER
- BUFR EQU 7774-19D*5 READ BUFFER
- KBUFL EQU 92D KEYBOARD BUFFER LENGTH
- * ENSURE ROOM FOR END OF LINE FOR EACH BUFFER.
- BUF EQU BUFM-KBUFL-7 LINE BUFFER
- DBUF EQU BUF-KBUFL-7 TAB AND DUP BUFFER
- KBUF EQU DBUF-KBUFL-7 KEYBOARD BUFFER
- OVL SPACE 4,10
- * OVERLAY CONTROL.
- *
- * AN ADDITIONAL BYTE HAS TO BE ADDED TO OVERLAY LENGTH
- * COMPUTATIONS TO ACCOUNT FOR THE FACT THAT THE BYTE AFTER
- * THE LAST BYTE TRANSFERRED BY AN *IAM* INSTRUCTION IS ZEROED
- * WHEN THE CHANNEL DISCONNECTS.
- .L MAX *,.L ADD LAST OVERLAY TO OVERFLOW CHECK
- .L SET .L+4-OVL
- .L SET .L/5*5+OVL+1
- ERRNG KBUF-.L PP MEMORY OVERFLOW
- .L SET ECMDO+4-OVL
- .L SET .L/5*5+OVL+1
- ERRNG DBUF-.L PP MEMORY OVERFLOW
- TTL O26 - CONSOLE TEXT EDITOR.
- O26 SPACE 4
- END O26 CONSOLE TEXT EDITOR
cdc/nos2.source/opl871/o26.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator