With what compiler and OS configuration? If it's 64-bit, then it won't be right, since push ECX will actually push a sign-extended 64-bit version of ECX.
--
Mats
Printable View
Ah. Mac OS X (Tiger) 10.4.11 with Intel Dual Core Xeon processors.
Hmmm. But doesn't it just usually work to move a number directly into a register without 0-ing? I don't know if I've tried...
Aha!Quote:
jae - Jump Above or Equal. It's the same as JGE but for unsigned numbers.
But then again, I've never encountered JGE before...
Another register is what I was thinking ;)Quote:
And I can't continue to use ECX after the call, since it's one of the registers that can be used in the callee without preservation, so it would require another load before inc can be used on it. Of course, I could have picked another register...
And I never knew inc could work with other things than registers... that's cool.
Thanks for the information. One step closer to an assembly expert :D