Ejemplo n.º 1
0
        public object Disassemble(uint pc, string name = "")
        {
            try
            {
                if (DisassemblableCore == null)
                {
                    throw new NotImplementedException();
                }

                MemoryDomain domain = MemoryDomains.SystemBus;

                if (!string.IsNullOrEmpty(name))
                {
                    domain = MemoryDomains[name];
                }

                int l;
                var d = DisassemblableCore.Disassemble(domain, pc, out l);
                return(new { disasm = d, length = l });
            }
            catch (NotImplementedException)
            {
                Console.WriteLine($"Error: {Emulator.Attributes().CoreName} does not yet implement {nameof(IDisassemblable.Disassemble)}()");
                return(null);
            }
        }
Ejemplo n.º 2
0
        public object Disassemble(uint pc, string name = "")
        {
            try
            {
                if (DisassemblableCore == null)
                {
                    throw new NotImplementedException();
                }

                int          l;
                MemoryDomain domain = MemoryDomains.SystemBus;

                if (!string.IsNullOrEmpty(name))
                {
                    domain = MemoryDomains[name];
                }

                var d = DisassemblableCore.Disassemble(domain, pc, out l);
                return(new { disasm = d, length = l });
            }
            catch (NotImplementedException)
            {
                Log(string.Format(
                        "Error: {0} does not yet implement disassemble()",
                        Emulator.Attributes().CoreName));
                return(null);
            }
        }
Ejemplo n.º 3
0
        private string Disassemble(uint address, string domainName = "")
        {
            if (DisassemblableCore == null)
            {
                throw new ApiError($"{Emulator.Attributes().CoreName} does not yet implement disassembly");
            }

            var d = DisassemblableCore.Disassemble(Domain(domainName), address, out int byteLength);

            return($"{d}\t({byteLength} bytes)");
        }
Ejemplo n.º 4
0
 public object Disassemble(uint pc, string name = "")
 {
     try
     {
         if (DisassemblableCore != null)
         {
             return(new {
                 disasm = DisassemblableCore.Disassemble(
                     string.IsNullOrEmpty(name) ? MemoryDomains.SystemBus : MemoryDomains[name],
                     pc,
                     out var l
                     ),
                 length = l
             });
         }