public DisplayInstructionBase(ushort word, ushort address, DisplayProcessorMode mode) { _usageMode = mode; _word = word; _address = address; Decode(); }
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)); } }
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]); }
public DisplayInstruction(ushort word, DisplayProcessorMode mode) { _usageMode = mode; _word = word; if (mode == DisplayProcessorMode.Processor) { Decode(); } else { DecodeImmediate(); } }
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)); } }
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)); } }
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(); } }
public PDS4DisplayInstruction(ushort word, DisplayProcessorMode mode) : base(word, mode) { }
/// <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);
public abstract string Disassemble(ushort address, DisplayProcessorMode mode, out int length);
/// <summary> /// Implementors provide a disassembly string representing this instruction. /// </summary> /// <param name="mode"></param> /// <returns></returns> public abstract string Disassemble(DisplayProcessorMode mode);
public abstract string Disassemble(ushort address, DisplayProcessorMode mode);
public PDS1DisplayInstruction(ushort word, ushort address, DisplayProcessorMode mode) : base(word, address, mode) { }