public Branch execute(Processor cpu) { Reg op1 = cpu.regs[op1Index]; Reg op2 = cpu.regs[op2Index]; cpu.zf(cpu.zf()); cpu.cf(((op1.get16() & (1 << (op2.get16() & (16 - 1)))) != 0)); return Branch.None; }
public Branch execute(Processor cpu) { Reg op1 = cpu.regs[op1Index]; if (op2.get16(cpu) == 0) { cpu.zf(true); } else { cpu.zf(false); op1.set16(31 - StaticOpcodes.numberOfLeadingZeros(0xFFFF & op2.get16(cpu))); } return Branch.None; }