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

Not much experienced with x86 asm, but you don't seem to be incrementing esi anywhere...

What am I missing?



stosb = store sequential byte increments the destination pointer, just like lodsb increments the source pointer.


Ah, thanks.

Also, eww. It decrements or increments dependent upon a flag. Not nice.


x86 assembly is full of old cruft, that 'cld' there is a thing that if you've ever forgotten it probably cost you a lot of time.

99% of the time the flag is clear... unless it isn't.

So for a seasoned assembly programmer that cld is idiomatic, axod probably typed the instruction reflexively because he knows he can't rely on the state of the direction flag, even if it has nothing to do with the problem per-se.




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

Search: