;UPRAVA HRY HERO MSX
;(C) ROS, 1990
;ADJHER;1 ; 26-JUL-90 ; 15:20
;
	.RADIX 16T
	ORG	0DFC1
;--------------------------------
ADR1	EQU	8A30 ; LIVE-
ADR2	EQU	8BE1 ; BOMB-
ADR3	EQU	9069 ; BOMB+
ADR4	EQU	82C6 ; INTERRUPT
ADR5	EQU	834D ; LOW INT
ADR6	EQU	8350 ; HIGH INT
;--------------------------------
TEST	PUSH	AF
	IN	A,(30)
	CPL
	AND	0C
	JP	Z,0000
	IN	A,(50)
	RLCA
	JR	C,RESET
VEN	POP	AF
	JP	ADR4
;---------------
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	PUSH	BC
	LD	A,(ADR1)
	OR	A
	JR	Z,SMRTEL
	XOR	A
	LD	B,A
ULOZIT	LD	(ADR1),A
	LD	(ADR2),A
	LD	A,B
	LD	(ADR3),A
	POP	BC
	JR	VEN
SMRTEL	LD	A,3D
	LD	B,80
	JR	ULOZIT
;--------------------------------
OBRAZ	CALL	00CC
	CALL	006F
	LD	HL,TEXT
	JP	TISK
START	DI
	LD	A,(0006)
	CP	10
	JP	NZ,831C
	JP	OBRAZ
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	A,L
	LD	(ADR5),A
	LD	A,H
	LD	(ADR6),A
	EI
	IN	A,(11)
	JP	831C
;--------------------------------
TEXT	DB 0C,0A,0A,0A,0A,0A,0A,0D,09,'Pro SORD m.5',0D,0A,0D,0A,'      upravil LZR Soft',0D,0
KONEC:
DELKA	EQU	KONEC-START
	END	START
