I'm trying to set a value in a register to null to later on test if some other value is null. I've looked around the internet to check what the representation of null is in IA32, however could not find anything properly.
Can anybody help?
On IA-32, the general registers are simply bits that are mostly interpreted as integer values. They do not have additional states such as “null” in the sense of “not currently holding a value”. (Some architectures do have such additional states, and the floating-point registers in IA-32 can have such a state.)
If you want to set an IA-32 general register to a “no value” state, there is no way to do this.
If you want to set a register to a “null pointer” state, the same as the C NULL macro, then this is represented as zero in most C implementations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With