File DISK328E

Directory of image this file is from
This file as a plain text file

*20
// DISK328E SUBROUTINE.
/DRIVES EITHER DF32 OR RK8E VIA
/LINCTAPE LIKE COMMANDS.
/PRESERVES DF & BETA REGISTERS.
/SETS AXO TO 0.
	 
/CALLS:   DRDE    DWRI
/         QN\BN   QN\BN
	 
/ONLY QN 4-7 ARE VALID.
/ONLY BN 0-177 ARE VALID.
	 
	DWRI=JMP .
	LDA I
LODSK,	4000
	SKP
	DRDE=JMP .
	LDA I
KZ1,	1		/OK
	STC DSKCOM
	ADD 0
	BCL I
	6000
	STC .+2
	LDA
	0
	STC MEMLOC
	ADD 0
	ADD KZ1
	STC LVJMP
/CALLERS DF.
	IOB
	6214
	SCR 1
	BSE I
	LDF
	STC LLDF
	 
/RK8E CODE
	DSKP=6741
	DCLR=6742
	DLAG=6743
	DLCA=6744
	DRST=6745
	DLDC=6746
	DMAN=6747
	 
/DF32 CODE
	DCMA=6601
	DMAR=6603
	DMAW=6605
	DCEA=6611
	DEAL=6615
	DFSE=6621
	DFSC=6622
	 
DISKD,	CLR
	ADD DSKCOM
	ROL I 1
	LDA I
	DMAR		/6603
	LZE
	ADD KZ2		/MAKE DMAW (6605)
	STC D32COM
	 
SETUP,	ADD LLDF	/PRESUME DF CALL
	SCR 2		/DF IN AC
	BCL I
	7770
	ROL 3
	STC CEXT	/EX MEM BITS (DLDC)
	QAC		/GET CORE ADDR
	ROL 1
	BCL I
	377
	STC CORLOC	/CORE ADDR (8E OR DF32)
	CLR		/0 TO MQ
	ADD MEMLOC
	BCL I
	7000
	STA I
BLKNM,	0		/FOR DLAG, 8E
	SCR 4		/PROPAGATES SIGN BITS
	ROL 6
	ADD CEXT
	STC DDEAL	/DEAL DF32
	QAC
	ROL 1
	STC D32ADR
	 
/SET UP 3X ERROR RETRY
KZ2,	PDP
	PMODE
	 
/CHECK TO SEE WHICH DISK IS UP
/DF 32 IS DEFAULT
/FIRST CHECK EXISTENCE OF 8E
	CLA CMA		/AC=-1
	DRST		/8E STATUS
	RTL		/BIT2 TO BIT0
	SPA
	 JMP DF32	/NO 8E,ASSUME DF32
	 
/8E EXISTS, BUT IS IT ON?
	RTL		/BIT4 TO BIT0
	SMA
	 JMP RK8E	/8E IS ON
	 
/ROUTINE TO RUN DF32
DF32,	CLA CMA		/AC=-1
	TAD CORLOC	/CORE ADDR
	CDF 0
	DCA I P7751	/CA
	TAD CM400
	DCA I P7750	/WC(-400)
	TAD DDEAL
	DEAL
	CLA
	TAD D32ADR	/DISK ADDR
D32COM,	0		/DMAR OR DMAW
	DFSC		/DISK DONE?
	JMP .-1
	DFSE		/ERRORS?
	 JMP DF32	/YES, RETRY
	 
/OK, LEAVE
CRET,	DCEA
	DCMA
	LINC
	LMODE
	CLR
	AXO
LLDF,	0		/LDF N
LVJMP,	0		/** EXIT
	 
	PMODE
P7750,	7750
P7751,	7751
CM400,	-400
DDEAL,	0
D32ADR,	0
CEXT,	0
CORLOC,	0
K1002,	1002
MEMLOC,	0
DSKCOM,	0
	 
/ROUTINE TO RUN RK8E
/FIRST MAKE SURE DISK IS READY
RK8E,	DCLR		/CLR STATUS
	DRST		/WAIT TIL CLR
	SZA CLA
	JMP .-2
	 
	TAD CEXT
	TAD DSKCOM
	DLDC		/LOAD COMMAND REG
	TAD CORLOC
	DLCA		/CORE ADDR
	TAD BLKNM
	TAD LODSK	/4000 FOR PARTITION 0
	DLAG		/LOAD DISK ADDR & GO
	DSKP		/DISK DONE?
	 JMP .-1
	DRST		/STAUS TO AC
	CLL RAL		/CLR SUCCESS BIT
	SNA		/OTHER ERRORS
	JMP CRET	/OK, LEAVE
	 
/8E ERROR ROUTINE
/FIRST CHECK FOR SEEK FAILED OR CYLINDER
/ADDRESS ERROR. MUST RECAL FOR THESE
BAD8E,	AND K1002	/NOTE AC RAL
	SNA CLA
	 JMP RK8E	/OTHER, RETRY
/RECAL AND RETRY
	DCLR		/CLR STATUS
	STL RTL		/AC=2
	DCLR		/RECAL
	DSKP		/WAIT FOR DONE
	 JMP .-1
	JMP RK8E	/RETRY
	LMODE
// END DISK328E



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search