[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exception Vectors and You...



Is there any special reason that I can't use the timer vector under all
the versions of MiNT I own?  (1.08 and up)

Here's the code (Lattice-style ASM):

	SECTION TEXT,CODE

	XDEF	_install_timer,_restore_timer
	XREF	_timeclicks

_install_timer:
	move.l	$400,old_timer+2
	move.l	#new_timer,$400
	rts

_restore_timer:
	move.l	old_timer+2,$400
	rts

new_timer:
	add.l	#1,_timeclicks
old_timer:
	jmp		0

	END

I run a Supexec((void *)install_timer) at the beginning of my program,
then a Supexec((void *)restore_timer) at the end.  I have within the
program a loop that prints the long timeclicks to the upper left-hand
corner of the screen using v_gtext.  Under MiNT, it runs normally, except
when I move the mouse, I get a fatal error from AESSYS and it crashes
completely.  The debug info is not terribly descriptive beyond that.  Any
ideas?  Do I need to use Setexc, and if so, how can I have my vector fall
through to the old one?

Thanks in advance,

Jim Baumgardner (jbaumgar@bronze.coil.com)
"Would you _please_ stop clicking my head?"