public static void Main() { try { ApplicationRuntime.Init(); //var result = MessageManager.Send(SysCallTarget.ServiceFunc1, 55); SysCalls.WriteDebugChar('='); SysCalls.WriteDebugChar('/'); SysCalls.WriteDebugChar('*'); var conStream = File.Open("/dev/console"); var con = new ConsoleClient(conStream); con.Reset(); con.SetForegroundColor(7); con.SetBackgroundColor(0); con.ApplyDefaultColor(); con.Clear(); con.SetCursor(0, 0); con.Write("kl\n"); //for (int i = 0; i < ApplicationRuntime.ElfSections.Count; i++) // con.WriteLine(ApplicationRuntime.ElfSections[i].Name); var cmdProcId_CreateFifo = SysCalls.GetProcessIDForCommand(SysCallTarget.CreateFifo); var buf3 = SysCalls.RequestMessageBuffer(4096, cmdProcId_CreateFifo); SysCalls.CreateFifo(buf3, "/tmp/tmp_fifo"); #pragma warning disable CA2000 // Dispose objects before losing scope var kbStream2 = File.Open("/tmp/tmp_fifo"); #pragma warning restore CA2000 // Dispose objects before losing scope using (var kbStream = File.Open("/dev/keyboard")) { while (true) { SysCalls.ThreadSleep(0); var num = kbStream.ReadByte(); if (num >= 0) { var key = (byte)num; // F8 if (key == 0x42) { StartProc("CHELLO.BIN"); continue; } // F9 if (key == 0x43) { StartProc("DSPSRV.BIN"); continue; } // F10 if (key == 0x44) { StartProc("GUIDEMO.BIN"); continue; } var s = key.ToString("x"); //for (var i = 0; i < s.Length; i++) // SysCalls.WriteDebugChar(s[i]); //SysCalls.WriteDebugChar(' '); for (var i = 0; i < s.Length; i++) { con.Write(s[i]); kbStream2.WriteByte(64); } con.Write(' '); } //SysCalls.WriteDebugChar('?'); } } } catch (Exception ex) { Console.WriteLine(ex.Message); } }