public MQRelay(ITeleprinter teleprinter) { this.teleprinter = teleprinter; publisherSocket = new PublisherSocket(); subscriberSocket = new SubscriberSocket(); publisherThread = new Thread(Publish) { IsBackground = true }; subscriberThread = new Thread(Subscribe) { IsBackground = true }; }
public Processor(IMemory memory, IRegisters registers, ITeleprinter teleprinter) { Memory = memory ?? throw new ArgumentNullException(nameof(memory)); Teleprinter = teleprinter ?? throw new ArgumentNullException(nameof(teleprinter)); Registers = registers ?? throw new ArgumentNullException(nameof(registers)); Interrupts = new Interrupts(registers, memory, teleprinter); group1Instructions = new Group1Instructions(this); group3Instructions = new Group3Instructions(this); memoryReferenceInstructions = new MemoryReferenceInstructions(this); noOperationInstruction = new NoOperationInstruction(this); group2ANDInstructions = new Group2ANDInstructions(this); group2ORInstructions = new Group2ORInstructions(this); memoryManagementInstructions = new MemoryManagementInstructions(this); keyboardInstructions = new KeyboardInstructions(this); teleprinterInstructions = new TeleprinterInstructions(this); interruptInstructions = new InterruptInstructions(this); privilegedNoOperationInstruction = new PrivilegedNoOperationInstruction(this); }
public Interrupts(IRegisters registers, IMemory memory, ITeleprinter teleprinter) { this.registers = registers; this.memory = memory; this.teleprinter = teleprinter; }