
>EXTERN "MODULES/MOD.GOMMOLASSMOT III",MT_DATA

S:	BSR	MT_INIT

EVER:	MOVE.L	$DFF004,D0
	AND.L	#$1FF00,D0
	CMP.L	#$08000,D0
	BNE.S	EVER

EV2:	LEA	MT_MUSIC(PC),A4
	LEA	TI+2(PC),A5
	LEA	$DFF006,A6
	MOVE.W	#0,$DFF180
	move.w	(A6),(A5)
	JSR	(A4)
	move.w	(A6),d1
	MOVE.W	#$444,$DFF180
	move.l	ti(PC),d0
	AND.L	#$FFFF,d1
	sub.w	d0,d1
	cmp.l	TIME,D1
	BLE.S	NONEW
	MOVE.L	D1,TIME
	move.w	#$888,$dff180
NONEW:
	BTST	#2,$DFF016
	BEQ.S	EV2

	BTST	#6,$BFE001
	BNE.S	EVER

	BSR	MT_END
	moveq	#0,d0
	RTS

ti:	dc.l	0
TIME:	DC.L	0
