#pragma GCC optimize "-Og"
#include "ArduinoTrace.h"
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
PORTD=PORTD|(1<<PD4); //board pin 4 pull-up resistor
DDRB=DDRB|(1<<PB0); //led pin output
}
void loop() {
// put your main code here, to run repeatedly:
asm volatile(
"sbis %0,4 \n"
"rjmp L10 \n"
"rjmp L20 \n"
"L10:"
"sbi %1, 0\n"
"rjmp L30\n"
"L20:"
"cbi %1, 0\n"
"L30:"
:
:"I" (_SFR_IO_ADDR(PIND)), "I" (_SFR_IO_ADDR(PORTB))
);
delay(100);
}