Beispiel #1
0
static void subx_l(struct cpu *cpu, WORD op)
{
  LONG s,d,r;

  int rx,ry;

  rx = (op&0xe00)>>9;
  ry = op&0x7;

  if(op&0x8) {
    cpu->a[ry] -= 4;
    s = bus_read_long(cpu->a[ry]);
    cpu->a[rx] -= 4;
    d = bus_read_long(cpu->a[rx]);
    r = d-s;
    if(CHKX) r -= 1;
    bus_write_long(cpu->a[rx], r);
    ADD_CYCLE(30);
  } else {
    s = cpu->d[ry];
    d = cpu->d[rx];
    r = d-s;
    if(CHKX) r -= 1;
    cpu->d[rx] = r;
    ADD_CYCLE(8);
  }

  cpu_set_flags_subx(cpu, s&0x80000000, d&0x80000000, r&0x80000000, r);
}
Beispiel #2
0
static void cmpm_l(struct cpu *cpu, WORD op)
{
  int rx,ry;
  LONG s,d,r;
  
  rx = (op&0xe00)>>9;
  ry = op&0x7;
  
  s = bus_read_long(cpu->a[ry]);
  cpu->a[ry] += 4;
  d = bus_read_long(cpu->a[rx]);
  cpu->a[rx] += 4;
  r = d-s;
  
  ADD_CYCLE(20);
  cpu_set_flags_cmp(cpu, s&0x80000000, d&0x80000000, r&0x80000000, r);
}
Beispiel #3
0
static void unlk(struct cpu *cpu, WORD op)
{
  int r;

  ENTER;

  r = op&0x7;

  cpu->a[7] = cpu->a[r];
  cpu->a[r] = bus_read_long(cpu->a[7]);
  cpu->a[7] += 4;

  ADD_CYCLE(12);
  cpu_prefetch();
}
Beispiel #4
0
static void subi_l(struct cpu *cpu, WORD op)
{
  LONG s,d,r;
  
  s = bus_read_long(cpu->pc);
  cpu->pc += 4;
  if(op&0x38) {
    ADD_CYCLE(20);
  } else {
    ADD_CYCLE(16);
  }
  d = ea_read_long(cpu, op&0x3f, 1);
  r = d-s;
  ea_set_prefetch_before_write();
  ea_write_long(cpu, op&0x3f, r);
  cpu_set_flags_sub(cpu, s&0x80000000, d&0x80000000, r&0x80000000, r);
}