;IOPackDefs.txt
	nolist
	opt	a+,c+,o-,d+

	incdir	"ainclude:"

	;include	"graphics/gfxbase.i"	;includes can go here
	;include	"graphics/graphics_lib.i"
	;include	"graphics/text.i"

; EQU's here

;GRAPHICS_REV	equ	31		;v1.1, example

;Exports
	XDEF	_IntuitionBase
	XDEF	IOPackWindow

;Imports
	XREF	MakeWindow
	XREF	ClearWindow
	XREF	GetWindowSize
	XREF	WindowTitle
	XREF	SetFont
	XREF	GetC
	XREF	CharOut
	XREF	BackSpace
	XREF	CStrin
	XREF	CStrout
	XREF	Strin
	XREF	Strout
	XREF	NewLine
	XREF	Spaces
	XREF	DecIn
	XREF	DecIn_Long
	XREF	DecOut
	XREF	DecOut_Long
	XREF	HexIn
	XREF	HexIn_Long
	XREF	HexOut
	XREF	HexOut_Long
	XREF	DivuLW
	XREF	Rand
	XREF	ResetRand
	XREF	Seed
	XREF	IOExit
	XREF	WaitForEvent
	XREF	AskYesNo
	XREF	WrtIOInfo
	XREF	startup

Start	jsr	startup		;init
	tst.l	d0
	bne.s	startup_ok
exit_iopack	jsr	IOExit

startup_ok	;clr.l	_GfxBase
	;moveq	#GRAPHICS_REV,d0	;open graphics library
	;lea	graf_name,a1	;(or library needed)
	;CALLEXEC	OpenLibrary	;intuition is already opened
	;move.l	d0,_GfxBase	;with the base in _IntuitionBase
	;bne.s	d0_main
	;jsr	IOExit

do_main	jmp	main		;execute the main code

; an interface to the IOExit routine

Exit	;tst.l	_GfxBase	;add various cleanup routines
	;beq.s	end_exit	;here
	;move.l	_GfxBase,a1
	;CALLEXEC	CloseLibrary
end_exit	jmp	IOExit

; Routines, put your own subroutines here

;GetRPort	move.l	IOPackWindow,a0	;example on getting the rastport
;	move.l	wd_RPort(a0),Rast	;of the IOPackWindow (see
;	rts			;Misc Variables below)

;DC's here

;graf_name	GRAFNAME			;example

;DS's here

	EVEN

; This is a pointer to the IOPack Window structure for your use

IOPackWindow	ds.l	1

; Library Bases

_IntuitionBase	ds.l	1
;_GfxBase	ds.l	1		;example: put your own
				;library bases here

; Misc Variables, put your own variables here

;Rast	ds.l	1		;example (rastport of
				;IOPackWindow)
