;UPRAVA HRY STAR BLAZER MSX
;(C) ROS, 1990
;ADJBLAZ;1 ; 03-SEP-90 ; 10:25
;
	.RADIX 16T

	ORG	0D038

;--------------------------------
ADR1	EQU	40F0 ; LIVE-
;--------------------------------
START	DI
	LD	A,(0006)
	CP	10
	JR	NZ,0D000
SORDM5	CALL	00CC
	CALL	006F
	LD	HL,TEXT
TISK	LD	A,(HL)
	PUSH	AF
	CALL	00A2
	POP	AF
	OR	A
	JR	Z,PAUSE
	INC	HL
	JR	TISK
PAUSE	LD	BC,1000
PAUS1	XOR	A
PAUS2	DEC	A
	JR	NZ,PAUS2
	DEC	BC
	OR	B
	JR	NZ,PAUS1
	LD	HL,0B656
	LD	(HL),0DB
	INC	HL
	LD	(HL),31
	INC	HL
	LD	(HL),2F
	INC	HL
	LD	(HL),07
	INC	HL
	LD	(HL),00
	LD	HL,TEST
	LD	(9010),HL
	CALL	EXCLOP
	LD	HL,(4002)
	EI
	IN	A,(11)
	JP	(HL)
;--------------------------------
EXCLOP	DI
	LD	HL,9000
	LD	DE,4000
	LD	BC,4000
EX1	LD	A,(DE)
	LDI
	DEC	HL
	LD	(HL),A
	INC	HL
	JP	PE,EX1
	RET
;--------------------------------
TEST	POP	AF
	IN	A,(30)
	CPL
	AND	0C
	JR	Z,SHIFTY
	IN	A,(50)
	RLCA
	JR	C,RESET
VEN	JP	63A8
;---------------
SHIFTY	CALL	EXCLOP
	RST	0
;---------------
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	LD	A,(ADR1)
	OR	A
	JR	Z,SMRTEL
	XOR	A
ULOZIT	LD	(ADR1),A
	JR	VEN
SMRTEL	LD	A,3D
	JR	ULOZIT
;--------------------------------
TEXT	DB 0C,0A,0A,0A,0A,0A,0A,0D,09
	DB         'Pro SORD m.5'
	DB 0D,0A,0D,0A,09
	DB         'v potu tvare'
	DB 0D,0A,0D,0A
	DB '       pracne upravil'
	DB 0D,0A,0D,0A
	DB '     LZR Soft 2.8. 1990'
	DB 0D,0
;--------------------------------
ZKONEC
	END	8FF8
