Index: Kernel/Core/Diagnostics.cs
===================================================================
--- Kernel/Core/Diagnostics.cs	(revision 718)
+++ Kernel/Core/Diagnostics.cs	(working copy)
@@ -11,11 +11,9 @@
 //  with Classpath Linking Exception for Libraries
 //
 
-using System;
-using System.Collections.Generic;
-using System.Text;
 using SharpOS.Kernel.Foundation;
 using SharpOS.Kernel.ADC;
+using System.Globalization;
 
 namespace SharpOS.Kernel {
 	public unsafe static class Diagnostics {
@@ -154,6 +152,91 @@
 			TextMode.RestoreAttributes ();
 		}
 
+
+    private static StringBuilder* formatDump_sb = (StringBuilder*)0; //StringBuilder.CREATE(4 * 4096);
+    private static StringBuilder* formatDump_asc = (StringBuilder*)0; //StringBuilder.CREATE(16);
+    private static StringBuilder* formatDump_tmp = (StringBuilder*)0; //StringBuilder.CREATE(1);
+    public unsafe static CString8* FormatDump(byte* buffer, int count, int bytesPerRow)
+    {
+      if (formatDump_sb==(StringBuilder*)0) formatDump_sb = StringBuilder.CREATE(4 * 4096);
+      if (formatDump_asc==(StringBuilder*)0) formatDump_asc = StringBuilder.CREATE(16);
+      if (formatDump_tmp == (StringBuilder*)0) formatDump_tmp = StringBuilder.CREATE(1);
+      formatDump_sb->Clear();
+      formatDump_asc->Clear();
+      formatDump_tmp->Clear();
+
+      // Dump memory into 3 parts : page offset, Hexa dump, ASCII dump
+      //
+      // oooo | hh hh hh hh hh hh hh hh hh hh hh hh hh hh hh hh | aaaaaaaaaaaa\n  --   11 + 4n, where n is the number of column (16)
+      //
+      for (int i = 0; i < count; i++)
+      {
+        // First byte of the line, write the offset
+        if (i % bytesPerRow == 0)
+        {
+					int offset = (int)buffer + i;
+					// sb.AppendFormat("{0:X4} | ", offset);
+          if (offset < 0x10) formatDump_sb->AppendNumber(0);
+          if (offset < 0x100) formatDump_sb->AppendNumber(0);
+          if (offset < 0x1000) formatDump_sb->AppendNumber(0);
+          if (offset < 0x10000) formatDump_sb->AppendNumber(0);
+          if (offset < 0x100000) formatDump_sb->AppendNumber(0);
+          if (offset < 0x1000000) formatDump_sb->AppendNumber(0);
+          if (offset < 0x10000000) formatDump_sb->AppendNumber(0);
+					formatDump_sb->AppendNumber (offset, true);
+          formatDump_sb->Append(" | ");
+        }
+
+        // Write the byte
+        //sb.AppendFormat("{0:X2} ", buffer[i]);
+        if (buffer[i] < 0x10) formatDump_sb->AppendNumber(0);
+        formatDump_sb->AppendNumber(buffer[i], true);
+        formatDump_sb->Append(" ");
+
+        // Append char to secondary StringBuilder if printable.Otherwise, append a dot.
+        //char c = Convert.ToChar(buffer[i]);
+        //asc.Append(CharIsPrintable(c) ? c : '.');
+        formatDump_tmp->Clear();
+        formatDump_tmp->AppendChar(buffer[i]);
+        if (buffer[i]!=0x0A && formatDump_tmp->buffer->Length > 0)
+        {
+          formatDump_asc->AppendChar(buffer[i]);
+        }
+        else
+        {
+          formatDump_asc->Append(".");
+        }
+
+        // Last byte of the line, write the ASCII equivalent
+        if (i % bytesPerRow == bytesPerRow - 1)
+        {
+          //sb.Append("| ");
+          //sb.Append(asc.ToString());
+          //sb.AppendLine();
+          //asc = new StringBuilder(bytesPerRow);
+          formatDump_sb->Append("| ");
+          formatDump_sb->Append(formatDump_asc->buffer);
+          formatDump_sb->Append("\n");
+          formatDump_asc->Clear();
+        }
+      }
+
+
+      // Last line, fill with spaces
+      if ((count - 1) % bytesPerRow != (bytesPerRow-1))
+      {
+        for (int i = 0; i < (bytesPerRow - 1) - (count - 1) % bytesPerRow; i++)
+          formatDump_sb->Append("   ");
+
+        formatDump_sb->Append("| ");
+        formatDump_sb->Append(formatDump_asc->buffer);
+        formatDump_sb->Append("\n");
+        formatDump_asc->Clear();
+      }
+
+      return formatDump_sb->buffer;
+    }
+
 		#endregion
 	}
 }
Index: Kernel/Core/Shell/Commands/BuiltIn/MemView.cs
===================================================================
--- Kernel/Core/Shell/Commands/BuiltIn/MemView.cs	(revision 0)
+++ Kernel/Core/Shell/Commands/BuiltIn/MemView.cs	(revision 0)
@@ -0,0 +1,92 @@
+// 
+// (C) 2007 The SharpOS Project Team (http://www.sharpos.org)
+//
+// Authors:
+//	Cedric Rousseau <cedrou@gmail.com>
+//
+// Licensed under the terms of the GNU GPL v3,
+//  with Classpath Linking Exception for Libraries
+//
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SharpOS.AOT.Attributes;
+using SharpOS.Kernel.Foundation;
+using SharpOS.Kernel.ADC;
+
+namespace SharpOS.Kernel.Shell.Commands.BuiltIn {
+	public unsafe static class MemView {
+		public const string name = "memview";
+		public const string shortDescription = "Display memory";
+		public const string lblExecute = "COMMANDS.memview.Execute";
+		public const string lblGetHelp = "COMMANDS.memview.GetHelp";
+
+		private static bool IsHexDigit (char c)
+		{
+			return (c >= '0' && c <= '9')
+					|| (c >= 'A' && c <= 'F')
+					|| (c >= 'a' && c <= 'f');
+		}
+
+		[Label (lblExecute)]
+		public static void Execute (CommandExecutionContext* context)
+		{
+			byte* buffer = context->parameters->Pointer;
+			int len = context->parameters->Length;
+
+			// scan parameter and convert string to hex int
+			int start = 0;
+			while (start < len && !IsHexDigit ((char)buffer [start]))
+				start++;
+			int end = start;
+			while (end < len && IsHexDigit ((char)buffer [end]))
+				end++;
+			len = end - start;
+
+			int offset = 0;
+			for (int index = start; index < end; index++)
+			{
+				offset <<= 4;
+
+				byte current = 0;
+				char digit = (char)buffer [index];
+
+				if (digit >= '0' && digit <= '9') {
+					current = (byte)(digit - '0');
+				}
+				else if (digit >= 'A' && digit <= 'F') {
+					current = (byte)(10 + digit - 'A');
+				}
+				else if (digit >= 'a' && digit <= 'f') {
+					current = (byte)(10 + digit - 'a');
+				}
+				offset |= current;
+			}
+
+			TextMode.Write(Diagnostics.FormatDump ((byte*)offset, 256, 16));
+		}
+
+		[Label (lblGetHelp)]
+		public static void GetHelp (CommandExecutionContext* context)
+		{
+			TextMode.WriteLine ("Syntax: ");
+			TextMode.WriteLine ("     memview <hex-address>");
+			TextMode.WriteLine ("");
+			TextMode.WriteLine ("Displays 256 bytes of memory at the requested address.");
+		}
+
+		public static CommandTableEntry* CREATE ()
+		{
+			CommandTableEntry* entry = (CommandTableEntry*)SharpOS.Kernel.ADC.MemoryManager.Allocate ((uint)sizeof (CommandTableEntry));
+
+			entry->name = (CString8*)SharpOS.Kernel.Stubs.CString (name);
+			entry->shortDescription = (CString8*)SharpOS.Kernel.Stubs.CString (shortDescription);
+			entry->func_Execute = (void*)SharpOS.Kernel.Stubs.GetLabelAddress (lblExecute);
+			entry->func_GetHelp = (void*)SharpOS.Kernel.Stubs.GetLabelAddress (lblGetHelp);
+			entry->nextEntry = null;
+
+			return entry;
+		}
+	}
+}
\ No newline at end of file
Index: Kernel/Core/Shell/Commands/CommandTableHeader.cs
===================================================================
--- Kernel/Core/Shell/Commands/CommandTableHeader.cs	(revision 718)
+++ Kernel/Core/Shell/Commands/CommandTableHeader.cs	(working copy)
@@ -267,6 +267,7 @@
 			header->AddEntry (BuiltIn.LS.CREATE ());
 			header->AddEntry (BuiltIn.LsPci.CREATE ());
 			header->AddEntry (BuiltIn.MemDump.CREATE ());
+			header->AddEntry (BuiltIn.MemView.CREATE ());
 			header->AddEntry (BuiltIn.Panic.CREATE ());
 			header->AddEntry (BuiltIn.Reboot.CREATE ());
 			header->AddEntry (BuiltIn.Show.CREATE ());
