Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

are you sure about that? http://docs.huihoo.com/help-pc/asm-repne.html http://faydoc.tripod.com/cpu/repnz.htm

repnz movsb is undocumented and undefined, MOVS doesnt modify flags, not sure how would that work



Whoops, looks like I've indeed mixed up my assembler.

While the rep/repe/repnz can be used in conjunction with movs(b/w) it will not terminate on the z flag in the eflags register (so it won't stop if *esi == 0) but rather when ecx = 0.

So ecx needs to contain the size of the string you want to move, and rep movsb does not use the zero flag.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: