;UPRAVA HRY MSX EXCHANGER
;ADJEXCHAN ; 21-AUG-91 ; 21:20

;(C) ROS, 20-OCT-90

	.RADIX 16T

	ORG	0C000

;--------------------------------
ADR3	EQU	875A ;LIVE-
;--------------------------------
START	LD	HL,DATA
	LD	DE,0D000
	LD	BC,000A
	LDIR
	LD	HL,0F3E9
	LD	A,0F
	LD	(HL),A
	INC	HL
	LD	A,4
	LD	(HL),A
	INC	HL
	LD	(HL),A
	CALL	00CC
	CALL	006F
	LD	HL,TEXT
TISK	LD	A,(HL)
	OR	A
	JR	Z,PAUSE
	CALL	00A2
	INC	HL
	JR	TISK
PAUSE	LD	BC,0E00
PAUS1	XOR	A
PAUS2	DEC	A
	JR	NZ,PAUS2
	DEC	BC
	OR	B
	JR	NZ,PAUS1
	LD	A,1
	LD	(0F3EB),A
	CALL	0072
	LD	BC,0E201
	CALL	0047
	DI
	LD	A,(0006)
	CP	10
	JR	NZ,RUN
	LD	HL,TEST
	LD	(0FDA0),HL
	LD	A,0C3
	LD	(0FD9F),A
	IN	A,(11)
RUN	JP	8700
;--------------------------------
TEST	PUSH	AF
	IN	A,(30)
	CPL
	AND	0C
	JP	Z,0000
	IN	A,(50)
	RLCA
	JR	C,RESET
VEN	POP	AF
	RET
;---------------
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	LD	A,(ADR3)
	XOR	39
	LD	(ADR3),A
	JR	VEN
;--------------------------------
TEXT	DB 0C,0A,0A,0A,0A,0A,0A,09,'Pro SORD m.5',0D,0A,0A,'      upravil LZR Soft',0D,0A,0A,09,20
	DB '21-AUG-91',0
;--------------------------------
DATA	DB 0,0,0,38,0,1B,0,20,0,18
;--------------------------------
ZKONEC
	END
