*	Created by TT-Digger vv5.5
*	Tue Jun 15 06:53:48 1999

*	TTD_5

*		TEXT	$00040C bytes, segment starts at L000
*		DATA	$000000 bytes
*		BSS	$0000A2 bytes, segment starts at U40C
*		FIXUPS	$000180 bytes
*		NAMES	$0000E0 bytes
*		names	$00002E

		XREF	tab2x,labx,heelverweg,tabx
		XDEF	mandelbrot

* RA_SYS names start
include RA_SYS.I
* RA_SYS names end
		TEXT

module L000

testea:		link.l	a6,#$FFF00001
		move 	$05(a1,d0),d0
		move 	ev_buserr.w,d0
		move 	ev_buserr.l,d0
		move.b	hw_sdma_cont.w,d0
		move.b	hw_sdma_cont.w,d0
		move.b	l_hw_sdma_cont.l,d0
		move.b	hw_sdma_cont.l,d0
		move.b	$00008901.l,d0
z0:
z1:
z2:
z:		move 	x(pc,d1),d0
		move 	$08(a1,d0*2),d0
		move 	L04A(pc,d1*4),d0
		move 	L04A(pc,d1),d0
x:		move 	(tab.w,a0,d2.l*8),d0
		move 	(tab2.w,d3.l*4),d0
L04A:		move 	(d3),d0
		move 	([N1234567,a5,d2.l],M1234567),([N2345678,a5,d2.l],M2345678)
		move 	([labx+$00000004.l,pc,d2.l],tab2x),d0
		move 	([tabx+$00000008,a0,d2*2],tab2x),d0
		move 	([tabx,d3.l*4],tab2x+$00000006),d0
		move 	([d3*8],tabel2+$0000000A),d0
		move 	([a1,d3],tabel2),d0
		move 	([y.l,pc,d2.l*4]),d0
		move 	([tabel,a0,d2*2]),d0
		move 	([tabel,d3.l]),d0
		move 	([d3*2]),d0
		move 	([a1,d3*4]),d0
		jsr 	([M2345678])
		move 	([tabel.l,pc],d2.l*2,tabel2),d0
ddd:		move 	([tabel,a0],d2,tabel2),d0
L0D0		=	*-$08
		move 	([tabel],d3.l*8,tabel2),d0
		move 	([a0],d3*4,tabel2),d0
		move 	([ddd.l,pc],d2.l),d0
		move 	([tabel,a0],d2*2),d0
		move 	([tabel],d3.l*4),d0
		move 	([a0],d3*8),d0
		move 	([L0D0.w,pc],tabel2),d0
		move 	([tabel,a0],tabel2),d0
		move 	([tabel],tabel2),d0
		move 	([a1],tabel2),d0
		move 	([tabel.l,pc]),d0
y:		move 	([tabel,a0]),d0
		move 	([tabel]),d0
		move 	([a1]),d0
		fmovecr	#$01,fp0
		movem.l	d3-d5,-(a7)
		fmovem	fp3-fp5,-(a7)
		fmove.l	FPSR,savefpsr.l
		fmovem.l FPCR/FPIAR,(a0)
l1:		fnop	
		fsave	save.l
		frestore save.l
		fmove.x	#$3FFF00009000000000000000,fp4
		fmove.l	fp4,([tabel,a4],d4*4,tabel2)
		fble.l	lf
		fmovem.l (a0),FPCR/FPIAR
		fmove.l	savefpsr.l,FPSR
		fsgt	-$0004(a6)
		fdble	d4,lf1
		ftrapeq	
lf:		ftrapne.w #$0FFF
lf1:		ftraple.l #$00FFFFFF
		fmovem	(a7)+,fp3-fp5
		movem.l	(a7)+,d3-d5
		cmpa 	#ssp_init,a0
l2:		tst.l	a0
		tst 	l2.l
		bkpt	#5
		trapeq	
		traple.w #$0FFF
		trapgt.l #$000FFFFF
		pack	-(a1),-(a2),#$1111
		pack	d3,d4,#-$7778
		unpk	-(a1),-(a2),#$1111
		unpk	d3,d4,#-$7778
		move 	tab.w,d0
		move 	tab2.w,d0
		blt.l	l1
		bgt.l	heelverweg
		bge.l	lang
		ble.l	langer
		ploadr	d0,$0008(a6)
		ploadw	#7,$000A(a5)
		ploadr	SFC,$000C(a4)
		ploadw	DFC,$000E(a3)
lang:		pflusha	
		pflush	#7,#2,$000A(a5)
		pflush	SFC,#3,$000C(a4)
		pflush	DFC,#4,$000E(a3)
langer:		ptestr	d0,$0008(a6),#1
		ptestw	#7,$000A(a5),#2
		ptestr	SFC,$000C(a4),#3,a1
		ptestw	DFC,$000E(a3),#4,a2
		pmove	TT0,(a1)
		pmove	TT1,(a2)
		pmove	(a2),TT0
		pmovefd	(a2),TT1
		pmove	(a1),TC
		pmovefd	(a1),SRP
		pmove	(a2),CRP
		pmove	(a2),MMUSR
		pmove	TC,(a1)
		pmove	SRP,(a1)
		pmove	CRP,(a2)
		pmove	MMUSR,(a2)
		moves 	a1,(a0)
		moves 	(a2),d0
		cas.b	d1,d2,-$000C(a7)
		cas 	d1,d2,-$000C(a7)
		cas.l	d1,d2,-$000C(a7)
		cas2 	d1:d2,d3:d4,(a1):(a2)
		cas2.l	d1:d2,d3:d4,(a1):(a2)
		callm	#$18,ergens.l
		chk2.b	$08(a3,d2),a1
		chk2.l	$10(a4,d3),a2
		cmp2.b	$08(a3,d2),a1
		cmp2.l	$10(a4,d3),a2
		muls.l	-$0008(a6),d1
		mulu.l	-$000A(a5),d2:d3
		divs.l	-$000C(a6),d4
		divu.l	-$000E(a6),d5:d6
		divul.l	-$0010(a6),d7:d0
		unlk	a6
		rts

ergens:		bftst	d6{d5:d4}
		bfextu	tabel.l{$0F:$08},d3
		bfchg	$0008(a6){$01:$02}
		bfexts	$000C(a4){$1F:$01},d4
		bfclr	$000A(a5){d0:d1}
		bfffo	$000E(a3){d2:$20},d5
		bfset	(a4){d1:$08}
		bfins	d6,(tabel2,d7){$06:d3}
		chk 	-$0004(a6),d4
		chk.l	-$0008(a6),d5
		rtd 	#$0018

mandelbrot:	fmove.x	$001C(a7),fp1
		fmove.x	$0028(a7),fp7
		fmove.x	$0004(a7),fp2
		fmove.x	$0010(a7),fp3
		fmove	d1,fp6
		clr.l	d2
l0:		fmove	fp3,fp0
		fmul	fp0,fp0
		fmove	fp2,fp5
		fmul	fp5,fp5
		fmove	fp5,fp4
		fadd	fp0,fp4
		fcmp	fp6,fp4
		fbgt.w	lx
		cmp 	d2,d0
		ble.w	lx
		fsub	fp0,fp5
		fadd	fp1,fp5
		fmul	fp2,fp3
		fadd	fp3,fp3
		fadd	fp7,fp3
		fmove	fp5,fp2
		addq 	#1,d2
		bra.w	l0

lx:		move 	d2,d0
		rts

		asl	$0002(a0)
		asr	$0002(a0)
		lsl	$0002(a0)
		ror	$0002(a0)
		lsr	$0002(a0)
		roxl	$0002(a0)
lbt:		roxr	$0002(a0)
lbd:		rol	$0002(a0)
lbc:		asl 	#2,d1
lbf:		asr 	#2,d1
		lsl 	#2,d1
		ror 	#2,d1
		lsr 	#2,d1
		roxl 	#2,d1
		roxr 	#2,d1
		rol 	#2,d1
L3C8:		btst	#$01,lbt(pc)
		btst	#$02,([lbd.l,pc,a0],tab)
		movem.l	L3C8(pc),d0-d3
		btst	#$03,([pc],a1)
L3E8:		frestore lbf(pc)
		fabs	(lbc.l,pc,a2),fp0
		fabs	(tab,a0,d2*4),fp0
		fadd	fp1,fp0
		dc.w	$F200
		ori 	#-$0E00,(a0)+
		dc.w	$04DC

		BSS

module U40C

tabel:		ds.b	$00000014
tabel2:		ds.b	$0000000A
save:		ds.b	$00000060
savefpsr:	ds.b	$0000000C
tab:		ds.b	$00000004
tab2:		ds.b	$00000004
N1234567:	ds.b	$00000004
M1234567:	ds.b	$00000004
N2345678:	ds.b	$00000004
M2345678:	ds.b	$00000004
U4AE:
		end	
