-+
-+static void scroll(void)
-+{
-+ int i;
-+
-+ memcpy ( vidmem, vidmem + cols * 2, ( lines - 1 ) * cols * 2 );
-+ for ( i = ( lines - 1 ) * cols * 2; i < lines * cols * 2; i += 2 )
-+ vidmem[i] = ' ';
-+}
-+
-+static void putstr(const char *s)
-+{
-+ int x,y,pos;
-+ char c;
-+
-+ x = RM_SCREEN_INFO.orig_x;
-+ y = RM_SCREEN_INFO.orig_y;
-+
-+ while ( ( c = *s++ ) != '\0' ) {
-+ if ( c == '\n' ) {
-+ x = 0;
-+ if ( ++y >= lines ) {
-+ scroll();
-+ y--;
-+ }
-+ } else {
-+ vidmem [ ( x + cols * y ) * 2 ] = c;
-+ if ( ++x >= cols ) {
-+ x = 0;
-+ if ( ++y >= lines ) {
-+ scroll();
-+ y--;
-+ }
-+ }
-+ }
-+ }
-+
-+ RM_SCREEN_INFO.orig_x = x;
-+ RM_SCREEN_INFO.orig_y = y;
-+
-+ pos = (x + cols * y) * 2; /* Update cursor position */
-+ outb_p(14, vidport);
-+ outb_p(0xff & (pos >> 9), vidport+1);
-+ outb_p(15, vidport);
-+ outb_p(0xff & (pos >> 1), vidport+1);
-+}
-+