;UPRAVA MSX HRY ROBOFROG
;ADJROBOFR ; 03-JUL-91 ; 18:28

;(C) ROS, 20-OCT-90

	.RADIX 16T

	ORG	0C000

;--------------------------------
ADR1	EQU	8017 ;INIT INT
ADR2	EQU	80EE ;SUBR INT
ADR3	EQU	9915 ;LIVE-
ADR4	EQU	8010 ;START
;--------------------------------
START	DI
	LD	A,(0006)
	CP	10
	JR	NZ,RUN
SORDM5	LD	HL,0F3E9
	LD	A,0F
	LD	(HL),A
	INC	HL
	LD	A,4
	LD	(HL),A
	INC	HL
	LD	(HL),A
	CALL	00CC
	CALL	006F
	LD	HL,TEXT
TISK	LD	A,(HL)
	OR	A
	JR	Z,PAUSE
	CALL	00A2
	INC	HL
	JR	TISK
PAUSE	LD	BC,0E00
PAUS1	XOR	A
PAUS2	DEC	A
	JR	NZ,PAUS2
	DEC	BC
	OR	B
	JR	NZ,PAUS1
	LD	HL,TEST
	LD	(ADR1),HL
	IN	A,(11)
	EI
RUN	JP	ADR4
;--------------------------------
TEST	PUSH	AF
	IN	A,(30)
	CPL
	AND	0C
	JP	Z,0000
	IN	A,(50)
	RLCA
	JR	C,RESET
VEN	POP	AF
	JP	ADR2
;---------------
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	PUSH	HL
	LD	A,(ADR3)
	OR	A
	JR	Z,SMRTEL
	LD	HL,2100
ULOZIT	LD	(ADR3),HL
	POP	HL
	JR	VEN
SMRTEL	LD	HL,0CC35
	JR	ULOZIT
;--------------------------------
TEXT	DB 0C,0A,0A,0A,0A,0A,0A,09,'Pro SORD m.5',0D,0A,0A,'      upravil LZR Soft',0D,0A,0A,09,20
	DB '03-AUG-91',0
;--------------------------------
ZKONEC
	END	8FF8
