view timer.s16 @ 59:b15187a99d6f default tip

Add a command line option for printing out label addresses on the command line. Useful for debugging purposes.
author Michael Pavone <pavone@retrodev.com>
date Wed, 07 Sep 2016 23:15:27 -0700
parents cb078b3b23e8
children
line wrap: on
line source

	ldim vectors, r0
	setvbr r0
	;current color value
	ldim 0, r0
	;color increment
	ldim $41, r3
	ldimh $8, r3
	;Palette RAM address/length
	ldim 1, r1
	;enable interrupt
	ori 1, sr
	;Timer Value
	ldim $FF, r2
	ldimh $FF, r2
	outi $A, r2
wait
	bra wait
	;shouldn't get here, disable timer so it's clear something broke
	ldim 0, r2
	outi $A, r2
	bra wait

vectors:
	dc.w timer_handler
	
timer_handler
	outi $E, r1
	outi $E, r0
	add r3, r0, r0
	reti r4