
.include "m128def.inc"

; Interrupt service vectors

.org $0000
	rjmp Reset						; Reset vector
					; INT2 vector (ext. interrupt from pin D2)


	
;-----------------------------------------------------------------
; Register defines for main loop
;-----------------------------------------------------------------


.def		mpr		=r16			; defines multipurpose register


;-----------------------------------------------------------------
; Reset vector
;-----------------------------------------------------------------

Reset:

;-----Set Port Directions-----------------------------------------
	ser		mpr						; Set TEMP to $FF to...
	out		DDRd,mpr				; ...set data direction to "out"


;	ldi		mpr,$FF
;	out 	PORTD,mpr



;	ldi		mpr,(1<<PD0)|(1<<PD2)
;	out		PORTD,mpr
;	nop

;	IN		mpr,PINb
;	ori		mpr,(1<<PD6)|(0<<PD4)
;	out 	PORTD,mpr

	Sbi		PORTD,0
	SBI		PORTD,1
;	SBI		PORTD,6



mainloop:

	rjmp	mainloop
