	INCLUDE	"macros.i"
	INCLUDE	"exec/types.i"
	INCLUDE	"exec/ables.i"
	INCLUDE	"exec/execbase.i"
	INCLUDE	"libraries/dosextens.i"
	INCLUDE	"libraries/arpbase.i"

	BITDEF	PR,DEFSTACK,7
ExecBase	EQU	4

	xref	LinkerDB
	xref	AmiCron

	csect	_NOMERGE,0,0,0,4
;	section	_NOMERGE,code

	XDEF	MyExit

run	movem.l	d0/a0,-(a7)
	lea	LinkerDB,a4
cont	move.l	ExecBase.w,a6
	lea	Arp,a1
	moveq.l	#ArpVersion,d0
	Call	OpenLibrary
	move.l	d0,ArpBase(a4)
	move.l	d0,a0
	move.l	ab_DosBase(a0),DOSBase(a4)
	move.l	ab_IntuiBase(a0),IntuitionBase(a4)

	movem.l	(a7)+,d0/a0
	jsr	AmiCron(pc)
MyExit	move.l	ArpBase(a4),a6
	Call	ArpExit
	rts

Arp	dc.b	"arp.library",0

	csect	__MERGED,1,0,0,4
;	section	__MERGED,data

	xdef	ArpBase,DOSBase,IntuitionBase

ArpBase	dc.l	0
DOSBase	dc.l	0
IntuitionBase
	dc.l	0
	END
