Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   Reg op2 = cpu.regs[op2Index];
   cpu.flagOp1 = op1.get32();
   cpu.flagOp2 = op2.get32();
   cpu.flagResult = (cpu.flagOp1 + cpu.flagOp2);
   op1.set32(cpu.flagResult);
   cpu.flagIns = UCodes.ADD32;
   cpu.flagStatus = OSZAPC;
   return Branch.None;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   cpu.of = cpu.af = cpu.cf = false;
   cpu.flagResult = (op1.get32() & immd);
   cpu.flagStatus = SZP;
   return Branch.None;
 }