Hello Forum, I want to compose two int variables, which contains the LSW and MSW, respective, into one unsigned long variable. The following code does the right thing:
int lo, hi; unsigned long longvar; longvar = (unsigned long) (unsigned int) hi << 16 | (unsigned long) (unsigned int) lo;
longvar.msw = hi; longvar.lsw = lo;