
...
...
union merge {tChar hilo[4]; tLong regval;} t1val; 
...
...
   while(1)
   {
    ...
    ...	 
       {
	 tmpResult = ovrfloCnt * 65536 ;  // Get the total period of overflows
		
	t1val.hilo[3] = TL1;              // (LSB) merge TL1 and TH1 into a long int... 
	t1val.hilo[2] = TH1; 	          //     ... to get the residual count
	t1val.hilo[1] = 0;
	t1val.hilo[0] = 0;	          // (MSB)	
		
	t1val.regval = t1val.regval + tmpResult;	
	tmpResult = 2000000 / t1val.regval; // Transfer function to get RPM
    ...
    ...
