public void RETN()
     {												
    	if(errorlog!=null) fprintf(errorlog,"Z80#%d RETN IFF1:%d IFF2:%d\n", cpu_getactivecpu(), Z80.IFF1, Z80.IFF2);
        RET(true);                                                     
    	if( Z80.IFF1 == 0 && Z80.IFF2 == 1 )								
    	{															
    		Z80.IFF1 = 1;												
    		if( Z80.irq_state != CLEAR_LINE ||						
    			Z80.request_irq >= 0 )								
    		{														
    			if(errorlog!=null) fprintf(errorlog, "Z80#%d RETN takes IRQ\n",cpu_getactivecpu());							
    			take_interrupt();									
            }                                                       
    	}															
    	else Z80.IFF1 = Z80.IFF2; 										
    }
    
    /*TODO*////***************************************************************
    /*TODO*/// * RETI
    /*TODO*/// ***************************************************************/
    /*TODO*///#define RETI	{												\
    /*TODO*///	int device = Z80.service_irq;								\
    /*TODO*///    RET(1);                                                     \
    /*TODO*////* according to http://www.msxnet.org/tech/Z80/z80undoc.txt */	\
    /*TODO*////*	_IFF1 = _IFF2;	*/											\
    /*TODO*///	if( device >= 0 )											\
    /*TODO*///	{															\
    /*TODO*///		LOG((errorlog,"Z80#%d RETI device %d: $%02x\n",         \
    /*TODO*///			cpu_getactivecpu(), device, Z80.irq[device].irq_param)); \
    /*TODO*///		Z80.irq[device].interrupt_reti(Z80.irq[device].irq_param); \
    /*TODO*///	}															\
    /*TODO*///}
    /*TODO*///
    /*TODO*////***************************************************************
    /*TODO*/// * LD	R,A
    /*TODO*/// ***************************************************************/
    /*TODO*///#define LD_R_A {												\
    /*TODO*///	_R = _A;													\
    /*TODO*///	_R2 = _A & 0x80;				/* keep bit 7 of R */		\
    /*TODO*///}