	.SYSID <	.TITLE DUMP >,< 000>
/
/COPYRIGHT (C) 1975
/DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
/
/THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY
/ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH
/THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS
/SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-
/VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON
/EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO
/THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE
/SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.
/
/THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE
/WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-
/MITMENT BY DIGITAL EQUIPMENT CORPORATION.
/
/DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
/OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
	.EJECT
	.TITLE EDIT LEGEND
/
/
/	015	RCHM	JULY-30-75	CHANGE XVM SIGN ON MESSAGE
/	016	BLR	AUG-31-75	XVM UPGRADE
/	017	BLR	AUG-31-75	RECODE ALL (NN) OPTION TO ALLOW
/					ANY INTEGER 1-128 FOR NN
/	018	BLR	SEPT-3-75	BUG FIX VERSION
/	019	BLR	SEPT-16-75	FIX NO QAREA BUG FOR BLK# MODE
/	020	BLR	SEPT-26-75	FIX A-B DECTAPE BUG AND NEGATIVE NR. BUG
/	021	BLR	OCT-02-75	FIX DECTAPE NNN-MMM BUG
/	022	BLR	OCT-12-75	FIX BOSS MSG. BUG AND BAD MEMSIZ BUG
/
/
/
/DUMP OF SAVED CORE OR INDIVIDUAL BLOCKS
/FROM .DAT SLOT -14 ONTO .DAT SLOT -12
/
/	IF DECTAPE DUMP THEN DUMP IS FROM 5-MEMSIZ WHERE MEMSIZ IS CURRENT
/	.SCOM+20 ASSUMING THE 'ALL' OPTION
/	TO DUMP OTHER DECTAPE SIZES USE ALL(NN) OPTION OR NNNNN-MMMMM
/	OPTION. THE ALL (NN) OPTION IS USED ONLY FOR DECTAPE
/
/COMMAND STRING:
/	ALL CR (MORE)
/	ALL ALTMODE (FINIS)
/	XXX-YYY CR (MORE)
/	XXX-YYY ALTMODE (FINIS)
/	XXX# CR (MORE)
/	XXX# ALTMODE (FINIS)
/
/
/INITIALIZATION
	.IODEV	-12,-14,-2,-3
.SCOM=100
	.TITLE INITIALIZE
DUMP	.INIT	-12,5,DUMP		/INIT LP FOR NO FF ON CLOSE (BR-015)
INT12=.-1				/BUFFER SIZE (BR-015)
BEGIN	CAL+1775			/.INIT
	1
MOD03	BEGIN
	0
	DZM	TAPESW			/CLEAR DECTAPE OPERATION IND. (BR-016)
	LAC*	(.SCOM+52
	SMA
	JMP	B1		/IF NOT BOSS-PRINT
	LAC	(NOP		/SET UP BOSS SWITCH
	DAC	BOSSW
	JMP	B2		/DON'T TYPE
B1	CAL+2775		/.WRITE -3
	11
MOD06A	MSG1
	-3
	CAL+775			/.WAIT -3
	12
B2	CAL+764		/.INIT
	1
MOD05	BEGIN
	0
	LAC .-1		/CHECK TO SEE IF .DAT -14
	AND (100	/IS FILE STRUCTURED
	SNA
	JMP ILDEV	/NO-PRINT MESSAGE
	LAC* (.SCOM+2		/LOWEST FREE LOCATION
	DAC DECBUF		/START OF BUFFER
	TCA
	TAD* (.SCOM+3		/HIGHEST FREE LOCATION
	AND (777400
	DAC BUFSZE		/BUFFER SIZE
	CLL				/SET UP SHIFT (BR-015)
	LRS	10			/AND DO IT (BR-015)
	DAC NOBLKS		/NO. OF BLOCKS
	LAC BUFSZE
	TCA
	DAC BUFWC			/2'S COMP WORD COUNT
	LAW	-1
	TAD	BUFSZE
	TAD DECBUF
	DAC DECEND		/LAST LOCATION IN BUFFER
GETCMP	CAL+776		/INIT
	1
MOD07	BEGIN
	0
	LAW -36		/CLEAR OUT BUFFER
	DAC COUNT
	LAC (BUFFER+2		/(BUFFER+2
	DAC LINE
TR2	DZM* LINE
	ISZ LINE
	ISZ COUNT
	JMP TR2
	DZM	BLKFLG
	XCT	BOSSW
	JMP	B3
TR6	CAL+2775		/TYPE >
	11
MOD10	MSG3
	-2
B3	LAC (764
	DAC DECLOP
	.TITLE COMMAND DECODER
	CAL+2776		/.READ-GET COMMAND STRING
	10
MOD11	BUFFER
	-64
	CAL+776
	12
GETCMD	LAC	(NOP
	DAC	NUMOD		/INITIAL CONTENTS OF NUPAGE
	LAC	INT12		/CHECK TO SEE IF .DAT -12
	AAC	-60		/IS LP OR TTY
	SMA
	JMP	TR1
	LAC	(SPACES		/TTY-SPACES
	SKP
TR1	LAC	(TAB		/LP-TAB
	DAC	FILLER
FILST	CAL+766		/.ENTER
	4
MOD24	FILNAM
	LAC NUMOD
	DAC NUPAGE		/SETUP TO PRINT COMMAND ON LPT
	LAC (BUFFER+2		/(BUFFER+2
	DAC GETP			/POINTER
	LAW -1
	DAC GET5			/COUNTER
	LAC*	(.SCOM+20		/GET SYSTEM MEMORY SIZE (BR-020)
	DAC	ENDUMP			/SAVE AS DEFAULT FOR DECTAPE (BR-020)
TR3	JMS GET
	SAD (12			/LINE FEED
	JMP TR3
	SAD (40			/SPACE
	JMP TR3
	DZM LOCNT
	DZM ADDRES
	SAD (101			/A
	SKP
	JMP NOTALL
	JMS GET
	SAD (114			/L
	SKP
	JMP BADCMD		/BAD COMMAND
	JMS GET
	SAD (114			/L
	SKP			/ALL
	JMP BADCMD		/BAD COMMAND
	JMS GET
	SAD (15
	JMP	CONTAL		/CR-RETURN TO COMMAND PROCESSOR WHEN DONE (BR-020)
	SAD (175
	JMP	ALT		/ALT MODE -.EXIT WHEN DONE
	SAD	(40		/WAS CORE SIZE TYPED?
	JMS	GET		/IF A SPACE WAS TYPED GO GET NEXT CHAR
	SAD	(50		/ (
	SKP
	JMP	BADCMD
	DZM	OLDTOT		/ZERO OLD TOTAL (BR-017)
MEM.1	JMS	GET		/GET CHAR (BR-017)
	SAD	(40		/SKIP IF NOT BLANK (BR-017)
	JMP	MEM.1		/TRY AGAIN IF BLANK (BR-017)
	AAC	-60		/TEST FOR NON NUMERIC (BR-017)
	DAC	NEWVAL		/SAVE NUMBER (BR-017)
	SPA			/SKIP IF POSSIBLE NUMBER (BR-017)
	JMP	MEM.2		/JUMP IF NOT NUMBER (BR-017)
	AAC	-13		/TEST AGAIN (BR-017)
	SMA!CLL			/SKIP IF NUMBER (BR-017)
	JMP	MEM.2		/JUMP IF NOT NUMBER (BR-017)
	LAC	OLDTOT		/GET PREVIOUS VALUE (BR-017)
	MUL			/MULT BY 10 (BR-017)
	12			/TEN (BR-017)
	LACQ			/GET RESULT (BR-017)
	TAD	NEWVAL		/ADD IN CURRENT DIGIT (BR-017)
	DAC	OLDTOT		/SAVE (BR-017)
	AAC	-201		/TEST FOR EXCEEDING 128K (BR-017)
	SMA			/SKIP IF LEQ 128K (BR-017)
	JMP	MSZBAD		/GTR 128K GIVE ERROR (BR-017)
	JMP	MEM.1		/GET NEXT CHARACTER (BR-017)
MEM.2	LAC	NEWVAL		/GET CHAR-60 (BR-017)
	SAD	(-7		/IS IT ')' - SKIP IF NOT (BR-017)
	JMP	MEM.3		/')' IS OK (BR-017)
	JMP	BADCMD		/ERROR - JUNK IN INPUT (BR-017)
MEM.3	LAC	OLDTOT		/GET NUMBER (BR-017)
	SNA			/SKIP IF NOT ZERO (BR-017)
	JMP	MSZBAD		/ZERO NOT GOOD VALUE (BR-017)
	CLL			/SET UP SHIFT (BR-017)
	ALS	12		/MULT BY 1024 (BR-017)
	AAC	-1		/MAKE TOP OF MEM ADR. (BR-017)
	DAC	ENDUMP		/SAVE AS LAST DUMP ADR. (BR-017)
	ISZ	TAPESW		/INDICATE ALL (NN) IS DECTAPE ONLY (BR-017)
	JMS	GET		/GET NEXT CHARACTER (BR-017)
	SAD	(15		/CR
	JMP	CONTAL		/CONTINUE WITH DUMP ALL (BR-017)
	SAD	(175		/IF ALTMODE OR CR
	SKP			/NOT TYPED
	JMP	BADCMD		/PRINT ?
	LAC	(NOP
	DAC	NEXTCM		/.EXIT WHEN DONE
	CAL+776			/.CLOSE
	6
	JMP	CONTAL		/CONTINUE WITH DUMP ALL (BR-017)
ALT	LAC (NOP
	DAC NEXTCM		/FALL THROUGH TO .EXIT
	CAL+776		/.CLOSE
	6
	.EJECT
CONTAL	JMS	DEVICE		/CHECK TO SEE IF DT,DK, OR DP
	DZM ADDRES		/BEGIN ADDRESS = 10
	LAC BUFWC
	DAC DECSZE		/FILL BUFFER
SETBUF	LAC DECBUF		/WHOLE BUFFER - BEGIN
	DAC STARTD
LOP	LAC DECEND		/WHOLE BUFFER - END
	DAC ENDBUF
DECLOP	CAL+764		/.TRAN
	13
DECBLK	0		/BLOCK NO.
DECBUF	0		/START OF BUFFER
DECSZE	0		/BUFFER SIZE
	CAL+764		/.WAIT
	12
	.TITLE PRINT BUFFER
	LAC ADDRES
	DAC BLIKE
	LAC* STARTD
	DAC SAMLOC
	DZM LIKE
	DZM PLIKE
	LAC (BUFFER+2
	DAC BUFFER
	JMS DECDMP		/PRINT BUFFER
	LAC (JMP NUBLOC
	DAC NUPAGE		/BYPASS HEADER PRINTOUT
	LAC DECBLK
	TAD NOBLKS		/UPDATE BLOCK NO. BY NO. OF BLOCKS READ
	DAC DECBLK
	LAC DECBUF
	DAC STARTD		/START AT BEGINNING OF BUFFER
REDUCE	LAC ADDRES
	TCA
	TAD ENDUMP		/COMPUTE AMOUNT LEFT
	DAC BUFFER
	CMA
	TAD	BUFSZE		/WILL IT FILL BUFFER
	SPA
	JMP LOP			/YES-BRING IT IN
	LAC BUFFER		/NO-REDUCE BY 1 BLOCK
	AND (377
	SZA
	LAC (400
	TAD (400
	TAD BUFFER
	AND (777400
	TCA
	DAC BUFFER
	TAD BUFSZE
	SPA
	JMP LOP
	LAC BUFFER
	DAC DECSZE
	JMP LOP
	.EJECT
BADCMD	XCT	BOSSW
	JMP	EXIT		/ILL. COMM. STRING-EXIT IF BOSS
	CAL+2775		/PRINT IT IF NOT BOSS
	11
MOD12	MSG2
	-2
	JMP BEGIN		/NEXT COMMAND STRING
	.TITLE FIRST BLK OF ^QAREA
DEVICE	0
			/NEXT THREE LINES CLEAR THE HIGH ORDER BITS
			/OF CAL+2 TO GET PROPER INFORMATION
			/BACK FROM THE FSTAT
	LAC	MOD24A		/(E. KATZ  EDIT 013)
	AND	(77777		/(E. KATZ  EDIT 013)
	DAC	MOD24A		/(E. KATZ  EDIT 013)
	-14&777+3000		/.FSTAT TO -14
	2
MOD24A	FILNAM
	LAC	.-1
	AND	(700000		/CHECK TO SEE WHAT
	SAD	(100000		/DEVICE IS ASS.-14
	JMP	DTAPE		/DECTAPE
	SAD	(200000
	JMP	DSK		/DEC DISK
	SAD (500000		/DISK CARTRIDGE - RK05?
	JMP	DSK		/YES
	SAD	(300000
	JMP	DSK		/DISK PACK
	XCT	BOSSW		/IF IN BOSS MODE-
	JMP	EXIT		/EXIT, DON'T PRINT MESSAGE
ILDEV	CAL+2775		/IF NONE OF THESE-
	11			/.WRITE:ILLEGAL DEVICE
MOD31	MSG
	-3
	.WAIT -3
EXIT	.EXIT
MSG	END-MSG/2*1000
	0
	.ASCII	'.DAT-14 IS NOT ASSIGNED TO A DISK OR DECTAPE'<15>
END=.
	.EJECT
DTAPE	LAC	(101		/^QAREA ON DECTAPE (BR-016)
	DAC	SAVBLK		/POINTER TO ^QAREA FIRST BLOCK (BR-016)
	DAC	DECBLK		/FIRST BLOCK TO DUMP (BR-016)
	ISZ	DECTP		/SET DECTAPE DUMP SWITCH (BR-021)
	JMP*	DEVICE		/RETURN TO CALLER (BR-016)
DSK	DZM	DECTP		/CLEAR DECTAPE MODE  (BR-021)
	LAC	TAPESW		/TEST FOR A DECTAPE ONLY OPERATION (BR-017)
	SNA			/SKIP IF DECTAPE ONLY OPERATION (BR-017)
	JMP	DSK.1		/DSK OPERATION - CONTINUE (BR-017)
	LAC	(ERR.5		/GET ERROR MSG POINTER (BR-017)
	JMP	Q.ERR		/ISSUE ERROR MSG (BR-017)
DSK.1	LAC	DECBUF		/GET START OF BUFFER ADR. (BR-016)
	DAC	T1.BUF		/SAVE IN .TRAN (BR-016)
	DAC	T2.BUF		/SAVE IN OTHER .TRAN (BR-016)
	AAC	21		/COMPUTE SYSBLK POINTER TO ^QAREA BLK # (BR-016)
	DAC	DB.21		/AND SAVE POINTER (BR-016)
	AAC	3		/COMPUTE SYSBLK POINTER TO ^QAREA SIZE (BR-016)
	DAC	DB.24		/AND SAVE POINTER (BR-016)
	AAC	67		/COMPUTE ^QAREA POINTER TO (.SCOM+20 (BR-020)
	DAC	DB.120		/AND SAVE (BR-016)
	.TRAN	-14,0,34,0,256	/READ IN SYSBLK (BR-016)
T1.BUF=.-2			/BUFFER POINTER (BR-016)
	.WAIT	-14		/WAIT FOR .TRAN TO FINISH (BR-016)
	LAC*	DB.21		/GET ^QAREA STARTING BLOCK # (BR-016)
	SZA			/SKIP IF NO ^QAREA EXISTS (BR-016)
	JMP	DSK.2		/^QAREA EXISTS - CONTINUE (BR-017)
	LAC	(ERR.4		/GET ERROR MSG POINTER (BR-017)
	JMP	Q.ERR		/GIVE ERROR IF NO ^QAREA (BR-016)
DSK.2	DAC	SAVBLK		/POINTER TO ^QAREA FIRST BLOCK (BR-016)
	DAC	DECBLK		/FIRST BLOCK TO DUMP (BR-016)
	DAC	T2.BLK		/SAVE IN .TRAN FOR MEMSIZ FETCH (BR-016)
	LAC*	DB.24		/GET MAX SIZE OF ^QAREA (BR-016)
	AAC	4		/COMPENSATE FOR STARTING LOC OF ^Q (BR-016)
	DAC	Q.MAX		/SAVE FOR LEGAL MEMSIZ TEST (BR-016)
	.TRAN	-14,0,0,0,256	/READ IN FIRST ^QAREA BLOCK (BR-016)
T2.BLK=.-3			/BLK # POINTER (BR-016)
T2.BUF=.-2			/BUFFER POINTER (BR-016)
	.WAIT	-14		/WAIT FOR .TRAN TO FINISH (BR-016)
	LAC*	DB.120		/GET MEMSIZ FROM ^QAREA IMAGE (BR-016)
	SPA!SNA			/SKIP IF POSSIBLY VALID MEMSIZ (BR-022)
	JMP	DSK.3		/NOT VALID - USE QAREA SIZE (BR-022)
	IAC!CLL			/MAKE NNNK (FROM NNNK-1) (BR-022)
	IDIV			/TEST FOR 8K MULTIPLE (BR-022)
	20000			/8K (BR-022)
	SZA			/SKIP IF EXACT MULTIPLE (BR-022)
	JMP	DSK.3		/NOT A VALID MEMSIZ (BR-022)
	LACQ			/GET # OF 8K MULTIPLES (BR-022)
	AAC	-3		/TEST FOR AT LEAST 24K (BR-022)
	SPA			/SKIP IF VALID MEMSIZ (BR-022)
	JMP	DSK.3		/BAD MEMSIZ (BR-022)
	LAC*	DB.120		/GET MEMSIZ FROM ^QAREA IMAGE (BR-022)
	TCA			/AND NEGATE (BR-016)
	TAD	Q.MAX		/IS MEMSIZ LEQ ^QAERA SIZE (BR-016)
	SPA			/SKIP IS LEQ ^QAREA (BR-016)
	JMP	DSK.3		/BAD IMAGE - DUMP ONLY QAREA (BR-016)
	LAC*	DB.120		/GET MEMSIZ FROM ^QAREA IMAGE (BR-016)
	SKP			/CONTINUE (BR-016)
DSK.3	LAC	Q.MAX		/ONLY DUMP ^QAERA (BR-016)
	DAC	ENDUMP		/SAVE DUMP LIMIT (BR-016)
	JMP*	DEVICE		/RETURN TO CALLER (BR-016)
Q.ERR	DAC	E.BUF		/SAVE IN ERROR MSG .WRITE (BR-017)
	.WRITE	-3,2,ERR.4,12	/TELL USER NO ^QAREA (BR-016)
E.BUF=.-2			/BUFFER POINTER (BR-017)
	.WAIT	-3		/AND WAIT FOR MSG TO FINISH (BR-016)
	XCT	BOSSW		/IS BOSS RUNNING (BR-022)
	JMP	EXIT		/FATAL ERROR - EXIT (BR-022)
	JMP	BEGIN		/ALLOW USER TO TRY AGAIN (BR-017)
ERR.4	077002			/DUMMY HEADER (BR-016)
	000000			/DITTO (BR-016)
	.ASCII	'NO ^QAREA ON .DAT-14 DEVICE'<15>
ERR.5	077002			/DUMMY HEADER (BR-017)
	000000			/DITTO (BR-017)
	.ASCII	'ALL (NN)  OPTION VALID ONLY FOR DECTAPE'<15>
MSZBAD	LAC	(ERR.6		/TELL USER BAD MEMORY SIZE (BR-017)
	JMP	Q.ERR		/AND WRITE MSG (BR-017)
ERR.6	077002			/DUMMY HEADER (BR-017)
	000000			/DITTO (BR-017)
	.ASCII	'INVALID DUMP SIZE'<15>
ERR.7	077002			/DUMMY HEADER (BR-017)
	000000			/DITTO (BR-017)
	.ASCII	'NUMBER TOO LARGE'<15>
	.TITLE SELECTIVE DUMP
NOTALL	DZM	HASHSW		/HASH LEGAL
	DZM	TERMSW		/SWITCH ON-CR OR A.M. ILLEGAL
	DZM	TERMCT
	DZM	CHRCNT		/CLEAR DIGIT COUNTER (BR-020)
	DAC	CHAR
	LAC	CHAR
NOTL	DAC	CHAR		/PROCESS SELECTIVE DUMP
	AND (170
	SAD (60
	SKP
	JMP BADCMD		/NOT OCTAL
	LAC LOCNT			/PREVIOUS DIGITS
	RCL
	RTL
	DAC LOCNT
	LAC CHAR
	AND (7
	XOR LOCNT			/COMBINE DIGITS
	DAC LOCNT
	ISZ	CHRCNT		/INCREMENT CHAR COUNTER (BR-020)
	LAC	CHRCNT		/AND GET THE RESULT (BR-020)
	SAD	(7		/SKIP IF NOT TOO LARGE A NUMBER (BR-020)
	SKP			/SKIP IF BAD (BR-020)
	JMP	NXTCHR
	LAC	(ERR.7		/GET ERROR MESSAGE POINTER (BR-020)
	JMP	Q.ERR		/ISSUE TOO LARGE ERROR (BR-020)
NXTCHR	ISZ	TERMCT		/INCREM. TO 1 NUM. AFTER DASH
	JMP	TR7
	LAW	-1
	DAC	TERMSW		/SWITCH OFF-CR OR A.M. LEGAL NOW
TR7	JMS GET		/NEXT CHARACTER
	SAD (40			/SPACE-IGNORED
	JMP NXTCHR
	SAD (55		/DASH SEPARATOR
	JMP FIRST
	SAD (43			/#-SELECTIVE BLOCK DUMP
	JMP BLKNO
	SAD (15		/RETURN - COMMAND STRING LOOP
	JMP LAST
	SAD (175			/ALT MODE -.EXIT WHEN -DONE
	JMP	TR10
	JMP NOTL		/STILL PART OF ADDRESS
BLKNO	ISZ	HASHSW
	SKP
	JMP	BADCMD
	DAC	BLKFLG
	LAC (377		/SINGLE 400(8) BLOCK
	DAC ENDUMP
	DZM ADDRES		/START WITH ZERO
	LAW -400		/1 BLOCK
	DAC DECSZE
	LAC LOCNT
	DAC DECBLK		/BLOCK NUMBER
NXGTBL	JMS GET		/SEE WHAT TERMINATES STRING
	SAD (15		/RETURN - COMMAND STRING LOOP
TR11	JMP SETBUF
	SAD (55		/MINUS - READ BLOCK IN REVERSE
	JMP NEGBLK
	SAD (175		/ALT MODE -.EXIT WHEN DONEE
	SKP
	JMP TR11
	LAC (NOP
	DAC NEXTCM		/.EXIT WHEN DONE
	CAL+776		/.CLOSE
	6
	JMP SETBUF
NEGBLK	LAC (2764
	DAC DECLOP
	JMP NXGTBL
FIRST	JMS	DEVICE		/DETERMINE DEVICE TYPE (BR-019)
	LAW	-1		/HASH OFF SW=-1 (BR-019)
	DAC	HASHSW		/SWITCH OFF-HASH ILLEGAL NOW
	LAC	MOD14+1
	DAC	TERMCT
	LAC LOCNT		/FIRST REGISTER
	SPA			/SKIP IF NOT>128K (BR-020)
	JMP	ER3		/ISSUE FATAL ERROR - TOO LARGE (BR-020)
	AAC	-5
	SPA			/SKP IF LOCNT > OR = 5(15) OR 6(9)
	JMP	ER2
	LAC	LOCNT
	DAC	ADRFUL		/SAVE FULL ADR. (BR-018)
	AND	(377770		/TO START EACH LINE AT XXXX0
	DAC	ADDRES
	DZM LOCNT		/FOR NEXT ADDRESS
	DZM	CHRCNT		/RESET DIGIT COUNTER (BR-020)
	JMP NXTCHR
TR10	LAC (NOP		/ENTRY FOR ALTMODE
	DAC NEXTCM		/.EXIT WHEN DONE
	CAL+776		/.CLOSE
	6
LAST	ISZ	TERMSW		/IF TERMSW INCREMENTS TO 0,CR OR A.M. LEGAL
	JMP	BADCMD
	LAC LOCNT		/LAST REGISTER
	SPA			/SKIP IF NOT>128K (BR-020)
	JMP	ER3		/ISSUE FATAL ERROR - TOO LARGE (BR-020)
	TCA
	TAD	ADRFUL
	SMA!SZA		/SEE IF LEQ THAN FIRST
	JMP BADCMD		
	LAC	DECTP	/GET DECTAPE MODE SWITCH (BR-021)
	SZA		/SKIP IF DISK OPERATION (BR-021)
	JMP	NOTEST	/SKIP TEST IF DECTAPE OPERATION (BR-021)
	LAC LOCNT
	TCA
	TAD	ENDUMP	/TEST FOR MAX (BR-018)
	SPA
	JMP ER3
NOTEST	LAC LOCNT
	DAC ENDUMP	/SET UP LAST REGISTER
	JMP SETBLK
SETBLK	LAC SAVBLK
	DAC DECBLK		/FIRST BLOCK
	LAC BUFWC
	DAC DECSZE		/WHOLE BUFFER
	LAC ADDRES	/START INFLUENCE REMOVED
	SZA
	AAC	-5
	SKP
TR12	ISZ DECBLK		/NEXT BLOCK
	DAC STARTD
	TAD (-400
	SMA		/SEE IF RIGHT BLOCK
	JMP TR12
	LAC STARTD		/YES, POSITION START IN RIGHT SPOT
	TAD DECBUF
	DAC STARTD
	JMP REDUCE		/REDUCE BUFFER SIZE
	.TITLE IOPS DUMP SUBROUTINE
/IOPS DUMP SUBROUTINE - FOR SAVED FILE
DECDMP	0
	LAC STARTD		/SET UP START ADDRESS
	DAC LOCNT
NUPAGE	NOP
	LAC (64000
	DAC* GETP		/SETUP CR IN BUFFER
	LAC (32002
	DAC BUFFER
	CAL+2766		/.WRITE - HEADER
	11
MOD13	BUFFER
	-100
	CAL+766		/.WAIT
	12
	JMP TR13		/SKIP .WRITE
TR16	CAL+2766
	11
MOD26	HOFBUF
	-100
TR13	LAW -6
	DAC BLOCK		/BLOCK COUNT
NUBLOC	CAL+2766		/SPACE ONE LINE
	11
MOD14	ONESP
	-2
	.WAIT	-12
	LAW -10
	DAC LINE			/LINES PER BLOCK COUNT
NULINE	DZM LIKE
	DZM PLIKE
TR14	LAC (BUFFER+2		/BUFFER+2
	DAC BUFFER		/FIRST FREE REGISTER
	DZM PK57
	LAC ADDRES		/ADDRESS ITSELF
	JMS OCTALZ		/FROM OCTAL  TO ASCII, ZERO SUPPRESS
	.EJECT
NUWORD	JMS* FILLER		/2 OR 6 SPACES
	LAC	BLKFLG
	SZA
	JMP	XYZ
	LAC	ADDRES
	AAC	-5
	SMA			/SKP IF ADDRES <5(15) OR 6(9)
	JMP	XYZ
	JMS	TAB		/6 SPACES
	ISZ	ADDRES
	JMP	NUWORD
XYZ	LAC* LOCNT		/CONTENTS
	SAD SAMLOC
	SKP
	ISZ LIKE
	JMS OCTAL			/FROM OCTAL TO ASCII
	LAC ADDRES
	SAD ENDUMP
	JMP FINIS		/EXIT FROM PROGRAM
	ISZ ADDRES		/NEXT LOCATION
	LAC LOCNT
	SAD ENDBUF		/SEE IF END OF BUFFER
	JMP DECNXT		/YES - NEXT BUFFER
	ISZ LOCNT		/NO - NEXT LOCATION
	LAC	ADDRES
	AND	(7
	SZA
	JMP NUWORD		/NEXT WORD
	LAC LIKE
	SZA
	JMP RESTLK		/NOT SAME
MLIKE	ISZ PLIKE		/SAME
	LAW	-1
	TAD	ADDRES
	DAC ELIKE		/LAST ALIKE
	JMP	TR14
RESTLK	LAC PLIKE
	SZA
	JMS PSAME		/PRINT SAME
	DZM LIKE
	LAC LOCNT		/GET POINTER
	AAC	-10		/BACKUP
	DAC LOCTMP
	LAW	-10
	TAD ADDRES
	DAC BLIKE
	LAW -10		/10(8) WORDS PER LINE
	DAC LOCCNT
	LAC* LOCTMP		/GET 1ST
	DAC SAMLOC
TR15	SAD* LOCTMP
	SKP		/ALIKE
	ISZ LIKE		/NOT LIKE
	ISZ LOCTMP		/MOVE POINTER
	ISZ LOCCNT
	JMP TR15		/TRY NEXT
	LAC LIKE
	SNA		/ARE ALL THE SAME
	JMP MLIKE		/YES
	JMS DONE		/OUTPUT LINE
	DZM LIKE
	DZM PLIKE
	LAC* LOCNT
	DAC SAMLOC
	LAC ADDRES
	DAC BLIKE
	ISZ LINE
	JMP NULINE		/NEXT LINE
	ISZ BLOCK
	JMP NUBLOC		/NEXT BLOCK
	JMP TR16		/NEXT PAGE
	.EJECT
DONE	0
	LAC (15			/END OF LINE
	JMS FILL
	LAC (32002		/BUFFER HEADER
	DAC BUFFER
	CAL+2766		/.WRITE
	11
MOD15	BUFFER
	-24
	CAL+766		/.WAIT
	12
	JMP* DONE
FINIS	LAC LIKE
	SZA
	JMP TR17
	LAC ADDRES
	DAC ELIKE
	JMS PSAME
	JMP	GETNXT
TR17	LAC PLIKE
	SZA
	JMS PSAME		/PRINT SAME
	JMS DONE		/PRINT LINE
GETNXT	CAL+766			/.CLOSE-OUTPUT FILE
	6
	.WAIT	-12
	.INIT	-12,5,BEGIN
NEXTCM	JMP BEGIN		/COMMAND STRING PROCESSOR OR .EXIT
	CAL			/.EXIT
	15
DECNXT	LAC LIKE
	SZA
	JMP TR20
	LAW	-1
	TAD ADDRES
	DAC ELIKE
	JMS PSAME
	JMP DECNXP
	.EJECT
TR20	LAC PLIKE
	SZA
	JMS PSAME		/PRINT SAME
	JMS DONE		/PRINT LINE
DECNXP	ISZ BLOCK
	JMP* DECDMP			/GET NEXT BLOCK
	LAW -6
	DAC BLOCK 		/BLOCK COUNT
	CAL+2766
	11
MOD27	HOFBUF
	-100
	JMP* DECDMP
	.TITLE UNPACK & ZERO SUPPRESS ADDRESS
/UNPACK AND ZERO SUPPRESS ADDRESS
OCTALZ	0			/OCTAL TO ASCII
	SNA
	JMP ZEROLC		/LOCATION 0
	DAC CHAR			/SAVE CHARACTER
	LAW -6
	DAC COUNT			/6 OCTAL DIGITS
	LAC (JMP LEADZ	/RESTORE ZERO SUPPRESSION
	DAC LEADZX
NEXTCZ	LAC CHAR			/GET WORD
	RCL
	RTL
	DAC CHAR			/SAVE WORD
	RAL
	AND (7
	SNA
LEADZX	JMP LEADZ			/LEADING ZERO
	XOR (60			/MAKE ASCII
	JMS FILL			/OUTPUT
	LAC (NOP		/PRINT REMAINING ZEROS
	DAC LEADZX
TR21	ISZ COUNT
	JMP NEXTCZ		/NEXT DIGIT
CHKPD	LAC (40
	DAC SUPCHR
	LAC	PRSSW		/SEE IF OCTALZ CALL IS FROM PSAME
	SAD	(-1		/SKP IF FROM PSAME
	JMP*	OCTALZ		/IF NOT, RETURN
	JMS	PDSUB		/IF YES, PAD WITH SPACES
	JMP* OCTALZ
LEADZ	LAC SUPCHR		/SPACE INSTEAD OF ZERO
	JMS FILL
	JMP	TR21
ZEROLC	LAW -5
	DAC COUNT			/FIVE SPACES
TR22	LAC SUPCHR
	JMS FILL			/OUTPUT
	ISZ COUNT
	JMP TR22
	LAC (60			/ZERO
	JMS FILL
	JMP	CHKPD
	.EJECT
/IF THE CALL TO OCTALZ IS FROM PSAME, IT IS NECESSARY TO
/REPLACE RIGHT-PADDING BLANKS (ASCII 000) WITH SPACES (ASCII 040)
/FOR NEW LINE PRINTER HARDWARE
PDSUB	0
	LAW	-4
	DAC	COUNT
BCK	LAC	SUPCHR
	JMS	FILL
	ISZ	COUNT
	JMP	BCK
	JMP*	PDSUB
/
/UNPACK OCTAL WORDS FROM MEMORY
OCTAL	0			/OCTAL TO ASCII
	LMQ			/SAVE OCTAL WORD (BR-015)
	LAW	-6		/SIX OCTAL CHARS/WORD (BR-015)
	DAC	COUNT		/KEEP COUNT (BR-015)
NEXTCH	CLA!CLL		/CLEAR RECIEVER WORD (BR-015)
	LLS	3		/SHIFT OCTAL CHAR TO AC (BR-015)
	AAC	60		/MAKE NUMERIC ASCII (BR-015)
	JMS FILL			/OUTPUT
	ISZ COUNT
	JMP NEXTCH		/NEXT DIGIT
	LAC	PRSSW		/SEE IF OCTAL CALL IS FROM PSAME
	SAD	(-1		/SKP IF FROM PSAME
	JMP*	OCTAL		/IF NOT, RETURN
	JMS	PDSUB
	JMP* OCTAL
/PACK ROUTINE FOR IOPS ASCII
FILL	0			/PACK UP 5/7
	AND (177
	DAC CHAR2
	CLL
	LAC PK57			/CHARACTER POSITION
	TAD (JMP* PKJ57
	DAC	TR23
	LAC CHAR2
TR23	XX			/MODIFIED JMP*
MOD16=.
PKJ57	PK571			/CHAR 1
MOD17	PK572			/CHAR 2
MOD20	PK573			/CHAR 3
MOD21	PK574			/CHAR 4
MOD22	PK575			/CHAR 5
PK571	RTR			/8 RIGHT
	RTR
	RTR
	RTR
	.EJECT
PK571A	DZM* BUFFER		/CLEAR DATA WORD
	JMP END57
PK572	RTL			/4 LEFT
	RTL
	JMP END57
PK573	RAR			/3 RIGHT - 1 ST HALF
	RTR
/
	AND (17
	XOR* BUFFER
	DAC* BUFFER
	ISZ BUFFER		/NEXT WORD
	LAC CHAR2
	RTR			/4 RIGHT - 2ND HALF
	RTR
	AND (700000
	JMP PK571A
PK574	RTL			/8 LEFT
	RTL
	RTL
	RTL
	JMP END57
PK575	RAL			/1 LEFT
	DZM PK57			/RESET 5/7 COUNTER
	SKP
END57	ISZ PK57
	XOR* BUFFER
	DAC* BUFFER
	LAC PK57
	SNA
	ISZ BUFFER		/2ND WORD COMPLETE
	JMP* FILL
	.EJECT
/SPACES FOR TTY -2 SPACES
SPACES	0
	LAC (40
	JMS FILL
	LAC (40
	JMS FILL
	JMP* SPACES
/TAB FOR LPT - 6 SPACES
TAB	0
	JMS SPACES
	JMS SPACES
	JMS SPACES
	JMP* TAB
/PRINT SAME TYPE LOCATIONS
PSAME	0
	LAC BLIKE
	SAD ELIKE
	JMP ONELKE
	DZM	PRSSW		/SET SW. TO PAD RIGHT WITH SPACES
	LAC PK57
	DAC SPK57
	LAC BUFFER
	DAC SBUFER
	DZM PK57
	LAC (LOCB		/(LOCB
	DAC BUFFER
	LAC BLIKE
	JMS OCTALZ
	DZM PK57
	LAC (LOCE		/(LOCE
	DAC BUFFER
	LAC ELIKE
	JMS OCTALZ
	DZM PK57
	LAC (CONTNS		/(CONTNS
	DAC BUFFER
	LAC SAMLOC
	JMS OCTAL
	LAC	(-1
	DAC	PRSSW		/RE-SET SW. TO DIS-ABLE SP. PAD.
	CAL+2766		/.WRITE
	11
MOD01	SAMEBF
	-100
	CAL+766		/WAIT
	12
	LAC SPK57
	DAC PK57
	LAC SBUFER
	DAC BUFFER
	SKP
ONELKE	JMS DONE
	ISZ LINE
	JMP* PSAME
	CAL+2766		/.WRITE
	11
MOD02	ONESP
	2
	CAL+766		/.WAIT
	12
	LAW -10
	DAC LINE
	ISZ BLOCK
	JMP* PSAME
	CAL+2766
	11
MOD30	HOFBUF
	-100
	LAW -6
	DAC BLOCK
	JMP* PSAME
	.TITLE UNPACK 5/7
/UNPACK 5/7 FROM IOPS ASCII
GET	0
	ISZ GET5
	JMP G5GET			/WORD PAIR STARTED
	LAC* GETP			/NEED NEXT PAIR
	ISZ GETP
	DAC WD1			/1ST PART
	LAC* GETP
	DAC WD2			/LAST PART
	ISZ GETP
	LAW 17773			/RESET COUNT
	DAC GET5
G5GET	LAW 17770			/LOOP 7+ 1/2 TIMES
	DAC WD3
G6GET	LAC WD2			/LOOP - BEGIN
	RAL
	ISZ WD3
	JMP TR24
	AND (177			/GOT CHARACTER
	JMP* GET
TR24	DAC WD2
	LAC WD1
	RAL
	DAC WD1
	JMP G6GET		/BACK TO LOOP
	.TITLE MESSAGES,CONSTANTS, & VARIABLES
ER1=.
	.WRITE -3,2,MSER1,40
ERCLS	XCT	BOSSW		/IS BOSS RUNNING (BR-022)
	JMP	EXIT		/FATAL ERROR (BR-022)
	.CLOSE	-3
	JMP BEGIN
ER2	LAC (ERMS20
	DAC BUFFER
	DZM PK57
	DZM SUPCHR
	LAC	(5
	JMS OCTALZ
ER2T=.
	.WRITE -3,2,MSER2,40
	JMP ERCLS
	.EJECT
ER3	LAC (ERMS30
	DAC BUFFER
	DZM PK57
	DZM SUPCHR
	LAC	ENDUMP
	JMS OCTALZ
ER3T=.
	.WRITE -3,2,MSER3,40
	JMP ERCLS
	.EJECT
/CONSTANTS AND VARIABLES
BLKFLG	0
HASHSW	0	/SWITCH:>-1=HASH LEGAL(BEFORE -),-1=ILLEGAL
TERMSW	0	/SWITCH:-1=CR OR A.M. LEGAL,OTHER=ILLEGAL
TERMCT	0	/CNTR FOR CHARS. AFTER - IN COMMAND STRING
LLOC4K	0
LOCNT	0		/LOCATION OF OUTPUT
FILLER	0		/FILLER ROUTINE
BLOCK	0		/6 BLOCKS PER PAGE
LINE	0		/8 LINES PER BLOCK
WORD	0		/8 WORDS PER LINE
ADDRES	0		/ACTUAL ADDRESS
ENDUMP	0		/LAST LOCATION OUT
STARTD	0		/START OF BUFFER
ENDBUF	0		/END OF BUFFER
CHAR	0		/CHARACTER STORAGE
COUNT	0		/LOOP COUNTER
CHAR2	0		/5/7 PACK CHAR STORAGE
PK57	0		/COUNTER -  5/7 PACK
NUMOD	0		/MOD SWITCH FOR NUPAGE
PRSSW	-1		/SWITCH:-1=NO SPACE PADDING,0=PADDING
ADRFUL	0		/STORAGE FOR FULL FIRST ADR IN SEL DUMP (BR-018)
CHRCNT	0		/DIGIT COUNTER FOR A-B AND B# MODES (BR-020)
DECTP	0		/DECTAPE MODE SWITCH (BR-021)
ONESP	2002
	777777
	.ASCII	<12><15>
MSG1=.-2
	.SYSID <	.ASCII 'DUMP >,<000'<15>> /(RCHM-114)
MSER1=.-2
	.ASCII / ILLEGAL BLOCK NUMBER/<15>
MSER2=.-2
	.ASCII ' LOWER LIMIT LESS THAN '
ERMS20	.ASCII <0>
	.ASCII <0><0><0><0><15>
MSG2	2002
	777777
	.ASCII	'?'<15>
MSG3=.-2
	.ASCII	'>'<175>
MSER3=.-2
	.ASCII / ERROR - ADDRESS GREATER THAN /
ERMS30	.ASCII <0>
	.ASCII <0><0><0><0><15>
SAMEBF	ENDBF-SAMEBF/2*1000\2
	777777
LOCB	.ASCII	<0>
	.ASCII	<0>
	.ASCII	' TO  '
LOCE	.ASCII	<0>
	.ASCII	<0>
	.ASCII	' CONTAINS '
CONTNS	.ASCII	<0>
	.ASCII	<0>
	.ASCII	<15>
ENDBF=.
HOFBUF	2002
	777777
	.ASCII	<14><15>
GETP	0		/POINTER - 5/7 UNPACK
GET5	0		/COUNTER - 5/7 UNPACK
NOBLKS	0		/NO. OF BLOCKS
BUFSZE	0		/BUFFER SIZE
BUFWC	0		/BUFFER WORD COUNT
DECEND	0		/BUFFER END
SAVBLK	0		/SAVE AREA (^Q)
WD1	0
WD2	0
WD3	0
SAMLOC	0		/CONTENTS OF LIKE LOCS
LIKE	0		/LIKE SWITCH
PLIKE	0		/PRINT LIKE SWITCH
BLIKE	0		/BEGIN LIKE
ELIKE	0		/END LIKE
SPK57	0		/PUSH/POP
SBUFER	0		/PUSH/POP
SUPCHR	40		/ZERO SUPPRESSION CHARACTER
LOCCNT	0
LOCTMP	0
SPCSW	0			/SPECIAL CASE-DISKPACK/DISK
BOSSW	SKP			/BOSS SWITCH-NOP IF IN BOSS MODE
GETSC3	LAC*	(.SCOM+3	/ORIN. CONTENTS OF 'BUFFER'
FILNAM	.SIXBT	/MEMORYDMP/
DB.21	0		/POINTER TO SYSBLK ^QAREA STARTING BLK # (BR-016)
DB.24	0		/POINTER TO SYSBLK ^QAREA MAX SIZE (BR-016)
DB.120	0		/POINTER TO ^QAREA IMAGE .SCOM+20 (BR-016)
Q.MAX	0		/^QAREA MAX SIZE (BR-016)
TAPESW	0		/DECTAPE ONLY OPERATION SWITCH (BR-017)
OLDTOT	0		/RUNNING TOTAL FOR 'ALL (NN)' (BR-017)
NEWVAL	0		/LAST DIGIT FOR 'ALL (NN)' (BR-017)
BUFFER	.BLOCK	100		/TEXT BUFFER (BR-015)
	.END
