コード例 #1
0
ファイル: btr_Ed_Gd.java プロジェクト: agimat/JPC
 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
ファイル: add_Gd_Ed.java プロジェクト: agimat/JPC
 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;
 }
コード例 #3
0
ファイル: sbb_Ed_Gd.java プロジェクト: agimat/JPC
 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
ファイル: test_Ed_Id.java プロジェクト: agimat/JPC
 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;
 }