7

I have to debug a C application in assembler. I want to know if a register is containing a NULL . I need for that the hex value of that.

Note:

I use a PPC

user1829804
  • 127
  • 1
  • 1
  • 9

1 Answers1

8

Null is 00 in hexadecimal.

Kindly refer to this: http://www.asciitable.com/

Blake Neal
  • 325
  • 4
  • 13
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
  • 1
    Don't you mean 00h? ;-) ;-) – Brian Knoblauch Nov 28 '12 at 12:49
  • 1
    No, he meant 0x00 ;-) – Blake Neal Sep 11 '19 at 19:56
  • 1
    @Blake: http://www.asciitable.com/ or the OP's original link have nothing to do with this; the question is about NULL, not NUL. But yes, I think all PowerPC compilers use `0` as the object-representation for NULL pointers. The C standard doesn't require that, though, and apparently there is/was at least one real-world C implementation that used a non-zero bit-pattern for `(void*)0` aka `NULL`. – Peter Cordes Sep 17 '19 at 05:54