public static bool F_WAIT() { // get key ConsoleKeyInfo key = Console.ReadKey(true); char c = (char)0; // character if (key.KeyChar >= 32 && key.KeyChar < 127) { c = key.KeyChar; } // special keys if (key.Key == ConsoleKey.Enter) { c = (char)240; } if (key.Key == ConsoleKey.Backspace) { c = (char)241; } if (key.Key == ConsoleKey.LeftArrow) { c = (char)242; } if (key.Key == ConsoleKey.RightArrow) { c = (char)243; } if (key.Key == ConsoleKey.UpArrow) { c = (char)244; } if (key.Key == ConsoleKey.DownArrow) { c = (char)245; } // send data CPU.SetW((byte)c); // redraw debug text if (CPU.DebugVisible) { CPU.DrawDebug(); } CPU.StepProgramCounter(I_WAIT.Arguments + 1); return(true); }