One example where a do{ ... }while(); loop was useful for me was when I needed to create a random string which wasn't already present in a database.
So,
do {
//generate string
//query database looking for that string
} while(string_was_found_in_db);
basically this loop will never run more than once, but I needed to make sure a unique string was generated.
However, do-while and while loop translated in asm (correct me if I'm wrong):
do-while
Code:
startloop:
;
; loop body
;
CMP x,x
JNZ startloop
while
Code:
startloop:
CMP x,x
JGE endloop
;
; loop body
;
JMP startloop
endloop: