Changeset 2034

Show
Ignore:
Timestamp:
04/02/09 21:35:21 (3 years ago)
Author:
mwhitworth
Message:

Scroll the screen of earlyconsole (soon, video/console.c may not be loaded at startup).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/trunk/video/earlyconsole.c

    r1750 r2034  
    22#include <typedefs.h> 
    33#include <print.h> 
     4#include <string.h> 
    45 
    56BYTE* screen=(BYTE*)0xC00B8000; 
     
    1011void EarlyConsoleNewLine() 
    1112{ 
     13        int i; 
     14         
    1215        curY++; 
    1316        curX=0; 
     
    1619                EarlyConsoleSetPos(curX, curY); 
    1720        else{ 
    18 //              EarlyConsoleClearScreen(); 
    19 //              curX=curY=0; 
     21                /* Scroll the screen. */ 
     22                for (i=0; i < 24 ; i++) 
     23                        memcpy ( &screen [ i*80*2] , &screen [ (i+1)*80*2 ] , 80*2); 
     24                         
     25                /* Clear the last line of the console. */ 
     26                memsetw( &screen[ i*80*2 ] , 80*2, ((0x07 << 8) | (' '))); 
     27                 
     28                curY = 24; 
    2029        } 
    2130}