本文整理汇总了C++中RM16函数的典型用法代码示例。如果您正苦于以下问题:C++ RM16函数的具体用法?C++ RM16怎么用?C++ RM16使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RM16函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: m68705_Interrupt
/* Generate interrupt - m68705 version */
static void m68705_Interrupt(void)
{
if( (m6805.pending_interrupts & ((1<<M6805_IRQ_LINE)|M68705_INT_MASK)) != 0 )
{
if ( (CC & IFLAG) == 0 )
{
PUSHWORD(m6805.pc);
PUSHBYTE(m6805.x);
PUSHBYTE(m6805.a);
PUSHBYTE(m6805.cc);
SEI;
if (m6805.irq_callback)
(*m6805.irq_callback)(0);
if ((m6805.pending_interrupts & (1<<M68705_IRQ_LINE)) != 0 )
{
m6805.pending_interrupts &= ~(1<<M68705_IRQ_LINE);
RM16( 0xfffa, &pPC);
change_pc(PC);
}
else if((m6805.pending_interrupts&(1<<M68705_INT_TIMER))!=0)
{
m6805.pending_interrupts &= ~(1<<M68705_INT_TIMER);
RM16( 0xfff8, &pPC);
change_pc(PC);
}
}
m6805_ICount -= 11;
}
}
示例2: m68705_Interrupt
/* Generate interrupt - m68705 version */
static void m68705_Interrupt( m6805_Regs *cpustate )
{
if( (cpustate->pending_interrupts & ((1<<M6805_IRQ_LINE)|M68705_INT_MASK)) != 0 )
{
if ( (CC & IFLAG) == 0 )
{
PUSHWORD(cpustate->pc);
PUSHBYTE(cpustate->x);
PUSHBYTE(cpustate->a);
PUSHBYTE(cpustate->cc);
SEI;
if (cpustate->irq_callback)
(*cpustate->irq_callback)(cpustate->device, 0);
if ((cpustate->pending_interrupts & (1<<M68705_IRQ_LINE)) != 0 )
{
cpustate->pending_interrupts &= ~(1<<M68705_IRQ_LINE);
RM16( cpustate, 0xfffa, &pPC);
}
else if((cpustate->pending_interrupts&(1<<M68705_INT_TIMER))!=0)
{
cpustate->pending_interrupts &= ~(1<<M68705_INT_TIMER);
RM16( cpustate, 0xfff8, &pPC);
}
}
cpustate->iCount -= 11;
}
}
示例3: PUSHWORD
/* Generate interrupt - m68705 version */
void m68705_device::interrupt()
{
if ((m_pending_interrupts & ((1 << M6805_IRQ_LINE) | M68705_INT_MASK)) != 0 )
{
if ((CC & IFLAG) == 0)
{
PUSHWORD(m_pc);
PUSHBYTE(m_x);
PUSHBYTE(m_a);
PUSHBYTE(m_cc);
SEI;
standard_irq_callback(0);
if ((m_pending_interrupts & (1 << M68705_IRQ_LINE)) != 0 )
{
m_pending_interrupts &= ~(1 << M68705_IRQ_LINE);
RM16(0xfffa, &m_pc);
}
else if ((m_pending_interrupts & (1 << M68705_INT_TIMER)) != 0)
{
m_pending_interrupts &= ~(1 << M68705_INT_TIMER);
RM16(0xfff8, &m_pc);
}
}
m_icount -= 11;
}
}
示例4: check_irq_lines
static void check_irq_lines(m68_state_t *m68_state)
{
if( m68_state->irq_state[M6809_IRQ_LINE] != CLEAR_LINE ||
m68_state->irq_state[M6809_FIRQ_LINE] != CLEAR_LINE )
m68_state->int_state &= ~M6809_SYNC; /* clear SYNC flag */
if( m68_state->irq_state[M6809_FIRQ_LINE]!=CLEAR_LINE && !(CC & CC_IF) )
{
/* fast IRQ */
/* HJB 990225: state already saved by CWAI? */
if( m68_state->int_state & M6809_CWAI )
{
m68_state->int_state &= ~M6809_CWAI; /* clear CWAI */
m68_state->extra_cycles += 7; /* subtract +7 cycles */
}
else
{
CC &= ~CC_E; /* save 'short' state */
PUSHWORD(pPC);
PUSHBYTE(CC);
m68_state->extra_cycles += 10; /* subtract +10 cycles */
}
CC |= CC_IF | CC_II; /* inhibit FIRQ and IRQ */
PCD=RM16(m68_state, 0xfff6);
(void)(*m68_state->irq_callback)(m68_state->device, M6809_FIRQ_LINE);
}
else
if( m68_state->irq_state[M6809_IRQ_LINE]!=CLEAR_LINE && !(CC & CC_II) )
{
/* standard IRQ */
/* HJB 990225: state already saved by CWAI? */
if( m68_state->int_state & M6809_CWAI )
{
m68_state->int_state &= ~M6809_CWAI; /* clear CWAI flag */
m68_state->extra_cycles += 7; /* subtract +7 cycles */
}
else
{
CC |= CC_E; /* save entire state */
PUSHWORD(pPC);
PUSHWORD(pU);
PUSHWORD(pY);
PUSHWORD(pX);
PUSHBYTE(DP);
PUSHBYTE(B);
PUSHBYTE(A);
PUSHBYTE(CC);
m68_state->extra_cycles += 19; /* subtract +19 cycles */
}
CC |= CC_II; /* inhibit IRQ */
PCD=RM16(m68_state, 0xfff8);
(void)(*m68_state->irq_callback)(m68_state->device, M6809_IRQ_LINE);
}
}
示例5: m68705Reset
void m68705Reset()
{
m6805_reset();
/* Overide default 6805 type */
m6805.subtype = SUBTYPE_M68705;
RM16( 0xfffe, &m6805.pc );
}
示例6: trap_23
static void trap_23( void )
{
PUSHWORD( PC );
pPC = RM16(0xffd0);
CHANGE_PC;
tms7000_icount -= 14;
}
示例7: CPU_RESET
static CPU_RESET( m6805 )
{
m6805_Regs *cpustate = get_safe_token(device);
device_irq_callback save_irqcallback = cpustate->irq_callback;
memset(cpustate, 0, sizeof(m6805_Regs));
cpustate->iCount=50000; /* Used to be global */
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
/* Force CPU sub-type and relevant masks */
cpustate->subtype = SUBTYPE_M6805;
SP_MASK = 0x07f;
SP_LOW = 0x060;
/* Initial stack pointer */
S = SP_MASK;
/* IRQ disabled */
SEI;
RM16( cpustate, 0xfffe, &pPC );
}
示例8: RM16
void m68hc05eg_device::interrupt_vector()
{
if ((m_pending_interrupts & (1 << M68HC05EG_INT_IRQ)) != 0)
{
m_pending_interrupts &= ~(1 << M68HC05EG_INT_IRQ);
RM16(0x1ffa, &m_pc);
}
else if((m_pending_interrupts & (1 << M68HC05EG_INT_TIMER)) != 0)
{
m_pending_interrupts &= ~(1 << M68HC05EG_INT_TIMER);
RM16(0x1ff8, &m_pc);
}
else if((m_pending_interrupts & (1 << M68HC05EG_INT_CPI)) != 0)
{
m_pending_interrupts &= ~(1 << M68HC05EG_INT_CPI);
RM16(0x1ff6, &m_pc);
}
}
示例9: DERIVED_OP_HANDLER
DERIVED_OP_HANDLER( hd63705, swi )
{
PUSHWORD(m_pc);
PUSHBYTE(m_x);
PUSHBYTE(m_a);
PUSHBYTE(m_cc);
SEI;
RM16(0x1ffa, &m_pc);
}
示例10: swi
/* $3f SWI absolute indirect ----- */
INLINE void swi( void )
{
PUSHWORD(pPC);
PUSHWORD(pX);
PUSHBYTE(A);
PUSHBYTE(B);
PUSHBYTE(CC);
SEI;
PCD = RM16(0xfffa);
CHANGE_PC();
}
示例11: hd63705Reset
void hd63705Reset(void)
{
m6805_reset();
/* Overide default 6805 types */
m6805.subtype = SUBTYPE_HD63705;
SP_MASK = 0x17f;
SP_LOW = 0x100;
RM16( 0x1ffe, &m6805.pc );
S = 0x17f;
}
示例12: RM16
void tlcs870_device::do_POP_gg(const uint8_t opbyte0, const uint8_t opbyte1)
{
/*
OP (opbyte0) (immval0) (opbyte1) (immval1) (immval2) JF ZF CF HF cycles
POP gg 1110 10gg 0000 0110 - - - - 5
*/
m_cycles = 5;
m_sp.d += 2;
const uint16_t val = RM16(m_sp.d - 1);
set_reg16(opbyte0 & 3, val);
// no flag changes
}
示例13: set_irq_line
/****************************************************************************
* Set IRQ line state
****************************************************************************/
static void set_irq_line(int irqline, int state)
{
if (irqline == INPUT_LINE_NMI)
{
if (hd6309.nmi_state == state) return;
hd6309.nmi_state = state;
LOG(("HD6309#%d set_irq_line (NMI) %d (PC=%4.4X)\n", cpu_getactivecpu(), state, pPC));
if( state == CLEAR_LINE ) return;
/* if the stack was not yet initialized */
if( !(hd6309.int_state & HD6309_LDS) ) return;
hd6309.int_state &= ~HD6309_SYNC;
/* HJB 990225: state already saved by CWAI? */
if( hd6309.int_state & HD6309_CWAI )
{
hd6309.int_state &= ~HD6309_CWAI;
hd6309.extra_cycles += 7; /* subtract +7 cycles next time */
}
else
{
CC |= CC_E; /* save entire state */
PUSHWORD(pPC);
PUSHWORD(pU);
PUSHWORD(pY);
PUSHWORD(pX);
PUSHBYTE(DP);
if ( MD & MD_EM )
{
PUSHBYTE(F);
PUSHBYTE(E);
hd6309.extra_cycles += 2; /* subtract +2 cycles */
}
PUSHBYTE(B);
PUSHBYTE(A);
PUSHBYTE(CC);
hd6309.extra_cycles += 19; /* subtract +19 cycles next time */
}
CC |= CC_IF | CC_II; /* inhibit FIRQ and IRQ */
PCD = RM16(0xfffc);
CHANGE_PC;
}
else if (irqline < 2)
{
LOG(("HD6309#%d set_irq_line %d, %d (PC=%4.4X)\n", cpu_getactivecpu(), irqline, state, pPC));
hd6309.irq_state[irqline] = state;
if (state == CLEAR_LINE) return;
CHECK_IRQ_LINES();
}
}
示例14: m6805_reset
static void m6805_reset(void *param)
{
memset(&m6805, 0, sizeof(m6805));
/* Force CPU sub-type and relevant masks */
m6805.subtype = SUBTYPE_M6805;
SP_MASK = 0x07f;
SP_LOW = 0x060;
/* Initial stack pointer */
S = SP_MASK;
/* IRQ disabled */
SEI;
RM16( 0xfffe , &pPC );
change_pc(PC);
}
示例15: konami_reset
static void konami_reset(void)
{
konami.int_state = 0;
konami.nmi_state = CLEAR_LINE;
konami.irq_state[0] = CLEAR_LINE;
konami.irq_state[0] = CLEAR_LINE;
DPD = 0; /* Reset direct page register */
CC |= CC_II; /* IRQ disabled */
CC |= CC_IF; /* FIRQ disabled */
PCD = RM16(0xfffe);
change_pc(PC); /* TS 971002 */
}