	.TITLE RKBOOT --DECPACK DISK BOOTSTRAP

/

/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

/

/

/EDIT #011	S.KRISH	14-APR-73	RK TASK CODE CHANGE FROM '2' TO '202'

/EDIT #012	S.KRISH	8-OCT-73	MULTI-UNIT RK OPERATION BUG FIX

/EDIT #013	SCR	1/23/74		CHANGE 705514 TO 703444

/     #014	3-JUL-74 BY ED GARDNER  ADD DELAY BETWEEN STPD (TO VT15)

/					AND CAF IN RIOCLR

/	#015	10/17/74	SCR	CHANGE TCB AREA TO 22+ FROM 65+

/	#016	3/31/75		SCR	FIX FOR >64 TRANSFER

/	#017	4/28/75		SCR	IAC TO AAC 1

/	#018	8/30/75		SCR	CLR PDP-11 ONLY 1ST TIME

/	#019	9/2/75		SCR	COPYRIGHT

/	#020	9/17/75		SCR	LONG WEIGHT=ERR;CLEAN

/

/

/PDP-15 DOS DECPACK DISK BOOTSTRAP.

/

LIOR=706006

SIOA=706001

/

/IF ENTERED VIA .DTBEG OR .DTOUT, 4 CELLS MUST BE SET:

/	.DTBLK = LOGICAL DISK BL# (0-1077) WHERE 1 BL. = 256 WDS

/	.DTCA = CORE ADDRESS -1

/	.DTWC = -WC (2'S COMP) TO BE TRANSFERED

/	.SCOM+5 = START ADDR. WHEN LOAD COMPLETE

/

/

EBA=707764

EEM=707702	/PDP-9 COMPATABILITY

/

	.TITLE START-UP ROUTINE AND USER VARIABLES.

	.FULL

	.LOC 17637

/

/ CELLS .DTBLK THRU .BOOT MUST RETAIN PRESENT POSITION.

/NON RESIDENT CELLS

/

.DTBLK	0		/LOGICAL BL# (0-17777)

.DTCA	0		/CORE ADDR -1

.DTWC	0		/2'S COMP WC.

/

/PDP-15 REQUIRES HRM JMP IN SAME BANK (17777).

/FOLLOWING CELLS OVERLAYED AFTER 1ST TIME THRU.

/

DKWORD	105		/DISK ADDRESS.

ODDFLG	EBA

.DTSRC	LAC .-2		/VESTGIAL REG. (FROM DTA BOOTSTRAP)

.DTTR	DAC 17777	/READ OR WRITE STATUS BITS

/

/RESIDENT DISK BOOTSTRAP

/FOR KM-15 LOAD, START AT .BOOT

/ .BOOT MUST BE AT LOC 17646!!!

/

/	.LOC 17646

.BOOT	EBA		/(018) BANK IN CASE RESTART

	LAC .L077	/START TRANSFER AT LOC 100.

	DAC .DTCA

	LAW -17400	/WC = 17400

	DAC .DTWC

	DZM .DTBLK	/LOGICAL BL 0 = TRACK 0, SECTOR 0

	DZM	.DTSRC		/RESET UNIT # TO '0'

	LAC	.L200	/(018)CLR PDP11 ONLY FIRST TIME

	JMS	STCB	/(018)200 STOP TASKS DIRECTIVE

	JMP .DTBEG

.L700S	700000

TCB	22	/POINTER TO TCB ADDRESS

TCB1	23	/POINTER TO TCB+1

	.EJECT

/

/FOR NON-DOS-15 LOAD, START AT .DTBEG (.DTBEG MUST BE AT LOC 17663!!!)

/ FOR NON DOS-15 LOADS START AT .DTBEG AFTER SETTING

/ UP PARAMATERS. (DTBEG MUST BE 17663).

/

/	.LOC 17663

.DTBEG	JMS	RIOCLR	/ENTRY FOR READ

	SKP!CLL!CML	/INDICATE READ WITH LINK SET

/

/FOR OUTPUT, START AT .DTOUT (.DTOUT MUST BE AT LOC 17665!!!).

/

.DTOUT	JMS	RIOCLR	/ENTRY FOR WRITE (RIOCLR RETURNS LINK=0)

	LAC	.DTSRC	/FETCH UNIT #

	AND	.L700S	/KEEP ONLY UNIT BITS

	JMP DSKOUT

/

/SUBR TO CLEAR I/O FLAGS,ETC.

/

/  RIOCLR MUST EXIT WITH LINK=0;PRESENTLY STCB EXITS LINK=0

/

RIOCLR	0

STPD=703044		/IOT TO STOP VT-15 DISPLAY

	STPD		/STOP VT15 SO CAF WON'T CAUSE NXM REFERENCE

	LAW -40		/NEED DELAY TO ENSURE THAT IT REALLY DID STOP

	SZA!IAC!CLL	/(018)LEAVE LINK 0. IAC OK UNICHANNELS

			/(018)ALWAYS HAVVE PDP-15'S

	JMP	.-1	/(018)LOOP CONTROL

	CAF		/CLEAR ALL EXCEPT PI

	IOF		/AND GET THE PI

	JMP* RIOCLR

/

.L077	77		/(018) REARRGANGE

.L200	200		/(018) REARRANGE

.L602	602		/(018) REARRANGE

	.EJECT

/

/.DSTOP MUST BE AT LOC 17704!!!

/

/	.LOC 17704

.DSTOP	HLT		/ERR. HLT

	JMP .BOOT	/RESTART

DSKOUT	SWHA		/UNIT # TO BITS 9-11

	RTL		/UNIT # TO BITS 7-9; BIT 16 SET IF READ

	AAC	2	/BIT 15 IF READ (4);BIT 16 IF WRITE (2)

	DAC* RKUNFN

	LAC .DTWC	/WC

	DAC* RKWC

	RTL		/CLEAR LINK IF TRANSFER>64K LONG

	CML		/BIT SET FOR LONG TRANSFER, SAVE IN LINK

	LAC .DTCA	/SA - 1

	AAC	1	/LEAVE LINK ALONE

	DAC* STADD1

	AND .L700S

	RAL		/MOVE LINK AND TWO HIGH BITS TO 15-17

	RTL		/OF ADDRESS WORD; LINK WAS XTRA 64K BIT

	DAC* STADD	/UPPER 2 BITS OF SA & XTRA 64 K BIT

	LAC .DTBLK	/BLOCK #

	DAC* RKBLOK

	LAC .L602

	JMS	STCB		/SEND REQUEST

	LAC* STATUS	/CHECK FOR ANY ERROR FLAGS

	RTL

	SPA

	JMP .DSTOP	/ERROR FLAG UP

	JMS RIOCLR	/CLEAR ALL I/O IN 15 AND 11

	LAC* .L105	/EXIT THROUGH BANK0, 105

	DAC RIOCLR	/TEMP STORAGE.

	JMS* RIOCLR	/CALL MONITOR VIA JMS*

/

	.EJECT

/

/  TASK CONTROL BLOCK POINTER

/

DEV	24		/DEVICE EVENT VARIABLE

RKBLOK	25		/PHYSICAL BLOCK #

STADD	26		/STARTING MEMORY ADDRESS (M.S. 2 BITS)

STADD1	27		/			(L.S. 16 BITS)

RKWC	30		/NUMBER OF WORDS

RKUNFN	31		/UNIT NUMBER * 400 + FUNCTION

STATUS	32		/RK CONTROL STATUS REGISTER (RKCS)

/

STCB	0

	DAC*	TCB1		/SET TASK CODE

	DZM*	DEV		/RESET REV

	DZM*	TCB		/NO API INT

	LAC	TCB

	DZM	RIOCLR		/(020) COUNTER IF LONG WAIT

RKB020	ISZ	RIOCLR		/(020) GO TO ERROR IF SKIPS

	SKP			/(020) NO ISZ SKIP, KEEP TRYING

	JMP	.DSTOP		/(020) ERRROR HALT

	SIOA		/CAN PDP-11 TAKE IT

	JMP	RKB020		/(020)GO TRY AGAIN

	LIOR		/IT CAN, SEND REQ

	LAC*	DEV		/DONE?

	SNA!RTL			/(020)DONE?

	JMP	.-2		/NO.

	SMA!CLL			/(020) SKIP IF ERROR

	JMP*	STCB		/(020) OK, EXIT LINK=0

	JMP	.DSTOP		/(020) PIREX ERROR

	.EJECT

/.L105 MUST BE LAST LOC IN UPPER 8K (17777)!!!

/

.L105=17777

	.END .BOOT-3	/PDP-15 ONLY.
