8 {sign
} long global
= ({sign
} long)0x12345678;
12 ASSERT (((global
>> 0) & 0xFF) == 0x78); // getByte 0
13 ASSERT (((global
>> 8) & 0xFF) == 0x56); // getByte 1
14 ASSERT (((global
>> 16) & 0xFF) == 0x34); // getByte 2
15 ASSERT (((global
>> 24) & 0xFF) == 0x12); // getByte 3
16 #if !defined(__SDCC_pdk14) // Lack of memory - see RFE #617.
17 ASSERT (((global
>> 0) & 0xFFFF) == 0x5678); // getWord 0
18 ASSERT (((global
>> 8) & 0xFFFF) == 0x3456); // getWord 1
19 ASSERT (((global
>> 16) & 0xFFFF) == 0x1234); // getWord 2
21 ASSERT ((uint8_t)(global
>> 0) == (uint8_t)0x78); // getByte 0
22 ASSERT ((uint8_t)(global
>> 8) == (uint8_t)0x56); // getByte 1
23 ASSERT ((uint8_t)(global
>> 16) == (uint8_t)0x34); // getByte 2
24 ASSERT ((uint8_t)(global
>> 24) == (uint8_t)0x12); // getByte 3
26 ASSERT ((uint16_t)(global
>> 0) == (uint16_t)0x5678); // getWord 0
27 ASSERT ((uint16_t)(global
>> 8) == (uint16_t)0x3456); // getWord 1
28 ASSERT ((uint16_t)(global
>> 16) == (uint16_t)0x1234); // getWord 2