
			;   autoinit if you ever reference TimerBase
			;
			;   (c)Copyright 1990, Matthew Dillon, All Rights Reserved
			;
			;   (2.0 timer.device library routines)

			xdef	_TimerBase
			xref	__AutoFail0

_LVOOpenDevice		equ	-444
_LVOCloseDevice 	equ	-450

			section autoinit0,code

			moveq.l #0,D0
			moveq.l #0,D1
			lea	timeriot(A4),A1
			lea	timername(pc),A0
			jsr	_LVOOpenDevice(A6)
			tst.l	D0
			bne	__AutoFail0
			bra	i10
timername		dc.b	'timer.device',0
			ds.w	0
i10
			section autoexit0,code

			move.l	_TimerBase(A4),D0
			beq	l10
			lea	timeriot(A4),A1
			jsr	_LVOCloseDevice(A6)
l10

			section libbss,bss

			ds.l	0
timeriot		ds.b	20	; struct timerequest
_TimerBase		ds.b	20	; io_Device

			END


