private static void JumpTo(Emulator emulator, byte lower, byte upper, bool condition) { ushort address = (ushort)((upper << 8) + lower); emulator.ProgramCounter = condition ? address : emulator.ProgramCounter; }
private static void CopyFromSourceToDestination(Emulator emulator, Register?source, Register destination) { emulator[destination] = source.HasValue ? emulator[source.Value] : emulator.GetHLMemoryValue(); }