Changeset 9a63657 in mainline
- Timestamp:
- 2008-12-27T11:29:11Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 24a44ec
- Parents:
- ac48fef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/drivers/ega.c
rac48fef r9a63657 39 39 #include <mm/page.h> 40 40 #include <mm/as.h> 41 #include <mm/slab.h> 41 42 #include <arch/mm/page.h> 42 43 #include <synch/spinlock.h> … … 59 60 static uint32_t ega_cursor; 60 61 static uint8_t *videoram; 62 static uint8_t *backbuf; 61 63 62 64 static void ega_putchar(chardev_t *d, const char ch); … … 72 74 { 73 75 uint8_t hi, lo; 76 77 backbuf = (uint8_t *) malloc(SCREEN * 2, 0); 78 if (!backbuf) 79 panic("Unable to allocate backbuffer.\n"); 74 80 75 81 videoram = (uint8_t *) hw_map(VIDEORAM, SCREEN * 2); … … 99 105 { 100 106 videoram[ega_cursor * 2] = ch; 107 backbuf[ega_cursor * 2] = ch; 101 108 } 102 109 … … 109 116 return; 110 117 111 memcpy((void *) videoram, (void *) (videoram + ROW * 2), (SCREEN - ROW) * 2); 118 memmove((void *) videoram, (void *) (videoram + ROW * 2), (SCREEN - ROW) * 2); 119 memmove((void *) backbuf, (void *) (backbuf + ROW * 2), (SCREEN - ROW) * 2); 112 120 memsetw(videoram + (SCREEN - ROW) * 2, ROW, 0x0720); 121 memsetw(backbuf + (SCREEN - ROW) * 2, ROW, 0x0720); 113 122 ega_cursor = ega_cursor - ROW; 114 123 } … … 152 161 } 153 162 163 void ega_redraw(void) 164 { 165 memcpy(videoram, backbuf, SCREEN * 2); 166 ega_move_cursor(); 167 } 168 154 169 /** @} 155 170 */
Note:
See TracChangeset
for help on using the changeset viewer.