Rev 2071 | Rev 3104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2439 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | chardev_t ega_console; |
64 | chardev_t ega_console; |
65 | static chardev_operations_t ega_ops = { |
65 | static chardev_operations_t ega_ops = { |
66 | .write = ega_putchar |
66 | .write = ega_putchar |
67 | }; |
67 | }; |
68 | 68 | ||
69 | void ega_move_cursor(void); |
69 | static void ega_move_cursor(void); |
70 | 70 | ||
71 | void ega_init(void) |
71 | void ega_init(void) |
72 | { |
72 | { |
73 | uint8_t hi, lo; |
73 | uint8_t hi, lo; |
74 | 74 | ||
Line 117... | Line 117... | ||
117 | memcpy((void *) videoram, (void *) (videoram + ROW * 2), (SCREEN - ROW) * 2); |
117 | memcpy((void *) videoram, (void *) (videoram + ROW * 2), (SCREEN - ROW) * 2); |
118 | memsetw((uintptr_t) (videoram + (SCREEN - ROW) * 2), ROW, 0x0720); |
118 | memsetw((uintptr_t) (videoram + (SCREEN - ROW) * 2), ROW, 0x0720); |
119 | ega_cursor = ega_cursor - ROW; |
119 | ega_cursor = ega_cursor - ROW; |
120 | } |
120 | } |
121 | 121 | ||
122 | void ega_putchar(chardev_t *d, const char ch) |
122 | void ega_putchar(chardev_t *d __attribute__((unused)), const char ch) |
123 | { |
123 | { |
124 | ipl_t ipl; |
124 | ipl_t ipl; |
125 | 125 | ||
126 | ipl = interrupts_disable(); |
126 | ipl = interrupts_disable(); |
127 | spinlock_lock(&egalock); |
127 | spinlock_lock(&egalock); |
Line 150... | Line 150... | ||
150 | } |
150 | } |
151 | 151 | ||
152 | void ega_move_cursor(void) |
152 | void ega_move_cursor(void) |
153 | { |
153 | { |
154 | outb(0x3d4, 0xe); |
154 | outb(0x3d4, 0xe); |
155 | outb(0x3d5, (ega_cursor >> 8) & 0xff); |
155 | outb(0x3d5, (uint8_t) ((ega_cursor >> 8) & 0xff)); |
156 | outb(0x3d4, 0xf); |
156 | outb(0x3d4, 0xf); |
157 | outb(0x3d5, ega_cursor & 0xff); |
157 | outb(0x3d5, (uint8_t) (ega_cursor & 0xff)); |
158 | } |
158 | } |
159 | 159 | ||
160 | /** @} |
160 | /** @} |
161 | */ |
161 | */ |