diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-06-30 20:45:37 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-06-30 20:45:37 +0200 |
commit | 25228d8927af801667d4be2ea85ee517d1916fc7 (patch) | |
tree | aa5932cfec8b95acdf978e459c9850d1b4a11678 /src/kernel/vgatext.c | |
parent | c1bbac52d78b2e3e93fa43a5a7b3907073493216 (diff) | |
download | abaos-25228d8927af801667d4be2ea85ee517d1916fc7.tar.gz abaos-25228d8927af801667d4be2ea85ee517d1916fc7.tar.bz2 |
almost got a complete mode switch (vga graphics back to text) working
some cleanup in VGA driver code
Diffstat (limited to 'src/kernel/vgatext.c')
-rw-r--r-- | src/kernel/vgatext.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/kernel/vgatext.c b/src/kernel/vgatext.c index 76bfd46..232d91a 100644 --- a/src/kernel/vgatext.c +++ b/src/kernel/vgatext.c @@ -262,3 +262,16 @@ void vga_text_hide_mouse_cursor( vga_text_t *vga_text ) } } +void vga_text_save( vga_text_t *vga_text ) +{ + volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xA0000; + + memcpy( vga_text->buf, VIDEO_MEMORY, 2*65535 ); +} + +void vga_text_restore( vga_text_t *vga_text ) +{ + volatile uint8_t *VIDEO_MEMORY = (uint8_t *)0xA0000; + + memcpy( VIDEO_MEMORY, vga_text->buf, 2*65535 ); +} |