예제 #1
0
 public RealMachine()
 {
     this.memory        = new Memory(Constants.BLOCKS_AMOUNT, Constants.BLOCK_SIZE);
     this.eval          = new Eval();
     this.virtualMemory = new VirtualMemory(eval.registers.PTR, memory);
     handles.add(new ConsoleDevice());
     loadProgramsToStorage();
     addProgramFromFile("inf.prog");
     addProgramFromFile("battery.prog");
     addProgramFromFile("battery2.prog");
     addProgramFromFile("inf.prog");
 }
예제 #2
0
 public KernelStorage()
 {
     processes     = new ProcessList();
     resources     = new ResourceList(processes);
     memory        = new Memory(Constants.BLOCKS_AMOUNT, Constants.BLOCK_SIZE);
     handles       = new HandleStorage();
     virtualHdd    = new Storage("main.bin", 65535);
     codeStorage   = new Storage("code.bin", 65535);
     channelDevice = new ChannelDevice();
     virtualMemory = new VirtualMemory(Constants.PTR, this.memory);
     handles.add(new ConsoleDevice());
     loadProgramsToStorage();
 }