TDR/CTSASM;
;TEST STEUERLEITUNGEN DTR/CTS
;M003 V24
;
SAD	EQU	8
SBD	EQU	9
SAC	EQU	0AH
SBC	EQU	0BH
CTC0	EQU	0CH
CTC1	EQU	0DH
;
TABC	DEFB	7	;CTC
	DEFB	6	;ZC
 
TABS	DEFB	18H	;SIO
	DEFB	4
	DEFB	44H
	DEFB	3
	DEFB	0C1H
	DEFB	5
	DEFB	0EAH
;
	DEFW	7F7FH
	DEFM	'T'
	DEFB	1
	DI
	LD	HL,TABC
	LD	B,2
	LD	C,CTC0
	PUSH	HL
	PUSH	BC
	OTIR
	POP	BC
	POP	HL
	INC	C
	OTIR
	LD	B,7
	LD	C,SAC
	PUSH	HL
	PUSH	BC
	OTIR
	POP	BC
	POP	HL
	INC	C
	OTIR
	EI
 
	LD	A,5	;WR5
	OUT	SAC,A
	LD	A,6AH	;DTRA=0
	OUT	SAC,A
	LD	A,10H
	OUT	SBC,A	;RES EXT-INT
	IN	A,SBC	;RR0
	AND	20H	;BIT5=/CTS
	JR	NZ,FEL	;CTSB=1
	LD	A,5
	OUT	SAC,A
	LD	A,0EAH	;DTRA=1
	OUT	SAC,A
	LD	A,10H
	OUT	SBC,A
	IN	A,SBC
	AND	20H
	JR	Z,FEL	;CTSB=0
 
	LD	A,5
	OUT	SBC
	LD	A,6AH	;DTRB=0
	OUT	SBC,A
	LD	A,10H
	OUT	SAC,A
	IN	A,SAC
	AND	20H
	JR	NZ,FEL1	;CTSA=1
	LD	A,5
	OUT	SBC,A
	LD	A,0EAH	;DTRB=1
	OUT	SBC,A
	LD	A,10H
	OUT	SAC,A
	IN	A,SAC
	AND	20H
	JR	Z,FEL1	;CTSA=0
END:	LD	A,18H
	OUT	SAC,A
	OUT	SBC,A
	RET
 
FEL:	CALL	0F003H	;DTRA/CTSB-ERROR
	DEFB	19H
	CALL	0F003H
	DEFB	2CH
	JR	END
FEL1	JR	FEL	;DTRB-CTSA-ERROR
ÿÿÿÿÿÿÿÿÿÿÿÿÿ