	PAGE	*** ICOM FLOPPY DRIVERS ***
	IFUND	NFLOPPIES
NFLOPPIES	EQU	2	THE STANDARD
	FIN	NFLOPPIES
*
*	PHYSICAL DISK DRIVERS STORAGE "DEFS"
*
::	SET	*
	ORG	DSKINFO:SIZE	TACKS ON TO BOTTOM OF DISK INFO TABLE
FDJMPINTAD	RMB	1	FOR JUMP OP CODE
FDINTSTATEAD	RMB	2	JUMP ADDRESS
FDREADWRITE	RMB	1	0 IS READ, <>0 IS WRITE
FDSEEKRETRY	RMB	1	NUMBER OF RE-SEEKS
FDRETRY	RMB	1	READ/WRITE RETRY COUNT
FDTARGETCYL	RMB	2	WHERE WE WANT TO BE
FDDRIVE	RMB	1	DRIVE NUMBER TO USE
FDCYL	RMB	2	CURRENT CYL
FDTRACK	RMB	2	DESIRED TRACK (?HOW DIFFERENT FROM TARGET CYL?)
FDSECTOR	RMB	1	GIMME THIS ONE
FDSKERRCT	RMB	2	SEEK ERROR COUNT
FDLSTSKERR	RMB	2	LAST SEEK STATUS IN ERROR
FDWERRCT	RMB	2	WRITE ERROR COUNT
FDLSTWERR	RMB	2	LAST WRITE ERROR STATUS
FDRERRCT	RMB	2	READ ERROR COUNT
FDLSTRERR	RMB	2	LAST READ STATUS IN ERROR
FDOPERCT3	RMB	1	OPERATION COUNT- BYTE 3
FDOPERCT2	RMB	1	OPERATION COUNT- BYTE 2
FDOPERCT1	RMB	1	OPERATION COUNT- BYTE 1
FDMAPALGORITHM	RMB	2
FDK1MODNSPT	RMB	1	SPIRALING CONSTANT MOD NSPT
FDK2MODNSPT	RMB	1	2*SC MOD NSPT
FDK4MODNSPT	RMB	1	4*SC MOD NSPT
FDK8MODNSPT	RMB	1	8*SC MOD NSPT
FDK16MODNSPT	RMB	1	16*SC MOD NSPT
FDK32MODNSPT	RMB	1	32*SC MOD NSPT
FDMAP	EQU	*	MAP FOR MAPPING
FDSIZE	EQU	*
	ORG	::
	PAGE
*
*	DISK INFO TABLE
*
*
	IF	NFLOPPIES=4
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