Whoops, looks like I&#x27;ve indeed mixed up my assembler.<p>While the rep&#x2F;repe&#x2F;repnz can be used in conjunction with movs(b&#x2F;w) it will not terminate on the z flag in the eflags register (so it won&#x27;t stop if *esi == 0) but rather when ecx = 0.<p>So ecx needs to contain the size of the string you want to move, and rep movsb does not use the zero flag.