Beispiel #1
0
 /// <summary>
 /// Constructs the object using the specifyed custom Data storage and I/O device
 /// objects.
 /// </summary>
 /// <param name="data">The Data object that stores memory and registers</param>
 /// <param name="ioDevice">The I/O device to be used by the I/O instructions</param>
 public VirtualMachine(Data data, IIODevice ioDevice)
 {
     Data         = data;
     Processor    = new Processor(Data, ioDevice);
     Disassembler = new Disassembler(Data);
 }
Beispiel #2
0
 /// <summary>
 /// Constructs the object using the I/O Device and
 /// Data object with specified History size.
 /// </summary>
 /// <param name="historySize">History size for Data object.</param>
 public VirtualMachine(int historySize)
 {
     Data         = new Data(historySize);
     Processor    = new Processor(Data, new ConsoleIODevice());
     Disassembler = new Disassembler(Data);
 }
Beispiel #3
0
 /// <summary>
 /// Constructs the object using the specifyed custom Data storage and I/O device
 /// objects.
 /// </summary>
 /// <param name="data">The Data object that stores memory and registers</param>
 /// <param name="ioDevice">The I/O device to be used by the I/O instructions</param>
 public VirtualMachine(Data data, IIODevice ioDevice)
 {
     Data = data;
     Processor = new Processor(Data, ioDevice);
     Disassembler = new Disassembler(Data);
 }
Beispiel #4
0
 public VirtualMachine(ushort[] givenInput, ushort[] expectedOutput)
 {
     Data         = new Data(0);
     Processor    = new Processor(Data, new TestingIODevice(givenInput, expectedOutput));
     Disassembler = new Disassembler(Data);
 }
Beispiel #5
0
 /// <summary>
 /// Constructs the object using the I/O Device and
 /// Data object with specified History size.
 /// </summary>
 /// <param name="historySize">History size for Data object.</param>
 public VirtualMachine(int historySize)
 {
     Data = new Data(historySize);
     Processor = new Processor(Data, new ConsoleIODevice());
     Disassembler = new Disassembler(Data);
 }