33 |
static int herc_highlight_color = A_REVERSE; |
static int herc_highlight_color = A_REVERSE; |
34 |
static int herc_current_color = A_NORMAL; |
static int herc_current_color = A_NORMAL; |
35 |
static color_state herc_color_state = COLOR_STATE_STANDARD; |
static color_state herc_color_state = COLOR_STATE_STANDARD; |
36 |
|
static int herc_cursor_state = 1; |
37 |
|
|
38 |
/* Write a byte to a port. */ |
/* Write a byte to a port. */ |
39 |
static inline void |
static inline void |
58 |
outb (0x80, 0); |
outb (0x80, 0); |
59 |
} |
} |
60 |
|
|
|
static void |
|
|
herc_turn_cursor (int state) |
|
|
{ |
|
|
outb (HERCULES_INDEX_REG, 0x0a); |
|
|
outb (0x80, 0); |
|
|
outb (HERCULES_DATA_REG, state ? 0 : (1 << 5)); |
|
|
outb (0x80, 0); |
|
|
} |
|
|
|
|
61 |
void |
void |
62 |
hercules_putchar (int c) |
hercules_putchar (int c) |
63 |
{ |
{ |
123 |
|
|
124 |
herc_x = herc_y = 0; |
herc_x = herc_y = 0; |
125 |
herc_set_cursor (); |
herc_set_cursor (); |
|
herc_turn_cursor (1); |
|
126 |
} |
} |
127 |
|
|
128 |
int |
int |
169 |
hercules_setcolorstate (herc_color_state); |
hercules_setcolorstate (herc_color_state); |
170 |
} |
} |
171 |
|
|
172 |
void |
int |
173 |
hercules_nocursor (void) |
hercules_setcursor (int on) |
174 |
{ |
{ |
175 |
herc_turn_cursor (0); |
int old_state = herc_cursor_state; |
176 |
|
|
177 |
|
outb (HERCULES_INDEX_REG, 0x0a); |
178 |
|
outb (0x80, 0); |
179 |
|
outb (HERCULES_DATA_REG, on ? 0 : (1 << 5)); |
180 |
|
outb (0x80, 0); |
181 |
|
herc_cursor_state = on; |
182 |
|
|
183 |
|
return old_state; |
184 |
} |
} |
185 |
|
|
186 |
#endif /* SUPPORT_HERCULES */ |
#endif /* SUPPORT_HERCULES */ |