Search code examples
cembeddedmicroprocessors

How can I create a data structure for a 64 bit integer in a 32 bit architecture?


I am trying to make data structure for a 64 bit integer in a 32 bit architecture.
Any idea to do this will be appreciate .

        struct make
        { 
            int a;// how to make  64 bit integer in a 32 bit  architecture.
         }

NOTE : I have a question, Will a C program compiled on a 32 bit Intel processor execute successfully on a 32 bit AMD processor?


Solution

  • Use a long long

    On the IA32 architecture, 64-bit integer (long long) are implemented in using two 32-bit registers (eax and edx).