Google
 

Trailing-Edge - PDP-10 Archives - bb-x130a-sb - dump.pal
There are 6 other files named dump.pal in the archive. Click here to see a list.
/	DUMP	0.2	14-NOV-75	--	DC72NP DUMP PROGRAM
/KALMAN RETI

	MAJOR=0
	MINOR=2
/	DEFAULT PARAMETERS
	IFNDEF	LPTN	<LPTN=1>	/DEFAULT IS LPT
	IFNZRO	LPTN-1	<LPTN=0>	/IF GARBAGE, ASSUME CTY
	IFNDEF	FIELDS	<FIELDS=2>	/NUMBER OF FIELDS TO DUMP
	IFNDEF	EXFLD	<EXFLD=0>	/FIELD TO RUN IN
	IFNDEF	START	<START=200>	/START ADDRESS

/	IOTS
	CTYTSF=6041	/SKIP ON TELEPRINTER FLAG
	CTYTLS=6046	/LOAD TELEPRINTER SEQUENCE
	LPTSTB=6666	/LOAD DATA AND CLEAR FLAG
	LPTSKF=6661	/SKIP ON LPT FLAG


/	MACROS
	XLIST
DEFINE	NLOAD	X	<XLIST
Z=7402
IFZERO X	< Z=CLL CLA >
IFZERO X-1	< Z=CLL CLA IAC >
IFZERO X-2	< Z=CLL CLA IAC RAL >
IFZERO X-3	< Z=CLL CLA IAC CML RAL >
IFZERO X-4	< Z=CLL CLA IAC RTL >
IFZERO X-6	< Z=CLL CLA IAC CML RTL >
IFZERO X-2000	< Z=CLL CLA CML RTR >
IFZERO X-3777	< Z=CLL CLA CMA RAR >
IFZERO X-4000	< Z=CLL CLA CML RAR >
IFZERO X-5777	< Z=CLL CLA CMA RTR >
IFZERO X-6000	< Z=CLL CLA CML IAC RTR >
IFZERO X-7775	< Z=CLL CLA CMA RTL >
IFZERO X-7776	< Z=CLL CLA CMA RAL >
IFZERO X-7777	< Z=CLL CLA CML CMA >
IFZERO Z-7402	< ***** BUM NLOAD CALL >
	XLIST;	Z	>/END OF DEFINE	NLOAD
	XLIST

	FIELD	EXFLD
*START
DUMP,	JMP	DUMP00		/SKIP OVER VERSION
	ZZ=MAJOR^100+MINOR
	ZZ			/VERSION
*START+10
DUMP00,				/START OF DUMP
	IOF
	CLA
DMP000,	DCA	DMPWAD		/START BY DUMPING WORD 0
	DCA	DMPFLD
IFNZRO LPTN <
	TAD	(DMPLPT
	DCA	DMPCHR		/WE ARE NOW PRINTING ON LPT
>/END OF IFNZRO LPTN
	JMP	DMPPAG
DMP010,	TAD	DMPFLD
	CLL RTL
	RAL
	TAD	(CDF
	DCA	.+1
	0
DMPLOP,
	IFNZRO LPTN <
	AND	(0017		/CR AFTER EVERY 20 WORDS
>/END OF IFNZRO LPTN
	IFZERO LPTN <
	AND	(0007		/CR AFTER EVERY 10 WORDS
>/END OF IFZERO LPTN
	SZA
	  JMP	DMPLP3

IFZERO LPTN <
DMPLP1,	TAD I	DMPWAD		/GET NEXT WORD
	SZA CLA
	  JMP	DMPLP2
	ISZ	DMPWAD
	  JMP	DMPLP1
	JMP	DMPINC		/ALL DONE WITH INCE
DMPLP2,	TAD	DMPWAD
	AND	(7770
	DCA	DMPWAD
>/END OF IFZERO LPTN

	JMS I	(DMPALP
	TAD	DMPWAD
	AND	(0177		/SKIP EXTRA LINE EVERY 100 WORDS
	SNA CLA
	  JMS	DMPCRL
IFNZRO LPTN < JMS	DMPTAB > /TAB IN CASE RIBBON SKEWED
	TAD	DMPFLD
	TAD	(0060
	JMS I	DMPCHR
	TAD	DMPWAD		/ADR OF WORD BEING DUMPED
	JMS	DMPWDO
DMPLP3,	AND	(0007
	SNA CLA
	  JMS	DMPTAB
	TAD I	DMPWAD		/GET NEXT WORD TO DUMP
	JMS	DMPWDO
	JMS	DMPSPC
	ISZ	DMPWAD
	TAD	DMPWAD
	SZA			/WAS THAT LAST WORD IN FIELD ?
	  JMP	DMPLOP
DMPINC,	ISZ	DMPFLD		/ADVANCE FIELD
DMPPAG,	TAD	(0015		/CARRIAGE RETURN
	JMS I	DMPCHR		/ NEED THIS FOR CENTRONICS
	TAD	(0014		/FORM FEED
	JMS I	DMPCHR
DMPTRC,	NLOAD	-FIELDS		/PUT NEG NUMBER OF FIELDS IN AC
	TAD	DMPFLD
	SMA CLA
	  7402			/ALL DONE
	JMP	DMP010
DMPWDO,	0
	DCA	DMPWRD		/SAVE WORD TO DUMP
	JMS	DMPWDC
	JMS	DMPWDC
	JMS	DMPWDC
	JMS	DMPWDC
	JMP I	DMPWDO
DMPWDC,	0
	TAD	DMPWRD
	RTL
	RAL
	DCA	DMPWRD
	TAD	DMPWRD
	RAL
	AND	(0007
	TAD	(0060
	JMS I	DMPCHR
	JMP I	DMPWDC
DMPTAB,	0
IFNZRO LPTN <
	JMS	DMPSPC
	JMS	DMPSPC
>/END OF IFNZRO LPTN
	JMS	DMPSPC
	JMS	DMPSPC
	JMP I	DMPTAB
DMPSPC,	0			/HERE TO PRINT A SPACE
	TAD	(0040
	JMS I	DMPCHR
	JMP I	DMPSPC
DMPCRL,	0
	TAD	(0015		/CARRIAGE RETURN
	JMS I	DMPCHR		/ WE NEED THIS FOR CENTRONICS
	TAD	(0012		/LINE FEED
	JMS I	DMPCHR
	TAD	(0012
	JMS I	DMPCHR
	JMP I	DMPCRL

IFNZRO LPTN <
DMPLPT,	0
	LPTSTB
	LPTSKF			/WAIT FOR LPT
	JMP	.-1
	NLOAD	0
	JMP I	DMPLPT
>/END OF IFNZRO LPTN
IFZERO LPTN <DMPLPT=DMPCTY>

DMPFLD,	0			/FIELD TO DUMP
DMPWAD,	0			/ADR OF CURRENT WORD BEING DUMPED
DMPWRD,	0
DMPCTY,	0
	CTYTLS
	CTYTSF
	JMP	.-1
	NLOAD	0
	JMP I	DMPCTY
DMPCHR,	DMPCTY
DMPC,	0
	JMS I	DMPCHR
	JMP I	DMPC
	PAGE

ALPWD,	0
ALPCT,	0
DMPALP,	0
	RDF			/GET DATA FIELD
	TAD	(CDF		/CONVERT TO INSTRUCTION
	DCA	DMPAL2		/STASH
	TAD	DMPAL2		/GET IT AGAIN
	DCA	ALPFLD		/STORE IN ALP SUBROUTINE
	QQ=EXFLD^10
	CDF+QQ		/SET TO FIELD IN WHICH CODE RESIDES
	TAD	DMPWAD		/GET CURRENT ADDRESS
	SNA			/TEST FOR 0
	  JMP	DMPAL2		/ZERO, SO JUST DO CRLF
	TAD	(-1
	JMS	ALP
DMPAL2,	0			/WILL CHANGE DATA FIELD
	JMS	DMPCRL
	JMP I	DMPALP
ALP,	0
	AND	(7760
	DCA	ALPWD
ALPFLD,	0			/WILL CHANGE DATA FIELD
	JMS	DMPSPC
	JMS	DMPSPC
	TAD	(-20
	DCA	ALPCT
ALPL,	TAD I	ALPWD
	AND	(3577		/TURN OFF SIGN AND EXTENSIBLE BITS
	TAD	(-40
	SMA CLA
	  JMP	ALPL1
ALPBL,	TAD	(56
	JMP	ALPLP
ALPL1,	TAD I	ALPWD
	AND	(3577
	TAD	(-141
	SMA CLA
	  JMP	ALPBL
	TAD I	ALPWD
	AND	(3577
ALPLP,	JMS	DMPC
	ISZ	ALPWD
	NOP
	ISZ	ALPCT
	  JMP	ALPL
	JMS	DMPSPC
	JMP I	ALP
	FIELD	EXFLD
*START
$