I use nasm. Say I want to have a loop and each loop add something to a buffer, here is the buffer:
buf: times 0ffh db 0
Here is the loop the loop:
xor al, al
mov edi, buf
theloop:
cmp al, 0ffh
je done
inc al ; add 1 to al
stosb ; put al into edi
jmp theloop
done:
ret
Between stosb and jmp theloop do I need to increment edi or not?