byte src; // just an unsigned 8-bit number
src = (ACC >> 1); // store the rotation temporary
if(C_FLAG) src |= 0x80; // if C was set, then set the #7 bit of the rotation's result
C_FLAG = ACC & 0x1;
Z_FLAG = !(src);
N_FLAG = !!(src & 0x80);
in that case, flags are setted/reseted relying on the accumulator's (or whatever the source is) final value? or is it correct to change the flags BEFORE the original data gets overwriten?
Yes, you need the ACC=src line. With that line, it looks correct. The N and Z flags are always based on the final value (for any instruction that affects them), not the original value. For other addressing modes, you would read and write to the appropriate memory location rather than the accumulator, of course.