/// <inheritdoc/> public override void PerformAction( IParsedInstruction instruction, IEmulatedMemory memory, IProcessorState state, IALU alu) { ushort addressA = (ushort)state.Registers[instruction.Register1]; ushort addressB = (ushort)state.Registers[instruction.Register2]; byte a = 0; byte b = 0; for (ushort i = 0; i < instruction.Immediate; i++) { a = (byte)memory.GetValue(0, (ushort)(addressA + i)); b = (byte)memory.GetValue(0, (ushort)(addressB + i)); if (a != b) { break; } } state.High = a > b; state.Equal = a == b; state.Low = !state.High; }
/// <inheritdoc/> public long GetData(IParsedInstruction instruction, IEmulatedMemory memory, IProcessorState state, IALU alu) { return((long)memory.GetValue(instruction.Width, instruction.Address)); }
/// <inheritdoc/> public long GetData(IParsedInstruction instruction, IEmulatedMemory memory, IProcessorState state, IALU alu) { return((long)memory.GetValue(instruction.Width, (ushort)state.Registers[instruction.Register1])); }