;UPRAVA MSX HRY BREAK-IN
;ADJBREAK0 ; 19-OCT-91 ; 13:35
;
;(C) ROS, 13-OCT-90

	.RADIX 16T

	ORG	8FF8

;--------------------------------
START	DI
	LD	A,(0006)
	CP	10
	JR	Z,ERR7
MSX	CALL	0138
	PUSH	AF
	XOR	A
	LD	(MODE),A
	LD	B,4
HLEDEJ	LD	A,(MODE)
	LD	HL,4000
	PUSH	HL
	PUSH	BC
	CALL	0024
	POP	BC
	POP	HL
	CALL	TEST
	JR	Z,RUN
	LD	HL,MODE
	INC	(HL)
	DJNZ	HLEDEJ
PRIPNI	POP	AF
	OUT	(0A8),A
ERR7	LD	E,7
	JP	406F
;--------------------------------
TEST	LD	A,(HL)
	CPL
	LD	(HL),A
	LD	C,(HL)
	CP	C
	RET
;--------------------------------
RUN	CALL	0138
	AND	0FC
	LD	B,A
	RRCA
	RRCA
	AND	03
	OR	B
	OUT	(0A8),A
	LD	DE,DATA
	LD	HL,0500
	CALL	TEST
	JR	NZ,PRIPNI
	EX	DE,HL
	LD	BC,3A81
	LDIR
	POP	AF
	OUT	(0A8),A
	EI
	RET
;--------------------------------
MODE	DB 0,0,0,0,0,0,0,0,0,0,0,0,0
DATA
	END
