Index: console/console.c
===================================================================
--- console/console.c	(revision 0f09bd45eb2e13210528158205dc92b518277346)
+++ console/console.c	(revision 7284260f34a3e21e6aab1faacd84d631c65c6709)
@@ -244,5 +244,4 @@
 
 	set_style(&conn->screenbuffer.style);
-	curs_goto(conn->screenbuffer.position_y, conn->screenbuffer.position_x);
 	curs_visibility(0);
 	if (interbuffer) {
@@ -272,4 +271,5 @@
 	}
 	
+	curs_goto(conn->screenbuffer.position_y, conn->screenbuffer.position_x);
 	curs_visibility(conn->screenbuffer.is_cursor_visible);
 }
Index: console/screenbuffer.h
===================================================================
--- console/screenbuffer.h	(revision 0f09bd45eb2e13210528158205dc92b518277346)
+++ console/screenbuffer.h	(revision 7284260f34a3e21e6aab1faacd84d631c65c6709)
@@ -31,6 +31,6 @@
 
 
-#define DEFAULT_FOREGROUND 0xffff00	/**< default console foreground color */
-#define DEFAULT_BACKGROUND 0x000080	/**< default console background color */
+#define DEFAULT_FOREGROUND 0x0	/**< default console foreground color */
+#define DEFAULT_BACKGROUND 0xf0f0f0	/**< default console background color */
 
 typedef struct {
Index: fb/fb.c
===================================================================
--- fb/fb.c	(revision 0f09bd45eb2e13210528158205dc92b518277346)
+++ fb/fb.c	(revision 7284260f34a3e21e6aab1faacd84d631c65c6709)
@@ -48,6 +48,6 @@
 #include "ppm.h"
 
-#define DEFAULT_BGCOLOR                0x000080
-#define DEFAULT_FGCOLOR                0xffff00
+#define DEFAULT_BGCOLOR                0xf0f0f0
+#define DEFAULT_FGCOLOR                0x0
 
 /***************************************************************/
Index: fb/sysio.c
===================================================================
--- fb/sysio.c	(revision 0f09bd45eb2e13210528158205dc92b518277346)
+++ fb/sysio.c	(revision 7284260f34a3e21e6aab1faacd84d631c65c6709)
@@ -37,4 +37,7 @@
 
 #include "sysio.h"
+
+#define WIDTH 80
+#define HEIGHT 25
 
 /* Allow only 1 connection */
@@ -80,4 +83,17 @@
 }
 
+static void scroll(int i)
+{
+	if (i > 0) {
+		curs_goto(HEIGHT-1, 0);
+		while (i--)
+			sysputs("\033D");
+	} else if (i < 0) {
+		curs_goto(0,0);
+		while (i++)
+			sysputs("\033M");
+	}
+}
+
 /** ANSI terminal emulation main thread */
 static void sysio_client_connection(ipc_callid_t iid, ipc_call_t *icall)
@@ -91,4 +107,5 @@
 	int newcol,newrow;
 	int fgcolor,bgcolor;
+	int i;
 
 	if (client_connected) {
@@ -120,7 +137,9 @@
 			newcol = IPC_GET_ARG2(call);
 			curs_goto(newrow, newcol);
+			lastrow = newrow;
+			lastcol = newcol;
 			break;
 		case FB_GET_CSIZE:
-			ipc_answer_fast(callid, 0, 25, 80);
+			ipc_answer_fast(callid, 0, HEIGHT, WIDTH);
 			continue;
 		case FB_CLEAR:
@@ -131,5 +150,7 @@
 			fgcolor = IPC_GET_ARG1(call);
 			bgcolor = IPC_GET_ARG2(call);
-			if (fgcolor > bgcolor)
+			if (bgcolor == 0xf0f0f0)
+				set_style(0);
+			else if (fgcolor > bgcolor)
 				set_style(0);
 			else
@@ -137,4 +158,15 @@
 			retval = 0;
 			break;
+		case FB_SCROLL:
+			i = IPC_GET_ARG1(call);
+			if (i > HEIGHT || i < -HEIGHT) {
+				retval = EINVAL;
+				break;
+			}
+			scroll(i);
+			curs_goto(lastrow, lastcol);
+			retval = 0;
+			break;
+
 		default:
 			retval = ENOENT;
@@ -150,3 +182,5 @@
 	clrscr();
 	curs_goto(0,0);
+	/* Set scrolling region to 0-25 lines */
+	sysputs("\033[0;25r");
 }
