Пример #1
0
 public ModRmExecutor(Registers regs, FlagsRegister flags, byte[] mem, ModRMDecoder dec)
 {
     registers     = regs;
     flagsRegister = flags;
     memory        = mem;
     decoder       = dec;
 }
Пример #2
0
 public InterpretCpu(byte[] mem)
 {
     _memory            = mem;
     registers          = new Registers();
     IntHandlers        = new Dictionary <byte, Action>();
     flagsRegister      = new FlagsRegister();
     stack              = new Stack(registers, _memory);
     _decoder           = new ModRMDecoder(_memory, registers);
     executor8          = new ModRmExecutor8(registers, flagsRegister, _memory, _decoder);
     executor16         = new ModRmExecutor16(registers, flagsRegister, _memory, _decoder);
     executorSegment    = new ModRmExecutorSegment(registers, flagsRegister, _memory, _decoder);
     executorSegment32b = new ModRmExecutorSegment32b(registers, flagsRegister, _memory, _decoder);
 }