/2 ROM-TD8E HANDLER
/
/
/
/
/
/
/
/
/
/COPYRIGHT  (C)  1974,1975 BY DIGITAL EQUIPMENT CORPORATION
/
/
/
/
/
/
/
/
/
/
/THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE
/AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
/CORPORATION.  DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/FOR ANY ERRORS THAT MAY APPEAR IN THIS DOCUMENT.
/
/THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FURNISHED TO THE PURCHASER
/UNDER A LICENSE FOR USE ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED
/(WITH INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH
/SYSTEM, EXCEPT AS MAY OTHERWISE BE PROVIDED IN WRITING BY DIGITAL.
/
/DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY FOR THE USE
/OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY
/DIGITAL.
/
/
/
/
/
/
/
/
/
/
	ROMFLD=70
	VERSION="A&77
/THESE ARE ASSEMBLY REFERENCES TO LOCATIONS IN THE ROM:

	RGO=7405
	F2SET=7552
/	TD8E MNEMONICS:
	SDSS=6771
	SDST=6772
	SDSQ=6773
	SDLC=6774
	SDLD=6775
	SDRC=6776
	SDRD=6777
	*0

	-3
	DEVICE ROM;DEVICE SYS;4211;2007;0;1341
	DEVICE ROM;DEVICE DTA0;4211;1007;0;1341
	DEVICE ROM;DEVICE DTA1;4211;SDTA1&177+1000;0;1341
	STARTB-ROMCT-1

	NOPUNCH
	*7360		/ROOM FOR DECTAPE HEADER WORDS
	ENPUNCH

STARTB,	ZBLOCK 20
	CDF 0		/BOOTSTRAP TO MOVE FIELD 1
	TAD I ROM1	/CODE UP TO FIELD 1
	CDF 10
	DCA I ROM2
	ISZ ROM1
	NOP
	ISZ ROM2
	NOP
	ISZ ROMCT
	JMP 7400
	CIF CDF 0	/DONE
	SDLC		/STOP THE TAPE
	JMP I .+1
	7605		/START HER UP
ROM1,	7427		/FIELD 1 CODE GETS LOADED HERE
ROM2,	7647		/AND GOES UP HERE
ROMCT,	-130
	*200

	NOPUNCH
	*7600
	ENPUNCH

	ZBLOCK 7
SHNDLR,	VERSION		/UNIT 0 ENTRY
	CLA CLL
	JMP SHND2
S70,	70
S6201,	6201
SDTA1,	VERSION		/UNIT 1 ENTRY POINT
	CLA CLL CML
	TAD SDTA1	/GET ARGS AT SHNDLR
	DCA SHNDLR
SHND2,	RAR		/UNIT BIT IS IN LINC
	DCA SUNIT
	RDF
	TAD S6203	/SETUP RETURN FIELD
	DCA EFLD
	TAD I SHNDLR
	SDLD		/STORE FUNCTION WORD IN DATA REG.
	AND S70		/SDLD DOESN'T CLEAR AC
	TAD S6201	/ISOLATE FIELD OF XFER
	DCA TFLD
	TAD TFLD
	DCA TFLD2
	ISZ SHNDLR
	TAD I SHNDLR	/BUFFER ADDRESS
	DCA BPTR
	ISZ SHNDLR
	TAD I SHNDLR	/PS/8 RECORD #
	CLL RAL		/TIMES 2 FOR ABSOLUTE BLOCK
	DCA BLOCK
	ISZ SHNDLR
	CDF 0
	CIF ROMFLD	/ROM IS IN FIELD 7
	JMP I XF2SET	/INITIALIZE.
GET,	0
TFLD,	HLT		/ROUTINE TO LOAD DATA FROM BUFFER
	TAD I XPTR
	CIF ROMFLD
	JMP I GET

PUT,	0		/PUT DATA INTO BUFFER
TFLD2,	HLT
	DCA I XPTR
	CIF ROMFLD
	JMP I PUT

ERROR,	CLA CLL		/FORCE TURNAROUND AT RGO
	CIF ROMFLD
	ISZ TRYCNT	/TRIED 3 TIMES?
	JMP I XRGO
S6203,	CIF CDF 0
	JMP SEREX	/YES..FATAL EXIT

XRGO,	RGO
XF2SET,	F2SET
/EQUIVALENCES FOR HANDLER

	EQUTMP=7750
	BPTR=7751
	XPGCT=7752
	XPTR=7753
	XWCNT=7754
	WRQ=7724
WRQUAD,	0		/WRITE A 12 BIT TAPE WORD
	CIF ROMFLD
	JMP WRQ
CIFR,	CIF ROMFLD
	JMP I WRQUAD

RDQUAD,	0		/READ A 12 BIT DATA WORD
	SDSQ
	JMP .-1
	SDRD
	CIF ROMFLD
	JMP I RDQUAD

EQUFUN,	0		/EQUIVALENCE CHECKSUM
	CMA
	DCA EQUTMP
	TAD EQUTMP
	AND SCKSUM
	CIA
	CLL RAL
	TAD EQUTMP
	TAD SCKSUM
	DCA SCKSUM
	TAD EQUTMP
	CLL CMA
	CIF ROMFLD
	JMP I EQUFUN

SEXIT,	ISZ SHNDLR	/NORMAL EXIT
SEREX,	TAD SUNIT	/STOP THE DRIVE
	SDLC
	CLA CML RAR	/EXIT CONDITION IN BIT 0
EFLD,	HLT
	JMP I SHNDLR

TRYCNT,	0
SXUNIT,	0
SXFUN,	0
SCKSUM,	0
BLOCK,	0
SUNIT,	0
	$

