Пример #1
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   Reg op2 = cpu.regs[op2Index];
   int bit = 1 << (op2.get32() & (32 - 1));
   cpu.cf = (0 != (op1.get32() & bit));
   cpu.flagStatus &= NCF;
   op1.set32((op1.get32() & ~bit));
   return Branch.None;
 }
Пример #2
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   cpu.flagOp1 = op1.get32();
   cpu.flagOp2 = op2.get32(cpu);
   cpu.flagResult = (cpu.flagOp1 - cpu.flagOp2);
   op1.set32(cpu.flagResult);
   cpu.flagIns = UCodes.SUB32;
   cpu.flagStatus = OSZAPC;
   return Branch.None;
 }
Пример #3
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   Reg op2 = cpu.regs[op2Index];
   int add = (cpu.cf() ? 1 : 0);
   cpu.flagOp1 = op1.get32();
   cpu.flagOp2 = op2.get32();
   cpu.flagResult = (cpu.flagOp1 - (cpu.flagOp2 + add));
   op1.set32(cpu.flagResult);
   cpu.flagIns = UCodes.SBB32;
   cpu.flagStatus = OSZAPC;
   return Branch.None;
 }
Пример #4
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   int tmp = op2.get32(cpu);
   if (!cpu.sf()) op1.set32(tmp);
   return Branch.None;
 }