Ok so I make my masks
short m1, m2, m3, m4;
m1 = 0xF000;
m2 = 0x0F00;
m2 = 0x00F0;
m3 = 0x000F;
and then I test my masks
printf("%hd %hd %hd %hd\n", m1, m2, m3, m4);
when I test it the values come out as
-4096 240 15 0
which is equal to
0xF000
0x00F0
0x000F
0x0000
which is messing up my checksum program when I try to apply the masks. :-\
Any advice?