public void tfr()
    {
    	/*UINT8*/int tb;
    	/*UINT16*/ int t;
    
    	tb=IMMBYTE();
    	if(( (tb^(tb>>4)) & 0x08 )!=0)	/* HJB 990225: mixed 8/16 bit case? */
    	{
    		/* transfer $ff to register */
    		t = 0xff;
        }
    	else
    	{
    		switch(tb>>4) {
    			case  0: t = getDreg();  break;
    			case  1: t = m6809.x;  break;
    			case  2: t = m6809.y;  break;
    			case  3: t = m6809.u;  break;
    			case  4: t = m6809.s;  break;
    			case  5: t = m6809.pc; break;
    			case  8: t = m6809.a;  break;
    			case  9: t = m6809.b;  break;
    			case 10: t = m6809.cc; break;
    			case 11: t = m6809.dp; break;
    			default: t = 0xff;
            }
    	}
    	switch(tb&15) {
    		case  0: setDreg(t);   break;
    		case  1: m6809.x = t;  break;
    		case  2: m6809.y = t;  break;
    		case  3: m6809.u = t;  break;
    		case  4: m6809.s = t;  break;
    		case  5: m6809.pc = t; CHANGE_PC(); break;
    		case  8: m6809.a = t;  break;
    		case  9: m6809.b = t;  break;
    		case 10: m6809.cc = t; break;
    		case 11: m6809.dp = t; break;
        }
        if(m6809log!=null) fprintf(m6809log,"M6809#%d tfr :PC:%d,PPC:%d,A:%d,B:%d,D:%d,DP:%d,U:%d,S:%d,X:%d,Y:%d,CC:%d,EA:%d\n", cpu_getactivecpu(),m6809.pc,m6809.ppc,m6809.a,m6809.b,getDreg(),m6809.dp,m6809.u,m6809.s,m6809.x,m6809.y,m6809.cc,ea);
 
    }