[w: TMP982] = (([w: GD63992] / 10) << 4) + ([w: GD63992] % 10);  //Day BIN -> BCD 
[w: TMP983] = (([w: GD63993] / 10) << 4) + ([w: GD63993] % 10);  //Hour BIN -> BCD 
[w: TMP984] = (([w: GD63994] / 10) << 4) + ([w: GD63994] % 10);  //Minute BIN -> BCD 
[w: TMP985] = (([w: GD63995] / 10) << 4) + ([w: GD63995] % 10);  //Second BIN -> BCD 
 
 
//Minute & Second Setting 
 
[w: GS515] = ([w: TMP984] << 8) + [w: TMP985];  //Set Minute & Second to Change Time Device 
//Set the Day of Week 
 
[w: TMP986] = [w: GD63990]; //Year (BIN) 
[w: TMP987] = [w: GD63991]; //Month (BIN) 
[w: TMP988] = [w: GD63992]; //Day (BIN) 
 
if(([w: TMP987] == 1) || ([w: TMP987] == 2)){//Perform the correction processing for having January and 
February as 13th and 14th months of previous year 
  [w: TMP986] =[w: TMP986] - 1; //Subtract 1 from Year 
  [w: TMP987] =[w: TMP987] + 12;//Add 12 to Month 
} 
 
[w: TMP989] = [w: TMP986]/4;//Create items required for Zeller's congruence 
[w: TMP990] = [w: TMP986]/100;//Create items required for Zeller's congruence 
[w: TMP991] = [w: TMP986]/400;//Create items required for Zeller's congruence 
[w: TMP992] = (13*[w: TMP987]+8)/5;//Create items required for Zeller's congruence 
 
//Calculate the Day of Week with Zeller's congruence and set it in the change time device 
[w: GS516] = ([w: TMP986]+[w: TMP989]-[w: TMP990]+[w: TMP991]+[w: TMP992]+[w: TMP988])%7;