示例#1
0
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   cpu.of = cpu.af = cpu.cf = false;
   cpu.flagResult = (byte) (op1.get8() ^ op2.get8(cpu));
   op1.set8((byte) cpu.flagResult);
   cpu.flagStatus = SZP;
   return Branch.None;
 }
示例#2
0
文件: add_Eb_Gb.java 项目: agimat/JPC
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   Reg op2 = cpu.regs[op2Index];
   cpu.flagOp1 = (byte) op1.get8();
   cpu.flagOp2 = (byte) op2.get8();
   cpu.flagResult = (byte) (cpu.flagOp1 + cpu.flagOp2);
   op1.set8((byte) cpu.flagResult);
   cpu.flagIns = UCodes.ADD8;
   cpu.flagStatus = OSZAPC;
   return Branch.None;
 }
示例#3
0
文件: adc_Gb_Eb.java 项目: agimat/JPC
 public Branch execute(Processor cpu) {
   Reg op1 = cpu.regs[op1Index];
   Reg op2 = cpu.regs[op2Index];
   boolean incf = cpu.cf();
   cpu.flagOp1 = op1.get8();
   cpu.flagOp2 = op2.get8();
   cpu.flagResult = (byte) (cpu.flagOp1 + cpu.flagOp2 + (incf ? 1 : 0));
   op1.set8((byte) cpu.flagResult);
   cpu.flagIns = UCodes.ADC8;
   cpu.flagStatus = OSZAPC;
   return Branch.None;
 }