#include <8052.h>

/* using a union so the data can be accessed as bytes or as long word */
union
{
    unsigned long a;
    struct
    {
        // is this your endianness?
        unsigned char b0;
        unsigned char b1;
        unsigned char b2;
        unsigned char b3;
    } b;
} myvar;

volatile char e;


void main()
{
   myvar.b.b0 = P1;  /* just to have something */
   myvar.b.b1 = P2;  /* just to have something */
   myvar.b.b2 = P3;  /* just to have something */

   if (myvar.a > 0x0649C6) /* look at the assembler source and eventually remove the last compare */
      e++;
}