void m68705_device::interrupt() { if (m_pending_interrupts & M68705_INT_MASK) { if ((CC & IFLAG) == 0) { pushword(m_pc); pushbyte(m_x); pushbyte(m_a); pushbyte(m_cc); SEI; standard_irq_callback(0); if (BIT(m_pending_interrupts, M68705_IRQ_LINE)) { LOGINT("servicing /INT interrupt\n"); m_pending_interrupts &= ~(1 << M68705_IRQ_LINE); rm16(M68705_VECTOR_INT, m_pc); } else if (BIT(m_pending_interrupts, M68705_INT_TIMER)) { LOGINT("servicing timer/counter interrupt\n"); rm16(M68705_VECTOR_TIMER, m_pc); } else { throw emu_fatalerror("Unknown pending interrupt"); } m_icount -= 11; burn_cycles(11); } } }
void rpn_Number(struct Expression *expr, ULONG i) { rpn_Reset(expr); pushbyte(expr, RPN_CONST); pushbyte(expr, i); pushbyte(expr, i >> 8); pushbyte(expr, i >> 16); pushbyte(expr, i >> 24); expr->nVal = i; }
int rpn_RangeCheck(struct Expression *expr, struct Expression *src, SLONG low, SLONG high) { *expr = *src; if (rpn_isReloc(src)) { pushbyte(expr, RPN_RANGECHECK); pushbyte(expr, low); pushbyte(expr, low >> 8); pushbyte(expr, low >> 16); pushbyte(expr, low >> 24); pushbyte(expr, high); pushbyte(expr, high >> 8); pushbyte(expr, high >> 16); pushbyte(expr, high >> 24); return (1); } else { return (expr->nVal >= low && expr->nVal <= high);
void rpn_Bank(struct Expression *expr, char *tzSym) { if (!sym_isConstant(tzSym)) { struct sSymbol *psym; rpn_Reset(expr); psym = sym_FindSymbol(tzSym); if (nPass == 2 && psym == NULL) { sprintf(temptext, "'%s' not defined", tzSym); yyerror(temptext); } expr->isReloc = 1; pushbyte(expr, RPN_BANK); while (*tzSym) pushbyte(expr, *tzSym++); pushbyte(expr, 0); } else yyerror("BANK argument must be a relocatable identifier"); }
void rpn_Symbol(struct Expression *expr, char *tzSym) { if (!sym_isConstant(tzSym)) { struct sSymbol *psym; rpn_Reset(expr); psym = sym_FindSymbol(tzSym); if (psym == NULL || psym->pSection == pCurrentSection || psym->pSection == NULL) expr->isPCRel = 1; expr->isReloc = 1; pushbyte(expr, RPN_SYM); while (*tzSym) pushbyte(expr, *tzSym++); pushbyte(expr, 0); } else rpn_Number(expr, sym_GetConstantValue(tzSym)); }
/* Generate interrupts */ void m6805_base_device::interrupt() { /* the 6805 latches interrupt requests internally, so we don't clear */ /* pending_interrupts until the interrupt is taken, no matter what the */ /* external IRQ pin does. */ if (BIT(m_pending_interrupts, HD63705_INT_NMI)) { pushword(m_pc); pushbyte(m_x); pushbyte(m_a); pushbyte(m_cc); SEI; /* no vectors supported, just do the callback to clear irq_state if needed */ standard_irq_callback(0); rm16(0x1ffc, m_pc); m_pending_interrupts &= ~(1 << HD63705_INT_NMI); m_icount -= 11; burn_cycles(11); } else if ((m_pending_interrupts & ((1 << M6805_IRQ_LINE) | HD63705_INT_MASK)) != 0) { if ((CC & IFLAG) == 0) { /* standard IRQ */ pushword(m_pc); pushbyte(m_x); pushbyte(m_a); pushbyte(m_cc); SEI; /* no vectors supported, just do the callback to clear irq_state if needed */ standard_irq_callback(0); interrupt_vector(); m_pending_interrupts &= ~(1 << M6805_IRQ_LINE); m_icount -= 11; burn_cycles(11); } } }