;+----------------------------------------------------------------------
;| Title		: myAVR Beispiel "Hallo Welt" für den ATmega48/88
;+----------------------------------------------------------------------
;| Funktion		: eine LED wir angeschalten
;| Schaltung	: PORTB0=LED1
;+----------------------------------------------------------------------
;| Prozessor	: ATmega48
;| Takt			: 3,6864 MHz
;| Sprache		: Assembler
;| Datum		: 15.03.2004
;| Version		: 1.0
;| Autor		: Dipl. Ing. Päd. Alexander Huwaldt
;+----------------------------------------------------------------------
.include	"avr.h"
;------------------------------------------------------------------------
;Reset and Interruptvectoren	;VNr.	Beschreibung
begin:	rjmp	main	; Reset Handler
	reti		; EXT_INT0 IRQ0 Handler
	reti		; EXT_INT1 IRQ1 Handler
	reti		; PCINT0 PCINT0 Handler
	reti		; PCINT1 PCINT1 Handler
	reti		; PCINT2 PCINT2 Handler
	reti		; WDT Watchdog Timer Handler
	reti		; TIM2_COMPA Timer2 Compare A Handler
	reti		; TIM2_COMPB Timer2 Compare B Handler
	reti		; TIM2_OVF Timer2 Overflow Handler
	reti		; TIM1_CAPT Timer1 Capture Handler
	reti		; TIM1_COMPA Timer1 Compare A Handler
	reti		; TIM1_COMPB Timer1 Compare B Handler
	reti		; TIM1_OVF Timer1 Overflow Handler
	reti		; TIM0_COMPA Timer0 Compare A Handler
	reti		; TIM0_COMPB Timer0 Compare B Handler
	reti		; TIM0_OVF Timer0 Overflow Handler
	reti		; SPI_STC SPI Transfer Complete Handler
	reti		; USART_RXC USART, RX Complete Handler
	reti		; USART_UDRE USART, UDR Empty Handler
	reti		; USART_TXC USART, TX Complete Handler
	reti		; ADC ADC Conversion Complete Handler
	reti		; EE_RDY EEPROM Ready Handler
	reti		; ANA_COMP Analog Comparator Handler
	reti		; TWI 2-wire Serial Interface Handler
	reti		; SPM_RDY Store Program Memory Ready Handler
;------------------------------------------------------------------------
;Start, Power ON, Reset
main:
	ldi	r16,hi8(RAMEND)
	out	SPH,r16
	ldi	r16,lo8(RAMEND)
	out	SPL,r16
	ldi	r16,0b00000001	; PortB 0 auf Ausgang
	out	DDRB,r16
;------------------------------------------------------------------------
mainloop:	nop
	ldi	r16,0b00000001
	out	PORTB,r16	; Licht an
	rjmp	mainloop
;------------------------------------------------------------------------

