;UPRAVA HRY TRAPPER MSX
;(C) ROS, 1990
;ADJTRAP;1 ; 04-OCT-90 ; 18:35
;
	.RADIX 16T

	ORG	0BF64

;--------------------------------
ADR1	EQU	0CEF4 ; LIVE-
ADR2	EQU	0D4F4 ; ATTACK
ADR3	EQU	0D4EC ; STICK
;--------------------------------
START	DI
	LD	A,(0006)
	CP	10
	JR	NZ,CONTIN
OBRAZ	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,0C00
PAUS1	XOR	A
PAUS2	DEC	A
	JR	NZ,PAUS2
	DEC	BC
	OR	B
	JR	NZ,PAUS1
	LD	HL,TEST
	LD	(ADR2),HL
	LD	(ADR3),HL
	EI
	IN	A,(11)
CONTIN	JR	0C000
;--------------------------------
TEXT	DB 0C,0A,0A,0A,0A,0A,0A,09,'Pro SORD m.5',0D,0A,0A,'      upravil LZR Soft',0D,0A,0A,09,'  04-OCT-90',0
;--------------------------------
TEST	PUSH	AF
	IN	A,(30)
	CPL
	AND	0C
	JP	Z,0000
	IN	A,(50)
	RLCA
	JR	C,RESET
VEN	POP	AF
	OR	A
	JP	Z,00D8
	JP	00D5
;---------------
RESET	IN	A,(50)
	RLCA
	JR	C,RESET
	LD	A,(ADR1)
	OR	A
	JR	Z,SMRTEL
	XOR	A
ULOZIT	LD	(ADR1),A
	JR	VEN
SMRTEL	LD	A,0
	ORG	$-1
	DEC	HL
	JR	ULOZIT
;--------------------------------
ZKONEC	;=0C000!
	END	START
