/* This file contains the main() function. It waits for a time to be elapsed by
 * a call to wait_timer() and inverts the LED port then.
 * @author Bernhard R. Fischer
 */
#include <avr/io.h>


.section .text

.global main
main:
   ldi   r16,0x20          ; init registers
   clr   r17
.Lmloop:
   rcall wait_timer        ; wait for timer overflow
   eor   r17,r16           ; invert output bit in register
   out   _SFR_IO_ADDR(PORTB),r17 ; write bit to port b (LED)
   rjmp  .Lmloop           ; loop forever

