setuphbl:
	move.w	#$2700,sr
	move.l	#hbllist,hblsave
	move.b	ieb,oldieb
	move.b	iea,oldiea
	move.b	ima,oldima
	move.l	key_vec,oldkeyvec
	move.l	key_vec,keyt+2
	move.l	#key_handler,key_vec		;put new key stuff in
	move.l	hbl_vec,oldhblvec

*	and.b	#$df,ieb	;stop 200hz timer
	move.b	#%01000000,ieb
	and.b	#$fe,iea	;stop hblank
	move.l	hbl_vec,oldhblvec
	move.l	#hblhandler1,hbl_vec
*	or.b	#1,iea			;enable hblank
	move.b	#%00000001,iea
	or.b	#1,ima

*	move.l	vbl_vec,vblt+2		;set up vbl handler
	move.l	vbl_vec,oldvblvec
	move.l	#vbl_handler,vbl_vec
	move.b	#0,tbcr
	move.b	#5,tbdr
	move.b	#8,tbcr
	move.w	#$2300,sr
	rts
