;UPRAVA HRY CHILLER MSX
;(C) ROS, 1990
;ADJCHI;1 ; 28-JUL-90 ; 23:45
;
	.RADIX 16T
	ORG	8A21
;--------------------------------
ADR1	EQU	9AF3 ; ENERGY-
ADR2	EQU	8B3C ; JOYSTICK
;--------------------------------
TEST	PUSH	AF
	IN	A,(30)
	CPL
	AND	0C
	JP	Z,0000
	IN	A,(50)
	RLCA
	JR	C,RESET
VEN	POP	AF
	JP	00D5
;---------------
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	LD	A,(ADR1)
	CP	0
	ORG	$-1
	OR	A
	JR	Z,SMRTEL
	LD	A,0
	ORG	$-1
	OR	A
ULOZIT	LD	(ADR1),A
	JR	VEN
SMRTEL	LD	A,0
	ORG	$-1
	DEC	A
	JR	ULOZIT
;--------------------------------
TEXT	DB 0C,0A,0A,0A,0A,0A,0A,0D,09,'Pro SORD m.5',0D,0A,0D,0A,'      upravil LZR Soft',0D,0
;--------------------------------
START	DI
	LD	A,(0006)
	CP	10
	JR	NZ,CONTIN
OBRAZ	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,0B00
PAUS1	XOR	A
PAUS2	DEC	A
	JR	NZ,PAUS2
	DEC	BC
	OR	B
	JR	NZ,PAUS1
	LD	HL,TEST
	LD	(ADR2),HL
	EI
	IN	A,(11)
CONTIN
	COND	CONTIN-8AAC
	.PRINTX CHYBA!
	ELSE
	.PRINTX ADRESY OK!
	ENDC
KONEC:
	END	START
