private void ModRm(Func <ushort, uint, uint> function, ModRmExecutor executor, bool rmFirst = true, bool useResult = true) { _decoder.Decode(_ip); executor.Execute(function, rmFirst, useResult); _ip += _decoder.IpShift; }
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); }