Ejemplo n.º 1
0
 public MemoryViewModel(IMemoryController memoryController)
 {
     this.memoryController = memoryController;
     memoryUseSubscription = memoryController
                             .MemoryUse
                             .Subscribe(x => Model = x);
 }
Ejemplo n.º 2
0
 public ClearMemoryCommand(IMemoryController memoryController, IList <string> args)
 {
     this.memoryController = memoryController;
     this.Arguments        = args;
 }
Ejemplo n.º 3
0
 public Instruction01(long instructionCode, IMemoryController memoryController) : base(instructionCode, memoryController)
 {
 }
Ejemplo n.º 4
0
 public CPU(IMemoryController memoryController)
 {
     this.memoryController = memoryController;
     Init();
 }
Ejemplo n.º 5
0
 public Instruction03(long instructionCode, IConsoleInput input, IMemoryController memoryController) : base(
         instructionCode, memoryController)
 {
     _input = input;
 }
Ejemplo n.º 6
0
 protected InstructionBase(long instructionCode, IMemoryController memoryController)
 {
     _memoryController = memoryController;
     Modes             = InstructionUtils.ParseParameterMode(instructionCode);
 }
Ejemplo n.º 7
0
 public Instruction09(long instructionCode, IMemoryController memoryController) : base(instructionCode,
                                                                                       memoryController)
 {
     _posBaseManager = memoryController;
 }
Ejemplo n.º 8
0
 public BasicCalculator()
 {
     this.historyController  = new HistoryController();
     this.memoryController   = new MemoryController();
     this.commandInterpreter = new CommandInterpreter(this.historyController, this.memoryController);
 }
Ejemplo n.º 9
0
 public Instruction04(long instructionCode, IConsoleOutput output, IMemoryController memoryController) :
     base(instructionCode, memoryController)
 {
     _output = output;
 }
Ejemplo n.º 10
0
        public void Load(IWorkspace workspace)
        {
            this._hooks = new List<CodeWriteHookDevice>();

            // grab a reference to some useful interfaces
            this._workspace = workspace;
            this._memController = workspace.RuntimeManager.System.MemoryController;
            this._ui = new CodeSafetyUi(this);

            workspace.BuildManager.BuildStatusChanged += new Delegates.BuildStatusChangedHandler(BuildManagerBuildStatusChanged);
            workspace.RuntimeManager.DebugInfoChanged += new Delegates.DebugInfoChangedHandler(RuntimeManagerDebugInfoChanged);
            workspace.RuntimeManager.ExecutionBreak += new Delegates.ExecutionBreakHandler(RuntimeManagerExecutionBreak);
        }
Ejemplo n.º 11
0
        public static InstructionBase GetInstruction(long[] program, long pc, IConsoleInput input, IConsoleOutput output, IMemoryController memoryController)
        {
            var             instructionCode = program[pc];
            InstructionBase instruction     = null;

            switch (ParseInstructionCode(instructionCode))
            {
            case OptCode.OptCode1:
                instruction = new Instruction01(instructionCode, memoryController);
                break;

            case OptCode.OptCode2:
                instruction = new Instruction02(instructionCode, memoryController);
                break;

            case OptCode.OptCode3:
                instruction = new Instruction03(instructionCode, input, memoryController);
                break;

            case OptCode.OptCode4:
                instruction = new Instruction04(instructionCode, output, memoryController);
                break;

            case OptCode.OptCode5:
                instruction = new Instruction05(instructionCode, memoryController);
                break;

            case OptCode.OptCode6:
                instruction = new Instruction06(instructionCode, memoryController);
                break;

            case OptCode.OptCode7:
                instruction = new Instruction07(instructionCode, memoryController);
                break;

            case OptCode.OptCode8:
                instruction = new Instruction08(instructionCode, memoryController);
                break;

            case OptCode.OptCode9:
                instruction = new Instruction09(instructionCode, memoryController);
                break;

            default:
                instruction = null;
                break;
            }
            return(instruction);
        }
Ejemplo n.º 12
0
 public CommandInterpreter(IHistoryController historyController, IMemoryController memoryController)
 {
     this.HistoryController = historyController;
     this.MemoryController  = memoryController;
 }