Пример #1
0
        private void DecodeAddr(int entryPoint)
        {
            ecl_offset = entryPoint;
            stopVM     = false;

            while (stopVM == false)
            {
                int command = ecl_ptr[ecl_offset + MemBase];

                int    addr = ecl_offset;
                string txt  = string.Format("0x{0:X4} 0x{1:X2} ", addr, command);

                CmdItem cmd;
                if (CommandTable.TryGetValue(command, out cmd))
                {
                    bool lastSkip = skipNext;

                    currentAddr = addr;
                    txt        += string.Format("{0} {1}", cmd.Name(), cmd.Dump());

                    if (lastSkip)
                    {
                        skipNext = false;
                        lastSkip = false;
                    }
                }
                else
                {
                    txt += "Unknown command";
                    break;
                }

                if (stopVM)
                {
                    txt += "\n\r";
                }

                AddLine(addr, txt, (ecl_offset - addr) & 0xFFFF);
            }
        }