So, the AND part makes the macro more robust. By the way, -out of curiosity- do you know cases (arch/os/compiler) where the code without the '& 0xffff' would not work?
Furthermore, how should I...
Type: Posts; User: kalevi
So, the AND part makes the macro more robust. By the way, -out of curiosity- do you know cases (arch/os/compiler) where the code without the '& 0xffff' would not work?
Furthermore, how should I...
Its good to know I don't miss anything there. Thanks for the help!
As I understand right shift does sign extension, thus signed negative numbers leave 1s, signed positive and unsigned numbers leave 0s in the upper bits.
Some test code:
#include <stdio.h>
...
I have seen the HIWORD and LOWORD in some winapi header file. As their name suggests they select the higher or lower WORD (16bit) from a DWORD(32bit). Whats the function of the '& 0xFFFF' in the...
Jasmin and Ketman are not the stuff you asked for - they can't
do protected mode stuff - but they are related and someone might find
them useful.
Jasmin
http://www.lrr.in.tum.de/~jasmin/
...