public VirtualMachine(Memory memory)
{
Registers = new short[16];
Memory = memory;
devices = new List<Device>();
deviceInHandlers = new Dictionary<short, Func<short>>();
deviceOutHandlers = new Dictionary<short, Action<short>>();
instruction = new Instruction(this);
}