	.TITLE  UNICHANNEL 15 ABSOLUTE BINARY LOADER

/

/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  #010  JAH   21-MAR-74

/EDIT	#011	SCR	5/13/74

/EDIT	#012	SCR	5/13/74	/SCRAP PDP-11 CODE

/EDIT	#014	SCR	5/15/74	/MAKE EDIT # 14 NOT 12, AS 13 FAILED

/EDIT	#015	SCR	11/14/74	/FIX TOMOVE 12K TO PDP11

/EDIT	#100	SCR	7/25/75	XVM VERSION, MOSTLY NEW

/EDIT	#101	SCR	7/25/75	FIX FOR POSSIBLE 0 START ADDR

/EDIT	#102	MJH	8/20/75 DISCLAIMER

/EDIT	#103	SCR	10/29/75 LONG RANGE CHANGE: FOR PDP-11'S WITH

/				FLOATED ADDRESS SPACE, DISPATCH WITHIN

/				OWN 4K, NOT GO TO END!!

/ !WARNING!

/

/ CODE CHANGERS, FIELD SERVICE REQUESTS NO EAE INSTRUCTIONS BE USED!

/

/  INSTRUCTIONS FOR USE OF PRODUCT

/

/  A 24K MACHINE IS ASSUMED!

/

/	1. PLACE THE ABSL11 LOADER IN THE PDP-15 READER.

/	2. SET THE PDP-15 ADDRESS SWITCHES TO 17700 (8).

/	3. PRESS RESET AND THEN READ IN.

/	   THE LOADER IS READ IN AND THE PDP-15 HALTS.

/	4. SET THE PDP-11 ADDRESS SWITCHES TO 140000

/	   (ANY MULTIPLE OF 20000 IN PDP-15 MEMORY UP TO 140000

/	   WILL FUNCTION CORRECTLY, INCLUDING OLD START VALUES.)

/	5. PRESS THE 11'S LOAD ADDRESS SWITCH, AND THE START SWITCH.

/	6. PLACE THE PDP-11 BINARY TAPE IN THE PDP-15 READER.

/	7. PRESS THE CONTINUE SWITCH ON THE PDP-15 TO READ IN THE TAPE.

/	   THE PDP-15 HALTS WITH THE AC=0 FOR A SUCCESSFUL READ,

/	   AND WITH AC=-1 FOR A CHECKSUM ERROR.

/	8. TO READ ANOTHER TAPE (ONLY IF NO START ADDR ON 

/	   THE PREVIOUS TAPE) GO TO STEP 6

/

/

	.ABSP

/

/

/ START OF LOADER

	.LOC	0

/

/  PDP-11 CODE FOR EACH PAGE TO TRANSFER TO WORKING LOOP

/

LOOPAD=ENTER+ENTER-4		/(#103)

/

	000167	/START:	JMP	ENTER	;(#103)ALWAYS SAME RELATIVE!

	LOOPAD	/

/

/  PDP-15 CODE

/

	.LOC	7460	/TO END OF PAGE

/

START	DBA		/PAGE MODE

	CAF+10		/CLEAR ALL FLAGS AND DISABLE INTERRUPTS

	IOF

	LAC	(47636	/LOOP CONTROL FOR REPLICATE

	PAL

	CLX

MOVIT	LAC	0,X	/REPLICATE IN PAGES UPTO

	DAC*	PAGE,X	/THE 24K DOS BOOTSTRAP

	AXS	1

	JMP	MOVIT

	HLT!CLA		/HALT HERE TO MAKE LOOK LIKE OLD VERS.

	JMP*	VECTOR	/EXECUTE JUST UNDER 24 K BOOT

VECTOR	LOOK+50000	/ADDRESS IN COPY IN PAGE 5

/

/

/  FIND OUT WHICH PAGE PDP-11 IS WORKING IN!!

/

LOOK	PXA		/UPDATE XR TO NEXT PAGE

	TAD	PAGE

	SMA!SZA		/IF LESS=PRESENT, OK

	LAC	M5P	/730000 TO REFERENCE PAGE 0

	PAX

	LAC	POINT,X	/DID PDP-11 WAKE UP IN THIS PAGE

	SAD	LM1	/IS STILL -1

	JMP	LOOK	/PDP-11 NOT HERE, KEEP LOOKING

/

/

/ LOOK FOR BEGINNING OF A BLOCK

/

LD2	DZM	CKSUM	/INITIALIZE CHECKSUM

	JMS	READ	/READ A FRAME

	SZA!CLL!RAR	/ACCEPT ONLY 1

	SZA

	JMP	LD2	/LOOK UNTIL +1 IS FOUND

	JMS	READ	/READ ANOTHER FRAME

	SZA		/ACCEPT ONLY 0

	JMP	LD2	/KEEP SCANNING FOR +1

/

/ INPUT AND SAVE BYTE COUNT. IF BYTE COUNT = 6, GO TO PROCESS

/ JUMP START.

/

	JMS	GETWRD	/GET FULL BYTE COUNT

	AAC	-6	/CORRECT FOR HEADER COUNT

	SNA!CMA!IAC	/SKIP IF REAL DATA, MAKE - FOR CONTROL

	JMP	LJMP	/NO MORE DATA, GO JUMP TO LOADED CODE

	DAC	BYTECT

	JMS	GETWRD	/GET LOAD ADDRESS

	DAC	POINT,X	/TO PDP-11 ADDR POINTER

LD3	JMS	READ	/GET A DATA BYTE

	DAC	CHAR,X	/DATA SLOT FOR PLACEMENT IN PDP-11 MEMORY

	ISZ	FLAG,X	/FLAG = 1; SAY DATA TO TRANSFER

	ISZ	BYTECT	/ANY MORE

	JMP	LD3	/DO THEM

	JMS	READ	/CHECKSUM FRAME

	LAC	CKSUM

	SZA		/SKIP IF OK

BADHLT	CLA!CMA!HLT	/WASN'T, HALT WITH -1 IN AC

	JMP	LD2	/GET NEXT BLOCK

/

/ INPUT A FRAME, DO CHECKSUM, LEAVE BYTE IN AC

/

RSF=700101

RSA=700104

RRB=700112

READ	0

	RSA		/READ IN ALPHANUMERIC MODE

	RSF		/WAIT FOR IT

	JMP	.-1

	RRB		/PUT THE FRAME IN THE AC

	AND	(377	/MASK OFF JUNK BITS

	PAL		/AND TEMPORARY SAVE

	TAD	CKSUM	/ADD TO CHECKSUM

	AND	(377	/USE ONLY 8 BITS OF CHECKSUM

	DAC	CKSUM

	PLA		/BYTE IN AC FOR CONVENIENCE

	JMP*	READ	/RETURN

/

/ ASSEMBLE ONE FULL WORD OF DATA

/

GETWRD	0

	JMS	READ	/GET ONE CHARACTER

	DAC	CHAR	/SAFE TEMPORARY

	JMS	READ	/GET ANOTHER FRAME

	SWHA

	CLL!RAR

	TAD	CHAR	/FINISH TEMPORARY USE OF CHAR

	JMP*	GETWRD	/RETURN

/

/ PROCESS TRANSFER ADDRESS

/

HALTAD=FLAG+FLAG+140000	/IF NO START ADDR, GO HERE TO HALT

/

LJMP	JMS	GETWRD	/GET POSSIBLE TRANSFER ADDRESS

	DAC	BYTECT	/SAVE TEMPORARILY

	JMS	READ	/CHECKSUM

	LAC	CKSUM	/IS IT OK

	SZA		/SKIP IF YES

	JMP	BADHLT	/NOPE, 

	LAC	BYTECT	/GET BACK ADDR

	CLL!RAR		/ODD BYTE BIT TO LINK

	SZL!RAL		/SKIP IF LEGAL START

	LAC	(HALTAD	/NOT START, VECTOR PDP-11 TO HALT

	DAC	CHAR,X	/VECTOR THRU CHAR HOLDER

LM1	LAW	-1	/SET FLAG TO SAY END OF TAPE

	DAC	FLAG,X

	CLA!HLT		/HALT WITH AC=0 TO SAY OK

	JMP	LD2	/DO NEXT TAPE

/

/

BYTECT	0

CKSUM	0

PAGE	10000		/SIZE OF PAGE

M5P	730000		/MINUS ADDR OF EXECUTING PAGE

/

/

/  BULK OF PDP-11 CODE

/

/

	116737	/TOP:	MOVB	CHAR,@#POINT	;DATA BYTE INTO LOAD

	000026	/

POINT	777777	/				;FILLED FROM PDP-15

ENTER	005267	/	INC	POINT		;POINTR MOVE 1 BYTE

	177772	/				;KICK POINT TO SHOW ENTR

	016700	/WAIT:	MOVE	FLAG,R0		;IS PDP-15 READY

	000016	/

	001775	/	BEQ	WAIT		;IF STILL 0, NO

	005067	/	CLR	FLAG		;RESET NEXT TIME

	000010	/

	005300	/	DEC	R0		;DATA OR END

	001764	/	BEQ	TOP		;ORIG=1; DATA

	000137	/	JMP	@#??		;GO TO START ADDR OR FLAG

CHAR	000000	/				;DATA CHAR;VECTOR

FLAG	000000	/				;1,0,-1 FLAG;HALT

	000765	/	BR	WAIT		;NEXT TAPE

	.END	START
