Esempio n. 1
0
 public DisplayInstructionBase(ushort word, ushort address, DisplayProcessorMode mode)
 {
     _usageMode = mode;
     _word      = word;
     _address   = address;
     Decode();
 }
Esempio n. 2
0
            public override string Disassemble(DisplayProcessorMode mode, Memory mem, out int length)
            {
                if (mode == DisplayProcessorMode.Indeterminate)
                {
                    mode = _usageMode;
                }

                switch (mode)
                {
                case DisplayProcessorMode.Increment:
                    length = 1;
                    return(DisassembleIncrement());

                case DisplayProcessorMode.Processor:
                    return(DisassembleProcessor(mem, out length));

                case DisplayProcessorMode.CompactAddressing:
                    length = 1;
                    return(DisassembleCompactAddressing());

                case DisplayProcessorMode.Indeterminate:
                    length = 1;
                    return("Indeterminate");

                default:
                    throw new InvalidOperationException(String.Format("{0} is not a supported disassembly mode for this processor.", mode));
                }
            }
Esempio n. 3
0
        private PDS4DisplayInstruction GetCachedInstruction(ushort address, DisplayProcessorMode mode)
        {
            if (_instructionCache[address & Memory.SizeMask] == null)
            {
                _instructionCache[address & Memory.SizeMask] = new PDS4DisplayInstruction(_mem.Fetch(address), mode);
            }

            return(_instructionCache[address & Memory.SizeMask]);
        }
Esempio n. 4
0
            public DisplayInstruction(ushort word, DisplayProcessorMode mode)
            {
                _usageMode = mode;
                _word      = word;

                if (mode == DisplayProcessorMode.Processor)
                {
                    Decode();
                }
                else
                {
                    DecodeImmediate();
                }
            }
Esempio n. 5
0
 public override string Disassemble(ushort address, DisplayProcessorMode mode)
 {
     //
     // Return a precached instruction if we have it due to previous execution
     // otherwise disassemble it now in the requested mode; this disassembly
     // does not get added to the cache.
     //
     if (_instructionCache[address & Memory.SizeMask] != null)
     {
         return(_instructionCache[address & Memory.SizeMask].Disassemble(mode));
     }
     else
     {
         return(new PDS4DisplayInstruction((ushort)(address & Memory.SizeMask), mode).Disassemble(mode));
     }
 }
Esempio n. 6
0
            public override string Disassemble(DisplayProcessorMode mode)
            {
                if (mode == DisplayProcessorMode.Indeterminate)
                {
                    mode = _usageMode;
                }

                switch (mode)
                {
                case DisplayProcessorMode.Increment:
                    return(DisassembleIncrement());

                case DisplayProcessorMode.Processor:
                    return(DisassembleProcessor());

                case DisplayProcessorMode.Indeterminate:
                    return("Indeterminate");

                default:
                    throw new InvalidOperationException(String.Format("{0} is not a supported disassembly mode for this processor.", mode));
                }
            }
Esempio n. 7
0
            public string Disassemble(DisplayProcessorMode mode)
            {
                if (mode == DisplayProcessorMode.Indeterminate)
                {
                    mode = _usageMode;
                }

                switch (mode)
                {
                case DisplayProcessorMode.Increment:
                    return(DisassembleIncrement());

                case DisplayProcessorMode.Processor:
                    return(DisassembleProcessor());

                case DisplayProcessorMode.Indeterminate:
                    return("Indeterminate");

                default:
                    throw new InvalidOperationException();
                }
            }
Esempio n. 8
0
 public PDS4DisplayInstruction(ushort word, DisplayProcessorMode mode) : base(word, mode)
 {
 }
Esempio n. 9
0
 /// <summary>
 /// Implementors provide a disassembly string representing this instruction.
 /// </summary>
 /// <param name="mode"></param>
 /// <returns></returns>
 public abstract string Disassemble(DisplayProcessorMode mode, Memory mem, out int length);
Esempio n. 10
0
 public abstract string Disassemble(ushort address, DisplayProcessorMode mode, out int length);
Esempio n. 11
0
 /// <summary>
 /// Implementors provide a disassembly string representing this instruction.
 /// </summary>
 /// <param name="mode"></param>
 /// <returns></returns>
 public abstract string Disassemble(DisplayProcessorMode mode);
Esempio n. 12
0
 public abstract string Disassemble(ushort address, DisplayProcessorMode mode);
Esempio n. 13
0
 public PDS1DisplayInstruction(ushort word, ushort address, DisplayProcessorMode mode) : base(word, address, mode)
 {
 }