// INR Increment Register or Memory
        // If register C contains 99H, the instruction: INR C will cause register C to contain 9AH
        private int INR(IByteOperandStrategy op)
        {
            var in8  = op.Read(this);
            var out8 = (byte)(in8 + 1);

            Flags = Flags
                    .Set(FlagIndex.AuxCarry, AuxCarryPredicates.calc_AC(in8, 1))
                    .calc_SZP(out8);

            op.Write(this, out8);
            return(op == OpMem ? 10 : 5);
        }
Exemple #2
0
 // MOV Move register to register
 private int MOV(IByteOperandStrategy rDest, IByteOperandStrategy rSrc)
 {
     rDest.Write(this, rSrc.Read(this));
     return(5);
 }
Exemple #3
0
 // MVI Move immediate data
 // The byte of immediate data is stored in the specified register or memory byte.
 private int MVI(IByteOperandStrategy r, byte val)
 {
     r.Write(this, val);
     return(7);
 }