Say you have this code: long int temp; int shift; shift = 16; temp = 0x00000001 << shift; The value stored in temp is 0x00000000, instead of 0x00010000. Here's the disassembly: int main() 26: { 0AAA6 FA0006 lnk #0x6 27: long int temp; 28: int shift; 29: 30: shift = 16; 0AAA8 200100 mov.w #0x10,0x0000 0AAAA 780F00 mov.w 0x0000,[0x001c] 31: 32: temp = 0x00000001 << shift; 0AAAC 200011 mov.w #0x1,0x0002 0AAAE 78001E mov.w [0x001c],0x0000 0AAB0 DD0800 sl 0x0002,0x0000,0x0000 0AAB2 DE80CF asr 0x0000,#15,0x0002 0AAB4 980710 mov.w 0x0000,[0x001c+2] 0AAB6 980721 mov.w 0x0002,[0x001c+4] Even more bizarre is a situation when shift = 15; temp = 0x00001111; After the shift, temp is 0xFFFF8000 (this works with any number, 0x00009876 would produce the same result) If we make shift = 14, we get: 0x00004000. Is this a known bug in C30? Finally, a stupid question: how do you display C30 version? Vitaliy -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist