DEVEX   ASM;-- ROUTINE DEVEX.KCC --
;			\
;BC00H ... BDFFH	\
;			\
;	` ml 28.12.1990	\
;-----------------------
SUTAB	EQU	0B7B0H
PV1	EQU	0F003H
WAIT	EQU	14H
ERRM	EQU	19H
AHEX	EQU	1CH
CRLF	EQU	2CH
;-------
	ORG	0BC00H
START	LD	HL,0
	LD	B,80H
DEV02	LD	A,M
	CP	7FH	;TEST PROLOG?
	INC	HL
	JR	Z,DEV01
	DJNZ	DEV02
	JR	DEV03
DEV01	LD	M,0	;LOESCHEN
DEV03	LD	HL,(SUTAB)
	LD	(SUBALT),HL ;MERKEN
	LD	DE,SUBNEU
	LD	(SUTAB),DE
	LD	BC,90H	;LAENGE SUTAB
	LDIR
	LD	HL,MBO	;BCBFH
	LD	(SUBNEU+2),HL
	LD	HL,MBI	;BCEBH
	LD	(SUBNEU+10),HL
	LD	HL,STAB
	LD	DE,SUBNEU+16
	LD	C,8
	LDIR
	RET
;-------
STAB	DW	ISRO	;BC6EH
	DW	CSRO	;BCC3H
	DW	ISRI	;BCD3H
	DW	CSRI	;BD0FH
;-------
	DW	0DDDDH
	DEFM	'TAPE'
	DB	1
	JR	DEV04
	DW	07F7FH
	DEFM	'TAPE'
	DB	1
DEV04	LD	HL,(SUBALT) ;SUTAB ALT
DEV06	LD	(SUTAB),HL
	RET
;-------
	DW	0DDDDH
	DEFM	'DISK'
	DB	1
	JR	DEV05
	DW	07F7FH
	DEFM	'DISK'
	DB	1
DEV05	LD	HL,SUBNEU ;SUTAB NEU
	JR	DEV06
;-------
ISRO	LD	(IX+2),0 ;BLOOCKNUMMER
	LD	L,(IX+5)
	LD	H,(IX+6) ;BLOCKPUFFER
	LD	BC,83F3H ;NAME
	LD	E,11	;ANZAHL
DEV07	OUTI
	INC	B
	INC	B
	DEC	E
	JR	NZ,DEV07 ;NAME AUSGEBEN
	LD	D,11	;NAME EINTRAGEN
DEV10	INC	(IX+2)	;NAECHSTER BL.
	LD	H,(IX+6)
	LD	L,(IX+5)
	LD	BC,81F2H ;SEKTOR
	LD	E,80H	;BLOCKLAENGE
DEV08	OUTI
	INC	B
	INC	B
	DEC	E
	JR	NZ,DEV08
DEV11	LD	BC,80F3H ;STEUERBYTE
	OUT	(C),D
DEV09	PUSH	BC
	LD	A,1
	CALL	PV1
	DB	WAIT
	POP	BC
	IN	A,(C)
	BIT	0,A	;FERTIG?
	JR	NZ,DEV09
	AND	A
	BIT	7,A	;FEHLER
	RET	Z
	INC	B
	IN	A,(C)
	CALL	PV1
	DB	AHEX	;FEHLERNUMMER
	CALL	PV1
	DB	ERRM
	SCF
	RET
;-------
MBO	LD	D,3	;SCHREIBEN NORM
	JR	DEV10
;-------
CSRO	CALL	MBO
	RET	C
	LD	D,43H	;SCHREIBEN CLOSE
	LD	(IX+5),0
	LD	(IX+6),0B7H
	JR	DEV11
;-------
ISRI	LD	(IX+2),0
	POP	DE
	POP	HL
	PUSH	HL
	PUSH	DE
	LD	BC,83F3H ;NAME
	LD	DE,090BH ;OPEN/LAENGE
DEV12	OUTI
	INC	B
	INC	B
	DEC	E
	JR	NZ,DEV12
	PUSH	DE
	JR	DEV13
;-------
MBI	PUSH	DE
	LD	D,1	;LESEN NORM
DEV13	CALL	DEV11	;STEUERBYTE
	POP	DE
	RET	C
	PUSH	DE
	PUSH	HL
	PUSH	AF
	LD	L,(IX+5)
	LD	H,(IX+6);PUFFER
	LD	BC,80F2H;SEKTOR
	LD	E,80H	;LAENGE
DEV14	INI
	INC	B
	INC	B
	DEC	E
	JR	NZ,DEV14
	INC	(IX+2)	;BLOCKNUMMER
	POP	AF
	POP	HL
	POP	DE
	RET
;-------
CSRI	CALL	PV1
	DB	CRLF
	RET
;-----------------------
;BD14H
SUBALT	DW	0FBA8H	;SUTAB ALT
;BD16H
SUBNEU	DW	0E329H	;CRT
	DW	0BCBFH	;MBO
	DW	0B7BDH	;UOT1
	DW	0B7C3H	;UOT2
	DW	0F238H	;KBD
	DW	0BCEBH	;MBI
	DW	0B7C0H	;USIN1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