File:  of Tape: OS8/OS8-V3D/al-4693d-sa-os8-v3d-3
(Source file text) 

/2 TC08 SYSTEM 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.
/
/
/
/
/
/
/
/
/
/
	VERSION="B&77
	*0
	-2
	DEVICE TC08;DEVICE SYS;4161;2007;0;1341
	DEVICE TC08;DEVICE DTA0;4161;1007;0;1341
	STARTB-ENDB-1		/NEGATIVE OF LENGTH OF BOOTSTRAP

	NOPUNCH
	*7600
	ENPUNCH

STARTB,	TAD B600	/THIS CODE ONLY EXECUTED ON DMS-TYPE BOOTSTRAP
	DTCA DTXA	/ALL IT DOES IS SIMULATE THE OTHER TYPE OF BOOTSTRAP
	DTSF		/MORAL: DISK MONITOR SYSTEM SUCKS
	JMP .-1
	DCA BOOTX
	DCA BOOTX+1	/FUDGE TO MAKE USE OF SOME COMMON CODE
	TAD B620
	JMP BOOT3	/START READING OVER OURSELVES WITH RECORD 0 AGAIN
	ZBLOCK	7611-.
BM7642,	-7641		/MUST BE BEFORE 7617
BOOT1,	TAD 7755
	TAD BM7642
	SNA CLA		/WATCH THE PROGRESS OF THE READ
	JMP BOOT2	/WHEN IT GETS PAST 7643, SWITCH TO FIELD 1
	NOP		/LOADS OVER DTSF IN 7616
	JMP BOOT1	/LOADS OVER JMP .-1 IN 7617 - STARTS BOOTSTRAP
BOOT2,	TAD B10
	DTLB		/ZAP A 10 INTO STATUS REG B TO LOAD INTO FIELD 1
	DTSF		/FROM HERE ON - LOAD THE FIELD 1 RESIDENT INTO FIELD 1
	JMP .-1
BOOT3,	DTXA		/CONTINUE READING NEXT RECORD(ALSO SEE CODE AT 7600)
	DTLB		/INTO FIELD 0
	TAD B7577
	DCA 7755	/PAGE 7600
	DCA 7754
BOOTX,	CDF CIF 10
	JMP 7642	/JUMP INTO WAIT LOOP IN FIELD 1
	JMP BOOT1	/DISK MONITOR FUDGE - JUMP INTO WAITING LOOP
B7577,	7577
B10,	10
B600,	600
B620,	620
	ZBLOCK	7642-.
	DCA 7744
	DTSF		/THIS IS LOADED INTO FIELD 1 WITH MONITOR RESIDENT
	JMP .-1		/IT IS IN THE CD OUTPUT AREA AND SO WILL BE ZAPPED
	CDF CIF 0	/BY THE KEYBOARD MONITOR
ENDB,	JMP 7605	/OK, FIELD 0 RESIDENT READ IN, START UP MONITOR

	/BOOTSTRAP FOR DECTAPE MONITOR IS THE SAME AS FOR THE 
	/DEC LIBRARY SYSTEM, RL MONITOR AND POLY BASIC - OR JUST
	/READ RECORD 0 INTO 7600 AND TRANSFER TO 7600 A LA DISK
	/MONITOR SYSTEM ON DECTAPE
	DTRB=6772
	DTLB=6774
	DTXA=6764
	DTCA=6762
	DTRA=6761
	DTSF=6771

	*200

	NOPUNCH
	*7600
	ENPUNCH

	SBLOCK=7776	/RELIC FROM OS/8 ASSEMBLY
	ZBLOCK 7
SHNDLR,	VERSION
	CLA CLL CMA RTL
	DCA SYSCNT	/3 TRIES ON ERROR
	RDF
	TAD SCIF
	DCA SFIELD	/RETURN FIELD SETUP
	TAD I SHNDLR
	DCA SFUN
	ISZ SHNDLR
	CLA CMA
	TAD I SHNDLR
	DCA SLOC	/BUFFER ADDRESS-1
	ISZ SHNDLR
STRY,	TAD S410	/SETUP DTA0 TO DO SEARCH REVERSE
	DTCA DTXA	/BUT MOTION BIT IS NOT ON
	DTLB
	CLA CMA CLL RAL
	DCA SCA		/7776=SBLOCK FROM OS/8 ASSEMBLY
	TAD SFUN
	RTR
	RTR
SERR,	RTL
	RAL		/LAST 4 INST. PUT MOTION BIT IN LINK
			/IF THIS BIT WAS SET IN THE CALLING
			/SEQUENCE, SEARCH STARTS FORWARD.
S7600,	7600
	TAD S200
SC,	SZL
	TAD S400
	DTXA		/ZAP MOTION BIT ON
	DTSF DTRB
	JMP .-1
	SPA		/CHECK FOR ANY ERRORS
	JMP SERR
	DTRA		/NO ERRORS
	RTL
	CMA RTL		/COMPLEMENT OF DIRECTION TO LINK
			/IF LINK ON, SEARCHING FORWARD.
	SNL CLA
	CML RTL
	TAD SBLOCK	/SEARCH FOR ONE RECORD BEFORE THE
			/REQUIRED ONE. THEN REVERSE DIRECTION
	CMA
	TAD I SHNDLR
	TAD I SHNDLR	/X+X=2*X; RECORDS TO BLOCKS
	NOP
	NOP
	CMA
	SZA CLA		/IS IT PROPER RECORD?
	JMP SC
	SNL		/YES..IF LINK IS ON,WAS FWD SRCH
	JMP SC+1	/REVERSE..REVERSE TAPE MOTION
			/AND SEARCH FORWARD
	TAD SLOC
	DCA SCA
	TAD SFUN
	DTLB		/SET UP FIELD
	TAD SFUN
	CLL RAL
	AND S7600
	DCA SBLKCT	/BLOCK COUNT
	RAL		/FUNCTION TO BIT 11
	IFNZRO .-7700	<NZERR>
	SKP
	HLT		/TO PROTECT AGAINST BAD PROGRAMMERS
	IAC
	CLL CML RTL
	RTL		/FORMS EITHER READ OR WRITE
SL,	DTXA
	TAD S7600
	DCA SWC		/TRANSFER 200 (8)
	DTSF DTRB
	JMP .-1
	CLL CML		/IN CASE OF FATAL ERROR
	SPA CLA
	JMP SERR2
	TAD SBLKCT
	TAD S7600
	SNA		/ALL DONE?
	JMP SOVER	/YES
	DCA SBLKCT
	JMP SL
SERR2,	ISZ SYSCNT	/TRY AGAIN?
	JMP STRY
	SKP		/DON'T BOTHER
SOVER,	ISZ SHNDLR
	ISZ SHNDLR
	TAD S200	/STOP THE TAPE
	DTXA
	RAR		/GIVE FATAL RETURN
SFIELD,	HLT
	JMP I SHNDLR
SCIF,	CIF 0
S400,	400
S200,	200
S410,	410
	SBLKCT=7753
	SYSCNT=7750
	SFUN=7751
	SLOC=7752
	SWC=7754
	SCA=7755
	$