News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

push 0 appearing in between a function call ?

Started by gelatine1, June 20, 2014, 05:21:26 AM

Previous topic - Next topic

MichaelW

Quote from: nidud on June 22, 2014, 09:12:05 PM
I think the macro works but the result is probably overwritten.

Yes, and the only reasonable fix I can see ATM is to add a register parameter, so a unique register can be specified for each invocation.

QuoteMaybe Will was right, that they actually are 32-bit...

In 32-bit code when you push a segment register the processor zero-extends the value to 32 bits and pushes that, see the Intel documentation. I can't see any good reason for Intel not doing the same for the other 16-bit registers, but with sign-extension instead of zero-extension.

Well Microsoft, here's another nice mess you've gotten us into.