Typically, you figure out how many time cycles you need to write, and then write a cycle. Consult your spreadsheet to determine how many cycles your cycle takes and calculate how many iterations you need.
ldi r16, x ; 1 cycle
loop: nop ; 1 cycle
dec r16 ; 1 cycle
brne loop1 ; 2 cycles when jumping, 1 otherwise
Depending on the value x, this cycle will take cycles x * 4. With a 16 megahertz board 1 ms, 16,000 cycles, so 5 ms will be 80,000 cycles. What is larger than this 8-bit loop can be controlled, so we need to make a 16-bit counter.
ldi r16, x ; 1 cycle
ldi r17, y ; 1 cycle
loop: nop ; 1 cycle
dec r16 ; 1 cycle
brne skip ; 2 cycles when jumping, 1 otherwise
dec r17 ; 1 cycle
skip: brne loop ; 2 cycles when jumping, 1 otherwise
, 6 . , 6 , , r16 . 2 , brne 1 , 1 . , 79999 , 13333 . , x=low(13333)=21 y=high(13333)=52 nop.
, , . , . , .