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

>STRCPY opcode.

whats wrong with rep movsb?



You'd need to run strlen first.


> You'd need to run strlen first.

I might be a bit rusty in my x86 assembly, but wouldn't "repnz movsb" be the x86 strcpy opcode, for zero-terminated strings?


Not a thing unfortunately; you can only use the rep prefix with movable.


movsb doesn’t set any flags, so no, it isn’t..


Real men just blast through memory until hitting a zero. If it's there at all.


If you care at least a little about buffer overflows You will run one anyway.


If you want a strlen+memcpy you are more than welcome to call it yourself




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

Search: