void minx_cpu_device::execute_run() { // UINT32 oldpc; UINT8 op; do { m_curpc = GET_MINX_PC; debugger_instruction_hook(this, m_curpc); // oldpc = GET_MINX_PC; if ( m_interrupt_pending ) { m_halted = 0; if ( ! ( m_F & 0xc0 ) && m_U == m_V ) { //logerror("minx_execute(): taking IRQ\n"); PUSH8( m_V ); PUSH16( m_PC ); PUSH8( m_F ); /* Set Interrupt Branch flag */ m_F |= 0x80; m_V = 0; m_PC = rd16( standard_irq_callback( 0 ) << 1 ); m_icount -= 28; /* This cycle count is a guess */ } } if ( m_halted ) { m_icount -= insnminx_cycles_CE[0xAE]; } else { op = rdop(); (this->*insnminx[op])(); m_icount -= insnminx_cycles[op]; } } while ( m_icount > 0 ); }
static CPU_EXECUTE( minx ) { // UINT32 oldpc; UINT8 op; minx_state *minx = get_safe_token(device); do { debugger_instruction_hook(device, GET_MINX_PC); // oldpc = GET_MINX_PC; if ( minx->interrupt_pending ) { minx->halted = 0; if ( ! ( minx->F & 0xc0 ) && minx->U == minx->V ) { //logerror("minx_execute(): taking IRQ\n"); PUSH8( minx, minx->V ); PUSH16( minx, minx->PC ); PUSH8( minx, minx->F ); /* Set Interrupt Branch flag */ minx->F |= 0x80; minx->V = 0; minx->PC = rd16( minx, minx->irq_callback( minx->device, 0 ) << 1 ); minx->icount -= 28; /* This cycle count is a guess */ } } if ( minx->halted ) { minx->icount -= insnminx_cycles_CE[0xAE]; } else { op = rdop(minx); insnminx[op](minx); minx->icount -= insnminx_cycles[op]; } } while ( minx->icount > 0 ); }
/* execute instructions on this CPU until icount expires */ void m6805_base_device::execute_run() { S = SP_ADJUST( S ); /* Taken from CPU_SET_CONTEXT when pointer'afying */ do { if (m_pending_interrupts != 0) { interrupt(); } debugger_instruction_hook(this, PC); u8 const ireg = rdop(PC++); (this->*m_params.m_ops[ireg])(); m_icount -= m_params.m_cycles[ireg]; burn_cycles(m_params.m_cycles[ireg]); } while (m_icount > 0); }
UINT16 minx_cpu_device::rdop16() { UINT16 op = rdop(); op = op | ( rdop() << 8 ); return op; }
uint16_t minx_cpu_device::rdop16() { uint16_t op = rdop(); op = op | ( rdop() << 8 ); return op; }
INLINE UINT16 rdop16( minx_state *minx ) { UINT16 op = rdop(minx); op = op | ( rdop(minx) << 8 ); return op; }