Example #1
0
        public override string ToString()
        {
            if (IMCInstruction.AsmTextPrint)
            {
                string itr = $"{OpCodesInfo.GetOpName(UnitConverter.ByteToBinary(OpCode, defaultWidth: 5))}";

                if (Ra >= 0 && Ra <= 7)
                {
                    itr += $" R{Ra}";
                }

                if (Rb >= 0 && Rb <= 7)
                {
                    itr += $" R{Rb}";
                }

                if (Rc >= 0 && Rc <= 7)
                {
                    itr += $" R{Rc}";
                }

                return(itr);
            }
            return($"MCInstructionF1[InstructionAddressDecimal: (decimal)'{InstructionAddressDecimal}', opcode:'{OpCode}', Ra:'{Ra}', Rb:'{Rb}', Rc:'{Rc}']");
        }
Example #2
0
 public override string ToString()
 {
     if (IMCInstruction.AsmTextPrint)
     {
         return($"{OpCodesInfo.GetOpName(UnitConverter.ByteToBinary(OpCode, defaultWidth: 5))} {AddressParamHex}");
     }
     return($"MCInstructionF3[InstructionAddressDecimal: (decimal)'{InstructionAddressDecimal}', opcode:'{OpCode}', AddressParamHex:'{AddressParamHex}']");
 }
Example #3
0
        public override string ToString()
        {
            if (IMCInstruction.AsmTextPrint)
            {
                if (OpCodesInfo.GetOpName(UnitConverter.ByteToBinary(OpCode, defaultWidth: 5)).ToLower().Equals("return"))
                {
                    return("RETURN");
                }

                string itr = $"{OpCodesInfo.GetOpName(UnitConverter.ByteToBinary(OpCode, defaultWidth: 5))}";

                if (Ra >= 0 && Ra <= 7)
                {
                    itr += $" R{Ra}";
                }

                return(itr);
            }

            return($"MCInstructionF2[InstructionAddressDecimal: (decimal)'{InstructionAddressDecimal}', opcode:'{OpCode}', Ra:'{Ra}', AddressParamHex:'{AddressParamHex}']");
        }