;----------------------------------------------------------------------
; Test Routine #1
;----------------
;
PATC11:	LD	A,06H		;Repeat	Clear the controller and enable drivers
	LD	(4006H),A
	LD	A,80H		;	Set Mode write missing clocks
	LD	(4007H),A
	LD	B,08H		;	Count:= 8
	LD	HL,4001H	;	Pointer:= disk data port
	LD	A,04H		;	Start controller; leave drivers enabled
	LD	(4006H),A
PATC12:	LD	(HL),0AAH	;	Repeat Write 0 1 0 1 0 1....
	DJNZ	PATC12		;	Until (8 bytes have been written)
	LD	(HL),44H
	LD	(HL),89H	;	Write an A1 (double density 8")
	LD	(HL),44H
	LD	(HL),89H	;	Write Second A1
	LD	(HL),44H
	LD	A,90H		;	Set Mode to normal clocks
	LD	(4007H),A
	LD	(HL),89H	;	Write third A1
	LD	(HL),0FBH	;	Write FB
	LD	(HL),00H
	LD	(HL),00H
	LD	A,(4003H)	
	AND	02H		;	(/SERIN)
	LD	(HL),00H	;	Write 3 trailing zeros
	JR	NZ,PATC11	;Until (the serial port goes active)
	RET

	PAGE
