Hi all, compliments of the season I'm converting some C to dsPIC assembly and need a little help, as I know only a bit of C. How it's spelled for example In the first part of the example below, it appears to be a simple magnitude test. 'if diff is greater or equal to 0, byte =3D 0. If diff is less than 0 then set byte,3 and negate diff' *** if(diff >=3D 0) byte =3D 0; else { byte =3D 8; diff =3D - diff; } *** This bit here is where I think I'm stuck Without any explicit 'elses', does this code execute each 'if', with the parentheses being the 'elses' ? eg if 'if(diff >=3D tempstep)' is false= , then program flow jumps to tempstep >>=3D 1;shift #1 if(diff >=3D tempstep) { byte |=3D 4; diff -=3D tempstep; } tempstep >>=3D 1;shift #1 if(diff >=3D tempstep) { byte |=3D 2; diff -=3D tempstep; } tempstep >>=3D 1;shift #2 if(diff >=3D tempstep) byte |=3D 1; diffq =3D step >> 3; My interpretation - if diff >=3D tempstep then (set byte,3 ,diff =3D diff - tempstep, rshft=20 tempstep) else just rshft tempstep if diff >=3D tempstep then (set byte,2 ,diff =3D diff - tempstep, rshft=20 tempstep) else just rshft tempstep if diff >=3D tempstep then (set byte,1 ,diffq =3D step/8) else just diffq = =3D=20 step/8 Correct ? Joe=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .