;UPRAVA HRY @PYRAMIDE
;(C) ROS 04-OCT-89
;ADJPYR;1  23:11
;
	.RADIX 16T
	ORG	09F64
ADRESA	EQU	0A368
;--------------------------------
STAR1	XOR	A
	LD	(0F3DB),A
	LD	A,(0006)
	CP	10
	JR	NZ,NASTRT
	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
	XOR	A
	LD	(TEST),A
	IN	A,(11)
NASTRT	JR	0A000
;--------------------------------
SMERY	CALL	TEST
	LD	A,02
	JP	00D5
;--------------------------------
ATTACK	CALL	TEST
	LD	A,02
	JP	00D8
;--------------------------------
TEST	RET
	IN	A,(30)
	CPL
	AND	0C
	JP	Z,0000
	IN	A,(50)
	RLCA
	RET	NC
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	LD	A,(ADRESA)
	OR	A
	JR	Z,SMRTEL
	XOR	A
ULOZIT	LD	(ADRESA),A
	RET
SMRTEL	LD	A,3D
	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	JP	STAR1
;--------------------------------
KONEC:
	END	START
