diff options
Diffstat (limited to 'arch/x86/io')
| -rw-r--r-- | arch/x86/io/VGADisplay.cpp | 10 | ||||
| -rw-r--r-- | arch/x86/io/VGADisplay.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/io/VGADisplay.cpp b/arch/x86/io/VGADisplay.cpp index ceb4862..5075351 100644 --- a/arch/x86/io/VGADisplay.cpp +++ b/arch/x86/io/VGADisplay.cpp @@ -1,4 +1,5 @@ #include "VGADisplay.h" +#include "VGADisplayInfo.h" VGADisplay out::display; @@ -137,3 +138,12 @@ bool VGADisplay::printChar(const char &c) } } }; + +void VGADisplay::clearScreen() +{ + xCurr = yCurr = 0; + videoMem = (dchar *)VGADisplayInfo::videoMemAddr; + uint16 maxPos = VGADisplayInfo::height * VGADisplayInfo::width * 2; + + for(uint16 pos = 0; pos < maxPos; pos++) *this << ' '; +}; diff --git a/arch/x86/io/VGADisplay.h b/arch/x86/io/VGADisplay.h index 326ae95..98c2250 100644 --- a/arch/x86/io/VGADisplay.h +++ b/arch/x86/io/VGADisplay.h @@ -35,6 +35,8 @@ class VGADisplay void setColor(char colorAttr); void setBlink(bool blinkAttr); void setBright(bool brigthAttr); + // Rewrite + void clearScreen(); }; // Global variables |
