Simple assembly code conversion to Java -
 I want to convert the following code to a Java code. I think this is the assembly code, but it is not sure. The part I really do not get is  y - = m   
This is a code, and I believe
< Pre> constant final integer [] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; Static int dow (int y, int m, int d) {if (m & lt; 3) {y--; } Return (y + y / 4 - y / 100 + y / 400 + t [m - 1] + d)% 7; }    is equivalent because  y - = m  y- = 1;  if  m  y- = 0;  Instead you can use a simple  if  in the end  t []  can not be static in a method in java. 
Comments
Post a Comment