ùúùúääääääääää	incdir	"include:"
	include	"exec/execbase.i"
	include	"libraries/gadtools.i"
	include	"libraries/gadutil.i"
	include	"libraries/gadutil_lib.i"
	include	"LVOs.i"
	include	"gadutil_20to30comp.i"

start:
	move.l	_AbsExecBase.w,a6
	lea.l	libdatas(pc),a2		; Open all needed libraries
	move.w	(a2)+,d2
.openlib:
	move.l	(a2),a1			; Get library name pointer
	moveq.l	#36,d0
	CallLib	OpenLibrary
	move.l	d0,(a2)+		; Save base address
	dbeq	d2,.openlib		; Continue until done or error
	beq.s	.closelibs

	bsr.w	TestProgram

.closelibs:
	lea.l	libdatas(pc),a2		; Close all opened libraries
	move.w	(a2)+,d2
.closelib:
	move.l	(a2)+,d0		; Get base address for library
	beq.s	.closedone
	move.l	d0,a1
	CallLib	CloseLibrary
	dbra	d2,.closelib
.closedone:
	moveq.l	#0,d0
	rts

;----------------------------- library data ----------------------------------
libdatas:	dc.w	5-1

dosbase:	dc.l	dosname
GUtilBase:	dc.l	gadutilname
GfxBase:	dc.l	gfxname
IntuiBase:	dc.l	intuiname
UtilBase:	dc.l	utilname

dosname:	dc.b	'dos.library',0
gadutilname:	dc.b	'gadutil.library',0
gfxname:	dc.b	'graphics.library',0
intuiname:	dc.b	'intuition.library',0
utilname:	dc.b	'utility.library',0
	even

;------------------------------ The test program -----------------------------
