public VirtualMachine(string fileName) { memory = new Memory(Memory.VIRTUAL_MEMORY_BLOCK_COUNT, Memory.BLOCK_WORD_COUNT); this.task = new TaskLoader(fileName, memory); task.Load(); cpu = new Cpu(memory, this); io = new IO(); BlockOffset += Memory.VIRTUAL_MEMORY_BLOCK_COUNT; this.MapBlocks(); VMTaskFinished += ReduceOffset; }