File COMDISKY

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

*20
/COMDISKY
	 
/COMBINED DISKY AND DFDISKY ROUTINES
	 
/ROUTINES TO READ AND WRITE ON ONE
/DF OF DISK
	 
/DF WRITE ROUTINE
	DFWRI=JMP.
	LDA
	3
	STC SAVE3	/SAVE BETA 3
	SET 3
	0
	JMP SETDSK	/SET DISK BUFFERS
	PDP
	PMODE
	6605		/DMAW
	JMP I EXIT
	 
/DF READ ROUTINE
	LMODE
	DFRDE=JMP.
	LDA
	3
	STC SAVE3	/SAVE BETA 3
	SET 3
	0
	JMP SETDSK	/SET DISK BUFFERS
	PDP
	PMODE
	6603		/DMAR
	JMP I EXIT	/LEAVE
	 
/ROUTINES TO READ & WRITE ON ONE BLOCK
/OF DF32 DISK AS IF FOR LINCTAPE.
	 
/BLOCK WRITE ROUTINE
	LMODE
	DWRI=JMP .
	LDA
	3		/SAVE BETA 3
	STC SAVE3
	SET 3
	0
	JMP SETUP	/SET DISK WORDS
	PDP
	PMODE
	6605		/DMAW
	JMP I EXIT	/LEAVE
	 
/BLOCK READ ROUTINE.
	LMODE
	DRDE=JMP .
	LDA
	3		/SAVE BETA 3
	STC SAVE3
	SET 3
	0
	JMP SETUP	/SET DISK WORDS
	PDP
	PMODE
	6603		/DMAR
	JMP I EXIT
PERR,	ERR
	 
/LEAVE ROUTINE
EXIT,	LEAVE
LEAVE,	6622		/DFSC, DISK DUN ?
	JMP .-1
	6621		/DFSE, ERRORS?
	JMP I PERR	/YES
	6611		/DCEA, NO
	6601		/DCMA
	LINC
	LMODE
	XSK I 3		/SET RTRN JUMP
	LDA
	3
	STC LV
	SET I 3
SAVE3,	0		/RESTORE BETA 3
LLDF,	0		/RESTORE DF
LV,	0		/EXIT FROM LEAVE
	 
/REPEAT IN CASE OF DISK ERROR.
	PMODE
ERR,	6611		/DCEA
	6601		/DCMA
	LINC
	LMODE
	ADD LV
	ADD KM1
	JMP SAVE3-2
	 
/ROUTINE TO SETUP DWRI OR DRDE.
SETUP,	LDA
	0
	STC SETUPX
	IOB
	IOF		/SIGSYS OFF IF ON
/GET CURRENT DF, SET EA & EXIT.
	CLR
	IOB
	6214		/RDF
	STA
	LLDF
	ROR I 4		/BITS 0&1 OF CA
	STC TEM		/FOR CA, CLR AC
	ROR I 11	/LINK TO AC8, EA EXT MEM
	STC TEM+1	/FOR EA, EMA
	ADD LLDF
	ROR 1
	BSE I
	LDF
	STC LLDF
/GET QN & SETUP CA & WA.
	LDF 5
	LDA 3
	 
	BCL I		/INSURE 0-177BN
	600
	STA 3
	 
	BCL I
	4777
	ROR 1
	ADD TEM
	LDF 3
	 
	AZE		/IF=0, SET=-0
	JMP .+4
	CLR
	COM
	SKP
	 
	ADD KM1
	STA
	7751		/CUR ADR (CA) -1
	LDA I
	7400		/-400 2S COM
	STA
	7750		/NUM REG TO TRNSFR, WC
	 
/SETUP EMA & DMA FROM BN.
	LDF 5
	LDA 3
	ROR 4
	BCL I
	0377
	STC TEM+2
	LDA 3
	ROL 2
	BCL I
	7077
	ADD TEM+1
	IOB
	6615		/DEAL
	LDA
	TEM+2
SETUPX,	0
	 
	 
/DISK SETUP ROUTINE FOR DF TRANSFER
SETDSK,	LDA
	0
	STC DSKX
	IOB
	IOF		/SIGSYS OFF IF ON
	IOB
	6214		/RDF
	ROR 1
	BSE I
	LDF
	STC LLDF
/SET UP CA AND WC IN BANK 3
	LDF 5
	LDA 3
	BCL I
	3777
	ROR 10
	STC TEM		/EA BIT
	LDA 3
	BCL I
	4777
	ROL 1
	LDF 3
	STA
	7751		/CA
	LDA I
	6000		/-2000 2S COM
	STA
	7750		/WC
/SET UP EMA AND EA
	LDF 5
	LDA 3
	ROL 12
	STA
	TEM+1		/DMA SETUP
	BCL I
	7740
	ROL 6		/EMA BITS
	ADD TEM		/EA BIT
	IOB
	6615		/DEAL
	LDA
	TEM+1
	BCL I
	1777
DSKX,	JMP 		/LEAVE
	 
/END COMDISKY



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