;UPRAVA HRY CONGO MSX
;(C) ROS, 1990
;ADJCONG;0 ; 29-JUL-90 ; 11:27
;
	.RADIX 16T

	ORG	8360

;--------------------------------
ADR1	EQU	0C2E2 ; LIVE-
ADR2	EQU	0CD40 ; TIME-
ADR3	EQU	0CD49 ; TIME-
ADR4	EQU	87E6  ; ATTACK
;--------------------------------
START	JR	RUN
;--------------------------------
TEST	PUSH	AF
	IN	A,(30)
	CPL
	AND	0C
	JP	Z,0000
	IN	A,(50)
	RLCA
	JR	C,RESET
VEN	POP	AF
	JP	00D8
;---------------
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	LD	A,(ADR1)
	OR	A
	PUSH	HL
	PUSH	DE
	JR	Z,SMRTEL
	XOR	A
	LD	H,A
	LD	L,A
	LD	D,A
	LD	E,A
ULOZIT	LD	(ADR1),A
	LD	(ADR2),HL
	LD	(ADR3),DE
	POP	DE
	POP	HL
	JR	VEN
SMRTEL	LD	A,3D
	LD	HL,01D6
	LD	DE,10D6
	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
;--------------------------------
RUN	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	(ADR4),HL
	EI
	IN	A,(11)
CONTIN
	COND	CONTIN-8400
	.PRINTX CHYBA!
	ELSE
	.PRINTX ADRESY OK!
	ENDC
KONEC:
	END	START
