Ejemplo n.º 1
0
Archivo: nec.cpp Proyecto: RalfVB/mame
void nec_common_device::nec_interrupt(unsigned int_num, int/*INTSOURCES*/ source)
{
	UINT32 dest_seg, dest_off;

	i_pushf();
	m_TF = m_IF = 0;

	if (source == INT_IRQ)  /* get vector */
		int_num = (standard_irq_callback)(0);

	dest_off = read_mem_word(int_num*4);
	dest_seg = read_mem_word(int_num*4+2);

	PUSH(Sreg(PS));
	PUSH(m_ip);
	m_ip = (WORD)dest_off;
	Sreg(PS) = (WORD)dest_seg;
	CHANGE_PC;
}
Ejemplo n.º 2
0
static void nec_interrupt(nec_state_t *nec_state, unsigned int_num, INTSOURCES source)
{
    UINT32 dest_seg, dest_off;

    i_pushf(nec_state);
	nec_state->TF = nec_state->IF = 0;

	if (source == INT_IRQ)	/* get vector */
		int_num = (*nec_state->irq_callback)(nec_state->device, 0);

    dest_off = read_mem_word(int_num*4);
    dest_seg = read_mem_word(int_num*4+2);

	PUSH(Sreg(PS));
	PUSH(nec_state->ip);
	nec_state->ip = (WORD)dest_off;
	Sreg(PS) = (WORD)dest_seg;
	CHANGE_PC;
}