示例#1
0
 public void loadProgram(Stream input, DWord programBase)
 {
     if (input.GetType() == typeof(MemoryStream))
     {
         MemoryController.StoreProgram((MemoryStream)input, programBase);
     }
     else
     {
         using (var ms = new MemoryStream()) {
             input.CopyTo(ms);
             MemoryController.StoreProgram(ms, programBase);
         }
     }
     Cpu.Reg.Pc = MemoryController.ProgramBase;
 }