Include 'M64DEF.INC'
ORG 0X0000
JMP main
ORG 0X0050
main:
LDI R16,0X0FF
OUT DDRA,R16
OUT PORTA,R16
LDI R16,0X00
OUT DDRB,R16
LDI R16, (1 << XDIVEN | (119)) 
OUT XDIV,R16
LDI R16,0X0E
OUT WDTCR,R16 

LOOP:
WDR
IN R20,PINB
LSR R20
BRCS ODD
SBI PORTA,1
CBI PORTA,0
JMP LOOP

ODD:
SBI PORTA,0
CBI PORTA,1
JMP LOOP