Subversion Repositories HelenOS

Rev

Rev 3343 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3343 Rev 3665
Line 62... Line 62...
62
saved_screen saved_screens[MAX_SAVED_SCREENS];
62
saved_screen saved_screens[MAX_SAVED_SCREENS];
63
 
63
 
64
#define EGA_IO_ADDRESS 0x3d4
64
#define EGA_IO_ADDRESS 0x3d4
65
#define EGA_IO_SIZE 2
65
#define EGA_IO_SIZE 2
66
 
66
 
-
 
67
int ega_normal_color=0x0f;
-
 
68
int ega_inverted_color=0xf0;
-
 
69
 
67
#define NORMAL_COLOR       0x0f
70
#define NORMAL_COLOR        ega_normal_color       
68
#define INVERTED_COLOR     0xf0
71
#define INVERTED_COLOR      ega_inverted_color
69
 
72
 
70
#define EGA_STYLE(fg,bg) ((fg) > (bg) ? NORMAL_COLOR : INVERTED_COLOR)
73
#define EGA_STYLE(fg,bg) ((fg) > (bg) ? NORMAL_COLOR : INVERTED_COLOR)
71
 
74
 
72
/* Allow only 1 connection */
75
/* Allow only 1 connection */
73
static int client_connected = 0;
76
static int client_connected = 0;
74
 
77
 
75
static unsigned int scr_width;
78
static unsigned int scr_width;
76
static unsigned int scr_height;
79
static unsigned int scr_height;
77
static char *scr_addr;
80
static char *scr_addr;
78
 
81
 
79
static unsigned int style = NORMAL_COLOR;
82
static unsigned int style;
80
 
83
 
81
static void clrscr(void)
84
static void clrscr(void)
82
{
85
{
83
    int i;
86
    int i;
84
   
87
   
Line 310... Line 313...
310
    size_t sz;
313
    size_t sz;
311
 
314
 
312
    ega_ph_addr = (void *) sysinfo_value("fb.address.physical");
315
    ega_ph_addr = (void *) sysinfo_value("fb.address.physical");
313
    scr_width = sysinfo_value("fb.width");
316
    scr_width = sysinfo_value("fb.width");
314
    scr_height = sysinfo_value("fb.height");
317
    scr_height = sysinfo_value("fb.height");
-
 
318
    if(sysinfo_value("fb.blinking"))
-
 
319
    {
-
 
320
            ega_normal_color&=0x77;
-
 
321
            ega_inverted_color&=0x77;
-
 
322
    }
-
 
323
    style = NORMAL_COLOR;
-
 
324
 
315
    iospace_enable(task_get_id(), (void *) EGA_IO_ADDRESS, 2);
325
    iospace_enable(task_get_id(), (void *) EGA_IO_ADDRESS, 2);
316
 
326
 
317
    sz = scr_width * scr_height * 2;
327
    sz = scr_width * scr_height * 2;
318
    scr_addr = as_get_mappable_page(sz);
328
    scr_addr = as_get_mappable_page(sz);
319
 
329