;UPRAVA DRUHE CASTI MSX HRY
;SUPER SOCCER
;ADJSSOC;3 ; 02-NOV-91 ; 15:06

;(C) ROS, 10-SEP-91

	.RADIX 16T

	ORG	0D000

;--------------------------------
SETINT	EQU	403C
SUBINT	EQU	4048
;--------------------------------
START	DI
	LD	HL,9000
	LD	DE,8000
	LD	BC,4000
	LDIR
	LD	HL,ODKUD
	LD	DE,0E000
	LD	BC,ZKONEC-ODKUD
	LDIR
	JP	0E000
;--------------------------------
ODKUD	LD	A,(0FFFE)
	CALL	013B
	LD	A,(0006)
	CP	10
	JR	NZ,MSX
	LD	HL,4000
	LD	DE,0C000
	LD	BC,2000
	LDIR
	LD	HL,0000
	LD	DE,4000
	LD	BC,4000
	CALL	0059
	LD	HL,4058
	LD	A,50
	CALL	KEYS+DIFF
	LD	(HL),80
	LD	HL,5418
	LD	A,30
	CALL	KEYS+DIFF
	LD	(HL),80
	LD	HL,5423
	CALL	KEYS+DIFF
	LD	(HL),40
	LD	HL,543C
	CALL	KEYS+DIFF
	LD	HL,5448
	CALL	KEYS+DIFF
	DEC	(HL)
	LD	HL,86EC
	INC	A
	CALL	KEYS+DIFF
	LD	(HL),04
	LD	HL,8242
	INC	A
	CALL	KEYS+DIFF
	LD	HL,8261
	INC	A
	CALL	KEYS+DIFF
	DEC	(HL)
	LD	HL,826F
	CALL	KEYS+DIFF
	LD	(HL),04
	LD	HL,824D
	INC	A
	CALL	KEYS+DIFF
	LD	HL,TEST+DIFF
	LD	DE,0FAF5
	PUSH	DE
	LD	BC,KONTST-TEST
	LDIR
	POP	HL
	LD	(SETINT),HL
MSX	LD	HL,0F3E9
	LD	(HL),0F
	INC	HL
	LD	A,4
	LD	(HL),A
	INC	HL
	LD	(HL),A
	CALL	00CC
	CALL	006F
	LD	HL,TEXT+DIFF
TISK	LD	A,(HL)
	OR	A
	JR	Z,PAUSE
	CALL	00A2
	INC	HL
	JR	TISK
PAUSE	LD	BC,1000
PAUS1	XOR	A
PAUS2	DEC	A
	JR	NZ,PAUS2
	DEC	BC
	OR	B
	JR	NZ,PAUS1
	CALL	013E
	LD	HL,(4002)
	JP	(HL)
;--------------------------------
KEYS	LD	(HL),0DB
	INC	HL
	LD	(HL),A
	INC	HL
	LD	(HL),2F
	INC	HL
	INC	HL
	LD	(HL),02
	RET
;--------------------------------
TEST	PUSH	AF
	IN	A,(30)
	CPL
	AND	0C
	JR	Z,SHIFTY
VEN	POP	AF
	JP	SUBINT
;---------------
SHIFTY	DI
	LD	HL,0C000
	LD	DE,4000
	LD	BC,2000
	LDIR
	LD	A,0BF
	LD	(0004),A
	LD	A,83
	LD	(0009),A
	LD	A,0D1
	LD	(0015),A
	XOR	A
	OUT	(6C),A
	OUT	(30),A
	LD	A,3
	OUT	(7F),A
	IN	A,(11)
	JP	0000
KONTST
;--------------------------------
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 '02-NOV-91',0
;--------------------------------
ZKONEC
DIFF	EQU	0E000-ODKUD
	END
