#if (F_CPU == 16000000)
void whackDelay(uint16_t delay) {
uint8_t tmp=0;

asm volatile("sbiw %0, 0x01 \n\t"
"ldi %1, 0xFF \n\t"
"cpi %A0, 0xFF \n\t"
"cpc %B0, %1 \n\t"
"brne .-10 \n\t"
: "+r" (delay), "+a" (tmp)
: "0" (delay)
);
}
#endif


sbiw %0, 0x01 - subtracts 1 from delay
ldi %1, 0xFF - loads -1 to temp
cpi %A0, 0xFF - compare low order byte of delay to -1
cpc %B0, %1 - compare high order byte of dela to temp, (with carry)
brne .-10 - repeat if not equal
: "+r" (delay), "+a" (temp) - this tells us the first param is delay and the second is temp
: "0" (delay) - this tells us that delay will not survive
from adafruit forum


Operator A ? B : C (of programing language C) stands for if A { B } else { C }
ledstat = (ledstat == LED_ON) ? LED_OFF : LED_ON;

#define LED_PIN 13
#define LED_ON HIGH
#define LED_OFF LOW
#define LED_DELAY_MSEC 1000
register unsigned char ledstat asm("r2");

void setup() {
/* initialize LED_PIN for output */
pinMode(LED_PIN, OUTPUT);
asm volatile("clr r2");
}

void loop() {
ledstat = (ledstat == LED_ON) ? LED_OFF : LED_ON;
digitalWrite(LED_PIN, ledstat);
delay(LED_DELAY_MSEC);
}
from lyz.jp


getchar:
ldi bit_count,9 ; 8 data bit + 1 stop bit
getchar1:
sbis PINA, rx_pin ; wait for start bit
rjmp getchar1
rcall bitdelay ; 0.5 bit delay
getchar2:
rcall bitdelay ; 1 bit delay
rcall bitdelay ;
clc ; clear carry
sbis PINA, rx_pin ; if RX pin high skip
sec ; otherwise set carry
dec bit_count
breq getchar3 ; return if all bits read
ror rxbyte ; otherwise shift bit into receive byte
rjmp getchar2 ; go get next bit
getchar3:
ret

.equ b = 13 ; 9600 baud (8 MHz clock /8)
bit_delay:
ldi temp, b
bitloop:
dec temp
brne bitloop
ret


from hello.serial.45.asm
din site-ul http://fab.cba.mit.edu/classes/MIT/863.08/09.29/index.html