Пример #1
0
alwaysinline void SMP::op_ret() {
  rd  = op_readstack() << 0;
  rd |= op_readstack() << 8;
  op_io();
  op_io();
  regs.pc = rd;
}
Пример #2
0
void R65816::op_rts() {
  op_io();
  op_io();
  rd.l = op_readstack();
  rd.h = op_readstack();
L op_io();
  regs.pc.w = ++rd.w;
}
Пример #3
0
void R65816::op_rti_e() {
  op_io();
  op_io();
  regs.p = op_readstack() | 0x30;
  rd.l = op_readstack();
L rd.h = op_readstack();
  regs.pc.w = rd.w;
}
Пример #4
0
template<int n> void R65816::op_pull_w() {
  op_io();
  op_io();
  regs.r[n].l = op_readstack();
L regs.r[n].h = op_readstack();
  regs.p.n = (regs.r[n].w & 0x8000);
  regs.p.z = (regs.r[n].w == 0);
}
Пример #5
0
void CPUcore::op_rts() {
  op_io();
  op_io();
  rd.l = op_readstack();
  rd.h = op_readstack();
L op_io();
  regs.pc.w = ++rd.w;
}
Пример #6
0
void R65816::op_rti_n() {
  op_io();
  op_io();
  regs.p = op_readstack();
  if(regs.p.x) {
    regs.x.h = 0x00;
    regs.y.h = 0x00;
  }
  rd.l = op_readstack();
  rd.h = op_readstack();
L rd.b = op_readstack();
  regs.pc.d = rd.d & 0xffffff;
  update_table();
}
Пример #7
0
void R65816::op_plb() {
  op_io();
  op_io();
L regs.db = op_readstack();
  regs.p.n = (regs.db & 0x80);
  regs.p.z = (regs.db == 0);
}
Пример #8
0
void CPUcore::op_rti() {
  op_io();
  op_io();
  regs.p = op_readstack() | (regs.e ? 0x30 : 0);
  if(regs.p.x) {
    regs.x.h = 0x00;
    regs.y.h = 0x00;
  }
  regs.pc.l = op_readstack();
  if(regs.e) {
L   regs.pc.h = op_readstack();
  } else {
    regs.pc.h = op_readstack();
L   regs.pc.b = op_readstack();
  }
  update_table();
}
Пример #9
0
void R65816::op_plp_n() {
  op_io();
  op_io();
L regs.p = op_readstack();
  if(regs.p.x) {
    regs.x.h = 0x00;
    regs.y.h = 0x00;
  }
  update_table();
}