;Test program to toggle PORTB avery 500ms.

.include	"8535def.inc"
.include	"map.asm"
.cseg
.org	0
reset:
	rjmp	init
.org	9
	rjmp	isr_t0_ov

init:
.include	"init.asm"
	sei
	ldi	tmp1,time_s_timer0
	sts	s_timer0,tmp1	
main_loop:

	lds	tmp1,s_timer0
	tst	tmp1
	brne 	main_loop
	ldi	tmp1,time_s_timer0
	sts	s_timer0,tmp1
	rcall	toggle
	rjmp	main_loop
.include	"timer.asm"
.include	"io.asm"
