Changeset 5d9d9a9 in mainline
- Timestamp:
- 2009-03-02T13:58:09Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a212307
- Parents:
- 2e079b70
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/ega/ega.c
r2e079b70 r5d9d9a9 61 61 static ioport8_t *ega_base; 62 62 63 #define EMPTY_CHAR 0x0720 64 63 65 chardev_t ega_console; 64 66 … … 70 72 if (ega_cursor < EGA_SCREEN) 71 73 return; 72 74 73 75 memmove((void *) videoram, (void *) (videoram + EGA_COLS * 2), 74 76 (EGA_SCREEN - EGA_COLS) * 2); 75 77 memmove((void *) backbuf, (void *) (backbuf + EGA_COLS * 2), 76 78 (EGA_SCREEN - EGA_COLS) * 2); 77 memsetw(videoram + (EGA_SCREEN - EGA_COLS) * 2, EGA_COLS, 0x0720);78 memsetw(backbuf + (EGA_SCREEN - EGA_COLS) * 2, EGA_COLS, 0x0720);79 memsetw(videoram + (EGA_SCREEN - EGA_COLS) * 2, EGA_COLS, EMPTY_CHAR); 80 memsetw(backbuf + (EGA_SCREEN - EGA_COLS) * 2, EGA_COLS, EMPTY_CHAR); 79 81 ega_cursor = ega_cursor - EGA_COLS; 80 82 } … … 104 106 105 107 ega_cursor = (hi << 8) | lo; 108 109 if (ega_cursor >= EGA_SCREEN) 110 ega_cursor = 0; 111 106 112 if ((ega_cursor % EGA_COLS) != 0) 107 113 ega_cursor = (ega_cursor + EGA_COLS) - ega_cursor % EGA_COLS; 114 115 memsetw(videoram + ega_cursor * 2, EGA_SCREEN - ega_cursor, EMPTY_CHAR); 116 memsetw(backbuf + ega_cursor * 2, EGA_SCREEN - ega_cursor, EMPTY_CHAR); 108 117 109 118 ega_check_cursor(); … … 120 129 } 121 130 122 static void ega_putchar(chardev_t *d __attribute__((unused)), const char ch, bool silent)131 static void ega_putchar(chardev_t *dev __attribute__((unused)), const char ch, bool silent) 123 132 { 124 133 ipl_t ipl;
Note:
See TracChangeset
for help on using the changeset viewer.