Remix.run Logo
rasz 7 months ago

>STRCPY opcode.

whats wrong with rep movsb?

saagarjha 7 months ago | parent [-]

You'd need to run strlen first.

cesarb 7 months ago | parent | next [-]

> 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?

saagarjha 7 months ago | parent | next [-]

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

muziq 7 months ago | parent | prev [-]

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

joezydeco 7 months ago | parent | prev | next [-]

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

rasz 7 months ago | parent | prev [-]

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

saagarjha 7 months ago | parent [-]

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