;UPRAVA HRY MS WORD MSX
;(C) ROS, 1990
;ADJMSWO;0 ; 29-JUL-90 ; 17:45
;
	.RADIX 16T

	ORG	0C035

;--------------------------------
ADR1	EQU	9A27 ; LIVE-
ADR2	EQU	8F2C ; PADDLE
ADR3	EQU	8F33 ; ATTACK
ADR4	EQU	8017 ; INTERRUPT
ADR5	EQU	81FC ; SUBINT
;--------------------------------
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,PADDLE
	LD	(ADR2),HL
	LD	HL,ATTACK
	LD	(ADR3),HL
	LD	HL,TEST
	LD	(ADR4),HL
	EI
	IN	A,(11)
CONTIN	JP	0C000
;--------------------------------
TEXT	DB 0C,0A,0A,0A,0A,0A,0A,0D,09,'Pro SORD m.5',0D,0A,0D,0A,'      upravil LZR Soft',0D,0
;--------------------------------
TEST	PUSH	AF
	IN	A,(30)
	CPL
	AND	0C
	JP	Z,0000
	IN	A,(50)
	RLCA
	JR	C,RESET
VEN	POP	AF
	JP	ADR5
;---------------
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	LD	A,(ADR1)
	OR	A
	PUSH	HL
	JR	Z,SMRTEL
	LD	HL,1800
ULOZIT	LD	(ADR1),HL
	POP	HL
	JR	VEN
SMRTEL	LD	HL,2035
	JR	ULOZIT
;--------------------------------
PADDLE	CALL	00D5
	OR	A
	RET	NZ
	LD	A,2
	JP	00D5
;--------------------------------
ATTACK	CALL	00D8
	OR	A
	RET	NZ
	LD	A,2
	JP	00D8
;--------------------------------
ZKONEC:
	END	START
