
		; KEYMAP.A
		;
		; autoinit code	for libraries I	need which aren't already
		; covered by DICE's auto library opening
		;
		; This must be JOIN'ed onto the end of autos.lib, NOT
		; linked with the main bulk of my obj's. This is because
		; Workbench message processing MUST take place before
		; anything else.

		xdef	_KeymapBase
		xref	__AutoFail0
		xref	_LVOOpenLibrary
		xref	_LVOCloseLibrary

		section	autoinit0,code

		moveq	#0,d0
		lea	kmname(pc),a1
		jsr	_LVOOpenLibrary(a6)
		move.l	d0,_KeymapBase(a4)
		beq	__AutoFail0

		bra	openend
kmname:
		dc.b	'keymap.library',0
		ds.w	0
openend:

		section	autoexit0,code

		move.l	_KeymapBase(a4),d0
		beq	nokm
		move.l	d0,a1
		jsr	_LVOCloseLibrary(a6)
nokm:

		section	libbss,bss
_KeymapBase	ds.l	1

