;+----------------------------------------------------------------------
;| Title		: myAVR Beispiel "Hallo Welt" für den ATmega168
;+----------------------------------------------------------------------
;| Funktion		: Alle LEDs wird angeschalten
;| Schaltung	: PORTB0-2 = LED1-3
;+----------------------------------------------------------------------
;| Prozessor	: ATmega168
;| Takt		: 3,6864 MHz
;| Sprache		: Assembler
;| Datum		: ...
;| Version		: ...
;| Autor		: ...
;+----------------------------------------------------------------------
.include	"AVR.H"
;------------------------------------------------------------------------
begin:	nop
	rjmp	main	; Reset Handler
	nop
	reti		; EXT_INT0 IRQ0 Handler
	nop
	reti		; EXT_INT1 IRQ1 Handler
	nop
	reti		; PCINT0 PCINT0 Handler
	nop
	reti		; PCINT1 PCINT1 Handler
	nop
	reti		; PCINT2 PCINT2 Handler
	nop
	reti		; WDT Watchdog Timer Handler
	nop
	reti		; TIM2_COMPA Timer2 Compare A Handler
	nop
	reti		; TIM2_COMPB Timer2 Compare B Handler
	nop
	reti		; TIM2_OVF Timer2 Overflow Handler
	nop
	reti		; TIM1_CAPT Timer1 Capture Handler
	nop
	reti		; TIM1_COMPA Timer1 Compare A Handler
	nop
	reti		; TIM1_COMPB Timer1 Compare B Handler
	nop
	reti		; TIM1_OVF Timer1 Overflow Handler
	nop
	reti		; TIM0_COMPA Timer0 Compare A Handler
	nop
	reti		; TIM0_COMPB Timer0 Compare B Handler
	nop
	reti		; TIM0_OVF Timer0 Overflow Handler
	nop
	reti		; SPI_STC SPI Transfer Complete Handler
	nop
	reti		; USART_RXC USART, RX Complete Handler
	nop
	reti		; USART_UDRE USART, UDR Empty Handler
	nop
	reti		; USART_TXC USART, TX Complete Handler
	nop
	reti		; ADC ADC Conversion Complete Handler
	nop
	reti		; EE_RDY EEPROM Ready Handler
	nop
	reti		; ANA_COMP Analog Comparator Handler
	nop
	reti		; TWI 2-wire Serial Interface Handler
	nop
	reti		; SPM_RDY Store Program Memory Ready Handler
;........................................................................
main:	ldi	r16,hi8(RAMEND)	; Main program start
	out	SPH,r16	; Set Stack Pointer to top of RAM m48
	ldi	r16,lo8(RAMEND)
	out	SPL,r16
	;.................
	ldi	r16,0xFF
	out	DDRB,r16
;------------------------------------------------------------------------
mainloop:	wdr
	ldi	r16,0xFF
	out	PORTB,r16
	rjmp	mainloop
;------------------------------------------------------------------------

