	.TITLE UPDATE
/PDP-9 ADVANCED SOFTWARE SYSTEM
/LIBRARY FILE UPDATE
/DAVE LENEY
/22 AUGUST 1969
/COPYRIGHT 1969, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
/
/VERSION V6A
/
/
	.ABS
	.LOC 13670
.SCOM=100
SIZE1=6
BSIZE=2000*SIZE1+1000
LISTBF	32002			/LISTING BUFFER
INSN=LISTBF+64
COMAND=LISTBF+67
BUFFER=LISTBF+72
/
/ROUTINE TO BANK RELOCATE UPDATE
START	LAC* (.SCOM
	AND (60000
	DAC BANKBT
CNTR	ADCT
	LAC (ADF-1
	XOR BANKBT
	DAC* (10
	DAC* (11
LOOP	LAC* 10
	XOR BANKBT
	DAC* 11
	ISZ CNTR
	JMP LOOP
CTR	MODCT
	LAC AD00
	DAC CNTR
LOOP1	LAC* CNTR
	XOR BANKBT
	DAC TMP
	LAC* TMP
	XOR BANKBT
	DAC* TMP
	ISZ CNTR
	ISZ CTR
	JMP LOOP1
	DZM CPSW
	JMP BEGIN
TMP	0
	.EJECT
MODF=.
	MOD01
	MOD02
	MOD03
	MOD03A
	MOD04
	MOD05
	MOD06
	MOD07
	MOD10
	MOD11
	MOD12
	MOD13
	MOD14
	MOD15
	MOD16
	MOD17
	MOD20
	MOD21
	MOD22
	MOD23
	MOD24
	MOD25
	MOD26
	MOD27
	MOD30
	MOD31
	MOD32
	MOD33
	MOD34
	MOD35
	MOD36
	MOD37
	MOD40
	MOD41
	MOD42
	MOD43
	MOD44
	MOD45
	MOD46
	MOD47
	MOD50
	MOD51
	MOD52
	MOD53
	MOD54
	MOD55
	MOD56
	MOD57
	MOD60
	MOD61
	MOD62
/
MODL=.
MODCT=MODL-MODF\777777+1
	.EJECT
	.BLOCK MODL-LISTBF\777777+140
/
CPINT	LAC CPSW
	SZA
	JMP CPNTP
BEGIN	CAL+776		/.INIT
	1
MOD01	CPINT
	0
	DZM CPSW
	JMS TYPE		/.WRITE
MOD02	MS01
AGAIN	LAC (NOP		/INITIALIZE SWITCHES TO NOP
	DAC LIST
	DAC UPDATE
	DAC NEW
	DAC ENDSW
	DAC FINIS
	DAC LSTACT
	DAC	CRUNCH
	JMS GETCMD	/GET COMMAND STRING
PROPTS	JMS GET		/CHECK OPTIONS
	SAD (12		/LINE FEED
	JMP PROPTS	/IGNORED
	SAD (137
	JMP ENDOPT	/END OF OPTIONS
	SAD (15		/RETURN
	JMP QUEST
	SAD (175		/ALTMODE
	JMP QUEST-2
	SAD (114		/L
	JMP LISTOP	/LISTING WANTED
	SAD (125		/U
	JMP UPDTMD	/UPDATE MODE
	SAD (116		/N
	JMP NEWOPT	/NEW FILE MODE
	SAD	(123	/S - SHORTEN BY ELIMINATING LOCAL SYMBOLS
	JMP	CRUN0
	JMP PROPTS
	CAL+775
	6
QUEST	JMS TYPE		/.WRITE
MOD07	MS03
	JMP AGAIN
LISTOP	LAC (SKP
	DAC LIST		/LISTING SWITCH
	JMP PROPTS
	.EJECT
UPDTMD	LAC (SKP
	SAD NEW
	JMP QUEST
	DAC UPDATE	/UPDATE SWITCH
	JMP PROPTS
NEWOPT	LAC (SKP
	SAD UPDATE
	JMP QUEST
	DAC NEW		/NEW FILE SWITCH
	JMP PROPTS
CRUN0	LAC	(SKP
	DAC	CRUNCH
	JMP	PROPTS
ENDOPT	JMS SCAN		/FOR FILE NAME
	LAC LASTCH
	SAD (15		/RETURN
	JMP SCANOK
	LAC COMAND	/FILE NAME
	SNA
	JMP ENDOPT	/IGNORE LEADING BLANKS
	JMP .+5
SCANOK	LAC CHARL		/SEE IF RETURN OR ALTMODE
	SNA
	LAC (15
	DAC LASTCH
	LAC COMAND		/CHECK FOR DEFAULT
	SZA		/NAME FOR FILE
	JMP .+6		/USER SPECIFIED NAME
	LAC .LIBRN	/.LIBR BY DEFAULT
	DAC COMAND
	LAC .LIBRN+1
	DAC COMAND+1
	DZM COMAND+2
	LAC LASTCH
	SAD (15		/RETURN
	JMP CONVRT
	SAD (175		/ALTMODE
	JMP ALTFIN
	JMS GET		/UNTIL RETURN OR ALTMODE
	JMP .-5
ALTFIN	LAC (SKP
	DAC FINIS		/EXIT SWITCH
CONVRT	JMS SIXF57	/CONVERT FILE NAME
	.EJECT
MOD27	FILE
	XCT NEW
	SKP
	JMP .+5		/NO INPUT FILE
	CAL+764		/.INIT - INPUT
	1
MOD03	CPINT
	0
	XCT UPDATE
	SKP
	JMP .+3
	XCT NEW
	JMP .+5
	CAL+1763
	1
MOD05	CPINT
	0
	XCT NEW
	SKP
	JMP .+4
	CAL+764		/.SEEK
	3
MOD10	FILE
	LAC WRKEXT		/WORK FILE TYPE
	DAC FILE+2
	XCT UPDATE
	SKP
	JMP .+3
	XCT NEW
	JMP .+4		/NO OUTPUT FILE
	CAL+763
	4
MOD15	FILE
	LAC LSTEXT
	DAC FILE+2
	LAC COMAND
	DAC ENAMEL
	LAC COMAND+1
	DAC ENAMEL+1
	LAC COMAND+2
	DAC ENAMEL+2
	XCT LIST
	JMP .+13		/NO LISTING FILE
	CAL+1766		/.INIT - LISTING
	1
MOD04	CPINT
	0
	CAL+766		/.ENTER
	4
	.EJECT
MOD14	FILE
	DZM PAGECT
	LAW -1
	DAC LINECT
	LAC* (.SCOM+2	/LOWEST FREE LOC
	DAC LB1ST
	DAC LBLAST
	DAC LBNEXT
	LAC* (.SCOM+3	/HIGHEST FREE LOC
	DAC LBFULL
	DZM	NSYMF
	DZM	F
	JMS	INOUT
	LAC	MOD62
	DAC	TBP
	LAW	-3
	DAC	B
	DZM	TO
NXTCMD	JMS GETCMD	/BRING IN COMMAND STRING
	JMS SCAN		/GET 1ST UNIT
	JMS TABLE		/SEARCH TABLE
	JMP WHAT		/ILLEGAL
	LAC* TABLEP
	XOR BANKBT
	DAC TABLEP
	JMP* TABLEP	/DISPATCH
/
WHAT	JMS TYPE		/.WRITE
MOD17	MS03
	JMP NXTCMD
/
INOUT	0
	LAC	(BSIZE	/INITIALIZE OUTPUT BUFFER HEADER WORD
	DAC	OUTBUF
	LAC	MOD61	/INITIALIZE OUTPUT BUFFER NEXT WORD POINTER
	TAD	(2
	DAC	Q
	LAW	-SIZE1	/INITIALIZE 4 WORD GROUPING COUNT
	DAC	OC
	DAC	OC1
	JMP*	INOUT
	.EJECT
/ERROR MESSAGES
NOUPD	JMS TYPE
MOD36	MS06
	JMP NXTCMD
ILLCS	JMS TYPE
MOD37	MS07
	JMP NXTCMD
NOUORN	JMS TYPE
MOD40	MS10
	JMP NXTCMD
NOPGNM	JMS TYPE
MOD41	MS11
	JMP BEGIN
OVERFO	JMS TYPE
MOD42	MS12
	JMP BEGIN
BADINP	JMS TYPE
MOD57	MS17
	JMP BEGIN
BADEOF	JMS TYPE
MOD43	MS13
	LAC (SKP
	DAC ENDSW
	JMP NXTCMD
WRONGP	JMS TYPE
MOD44	MS14
	LAW -1
	DAC CPSW
	JMP .
/
READER	LAC R.DAT
	XOR (777000
	TAD (-1
	CMA
	RTL
	RTL
	AND (160
	XOR (1400
	DAC DATMSG
	JMS TYPE
MOD06	MS16
	JMP BEGIN
	.EJECT
/DELETE PROCESSING
DELETE	XCT UPDATE
	JMP NOUPD
	JMS SCAN		/GET NAME 2
	LAC LASTCH
	SAD (15		/RETURN
	JMP DELOK
	LAC COMAND	/SUPPRESS LEADING SPACES
	SNA
	JMP DELETE+2
DELOK	LAC COMAND	/SEE IF GOOD COMMAND
	SNA
	JMP ILLCS		/NOTHING TO DELETE
	LAC GETP		/SAVE POINTERS
	DAC GETPT
	LAC GETC
	DAC GETCT
	LAC GET1
	DAC GET1T
	LAC GET2
	DAC GET2T
	JMS R50F57
MOD21	NAME2
	JMS DELUNT
	LAC LIST		/SAVE FOR LATER
	DAC SLIST
	LAC UPDATE
	DAC SUPDAT
	LAC (NOP
	DAC LIST		/DELETE WITHOUT LIST OR COPY
	DAC UPDATE
	LAC LASTCH
	SAD (15
	JMP DELDON	/NO MORE
	LAC GETPT		/RESTORE POINTERS
	DAC GETP
	LAC GETCT
	DAC GETC
	LAC GET1T
	DAC GET1
	LAC GET2T
	DAC GET2
DELOOK	JMS SCAN		/GET NAME
	LAC COMAND
	SZA
	JMP MOD60-1
	LAC LASTCH
	SAD (15
	JMP DELDON
	JMP DELOOK
	JMS R50F57
MOD60	NAME2
	JMS POSUNT		/ACTUALLY DELETES BLOCK
DELDON	LAC SLIST		/RESTORE OPTIONS
	DAC LIST
	LAC SUPDAT
	DAC UPDATE
	DZM PROGN		/CLEAR OUT PROG NAME
	DZM PROGN+1
	DZM LSTACT		/PRINT ACTION
	DZM SIZE
	XCT LIST
	SKP
	JMS LINEB		/BUILD LINE + PRINT
	JMP NXTCMD	/ALL DONE ACTION
	.EJECT
/
/REPLACE PROCESSING
REPLAC	XCT UPDATE
	JMP NOUPD
	JMS SCAN		/GET NAME 2 & DEFAULT NAME 1
	LAC LASTCH
	SAD (15		/RETURN
	JMP REPLOK
	LAC COMAND	/SUPPRESS LEADING BLANKS
	SNA
	JMP REPLAC+2
REPLOK	LAC COMAND	/SEE IF GOOD NAME
	SNA
	JMP ILLCS		/NOTHING TO REPLACE
	JMS R50F57
MOD22	NAME1
	JMS R50F57
MOD23	NAME2
	JMS PUSH
	
REPAGN	JMS SCAN		/GET NAME 1
	LAC LASTCH
	SAD (15		/RETURN
	JMP REPOK
	LAC COMAND
	SNA
	JMP REPAGN	/SUPPRESS LEADING BLANKS
REPOK	LAC COMAND	/SEE IF NAME THERE
	SNA
	JMP .+4		/USE SAME AS NAME 2
	JMS R50F57
MOD24	NAME1
	JMS PUSH
	JMS DELUNT	/DELETE OLD
	JMS INSUNT	/INSERT NEW
	JMP NXTCMD
	.EJECT
/INSERT PROCESSING
INSERT	JMS SCAN		/GET NAME 1
	LAC LASTCH
	SAD (15		/RETURN
	JMP INSOK
	LAC COMAND
	SNA
	JMP INSERT
INSOK	LAC COMAND	/SEE IF GOOD NAME
	SNA
	JMP ILLCS		/NOTHING TO INSERT
	JMS R50F57
MOD25	NAME1
	JMS PUSH
	LAC LASTCH
	SAD (15
	JMP INSNAF
INSAGN	JMS SCAN		/GET NAME 2
	LAC LASTCH
	SAD (15		/RETURN
	JMP INSTOK
	LAC COMAND
	SNA
	JMP INSAGN	/SUPPRESS LEADING SPACES
INSTOK	LAC COMAND	/SEE IF NAME THERE
	SZA
	JMP INSAFT	/INSERT AFTER
INSNAF	XCT NEW
	SKP
	JMP .+3
	XCT UPDATE
	JMP NOUORN	/ILLEGAL COMMAND
	JMS INSUNT
	JMP NXTCMD	/ALL DONE ACTION
INSAFT	JMS R50F57
MOD26	NAME2
	XCT UPDATE
	JMP NOUPD		/ILLEGAL COMMAND
	JMS POSUNT
	JMS INSUNT
	JMP NXTCMD	/ALL DONE ACTION
	.EJECT
/END PROCESSING
END	XCT NEW
	SKP
	JMP NOUPD
	XCT ENDSW		/SKIP IF AT END
	JMS POSEOF
	JMP NXTCMD
/
/KILL PROCESSING
KILL	JMP BEGIN		/START OVER
/
/
/CLOSE PROCESSING
CLOSE	JMS SCAN
	LAC LASTCH
	SAD (15
	JMP .+4
	LAC COMAND
	SNA
	JMP CLOSE
	XCT NEW
	SKP
	JMP .+3
	XCT ENDSW
	JMS POSEOF
CLOSOK	LAC COMAND	/SEE IF DEFAULT FILE
	SZA
	JMP .+7		/USER SPECIFIED NAME
	LAC ENAMEL
	DAC COMAND
	LAC ENAMEL+1
	DAC COMAND+1
	LAC ENAMEL+2
	DAC COMAND+2
	JMS SIXF57
MOD33	FILE+3
	XCT NEW
	SKP
	JMP .+3
	XCT UPDATE
	JMP NOCLOS	/NO OUTPUT FILE
	.EJECT
	CAL+763		/.CLOSE
	6
	LAC BINEXT
	DAC FILE+2
	DAC FILE+5
	LAC FILE		/SEE IF BOTH NAMES
	SAD FILE+3	/ARE IDENTICAL
	SKP
	JMP NOTSFL	/NOT SAME NAME
	LAC FILE+1
	SAD FILE+4
	SKP
	JMP NOTSFL	/NOT SAME NAME
	CAL+1763		/.DLETE - ON NEW FILE
	2
MOD34	FILE+3
NOTSFL	LAC WRKEXT
	DAC FILE+2
	CAL+2763		/.RENAM - ON WORK FILE
	2
MOD35	FILE
NOCLOS	XCT LIST
	JMP .+3		/NO LISTING
	CAL+766		/.CLOSE
	6
	XCT NEW
	SKP
	JMP .+3		/NO PRIMARY INPUT
	CAL+764		/.CLOSE
	6
	XCT FINIS
	JMP BEGIN
	CAL		/.EXIT
	15
	.EJECT
/IOPS 5/7 ASCII PACKING ROUTINE
/INITIALIZE:
/	PUTC TO 0
/	PUTP TO 1ST WORD
PUT	0
	AND (177
	DAC PUT1
	CLL
	LAC PUTC		/CHAR POSITION
	TAD (JMP* PUTJ
	DAC .+2
	LAC PUT1
	XX		/MODIFIED JMP
MOD52=.
PUTJ	PUT571		/CHAR 1
MOD53	PUT572		/CHAR 2
MOD54	PUT573		/CHAR 3
MOD55	PUT574		/CHAR 4
MOD56	PUT575		/CHAR 5
PUT571	JMS	SUBS8		/8 RIGHT
	RTR
PUT57A	DZM* PUTP		/CLEAR DATA WORD
	JMP PUTEND
PUT572	RTL		/4 LEFT
	RTL
	JMP PUTEND
PUT573	RTR		/3 RIGHT - 1ST HALF
	RAR
	AND (17
	XOR* PUTP
	DAC* PUTP
	ISZ PUTP		/LAST WORD OF PAIR
	LAC PUT1
	RTR		/4 RIGHT - 2ND HALF
	RTR
	AND (700000
	JMP PUT57A
PUT574	JMS	SUBS8		/8 LEFT
	RTL
	JMP PUTEND
PUT575	RAL		/1 LEFT
	DZM PUTC		/RESET 5/7 COUNTER
	SKP
PUTEND	ISZ PUTC
	XOR* PUTP
	DAC* PUTP
	LAC PUTC
	SNA
	ISZ PUTP		/2ND WD COMPLETE
	LAC PUT1
	JMP* PUT		/RETURN
/IOPS 5/7 ASCII UNPACKING ROUTINE
/INITIALIZE:
/	GETC TO LAW -1
/	GETP TO 1ST WORD
GET	0
	ISZ GETC
	JMP GETS		/WORD PAIR STARTED
	LAC* GETP
	ISZ GETP
	DAC GET1		/FIRST PART
	LAC* GETP
	ISZ GETP
	DAC GET2		/LAST PART
	LAW -5
	DAC GETC		/RESET 5/7 COUNTER
GETS	LAW -10
	DAC GET3		/SHIFT LOOP 7+1/2 TIMES
GETL	LAC GET2
	RAL
	ISZ GET3
	JMP .+3
	AND (177		/GOT CHARACTER
	JMP* GET		/RETURN
	DAC GET2
	LAC GET1
	RAL
	DAC GET1
	JMP GETL		/BACK TO LOOP
/
/TYPE ROUTINE
TYPE	0
	LAC* TYPE
	DAC .+3
	CAL+2775
	11
	XX
	-60
	ISZ TYPE
	JMP* TYPE
/
	.EJECT
/GET COMMAND STRING FROM TT1
GETCMD	0
	CAL+2775		/.WRITE
	11
MOD12	MS02
	-42
	LAC AD03		/(BUFFER+2
	DAC GETP		/SETUP POINTERS + COUNTERS
	LAW -1
	DAC GETC
	CAL+2776		/.READ
	10
MOD13	BUFFER
	-42
	CAL+776		/.WAIT
	12
	CAL+776
	6
	DZM LASTCH
	JMP* GETCMD	/RETURN
	.EJECT
/COMMAND PUSH/POP
PUSH	0
	LAC COMAND
	DAC INSN
	LAC COMAND+1
	DAC INSN+1
	LAC COMAND+2
	DAC INSN+2
	JMP* PUSH
/
POP	0
	LAC INSN
	DAC COMAND
	LAC INSN+1
	DAC COMAND+1
	LAC INSN+2
	DAC COMAND+2
	JMP* POP
/
/SCAN FOR COMMAND UNIT TERMINATED
/   BY SPACE, COMMA, RETURN, OR ALTMODE
SCAN	0
	LAC AD01		/(COMAND
	DAC PUTP		/SETUP POINTER + COUNTER
	DZM PUTC
	DZM CHARL
	DZM COMAND
	DZM COMAND+1
	DZM COMAND+2
	LAC LASTCH
	SAD (15
	JMP* SCAN
SCANL	JMS GET
	SAD (12		/LINE FEED
	JMP .-2		/IGNORED
	SAD (40		/SPACE
	JMP SCANT
	SAD (54		/COMMA
	JMP SCANT
	SAD (15		/RETURN
	JMP SCANT
	SAD (175		/ALTMODE
	JMP SCANAT
	JMS PUT		/FILL UP COMAND
	JMP SCANL		/NEXT CHAR
SCANAT	DAC CHARL
	CAL+775		/.CLOSE
	6
	LAC (15		/ALTMODE TO RETURN
SCANT	DAC LASTCH	/SAVE LAST CHARACTER
	JMP* SCAN		/RETURN
	.EJECT
/TABLE SEARCH ROUTINE
TABLE	0
	LAC AD02		/(COMTAB+1
	DAC TABLEP	/POINTER
	LAC COMTAB
	DAC TABLEC	/COUNTER
NEXTAB	LAC* TABLEP	/GET COMMAND
	SAD COMAND
	JMP COMDOK	/1ST 3 CHARS OK
	ISZ TABLEP
	ISZ TABLEP
LASTNG	ISZ TABLEP
	ISZ TABLEC
	JMP NEXTAB	/TRY NEXT COMMAND
	JMP* TABLE	/ILLEGAL COMMAND
COMDOK	ISZ TABLEP
	LAC* TABLEP	/GET REST
	ISZ TABLEP
	SAD COMAND+1
	SKP
	JMP LASTNG	/NOT RIGNT ONE
	ISZ TABLE
	JMP* TABLE	/GOOD - RETURN
	.EJECT
/CONVERT FROM 5/7 ASCII TO SIXBIT
SIXF57	0
	LAC* SIXF57	/GET FILE ENTRY POINTER
	DAC FILEP		/SAVE
	ISZ SIXF57	/TO RETURN POINT
	LAC COMAND
	RCL
	DAC SAVEC
	AND (770000	/CHARACTER 1
	DAC SAVE
	LAC SAVEC
	RCL
	DAC SAVEC
	AND (7700		/CHARACTER 2
	XOR SAVE
	DAC SAVE
	LAC SAVEC
	RCL
	AND (70		/CHARACTER 3 - PART 1
	XOR SAVE
	DAC SAVE
	LAC COMAND+1
	RTL
	RTL
	DAC SAVEC
	AND (7		/CHARACTER 3 - PART 2
	XOR SAVE
	DAC* FILEP
	ISZ FILEP
	LAC SAVEC
	AND (770000	/CHARACTER 4
	DAC SAVE
	LAC SAVEC
	RCL
	AND (7700		/CHARACTER 5
	XOR SAVE
	DAC SAVE
	LAC COMAND+2
	JMS	SUBS8
	RTL
	AND (77		/CHARACTER 6
	XOR SAVE
	DAC* FILEP
	ISZ FILEP
	LAC BINEXT	/EXTENSION
	DAC* FILEP
	JMP* SIXF57	/DONE
	.EJECT
/OCTAL TO ASCII - ZERO SUPPRESSES
OCTALZ	0
	SNA
	JMP ZEROLC	/CONTENTS = 0
	DAC SAVEZ		/SAVE
	LAW -6
	DAC OCTALC	/6 DIGITS
	LAC (JMP LEADZ
	DAC LEADZX	/RESTORE ZERO SUP
NEXTCZ	LAC SAVEZ		/GET WORD
	RCL
	RTL
	DAC SAVEZ		/SAVE WORD
	RAL
	AND (7
	SNA		/NOT ZERO
LEADZX	JMP LEADZ		/LEADING ZERO
	XOR (60		/MAKE ASCII
	JMS PUT		/OUTPUT
	LAC (NOP
	DAC LEADZX	/PRINT REST OF ZEROS
	ISZ OCTALC
	JMP NEXTCZ	/NEXT DIGIT
	JMP FIXSUP
LEADZ	LAC SUPRES	/SPACE INSTEAD OF ZERO
	JMS PUT
	JMP LEADZX+5
ZEROLC	LAW -5
	DAC OCTALC	/5 SPACES
	LAC (40
	JMS PUT		/OUTPUT
	ISZ OCTALC
	JMP .-3
	LAC (60		/ZERO
	JMS PUT		/OUTPUT
FIXSUP	LAC (40		/SPACE
	DAC SUPRES
	JMP* OCTALZ	/RETURN
	.EJECT
/RADIX 50 FROM 5/7 ASCII
R50F57	0
	JMS SIXF57	/5/7 TO SIXBIT
MOD47	R50SX
	LAC* R50F57	/GET PLACE TO PUT SYMBOL
	ISZ R50F57	/INDEX TO RETURN
	DAC F57P
	JMS FSQZE		/CONVERT 1ST PART
MOD50	R50SX
	LAC* MOD51
	SNA
	JMP* R50F57	/RETURN
	LAC* F57P
	XOR (400000	/INDICATE PRESENCE OF
	DAC* F57P		/2ND PART
	ISZ F57P
	JMS FSQZE		/CONVERT 2ND PART
MOD51	R50SX+1
	JMP* R50F57	/RETURN
FSQZE	0
	LAC* FSQZE
	DAC F57T3
	DZM* F57P		/CLEAR ENTRY
	LAW -3
	DAC F57C		/3 CHARS
FSQZN	LAC* F57T3		/GET CHARACTER
	RTL
	RTL
	RTL
	DAC* F57T3
	RAL
	AND (77		/6 BIT
	DAC F57T1		/SAVE
	DAC F57T2
	AND (40
	SNA
	JMP FSQOK		/A-Z
	LAC F57T1
	AND (20
	SNA
	JMP FSQ.%
	LAC F57T1		/0-9
	TAD (777755
	DAC F57T1
	JMP FSQOK
	.EJECT
FSQ.%	LAC (33		/.
	DAC F57T1
	LAC F57T2		/ACTUAL CHAR
	SAD (56		/SKIP IF PERIOD
	ISZ F57T1		/%
FSQOK	LAC* F57P		/PREVIOUS CHARS
	RCL		/TIMES 50 (8)
	RTL
	DAC F57T2
	RTL
	TAD F57T2
	TAD F57T1		/NEW CHAR
	DAC* F57P
	ISZ F57C		/3 TIMES
	JMP FSQZN
	ISZ FSQZE		/BUMP TO RETURN
	JMP* FSQZE
	.EJECT
/RADIX 50 TO 5/7 ASCII
R50T57	0
	LAC PROGN
	AND (177777	/CLEAR BITS (0-1)
	JMS UNSQZE	/UNPACK PART 1
	LAC PROGN
	SPA!CLA		/DEFAULT PART 2=0
	LAC PROGN+1	/REAL PART 2
	JMS UNSQZE	/UNPACK PART 2
	JMP* R50T57	/RETURN
UNSQZE	0
	DAC T57T1		/SAVE SYMBOL
	LAW 17775
	DAC T57C		/FOR 3 CHARS
	LAC AD06
	DAC T57T2		/ADDRESS OF R50 CONSTANTS
UNSQX	LAC T57T1		/GET SYMBOL
	DZM T57T3		/CLEAR CHAR GENERATOR
	TAD* T57T2	/ADD CONSTANT
	SPA
	JMP .+4
	ISZ T57T3		/INDEX GENERATOR
	DAC T57T1		/SAVE SYMBOL
	JMP .-5
	LAW 17745
	TAD T57T3		/CHECK GENERATED CHAR
	SMA
	TAD (123		/ONLY IF NEG
	TAD (33
	XOR (100		/BIT 7 MAYBE
	SAD (56
	LAC (45		/%
	SAD (57
	LAC (56		/.
	SAD (72
	LAC (43		/#
	SAD (100
	LAC (40		/SPACE
	AND (177		/7-BIT ASCII
	JMS PUT		/INTO BUFFER
	ISZ T57T2		/NEXT R50 CONSTANT
	ISZ T57C
	JMP UNSQX		/NEXT CHAR
	JMP* UNSQZE	/RETURN
	.EJECT
/NEW PAGE ROUTINE
NEXTPG	0
	LAC LISTNG	/PUSH
	DAC SAVEL
	LAW -64
	DAC LINECT
	LAC AD04		/(PGNOL
	DAC PUTP
	DZM PUTC
	ISZ PAGECT	/INCREMENT PAGE NO.
	LAC PAGECT
	DZM SUPRES		/ZERO SUPPRESS WITH RO
	JMS OCTALZ	/OCTAL TO ASCII
	XCT LIST
	JMP* NEXTPG
	JMS LISTNG
MOD03A	MS03A		/CR-LF FOR TTY
	JMS LISTNG	/PAGE NO.
MOD11	MS04
	JMS LISTNG	/BLANK LINE
MOD16	MS05
	JMS LISTNG	/HEADING
MOD45	MS15
	JMS LISTNG	/BLANK LINE
MOD46	MS05
	LAC SAVEL		/POP
	DAC LISTNG
	JMP* NEXTPG
	.EJECT
/LISTING SUBROUTINE
/CALLING SEQUENCE:
/	JMS LISTNG
/	BUFFER		/BUFFER POINTER
/	RETURN
LISTNG	0
	ISZ LINECT
	SKP
	JMS NEXTPG		/NEW PAGE
	LAC (32002
	DAC LISTBF
	LAC* LISTNG	/BUFFER ADDRESS
	DAC LSTBUF
	CAL+766		/.WAIT
	12
	CAL+2766		/.WRITE
	11
LSTBUF	0
	-100
	ISZ LISTNG
	JMP* LISTNG
	.EJECT
/LISTING LINE BUILD ROUTINE
/	LSTACT ZERO IF ACTION PRINTED
LINEB	0
	CAL+766		/.WAIT
	12
	LAC AD05		/(LISTBF+2
	DAC PUTP
	DZM PUTC
	LAC (40		/SPACES
	JMS PUT
	LAC (40
	JMS PUT
	LAC (40
	JMS PUT
	JMS R50T57	/RADIX 50 TO 5/7 ASCII
	LAW -11
	DAC GET1
	LAC (40		/SPACES
	JMS PUT
	ISZ GET1
	JMP .-3
	LAC SIZE
	JMS OCTALZ	/OCTAL TO 5/7 ASCII
	LAC LSTACT
	SZA		/CHECK ACTION SWITCH
	JMP PRINT		/NO ACTION
	LAW -10
	DAC GET1
	LAC (40		/SPACES
	JMS PUT
	ISZ GET1
	JMP .-3
	LAC AD03		/(BUFFER+2
	DAC GETP
	LAW -1
	DAC GETC
	JMS GET
	SAD (175		/ALTMODE
PRINT	LAC (15		/FORCE RETURN
	SAD (15		/RETURN
	JMP .+3
	JMS PUT
	JMP .-6
	DAC LSTACT	/NO ACTION
	JMS PUT
	JMS LISTNG
MOD20	LISTBF
	JMP* LINEB	/RETURN
	.EJECT
/READ ROUTINE INTO FREE AREA
/   IF READSW 0 OR NEG - DOUBLE BUFFER
/   IF READSW POS      - SINGLE BUFFER
READ	0
	LAC R.DAT		/.DAT SLOT BEING READ
	DAC C.DAT1
	DAC C.DAT2
	DAC C.DAT3
	SAD (764
	XCT ENDSW
	SKP
	JMP BADEOF
	LAC READSW
	SPA		/IN DOUBLE BUFFERING
	JMP C.DAT2	/TO .WAIT
	SNA!CLA!CMA
	DAC READSW		/BEGIN DOUBLE BUFFERING - OR SINGLE READ
	LAC LB1ST
	DAC LBNEXT
	DAC LBRD1
C.DAT1	CAL		/.READ - .DAT SLOT LATER
	10
LBRD1	0		/BUFFER ADDRESS
	-100
C.DAT2	CAL		/.WAIT - .DAT SLOT LATER
	12
JMPWAT	LAC LBNEXT		/UPDATE LAST BUFFER
	DAC LBLAST	/FILLED POINTER
	CLC
	DAC TEM12
	LAC* LBLAST	/GET LB HEADER
	AND (17		/GET MODE BITS
	SAD (5		/EOF
	JMP* READ
	SAD (6		/EOM
	JMP* READ
	ISZ READ		/TO NORMAL RETURN
	LAC* LBLAST	/GET LB HEADER
	AND (60		/GET VD BITS
	SZA
	JMP READER	/READ ERROR TYPEOUT
	.EJECT
	LAC* LBLAST	/GET LB HEADER
	AND (377000	/GET WPC
	JMS	SUBS8
	RTR
	DAC LBWC		/NO OF WORDS IN BUFFER
	DAC LBWCT
	LAC READSW
	SMA
	JMP* READ
	LAC LBWC
	TAD LBLAST
	DAC LBNEXT
	CMA
	TAD LBFULL	/END OF BUFFER
	SPA
	JMP OVERFO	/BUFFER OVERFLOW
	JMS SEARCH
	JMP C.DAT3
	JMP CRTEOF
	LAW -2
	TAD SEARCH
	DAC SEARCH
	JMP PROCES
C.DAT3	CAL		/.READ - .DAT SLOT LATER
	10
LBNEXT	0		/BUFFER ADDRESS
	-100
	JMP .+3
CRTEOF	LAC (1005
	DAC* LBNEXT
	LAC LBWCT
	DAC LBWC
	JMP* READ
/WAIT ROUTINE
WAIT	0
	LAC R.DAT
	DAC C.DAT4
	DAC SHRTPG
C.DAT4	CAL		/.WAIT - .DAT SLOT LATER
	12
	DZM READSW	/CLEAR READ UNDERWAY
	LAC WAIT
	DAC READ
	JMP JMPWAT
	.EJECT
/BUFFER SEARCH ROUTINE
/CALLING SEQUENCE:
/	JMS SEARCH
/	RETURN		/ON NORMAL BUFFER
/	RETURN		/ON END CODE
/	RETURN		/ON PROG NAME
SEARCH	0
	LAC LBLAST	/BUFFER ADDRESS
	TAD (2
	DAC CONTLP	/CONTROL WORD
	TAD (1
	DAC DATAP		/DATA WORD
	LAC LBWC		/WORD COUNT
	CMA
	TAD (3		/2'S COMP MINUS HEADER
	DAC LBWC
NXCNTL	LAW -3
	DAC CONTLC	/3 CODES PER WORD
	LAC* CONTLP	/GET CONTROL WORD
	SKP
NXCODE	LAC CODESV	/GET CONTROL WORD
	RTL
	RTL
	RTL
	DAC CODESV	/SAVE FOR LATER
	RAL
	AND (77		/GET CODE
	SAD (1
	JMP CODE01	/SIZE
	SAD (7
	JMP CODE07	/SYMBOL - 1ST PART
	SAD (10
	JMP CODE10	/SYMBOL - 2ND PART
	SAD (23
	JMP CODE23	/DEF - MAY BE PROG NAME
	SAD (27
	JMP CODE27	/END CODE
PROCES	ISZ LBWC
	ISZ DATAP
	ISZ CONTLC
	JMP NXCODE	/NEXT IN THIS WORD
	ISZ DATAP		/NEXT DATA WORD
	ISZ LBWC
	SKP
	JMP* SEARCH	/RETURN
	LAC CONTLP
	TAD (4
	DAC CONTLP
	JMP NXCNTL
	.EJECT
CODE01	LAC* DATAP
	DAC SIZE		/SAVE SIZE
	JMP PROCES
CODE07	LAC* DATAP
	DAC SYMBL		/SYMBOL PART 1
	JMP PROCES
CODE10	LAC* DATAP
	DAC SYMBL+1	/SYMBOL PART 2
	JMP PROCES
CODE23	LAC* DATAP
	SMA
	JMP PROCES	/NOT PROG NAME
	ISZ TEM12		/IS PROG NAME
	JMP CODE27-1
	LAC SYMBL
	DAC PROGN		/SAVE
	LAC SYMBL+1
	DAC PROGN+1
	ISZ SEARCH
CODE27	ISZ SEARCH	/ENTER HERE IF END CODE
	JMP* SEARCH	/RETURN
	.EJECT
/WRITE ROUTINE FROM BUFFERS
OUTBUF	BSIZE		/OUTPUT BUFFER
	0
	.BLOCK	4*SIZE1
MOD62	MOD62+1		/TEMPORARY STORAGE FOR OUTPUT LOADER GROUPING
TB	.BLOCK	3
WRITE	0
	DZM	FEND	/INIT. FLAG FOR END OF OUTPUT
	LAC	LB1ST	/1ST BUFFER
	JMP	R1
R2	TAD	(2
	DAC	P	/SET POINTER FOR FIRST WORD TO BE OUTPUT
	LAC*	LBWRT	/CALCULATE NUMBER OF WORDS IN CURRENT BUFFER
	AND	(377000
	JMS	SUBS8
	RTR
	DAC	IC1
	CMA
	TAD	(3
	DAC	IC
	SMA
	JMP	R
QQ	LAW	-4	/OUTPUT IN GROUPS OF 4
	DAC	C
	LAC*	P	/FIRST WORD OF GROUP IS LOADER CODES WORD
	DAC	T
S	ISZ	P
	LAC	T
	ISZ	IC
	RTL!SKP
	JMP	R	/FINISHED WITH THIS BUFFER
	ISZ	C
	RTL!SKP
	JMP	QQ	/START NEW 4 WORD GROUP
	RTL
	DAC	T	/LEAVE NEXT LOADER CODE IN POSITION
	RAL
	AND	(77	/EXTRACT THIS LOADER CODE
	DAC	TS
	TAD	(XCT	TAB	/COMPUTE ACTION TO BE PERFORMED
	DAC	.+2
	LAC*	P
	XCT	.
	JMP	S
R	ISZ	FEND
	SKP
	JMP*	WRITE	/END OF CURRENT OUTPUT
	LAC	LBWRT
	TAD	IC1
R1	DAC	LBWRT
	SAD	LBLAST
	SKP
	JMP	R2
	LAC*	LBLAST	/CHECK IF LAST BUFFER CONTAINS EOF INDICATION
	AND	(17
	SAD	(5
	JMP*	WRITE	/YES,EXIT
	CLC		/NO,OUTPUT FILE AND THEN EXIT
	DAC	FEND
	LAC	LBWRT
	JMP	R2
SO	ISZ	NSYMF	/HAS CURRENT SYMBOL BEEN OUTPUT
	JMP	NOSYM	/YES
	LAC	TS	/NO OUTPUT
	DAC	TSS	/TEMPORARY STORE LOADER CODE
	LAC	(7
	DAC	TS	/LOADER CODE FOR SYM
	LAC	SYM
	SMA
	JMP	ASO	/3 LETTER SYMBOL
	JMS	OUT
	LAC	(10
	DAC	TS
	LAC	BOL
ASO	JMS	OUT
	LAC	TSS	/RESTORE LOADER CODE
	DAC	TS
	LAC*	P
NOSYM	JMS	OUT
	JMP	S	/FETCH NEXT INPUT WORD
DACSYM	DAC	SYM
	CLC
	DAC	NSYMF
	JMP	S
CRUN1	SMA
CRUNCH	NOP	/SKP MEANS DELETE LOCAL SYMBOLS
	JMP	SO
	JMP	S
SUBS8	0		/PERFORM LONG ROTATES
	CLL
	XCT*	SUBS8
	XCT*	SUBS8
	XCT*	SUBS8
	JMP*	SUBS8
TAB	NOP		/0 LOADER CODE
	JMS	OUT	/1
	JMS	OUT	/2
	JMS	OUT	/3
	JMS	OUT	/4
	JMS	OUT	/5
	JMS	OUT	/6
	JMP	DACSYM	/7
	DAC	BOL	/8
	JMP	SO	/9
	JMP	SO	/10
	JMS	OUT	/11
	JMP	SO	/12
	JMS	OUT	/13
	JMS	OUT	/14
	JMS	OUT	/15
	JMS	OUT	/16
	JMS	OUT	/17
	JMS	OUT	/18
	JMP	CRUN1	/19
	JMS	OUT	/20
	JMS	OUT	/21
	JMS	OUT	/22
	JMP	EOR	/23
	NOP		/24
OUT	0		/OUTPUT WORD
	DAC*	TBP	/STORE WORD IN TEMPORARY BUFFER
	ISZ	TBP
	LAC	TO	/PACK CORRESPONDING LOADER CODE
	RTL
	RTL
	RTL
	AND	(777700
	XOR	TS
	DAC	TO
	ISZ	B
	JMP*	OUT	/FINISHED
	DAC*	Q	/STORE GROUP AWAY
	ISZ	Q
	LAC	MOD62	/INITIALIZE TEMPORARY BUFFER POINTER
	DAC	TBP
	DZM	TO	/INITIALIZE LOADER CODE BUFFER
	LAC	TB
	DAC*	Q
	LAC	TB+1
	ISZ	Q
	DAC*	Q
	ISZ	Q
	LAC	TB+2
	DAC*	Q
	ISZ	Q
	LAW	-3	/GO BACK FOR NEXT GROUP
	DAC	B
	ISZ	OC	/COUNT GROUPS
	JMP*	OUT
	JMS	SBOUT	/OUTPUT THIS BUFFER
	JMP*	OUT
SBOUT	0
	CAL+763		/.WRITE -15
	11
MOD61	OUTBUF
	-4*SIZE1-2
	CAL+763		/.WAIT -15
	12
	LAC	OUTBUF	/UPDATE DECTAPE BUFFER POINTER
	JMS	SUBS8
	RTR
	TAD	F
	DAC	F
	JMS	INOUT	/REINITIALIZE OUTPUT FOR NEXT BUFFER
	LAW	-370	/HAVE WE FILLED THIS DECTAPE BUFFER
	TAD	F
	SMA
	JMP	SBX	/YES
	TAD	(4*SIZE1	/CAN WE FIT ONE MORE BUFFER
	SPA!RCR
	JMP*	SBOUT	/YES
	RCR		/NO,COMPUTE SMALLER BUFFER
	TAD	OC
	DAC	OC
	DAC	OC1
	CMA		/COMPUTE NEW HEADER WORD FOR SMALLER BUFFER
	RCL
	TAD	(3
	JMS	SUBS8
	RTL
	RAL
	AND	(377000
	DAC	OUTBUF
	JMP*	SBOUT
SBX	DZM	F	/NEW DECTAPE BUFFER
	JMP*	SBOUT
EOR	JMS	OUT	/EVERY NEW PROGRAM MUST START A FRESH BUFFER
	DZM	TS
	LAW	-3
	SAD	B
	JMP	.+3
	CLA		/FILL UP REMAINING MEMBERS OF LOADER GROUP WITH IGNORED 00 CODES
	JMP	EOR
	DZM	NSYMF	/DO NOT USE SYMBOLS BETWEEN PROGRAMS IN LIBRARY
	CLC
	TAD	OC1
	CMA
	TAD	OC
	SNA
	JMP	R	/LUCKY WE JUST OUTPUT THE LAST BUFFER
	JMS	SUBS8	/COMPUTE SMALLER WORD PAIR COUNT FOR HEADER WORD
	RTL
	RTL
	TAD	(1000
	AND	(377000
	DAC	OUTBUF
	JMS	SBOUT
	JMP	R
	.EJECT
/TO POSITION ON A UNIT
POSUNT	0
POSNXT	DZM READSW
	LAC (764
	DAC R.DAT		/SETUP FOR PRIMARY INPUT
	JMS READ
	JMP BADEOF
	JMS SEARCH
	JMP .-3		/NEXT BUFFER
	JMP NOPGNM		/NO PROGRAM NAME
	LAC NAME2		/POSITION NAME
	SAD PROGN		/NAME FOUND
	JMP POSEQU
NOTPOS	JMS WAIT		/FOR LAST BUFFER
	DZM SHRTPG
	XCT UPDATE
	SKP
	JMS WRITE		/COPY
	XCT LIST
	SKP
	JMS LINEB		/LISTING
	LAC SHRTPG
	SNA
	JMP POSNXT
	JMS SEARCH
	SKP
	JMP POSNXT
	NOP
	LAC (1
	DAC READSW	/NO DOUBLE BUFFERING
POSCPY	JMS READ
	JMP BADEOF
	XCT UPDATE
	SKP
	JMS WRITE		/COPY
	JMS SEARCH
	JMP POSCPY
	JMP POSNXT
	JMP POSCPY
POSEQU	SMA
	JMP .+5		/ONE WORD SYMBOL
	LAC NAME2+1	/PART 2
	SAD PROGN+1
	SKP
	JMP NOTPOS	/NOT RIGHT PROG
	JMS WAIT
	JMP POSEND
/
	.EJECT
POSCNT	JMS SEARCH
	SKP
	JMP POSEND	/END OF RIGHT UNIT
	XCT UPDATE
	SKP
	JMS WRITE
	LAC (1
	DAC READSW		/NO DOUBLE BUFFERING
	JMS READ
	JMP BADEOF
	JMP POSCNT
POSEND	XCT UPDATE
	SKP
	JMS WRITE		/COPY REST OF UNIT
	XCT LIST
	SKP
	JMS LINEB		/LINE OF LISTING
	JMP* POSUNT
	.EJECT
/TO DELETE A UNIT
DELUNT	0
DELNXT	DZM READSW
	LAC (764
	DAC R.DAT		/SETUP FOR PRIMARY INPUT
	JMS READ
	JMP BADEOF
	JMS SEARCH
	JMP .-3		/NEXT RECORD
	JMP NOPGNM	/NO PROG NAME
	LAC NAME2		/NAME LOOKED FOR
	SAD PROGN		/NAME FOUND
	JMP DEQPN
NOTDEL	JMS WAIT		/FOR LAST BUFFER
	DZM SHRTPG
	XCT UPDATE
	SKP
	JMS WRITE		/COPY
	XCT LIST
	SKP
	JMS LINEB		/GIVE LISTING
	LAC SHRTPG
	SNA
	JMP DELNXT
	JMS SEARCH
	SKP
	JMP DELNXT
	NOP
	LAC (1
	DAC READSW	/NO DOUBLE BUFFERING
DELCPY	JMS READ
	JMP BADEOF
	XCT UPDATE
	SKP
	JMS WRITE		/COPY
	JMS SEARCH
	JMP DELCPY
	JMP DELNXT
	JMP DELCPY
DEQPN	SMA
	JMP .+5		/ONE WORD SYMBOL
	LAC NAME2+1	/PART 2
	SAD PROGN+1
	SKP
	JMP NOTDEL	/NOT RIGHT PROG
	JMS WAIT
	JMP* DELUNT
DELCNT	JMS SEARCH
	SKP
	JMP* DELUNT	/DELETE DONE
	NOP
	LAC (1
	DAC READSW	/NO DOUBLE BUFFERING
	JMS READ
	JMP BADEOF
	JMP DELCNT
	.EJECT
/TO INSERT A UNIT
INSUNT	0
CPNTP	CAL+770
	1
MOD32	CPINT
	0
	JMS POP
	JMS SIXF57
MOD30	FILE+3
	CAL+770
	3
MOD31	FILE+3
	DZM READSW
	LAC (770
	DAC R.DAT		/SETUP FOR SECONDARY INPUT
	JMS READ
	JMP WRONGP
	JMS SEARCH
	JMP .-3		/NEXT RECORD
	JMP NOPGNM	/NO PROG NAME
	LAC NAME1		/NAME WANTED
	SAD PROGN		/NAME FOUND
	SKP
	JMP WRONGP	/WRONG PROGRAM
	SMA
	JMP .+5		/ONE WORD SYMBOL
	LAC NAME1+1	/PART 2
	SAD PROGN+1
	SKP
	JMP WRONGP	/WRONG PROGRAM
	JMS WAIT
	DZM SHRTPG
	DZM LSTACT		/TO PRINT ACTION
	XCT LIST
	SKP
	JMS LINEB
	LAC SHRTPG
	SNA
	JMP INSEND
	.EJECT
	JMS SEARCH
	SKP
	JMP INSEND	/END OF INSERTED UNIT
	XCT NEW
	SKP
	JMP .+3
	XCT UPDATE
	SKP
	JMS WRITE
	LAC (1
	DAC READSW	/NO DOUBLE BUFFERING
INSRNX	JMS READ
	JMP BADINP
	JMS SEARCH
	SKP
	JMP INSEND	/END OF UNIT
	NOP
	XCT NEW
	SKP
	JMP .+3
	XCT UPDATE
	SKP
	JMS WRITE
	JMP INSRNX
INSEND	XCT NEW
	SKP
	JMP .+3
	XCT UPDATE
	SKP
	JMS WRITE
	CAL+770		/.CLOSE
	6
	JMP* INSUNT
	.EJECT
/TO POSITION AT END FILE
POSEOF	0
	LAC (764
	DAC R.DAT
	LAC (1
	DAC READSW	/NOT DOUBLE BUFFERED
EOFPNX	JMS READ
	JMP GOTEOF
	XCT UPDATE
	SKP
	JMS WRITE		/COPY
	JMS SEARCH
	JMP EOFPNX
	SKP
	JMP C.DAT3-4
	JMS READ
	JMP GOTEOF
	XCT LIST
	SKP
	JMS LINEB		/LISTING
	JMP EOFPNX+2
GOTEOF	DZM LSTACT	/PRINT ACTION
	XCT LIST
	SKP
	JMS LINEB		/LISTING
	LAC (SKP
	DAC ENDSW
	JMP* POSEOF
	.EJECT
/OUTPUT MESSAGES
MS01	MS02-MS01/2*1000\2
	777777
	.ASCII	'UPDATE V6A'<15>
MS02	MS03-MS02/2*1000\2
	777777
	.ASCII	<3><12>'>'<175>
MS03	MS03A-MS03/2*1000\2
	777777
	.ASCII	<77><15>
MS03A	MS04-MS03A/2*1000\2
	777777
	.ASCII	<12><15>
MS04	MS05-MS04/2*1000\2
	777777
	.ASCII	<14>'    LIBRARY FILE LISTING'
	.ASCII	' FOR '
ENAMEL	.ASCII <0>
	.ASCII <0>
	.ASCII	<11><11>'PAGE '
PGNOL	.ASCII	<0>
	.ASCII <0>
	.ASCII	<15>
	.EJECT
MS05	MS06-MS05/2*1000\2
	777777
	.ASCII	<12><15>
MS06	MS07-MS06/2*1000\2
	777777
	.ASCII	' VALID ONLY IN U MODE - '
	.ASCII	'COMMAND IGNORED'<15>
MS07	MS10-MS07/2*1000\2
	777777
	.ASCII	' ILLEGAL COMMAND STRUCTURE - '
	.ASCII	'COMMAND IGNORED'<15>
MS10	MS11-MS10/2*1000\2
	777777
	.ASCII	' VALID ONLY IN U OR N MODE'
	.ASCII	' - COMMAND IGNORED'<15>
MS11	MS12-MS11/2*1000\2
	777777
	.ASCII	' PROGRAM NAME MISSING - '
	.ASCII	'DYNAMIC KILL'<15>
MS12	MS13-MS12/2*1000\2
	777777
	.ASCII	' BUFFER OVERFLOW '
	.ASCII	'- DYNAMIC KILL'<15>
MS13	MS14-MS13/2*1000\2
	777777
	.ASCII	' EOF REACHED BY SEARCH - '
	.ASCII	'COMMAND IGNORED'<15>
MS14	MS15-MS14/2*1000\2
	777777
	.ASCII	' WRONG PROGRAM '
	.ASCII	'- CORRECT INPUT AND ^P'<15>
MS15	MS16-MS15/2*1000\2
	777777
	.ASCII	'PROGRAM NAME    PROGRAM SIZE'
	.ASCII	'    ACTION'<15>
MS16	MS17-MS16/2*1000\2
	777777
	.ASCII	'UNRECOVERABLE READ ERROR ON .DAT -1'
DATMSG	.ASCII	<0>
	.ASCII	' - DYNAMIC KILL'<15>
MS17	MS20-MS17/2*1000\2
	777777
	.ASCII	' BAD SECONDARY INPUT - DYNAMIC KILL'<15>
MS20=.
	.EJECT
/UPDATE COMMAND TABLE
COMTAB	COMTAE-COMTAB-1/3\777777+1
	.ASCII	'DELET'
	DELETE
	.ASCII	'D'
	DELETE
	.ASCII	'REPLA'
	REPLAC
	.ASCII	'R'
	REPLAC
	.ASCII	'INSER'
	INSERT
	.ASCII	'I'
	INSERT
	.ASCII	'END'
	END
	.ASCII	'E'
	END
	.ASCII	'KILL'
	KILL
	.ASCII	'K'
	KILL
	.ASCII	'CLOSE'
	CLOSE
	.ASCII	'C'
	CLOSE
COMTAE=.
	.EJECT
/CONSTANTS AND VARIABLES
BANKBT	0
PUTC	0	/PUT COUNTER
PUTP	0	/PUT POINTER
PUT1	0	/PUT TEMP
GETC	0	/GET COUNTER
GETP	0	/GET POINTER
GET1	0	/GET TEMP 1
GET2	0	/GET TEMP 2
GET3	0	/GET TEMP 3
GETPT	0
GETCT	0
GET1T	0
GET2T	0
SHRTPG	0
LASTCH	0	/LAST CHARACTER
TABLEC	0	/TABLE COUNTER
TABLEP	0	/TABLE POINTER
SAVEC	0	/SAVE COMAND, ETC.
SAVE	0	/SAVE SIXBT, ETC.
FILE	.BLOCK 6	/DIRECTORY ENTRY
.LIBRN	.ASCII	'.LIBR'	/LIBRARY FILE
BINEXT	.SIXBT	'BIN'	/BINARY EXT
WRKEXT	.SIXBT	'WRK'	/WORK EXT
PAGECT	0		/NO OF PAGES
LINECT	0		/NO OF LINES PER PAGE
SUPRES	40		/ZERO SUPPRESSION CHAR
LSTEXT	.SIXBT	'LST'	/LISTING EXT
OCTALC	0		/OCTAL COUNT
SAVEZ	0		/SAVE AREA FOR OCTALZ
LBWC	0		/WORD COUNT OF BUFFER
LBWCT	0
LB1ST	0		/FIRST BUFFER POINTER
LBFULL	0		/OVERFLOW POINTER
NAME1	0		/RADIX 50 NAME
	0
NAME2	0		/RADIX 50 NAME
	0
PROGN	0		/RADIX 50 PROG NAME
	0
SYMBL	0		/RADIX 50 SYMBOL
	0
SIZE	0		/BIN PROG SIZE
CONTLP	0		/CONTROL WORD POINTER
DATAP	0		/DATA WORD POINTER
CONTLC	0		/CONTROL WORD COUNTER
CODESV	0		/STORAGE FOR OTHER CODES
SAVEL	0		/PUSH/POP FOR LISTING
R.DAT	0		/READ .DAT SLOT
CHARL	0		/LAST CHAR
FILEP	0		/POINTER TO FILE ENTRY
TEM12	0		/FLAG TO PICK UP FILE NAME ONLY ONCE
	.EJECT
R50SX	0	/SIX BIT SAVE
	0
F57C	0	/FROM 5/7 COUNTER
F57P	0	/FROM 5/7 POINTER
F57T1	0	/TEMPORARY STORAGE
F57T2	0	/TEMPORARY STORAGE
F57T3	0	/TEMPORARY STORAGE
/
R50CT	774700
	777730
	777777
T57C	0	/TO 5/7 COUNTER
T57T1	0	/TEMP STORAGE
T57T2	0	/TEMP STORAGE
T57T3	0	/TEMP STORAGE
/
/
/OPTION SWITCHES
LIST	0		/LISTING SWITCH
SLIST	0
UPDATE	0		/UPDATE SWITCH
SUPDAT	0
NEW	0		/NEW SWITCH
FINIS	0		/COMMAND TERMINATOR
ENDSW	0		/END SWITCH
READSW	0		/READ UNDERWAY SWITCH
LSTACT	0		/ACTION PRINT SWITCH
CPSW	0		/^P SWITCH
/CRUNCH VARIABLES AND CONSTANTS
/
IC	0	/INPUT BUFFER COUNTER
IC1	0	/NUMBER OF WORDS IN CURRENT INPUT BUFFER
C	0	/LOADER GROUP COUNTER
P	0	/POINTER TO CURRENT WORD TO BE OUTPUT
T	0	/LOADER CODES BEING OUTPUT NOW HOLDER
FEND	0	/FLAG SIGNALLING END OF BUFFER
LBLAST	0	/LAST BUFFER FILLED ON INPUT
LBWRT	0	/BUFFER CURRENTLY BEING OUTPUT
TS	0	/TEMPORARY STORAGE LOADER CODE
TSS	0	/TEMPORARY STORAGE OF TS
NSYMF	0	/-1 WHEN SYMBOL IS AWAITING OUTPUT
SYM	0	/FIRST HALF OF OUTPUT SYMBOL
BOL	0	/LAST HALF OF OUTPUT SYMBOL
TBP	0	/OUTPUT LOADER GROUPING BUFFER POINTER
Q	0	/OUTPUT BUFFER NEXT WORD POINTER
OC	0	/OUTPUT LOADER GROUPING COUNTER
OC1	0	/MAXIMUM COUNT OF LOADER GROUPING
TO	0	/LOADER CODE GROUPING LOADER CODE WORD TEMPORARY STORAGE
F	0	/POINTER TO DECTAPE BUFFER NEXT WORD TO BE FILLED
B	0	/LOADER CODE GROUPING MEMBER COUNTER
/
/ADDRESS CONSTANTS
ADF=.
AD00	MODF
AD01	COMAND
AD02	COMTAB+1
AD03	BUFFER+2
AD04	PGNOL
AD05	LISTBF+2
AD06	R50CT
ADL=.
ADCT=ADL-ADF\777777+1
/
	.EJECT
	.END
