public Branch execute(Processor cpu) { Reg op1 = cpu.regs[op1Index]; Reg op2 = cpu.regs[op2Index]; int bit = 1 << (op2.get16() & (16 - 1)); cpu.cf = (0 != (op1.get16() & bit)); cpu.flagStatus &= NCF; op1.set16((short) (op1.get16() & ~bit)); 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; }
public Branch execute(Processor cpu) { Reg op1 = cpu.regs[op1Index]; boolean incf = Processor.getCarryFlag( cpu.flagStatus, cpu.cf, cpu.flagOp1, cpu.flagOp2, cpu.flagResult, cpu.flagIns); cpu.flagOp1 = op1.get16(); cpu.flagOp2 = immb; cpu.flagResult = (short) (cpu.flagOp1 + cpu.flagOp2 + (incf ? 1 : 0)); op1.set16((short) cpu.flagResult); cpu.flagIns = UCodes.ADC16; cpu.flagStatus = OSZAPC; return Branch.None; }
public Branch execute(Processor cpu) { Reg op1 = cpu.regs[op1Index]; op1.set16((short) op2.get16(cpu)); return Branch.None; }
public Branch execute(Processor cpu) { Reg op1 = cpu.regs[op1Index]; Segment seg = cpu.segs[segIndex]; op1.set16((short) seg.getSelector()); return Branch.None; }