Hi Guys,

                In qemu add -serial file:log.txt.

Index: Kernel/Core/ADC/TextMode.cs
===================================================================
--- Kernel/Core/ADC/TextMode.cs       (revision 457)
+++ Kernel/Core/ADC/TextMode.cs       (working copy)
@@ -222,7 +222,10 @@
               public static void Write (string message)
               {
                       for (int i = 0; i < message.Length; i++)
-                              WriteChar ((byte) message [i]);
+                      {
+                              WriteChar((byte)message[i]);
+                              Serial.PutChar((byte)message[i]);
+                      }
               }
         public static void Write(string message, int value)
         {
@@ -254,18 +257,33 @@
               }

               /// <summary>
+              /// Writes an Bool to the screen as true or false
+              /// </summary>
+              /// <param name="value"></param>
+              public static void Write(bool value)
+              {
+                      if (value)
+                              Write("true");
+                      else
+                              Write("false");
+              }
+
+              static byte* buffer = Kernel.StaticAlloc(32);
+              /// <summary>
               /// Writes an Int32 to the screen, either in decimal or
               /// hexadecimal format.
               /// </summary>
               public unsafe static void Write (int value, bool hex)
               {
-                      byte* buffer = stackalloc byte [32];
                       int length;

                       length = Convert.ToString (value, hex, buffer, 32, 0);

                       for (int x = 0; x < length; ++x)
-                              WriteChar (buffer [x]);
+                      {
+                              WriteChar(buffer[x]);
+                              Serial.PutChar(buffer[x]);
+                      }
               }

               #endregion
@@ -277,6 +295,8 @@
               public unsafe static void WriteLine ()
               {
                       WriteChar ((byte) '\n');
+                      Serial.PutChar((byte)'\r');
+                      Serial.PutChar((byte)'\n');
               }

               /// <summary>


Kveðja/Regards
   Ásgeir Halldórsson
   E.C. Software

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers

Reply via email to