Esempio n. 1
0
File: 6510.c Progetto: trieck/source
void _cpyZp(void)
{
    byte zaddr;
    word res;

    zaddr = fetch_byte((word)(cpu.pc + 1));

    res = cpu.y - fetch_byte(zaddr);

    set_carry(res < 0x100);
    set_nz(res);

    cpu.pc += 2;
}
Esempio n. 2
0
File: 6510.c Progetto: trieck/source
void _cpyImm(void)
{
    byte value;
    word res;

    value = fetch_byte((word)(cpu.pc + 1));

    res = cpu.y - value;

    set_carry(res < 0x100);
    set_nz(res);

    cpu.pc += 2;
}
Esempio n. 3
0
File: 6510.c Progetto: trieck/source
void _cpyAbsl(void)
{
    word addr;
    word res;

    addr = fetch_word((word)(cpu.pc + 1));

    res = cpu.y - fetch_byte(addr);

    set_carry(res < 0x100);
    set_nz(res);

    cpu.pc += 3;
}
Esempio n. 4
0
File: 6510.c Progetto: trieck/source
void _cmpZpx(void)
{
    byte zaddr;
    word res;

    zaddr = fetch_byte((word)(cpu.pc + 1));
    zaddr += cpu.x;

    res = cpu.a - fetch_byte(zaddr);

    set_carry(res < 0x100);
    set_nz(res);

    cpu.pc += 2;
}
Esempio n. 5
0
File: 6510.c Progetto: trieck/source
void _cmpAby(void)
{
    word addr;
    word res;

    addr = fetch_word((word)(cpu.pc + 1));

    addr += cpu.y;

    res = cpu.a - fetch_byte(addr);

    set_carry(res < 0x100);
    set_nz(res);

    cpu.pc += 3;
}
Esempio n. 6
0
void		op_xor(t_vm *vm, t_proc **lproc)
{
  int	param1;
  int	param2;
  int	indice;

  indice = 0;
  debug(vm, lproc, -1);
  param1 = return_param_op(lproc, &indice, vm, 6);
  param2 = return_param_op(lproc, &indice, vm, 4);
  if ((*lproc)->cmd[indice - 1] < 0)
    (*lproc)->cmd[indice] = 1;
  if (vm->option[0].debug != -1)
    print_debug((param1 ^ param2), "result : ", 0);
  set_carry(lproc, (param1 ^ param2));
  (*lproc)->pc += interval_memory((*lproc)->cmd, (*lproc)->code, 0, 0);
}
Esempio n. 7
0
File: 6510.c Progetto: trieck/source
void _cmpIdy(void)
{
    byte zaddr;
    word addr;
    word res;

    zaddr = fetch_byte((word)(cpu.pc + 1));

    addr = fetch_word(zaddr) + cpu.y;

    res = cpu.a - fetch_byte(addr);

    set_carry(res < 0x100);
    set_nz(res);

    cpu.pc += 2;
}